1 |
/* |
/* |
2 |
* JSampler - a java front-end for LinuxSampler |
* JSampler - a java front-end for LinuxSampler |
3 |
* |
* |
4 |
* Copyright (C) 2005-2008 Grigor Iliev <grigor@grigoriliev.com> |
* Copyright (C) 2005-2011 Grigor Iliev <grigor@grigoriliev.com> |
5 |
* |
* |
6 |
* This file is part of JSampler. |
* This file is part of JSampler. |
7 |
* |
* |
152 |
public final static String SOCKET_READ_TIMEOUT = "socketReadTimeout"; |
public final static String SOCKET_READ_TIMEOUT = "socketReadTimeout"; |
153 |
|
|
154 |
|
|
155 |
|
/** Property representing the maximum number of lines to be kept in the command history. */ |
156 |
|
public final static String LS_CONSOLE_HISTSIZE = "LSConsole.historySize"; |
157 |
|
|
158 |
|
/** Property which specifies whether the command history should be saved on exit. */ |
159 |
|
public final static String SAVE_LS_CONSOLE_HISTORY = "LSConsole.saveCommandHistory"; |
160 |
|
|
161 |
|
/** Property representing the background color of the LS Console. */ |
162 |
|
public final static String LS_CONSOLE_BACKGROUND_COLOR = "LSConsole.backgroundColor"; |
163 |
|
|
164 |
|
/** Property representing the text color of the LS Console. */ |
165 |
|
public final static String LS_CONSOLE_TEXT_COLOR = "LSConsole.textColor"; |
166 |
|
|
167 |
|
/** Property representing the notification messages' color of the LS Console. */ |
168 |
|
public final static String LS_CONSOLE_NOTIFY_COLOR = "LSConsole.notifyColor"; |
169 |
|
|
170 |
|
/** Property representing the warning messages' color of the LS Console. */ |
171 |
|
public final static String LS_CONSOLE_WARNING_COLOR = "LSConsole.warningColor"; |
172 |
|
|
173 |
|
/** Property representing the error messages' color of the LS Console. */ |
174 |
|
public final static String LS_CONSOLE_ERROR_COLOR = "LSConsole.errorColor"; |
175 |
|
|
176 |
|
/** Property representing the list of recent LSCP scripts. */ |
177 |
|
public final static String RECENT_LSCP_SCRIPTS = "recentLscpScripts"; |
178 |
|
|
179 |
|
/** Property representing the maximum number of recent LSCP scripts to be stored. */ |
180 |
|
public final static String RECENT_LSCP_SCRIPTS_SIZE = "recentLscpScripts.maxNumber"; |
181 |
|
|
182 |
|
/** Property which specifies whether the LS Console should be shown when script is run. */ |
183 |
|
public final static String SHOW_LS_CONSOLE_WHEN_RUN_SCRIPT = "showLSConsoleWhenRunScript"; |
184 |
|
|
185 |
|
/** Property representing the maximum master volume (in percents). */ |
186 |
|
public final static String MAXIMUM_MASTER_VOLUME = "maximumMasterVolume"; |
187 |
|
|
188 |
|
/** Property representing the maximum channel volume (in percents). */ |
189 |
|
public final static String MAXIMUM_CHANNEL_VOLUME = "maximumChannelVolume"; |
190 |
|
|
191 |
|
/** Property which specifies whether the user should confirm channel removals. */ |
192 |
|
public final static String CONFIRM_CHANNEL_REMOVAL = "confirmChannelRemoval"; |
193 |
|
|
194 |
|
/** Property which specifies whether the user should confirm audio/MIDI device removals. */ |
195 |
|
public final static String CONFIRM_DEVICE_REMOVAL = "confirmDeviceRemoval"; |
196 |
|
|
197 |
|
/** Property which specifies whether the user should confirm quiting. */ |
198 |
|
public final static String CONFIRM_APP_QUIT = "confirmAppQuit"; |
199 |
|
|
200 |
|
/** Property which specifies the sort order in the instruments database frame. */ |
201 |
|
public final static String INSTRUMENTS_DB_FRAME_SORT_ORDER = "instrumentsDbFrameSortOrder"; |
202 |
|
|
203 |
|
/** Property representing the channel view to be used when creating a sampler channel. */ |
204 |
|
public final static String DEFAULT_CHANNEL_VIEW = "defaultChannelView"; |
205 |
|
|
206 |
|
/** |
207 |
|
* Property which specifies whether a different sampler channel view should be shown |
208 |
|
* when the mouse cursor is over a sampler channel. |
209 |
|
*/ |
210 |
|
public final static String DIFFERENT_CHANNEL_VIEW_ON_MOUSE_OVER = "differentChannelViewOnMO"; |
211 |
|
|
212 |
|
/** |
213 |
|
* Property representing the channel view to be used when |
214 |
|
* the mouse cursor is over a sampler channel. |
215 |
|
*/ |
216 |
|
public final static String CHANNEL_VIEW_ON_MOUSE_OVER = "channelViewOnMouseOver"; |
217 |
|
|
218 |
|
|
219 |
private final String pathName; |
private final String pathName; |
220 |
private final Preferences userPrefs; |
private final Preferences userPrefs; |
221 |
|
|
283 |
public String |
public String |
284 |
getDefaultStringValue(String name) { |
getDefaultStringValue(String name) { |
285 |
if(BACKEND_LAUNCH_COMMAND.equals(name)) return "linuxsampler"; |
if(BACKEND_LAUNCH_COMMAND.equals(name)) return "linuxsampler"; |
286 |
|
if(RECENT_LSCP_SCRIPTS.equals(name)) return ""; |
287 |
|
if(DEFAULT_ENGINE.equals(name)) return "GIG"; |
288 |
|
if(DEFAULT_MIDI_INPUT.equals(name)) return "firstDeviceNextChannel"; |
289 |
|
if(DEFAULT_AUDIO_OUTPUT.equals(name)) return "firstDevice"; |
290 |
|
if(DEFAULT_MIDI_DRIVER.equals(name)) return "ALSA"; |
291 |
|
if(DEFAULT_AUDIO_DRIVER.equals(name)) return "ALSA"; |
292 |
|
if(DEFAULT_MIDI_INSTRUMENT_MAP.equals(name)) return "midiInstrumentMap.none"; |
293 |
|
|
294 |
return null; |
return null; |
295 |
} |
} |
296 |
|
|
403 |
if(FIRST_MIDI_BANK_NUMBER.equals(name)) return 1; |
if(FIRST_MIDI_BANK_NUMBER.equals(name)) return 1; |
404 |
if(FIRST_MIDI_PROGRAM_NUMBER.equals(name)) return 1; |
if(FIRST_MIDI_PROGRAM_NUMBER.equals(name)) return 1; |
405 |
if(BACKEND_LAUNCH_DELAY.equals(name)) return 3; |
if(BACKEND_LAUNCH_DELAY.equals(name)) return 3; |
406 |
|
if(DEFAULT_CHANNEL_VOLUME.equals(name)) return 100; |
407 |
|
if(LS_CONSOLE_HISTSIZE.equals(name)) return 1000; |
408 |
|
if(RECENT_LSCP_SCRIPTS_SIZE.equals(name)) return 7; |
409 |
|
if(MAXIMUM_MASTER_VOLUME.equals(name)) return 100; |
410 |
|
if(MAXIMUM_CHANNEL_VOLUME.equals(name)) return 100; |
411 |
|
if(INSTRUMENTS_DB_FRAME_SORT_ORDER.equals(name)) return 1; |
412 |
|
if(DEFAULT_CHANNEL_VIEW.equals(name)) return 1; |
413 |
|
if(CHANNEL_VIEW_ON_MOUSE_OVER.equals(name)) return 1; |
414 |
|
|
415 |
return 0; |
return 0; |
416 |
} |
} |
417 |
|
|
474 |
if(EXPORT_MIDI_MAPS_TO_SESSION_SCRIPT.equals(name)) return true; |
if(EXPORT_MIDI_MAPS_TO_SESSION_SCRIPT.equals(name)) return true; |
475 |
if(LOAD_MIDI_INSTRUMENTS_IN_BACKGROUND.equals(name)) return true; |
if(LOAD_MIDI_INSTRUMENTS_IN_BACKGROUND.equals(name)) return true; |
476 |
if(LAUNCH_BACKEND_LOCALLY.equals(name)) return true; |
if(LAUNCH_BACKEND_LOCALLY.equals(name)) return true; |
477 |
|
if(DIFFERENT_CHANNEL_VIEW_ON_MOUSE_OVER.equals(name)) return true; |
478 |
|
if(CONFIRM_CHANNEL_REMOVAL.equals(name)) return true; |
479 |
|
if(CONFIRM_DEVICE_REMOVAL.equals(name)) return true; |
480 |
|
if(CONFIRM_APP_QUIT.equals(name)) return true; |
481 |
|
if(SAVE_LS_CONSOLE_HISTORY.equals(name)) return true; |
482 |
|
if(USE_CHANNEL_DEFAULTS.equals(name)) return true; |
483 |
|
if("nativeFileChoosers".equals(name) && CC.isMacOS()) return true; |
484 |
|
|
485 |
return false; |
return false; |
486 |
} |
} |
487 |
} |
} |