136 |
scheduleTask(Task t) { |
scheduleTask(Task t) { |
137 |
while(getTaskQueue().removeTask(t)) { } |
while(getTaskQueue().removeTask(t)) { } |
138 |
|
|
|
if(getTaskQueue().getPendingTaskCount() == 0) { |
|
|
if(t.equals(getTaskQueue().getRunningTask())) return; |
|
|
} |
|
|
|
|
139 |
getTaskQueue().add(t); |
getTaskQueue().add(t); |
140 |
} |
} |
141 |
|
|
400 |
*/ |
*/ |
401 |
public static InstrumentsDbTreeModel |
public static InstrumentsDbTreeModel |
402 |
getInstrumentsDbTreeModel() { |
getInstrumentsDbTreeModel() { |
403 |
|
if(CC.getSamplerModel().getServerInfo() == null) return null; |
404 |
if(!CC.getSamplerModel().getServerInfo().hasInstrumentsDbSupport()) return null; |
if(!CC.getSamplerModel().getServerInfo().hasInstrumentsDbSupport()) return null; |
405 |
|
|
406 |
if(instrumentsDbTreeModel == null) { |
if(instrumentsDbTreeModel == null) { |
421 |
idtmListeners.remove(l); |
idtmListeners.remove(l); |
422 |
} |
} |
423 |
|
|
424 |
|
private static final LostFilesModel lostFilesModel = new LostFilesModel(); |
425 |
|
|
426 |
|
public static LostFilesModel |
427 |
|
getLostFilesModel() { return lostFilesModel; } |
428 |
|
|
429 |
/** |
/** |
430 |
* Loads the orchestras described in <code><jsampler_home>/orchestras.xml</code>. |
* Loads the orchestras described in <code><jsampler_home>/orchestras.xml</code>. |
431 |
* If file with name <code>orchestras.xml.bkp</code> exist in the JSampler's home |
* If file with name <code>orchestras.xml.bkp</code> exist in the JSampler's home |
915 |
sb.append("\r\n"); |
sb.append("\r\n"); |
916 |
} |
} |
917 |
|
|
918 |
|
exportInstrMapsToLscpScript(lscpClient); |
919 |
|
sb.append(out.toString()); |
920 |
|
out.reset(); |
921 |
|
sb.append("\r\n"); |
922 |
|
|
923 |
SamplerChannelModel[] channels = getSamplerModel().getChannels(); |
SamplerChannelModel[] channels = getSamplerModel().getChannels(); |
924 |
|
|
925 |
for(int i = 0; i < channels.length; i++) { |
for(int i = 0; i < channels.length; i++) { |
937 |
sb.append("\r\n"); |
sb.append("\r\n"); |
938 |
} |
} |
939 |
|
|
|
exportInstrMapsToLscpScript(lscpClient); |
|
|
sb.append(out.toString()); |
|
|
out.reset(); |
|
|
|
|
940 |
return sb.toString(); |
return sb.toString(); |
941 |
} |
} |
942 |
|
|
1003 |
if(chn.getEngine() != null) { |
if(chn.getEngine() != null) { |
1004 |
lscpCLient.loadSamplerEngine(chn.getEngine().getName(), chnId); |
lscpCLient.loadSamplerEngine(chn.getEngine().getName(), chnId); |
1005 |
lscpCLient.setChannelVolume(chnId, chn.getVolume()); |
lscpCLient.setChannelVolume(chnId, chn.getVolume()); |
1006 |
|
int mapId = chn.getMidiInstrumentMapId(); |
1007 |
|
lscpCLient.setChannelMidiInstrumentMap(chnId, mapId); |
1008 |
} |
} |
1009 |
|
|
1010 |
id = chn.getAudioOutputDevice(); |
id = chn.getAudioOutputDevice(); |
1208 |
/** Invoked when the number of MIDI instruments in a MIDI instrument map is changed. */ |
/** Invoked when the number of MIDI instruments in a MIDI instrument map is changed. */ |
1209 |
public void |
public void |
1210 |
instrumentCountChanged(MidiInstrumentCountEvent e) { |
instrumentCountChanged(MidiInstrumentCountEvent e) { |
1211 |
getTaskQueue().add(new Midi.UpdateInstruments(e.getMapId())); |
scheduleTask(new Midi.UpdateInstruments(e.getMapId())); |
1212 |
} |
} |
1213 |
|
|
1214 |
/** Invoked when a MIDI instrument in a MIDI instrument map is changed. */ |
/** Invoked when a MIDI instrument in a MIDI instrument map is changed. */ |