24 |
|
|
25 |
import java.util.Vector; |
import java.util.Vector; |
26 |
|
|
27 |
import javax.swing.SwingUtilities; |
import net.sf.juife.PDUtils; |
|
|
|
28 |
import net.sf.juife.Task; |
import net.sf.juife.Task; |
29 |
import net.sf.juife.event.TaskEvent; |
import net.sf.juife.event.TaskEvent; |
30 |
import net.sf.juife.event.TaskListener; |
import net.sf.juife.event.TaskListener; |
89 |
* Registers the specified listener for receiving event messages. |
* Registers the specified listener for receiving event messages. |
90 |
* @param l The <code>SamplerChannelListener</code> to register. |
* @param l The <code>SamplerChannelListener</code> to register. |
91 |
*/ |
*/ |
92 |
|
@Override |
93 |
public void |
public void |
94 |
addSamplerChannelListener(SamplerChannelListener l) { listeners.add(l); } |
addSamplerChannelListener(SamplerChannelListener l) { listeners.add(l); } |
95 |
|
|
97 |
* Removes the specified listener. |
* Removes the specified listener. |
98 |
* @param l The <code>SamplerChannelListener</code> to remove. |
* @param l The <code>SamplerChannelListener</code> to remove. |
99 |
*/ |
*/ |
100 |
|
@Override |
101 |
public void |
public void |
102 |
removeSamplerChannelListener(SamplerChannelListener l) { listeners.remove(l); } |
removeSamplerChannelListener(SamplerChannelListener l) { listeners.remove(l); } |
103 |
|
|
105 |
* Registers the specified listener for receiving event messages. |
* Registers the specified listener for receiving event messages. |
106 |
* @param l The <code>EffectSendsListener</code> to register. |
* @param l The <code>EffectSendsListener</code> to register. |
107 |
*/ |
*/ |
108 |
|
@Override |
109 |
public void |
public void |
110 |
addEffectSendsListener(EffectSendsListener l) { fxListeners.add(l); } |
addEffectSendsListener(EffectSendsListener l) { fxListeners.add(l); } |
111 |
|
|
113 |
* Removes the specified listener. |
* Removes the specified listener. |
114 |
* @param l The <code>EffectSendsListener</code> to remove. |
* @param l The <code>EffectSendsListener</code> to remove. |
115 |
*/ |
*/ |
116 |
|
@Override |
117 |
public void |
public void |
118 |
removeEffectSendsListener(EffectSendsListener l) { fxListeners.remove(l); } |
removeEffectSendsListener(EffectSendsListener l) { fxListeners.remove(l); } |
119 |
|
|
122 |
* MIDI events are sent to the channel. |
* MIDI events are sent to the channel. |
123 |
* @param l The <code>MidiDataListener</code> to register. |
* @param l The <code>MidiDataListener</code> to register. |
124 |
*/ |
*/ |
125 |
|
@Override |
126 |
public void |
public void |
127 |
addMidiDataListener(MidiDataListener l) { midiListeners.add(l); } |
addMidiDataListener(MidiDataListener l) { midiListeners.add(l); } |
128 |
|
|
130 |
* Removes the specified listener. |
* Removes the specified listener. |
131 |
* @param l The <code>MidiDataListener</code> to remove. |
* @param l The <code>MidiDataListener</code> to remove. |
132 |
*/ |
*/ |
133 |
|
@Override |
134 |
public void |
public void |
135 |
removeMidiDataListener(MidiDataListener l) { midiListeners.remove(l); } |
removeMidiDataListener(MidiDataListener l) { midiListeners.remove(l); } |
136 |
|
|
138 |
* Gets the sampler channel number. |
* Gets the sampler channel number. |
139 |
* @return The sampler channel number or -1 if the sampler channel number is not set. |
* @return The sampler channel number or -1 if the sampler channel number is not set. |
140 |
*/ |
*/ |
141 |
|
@Override |
142 |
public int |
public int |
143 |
getChannelId() { return channel == null ? -1 : channel.getChannelId(); } |
getChannelId() { return channel == null ? -1 : channel.getChannelId(); } |
144 |
|
|
147 |
* @return <code>SamplerChannel</code> instance containing |
* @return <code>SamplerChannel</code> instance containing |
148 |
* the current settings of the sampler channel. |
* the current settings of the sampler channel. |
149 |
*/ |
*/ |
150 |
|
@Override |
151 |
public SamplerChannel |
public SamplerChannel |
152 |
getChannelInfo() { return channel; } |
getChannelInfo() { return channel; } |
153 |
|
|
159 |
* the new settings for this sampler channel. |
* the new settings for this sampler channel. |
160 |
* @throws IllegalArgumentException If <code>channel</code> is <code>null</code>. |
* @throws IllegalArgumentException If <code>channel</code> is <code>null</code>. |
161 |
*/ |
*/ |
162 |
|
@Override |
163 |
public void |
public void |
164 |
setChannelInfo(SamplerChannel channel) { |
setChannelInfo(SamplerChannel channel) { |
165 |
if(channel == null) throw new IllegalArgumentException("channel must be non null"); |
if(channel == null) throw new IllegalArgumentException("channel must be non null"); |
173 |
* Gets the number of active disk streams. |
* Gets the number of active disk streams. |
174 |
* @return The number of active disk streams. |
* @return The number of active disk streams. |
175 |
*/ |
*/ |
176 |
|
@Override |
177 |
public int |
public int |
178 |
getStreamCount() { return streamCount; } |
getStreamCount() { return streamCount; } |
179 |
|
|
183 |
* of active disk streams on the backend side. |
* of active disk streams on the backend side. |
184 |
* @param count The new number of active disk streams. |
* @param count The new number of active disk streams. |
185 |
*/ |
*/ |
186 |
|
@Override |
187 |
public void |
public void |
188 |
setStreamCount(int count) { |
setStreamCount(int count) { |
189 |
if(streamCount == count) return; |
if(streamCount == count) return; |
196 |
* Gets the number of active voices. |
* Gets the number of active voices. |
197 |
* @return The number of active voices. |
* @return The number of active voices. |
198 |
*/ |
*/ |
199 |
|
@Override |
200 |
public int |
public int |
201 |
getVoiceCount() { return voiceCount; } |
getVoiceCount() { return voiceCount; } |
202 |
|
|
206 |
* of active voices on the backend side. |
* of active voices on the backend side. |
207 |
* @param count The new number of active voices. |
* @param count The new number of active voices. |
208 |
*/ |
*/ |
209 |
|
@Override |
210 |
public void |
public void |
211 |
setVoiceCount(int count) { |
setVoiceCount(int count) { |
212 |
if(voiceCount == count) return; |
if(voiceCount == count) return; |
219 |
* Schedules a new task for setting the sampler engine type to be used. |
* Schedules a new task for setting the sampler engine type to be used. |
220 |
* @param engine The name of the engine type to be used. |
* @param engine The name of the engine type to be used. |
221 |
*/ |
*/ |
222 |
|
@Override |
223 |
public void |
public void |
224 |
setBackendEngineType(String engine) { |
setBackendEngineType(String engine) { |
225 |
final LoadEngine loadEngine = new LoadEngine(engine, getChannelId()); |
final LoadEngine loadEngine = new LoadEngine(engine, getChannelId()); |
246 |
* @param mute Specifies the mute mode. If <code>true</code> the channel is muted, else |
* @param mute Specifies the mute mode. If <code>true</code> the channel is muted, else |
247 |
* the channel is unmuted. |
* the channel is unmuted. |
248 |
*/ |
*/ |
249 |
|
@Override |
250 |
public void |
public void |
251 |
setBackendMute(boolean mute) { |
setBackendMute(boolean mute) { |
252 |
final SetMute smc = new SetMute(getChannelId(), mute); |
final SetMute smc = new SetMute(getChannelId(), mute); |
273 |
* @param solo Specifies the solo mode. If <code>true</code> the channel is soloed, else |
* @param solo Specifies the solo mode. If <code>true</code> the channel is soloed, else |
274 |
* the channel is unsoloed. |
* the channel is unsoloed. |
275 |
*/ |
*/ |
276 |
|
@Override |
277 |
public void |
public void |
278 |
setBackendSolo(boolean solo) { |
setBackendSolo(boolean solo) { |
279 |
final SetSolo ssc = new SetSolo(getChannelId(), solo); |
final SetSolo ssc = new SetSolo(getChannelId(), solo); |
299 |
* Schedules a new task for setting the channel volume on the backend side. |
* Schedules a new task for setting the channel volume on the backend side. |
300 |
* @param volume Specifies the new volume value. |
* @param volume Specifies the new volume value. |
301 |
*/ |
*/ |
302 |
|
@Override |
303 |
public void |
public void |
304 |
setBackendVolume(float volume) { |
setBackendVolume(float volume) { |
305 |
final SetVolume scv = new SetVolume(getChannelId(), volume); |
final SetVolume scv = new SetVolume(getChannelId(), volume); |
326 |
* device of the channel represented by this model. |
* device of the channel represented by this model. |
327 |
* @param deviceId Specifies the numerical ID of the MIDI input device to be set. |
* @param deviceId Specifies the numerical ID of the MIDI input device to be set. |
328 |
*/ |
*/ |
329 |
|
@Override |
330 |
public void |
public void |
331 |
setBackendMidiInputDevice(int deviceId) { |
setBackendMidiInputDevice(int deviceId) { |
332 |
final Task scmid = new SetMidiInputDevice(getChannelId(), deviceId); |
final Task scmid = new SetMidiInputDevice(getChannelId(), deviceId); |
353 |
* MIDI input port of the channel represented by this model. |
* MIDI input port of the channel represented by this model. |
354 |
* @param port Specifies the number of the MIDI input port. |
* @param port Specifies the number of the MIDI input port. |
355 |
*/ |
*/ |
356 |
|
@Override |
357 |
public void |
public void |
358 |
setBackendMidiInputPort(int port) { |
setBackendMidiInputPort(int port) { |
359 |
final Task scmip = new SetMidiInputPort(getChannelId(), port); |
final Task scmip = new SetMidiInputPort(getChannelId(), port); |
381 |
* @param channel Specifies the MIDI channel that the channel |
* @param channel Specifies the MIDI channel that the channel |
382 |
* represented by this model should listen to. |
* represented by this model should listen to. |
383 |
*/ |
*/ |
384 |
|
@Override |
385 |
public void |
public void |
386 |
setBackendMidiInputChannel(int channel) { |
setBackendMidiInputChannel(int channel) { |
387 |
final Task scmic = new SetMidiInputChannel(getChannelId(), channel); |
final Task scmic = new SetMidiInputChannel(getChannelId(), channel); |
408 |
* device of the channel represented by this model. |
* device of the channel represented by this model. |
409 |
* @param deviceId Specifies the numerical ID of the audio output device to be set. |
* @param deviceId Specifies the numerical ID of the audio output device to be set. |
410 |
*/ |
*/ |
411 |
|
@Override |
412 |
public void |
public void |
413 |
setBackendAudioOutputDevice(int deviceId) { |
setBackendAudioOutputDevice(int deviceId) { |
414 |
final Task scaod = new Channel.SetAudioOutputDevice(getChannelId(), deviceId); |
final Task scaod = new Channel.SetAudioOutputDevice(getChannelId(), deviceId); |
437 |
* @param audioDst The audio channel of the selected audio output device |
* @param audioDst The audio channel of the selected audio output device |
438 |
* where <code>audioSrc</code> should be routed to. |
* where <code>audioSrc</code> should be routed to. |
439 |
*/ |
*/ |
440 |
|
@Override |
441 |
public void |
public void |
442 |
setBackendAudioOutputChannel(int audioSrc, int audioDst) { |
setBackendAudioOutputChannel(int audioSrc, int audioDst) { |
443 |
final Task t; |
final Task t; |
465 |
* map that should be assigned to this sampler |
* map that should be assigned to this sampler |
466 |
* channel or <code>-1</code> to remove the current map binding. |
* channel or <code>-1</code> to remove the current map binding. |
467 |
*/ |
*/ |
468 |
|
@Override |
469 |
public void |
public void |
470 |
setBackendMidiInstrumentMap(int mapId) { |
setBackendMidiInstrumentMap(int mapId) { |
471 |
final Task t = new Channel.SetMidiInstrumentMap(getChannelId(), mapId); |
final Task t = new Channel.SetMidiInstrumentMap(getChannelId(), mapId); |
491 |
* @param filename The file name of the instrument to be loaded. |
* @param filename The file name of the instrument to be loaded. |
492 |
* @param InstrIndex The index of the instrument in the instrument file to be loaded. |
* @param InstrIndex The index of the instrument in the instrument file to be loaded. |
493 |
*/ |
*/ |
494 |
|
@Override |
495 |
public void |
public void |
496 |
loadBackendInstrument(String filename, int InstrIndex) { |
loadBackendInstrument(String filename, int InstrIndex) { |
497 |
final Task li = new LoadInstrument(filename, InstrIndex, getChannelId()); |
final Task li = new LoadInstrument(filename, InstrIndex, getChannelId()); |
501 |
} |
} |
502 |
|
|
503 |
/** Schedules a new task for reseting the channel. */ |
/** Schedules a new task for reseting the channel. */ |
504 |
|
@Override |
505 |
public void |
public void |
506 |
resetBackendChannel() { |
resetBackendChannel() { |
507 |
CC.getTaskQueue().add(new org.jsampler.task.Channel.Reset(getChannelId())); |
CC.getTaskQueue().add(new org.jsampler.task.Channel.Reset(getChannelId())); |
510 |
} |
} |
511 |
|
|
512 |
/** Schedules a new task for duplicating the channel. */ |
/** Schedules a new task for duplicating the channel. */ |
513 |
|
@Override |
514 |
public void |
public void |
515 |
duplicateBackendChannel() { |
duplicateBackendChannel() { |
516 |
CC.getTaskQueue().add(new DuplicateChannels(getChannelInfo())); |
CC.getTaskQueue().add(new DuplicateChannels(getChannelInfo())); |
523 |
* @param midiCtrl Defines the MIDI controller, which |
* @param midiCtrl Defines the MIDI controller, which |
524 |
* will be able alter the effect send level. |
* will be able alter the effect send level. |
525 |
*/ |
*/ |
526 |
|
@Override |
527 |
public void |
public void |
528 |
addBackendFxSend(int midiCtrl) { |
addBackendFxSend(int midiCtrl) { |
529 |
CC.getTaskQueue().add(new Channel.AddFxSend(getChannelId(), midiCtrl)); |
CC.getTaskQueue().add(new Channel.AddFxSend(getChannelId(), midiCtrl)); |
539 |
* @param name The name of the effect send entity. |
* @param name The name of the effect send entity. |
540 |
* The name does not have to be unique. |
* The name does not have to be unique. |
541 |
*/ |
*/ |
542 |
|
@Override |
543 |
public void |
public void |
544 |
addBackendFxSend(int midiCtrl, String name) { |
addBackendFxSend(int midiCtrl, String name) { |
545 |
CC.getTaskQueue().add(new Channel.AddFxSend(getChannelId(), midiCtrl, name)); |
CC.getTaskQueue().add(new Channel.AddFxSend(getChannelId(), midiCtrl, name)); |
550 |
* Adds the specified effect send. |
* Adds the specified effect send. |
551 |
* @param fxSend The effect send to be added. |
* @param fxSend The effect send to be added. |
552 |
*/ |
*/ |
553 |
|
@Override |
554 |
public void |
public void |
555 |
addFxSend(FxSend fxSend) { |
addFxSend(FxSend fxSend) { |
556 |
fxSends.add(fxSend); |
fxSends.add(fxSend); |
561 |
* Schedules a new task for removing the specified effect send on the backend side. |
* Schedules a new task for removing the specified effect send on the backend side. |
562 |
* @param fxSendId The ID of the effect send to remove. |
* @param fxSendId The ID of the effect send to remove. |
563 |
*/ |
*/ |
564 |
|
@Override |
565 |
public void |
public void |
566 |
removeBackendFxSend(int fxSendId) { |
removeBackendFxSend(int fxSendId) { |
567 |
CC.getTaskQueue().add(new Channel.RemoveFxSend(getChannelId(), fxSendId)); |
CC.getTaskQueue().add(new Channel.RemoveFxSend(getChannelId(), fxSendId)); |
572 |
* @param index The index of the effect send to be returned. |
* @param index The index of the effect send to be returned. |
573 |
* @return The effect send at the specified position. |
* @return The effect send at the specified position. |
574 |
*/ |
*/ |
575 |
|
@Override |
576 |
public FxSend |
public FxSend |
577 |
getFxSend(int index) { return fxSends.get(index); } |
getFxSend(int index) { return fxSends.get(index); } |
578 |
|
|
582 |
* @return The effect send with the specified ID or <code>null</code> |
* @return The effect send with the specified ID or <code>null</code> |
583 |
* if there is no effect send with ID <code>fxSendId</code>. |
* if there is no effect send with ID <code>fxSendId</code>. |
584 |
*/ |
*/ |
585 |
|
@Override |
586 |
public FxSend |
public FxSend |
587 |
getFxSendById(int fxSendId) { |
getFxSendById(int fxSendId) { |
588 |
for(FxSend fxs : fxSends) { |
for(FxSend fxs : fxSends) { |
597 |
* @param index The position of the effect send to remove. |
* @param index The position of the effect send to remove. |
598 |
* @return The removed effect send. |
* @return The removed effect send. |
599 |
*/ |
*/ |
600 |
|
@Override |
601 |
public FxSend |
public FxSend |
602 |
removeFxSend(int index) { |
removeFxSend(int index) { |
603 |
FxSend fxs = fxSends.remove(index); |
FxSend fxs = fxSends.remove(index); |
611 |
* @return <code>true</code> if the effect send is removed successfully, <code>false</code> |
* @return <code>true</code> if the effect send is removed successfully, <code>false</code> |
612 |
* if the channel does not contain effect send with ID <code>fxSendId</code>. |
* if the channel does not contain effect send with ID <code>fxSendId</code>. |
613 |
*/ |
*/ |
614 |
|
@Override |
615 |
public boolean |
public boolean |
616 |
removeFxSendById(int fxSendId) { |
removeFxSendById(int fxSendId) { |
617 |
for(int i = 0; i < fxSends.size(); i++) { |
for(int i = 0; i < fxSends.size(); i++) { |
627 |
} |
} |
628 |
|
|
629 |
/** Removes all effect sends from this channel. */ |
/** Removes all effect sends from this channel. */ |
630 |
|
@Override |
631 |
public void |
public void |
632 |
removeAllFxSends() { |
removeAllFxSends() { |
633 |
for(int i = fxSends.size() - 1; i >= 0; i--) { |
for(int i = fxSends.size() - 1; i >= 0; i--) { |
641 |
* Updates the specified effect send. |
* Updates the specified effect send. |
642 |
* @param fxSend The effect send to update. |
* @param fxSend The effect send to update. |
643 |
*/ |
*/ |
644 |
|
@Override |
645 |
public void |
public void |
646 |
updateFxSend(FxSend fxSend) { |
updateFxSend(FxSend fxSend) { |
647 |
for(int i = 0; i < fxSends.size(); i++) { |
for(int i = 0; i < fxSends.size(); i++) { |
658 |
* Gets the current number of effect sends. |
* Gets the current number of effect sends. |
659 |
* @return The current number of effect sends. |
* @return The current number of effect sends. |
660 |
*/ |
*/ |
661 |
|
@Override |
662 |
public int |
public int |
663 |
getFxSendCount() { return fxSends.size(); } |
getFxSendCount() { return fxSends.size(); } |
664 |
|
|
666 |
* Gets the current list of effect sends. |
* Gets the current list of effect sends. |
667 |
* @return The current list of effect sends. |
* @return The current list of effect sends. |
668 |
*/ |
*/ |
669 |
|
@Override |
670 |
public FxSend[] |
public FxSend[] |
671 |
getFxSends() { return fxSends.toArray(new FxSend[fxSends.size()]); } |
getFxSends() { return fxSends.toArray(new FxSend[fxSends.size()]); } |
672 |
|
|
675 |
* @param fxSend The numerical ID of the effect send. |
* @param fxSend The numerical ID of the effect send. |
676 |
* @param name The new name of the effect send entity. |
* @param name The new name of the effect send entity. |
677 |
*/ |
*/ |
678 |
|
@Override |
679 |
public void |
public void |
680 |
setBackendFxSendName(final int fxSend, String name) { |
setBackendFxSendName(final int fxSend, String name) { |
681 |
final Task t = new Channel.SetFxSendName(getChannelId(), fxSend, name); |
final Task t = new Channel.SetFxSendName(getChannelId(), fxSend, name); |
703 |
* @param audioDst The audio channel of the selected audio output device |
* @param audioDst The audio channel of the selected audio output device |
704 |
* where <code>audioSrc</code> should be routed to. |
* where <code>audioSrc</code> should be routed to. |
705 |
*/ |
*/ |
706 |
|
@Override |
707 |
public void |
public void |
708 |
setBackendFxSendAudioOutputChannel(int fxSend, int audioSrc, int audioDst) { |
setBackendFxSendAudioOutputChannel(int fxSend, int audioSrc, int audioDst) { |
709 |
Task t = new Channel.SetFxSendAudioOutputChannel ( |
Task t = new Channel.SetFxSendAudioOutputChannel ( |
719 |
* @param midiCtrl The MIDI controller which shall be |
* @param midiCtrl The MIDI controller which shall be |
720 |
* able to modify the effect send's send level. |
* able to modify the effect send's send level. |
721 |
*/ |
*/ |
722 |
|
@Override |
723 |
public void |
public void |
724 |
setBackendFxSendMidiController(int fxSend, int midiCtrl) { |
setBackendFxSendMidiController(int fxSend, int midiCtrl) { |
725 |
Task t = new Channel.SetFxSendMidiController(getChannelId(), fxSend, midiCtrl); |
Task t = new Channel.SetFxSendMidiController(getChannelId(), fxSend, midiCtrl); |
732 |
* send, which volume should be changed. |
* send, which volume should be changed. |
733 |
* @param level The new volume value. |
* @param level The new volume value. |
734 |
*/ |
*/ |
735 |
|
@Override |
736 |
public void |
public void |
737 |
setBackendFxSendLevel(int fxSend, float level) { |
setBackendFxSendLevel(int fxSend, float level) { |
738 |
CC.getTaskQueue().add(new Channel.SetFxSendLevel(getChannelId(), fxSend, level)); |
CC.getTaskQueue().add(new Channel.SetFxSendLevel(getChannelId(), fxSend, level)); |
741 |
/** |
/** |
742 |
* Sends a MIDI data message to this sampler channel. |
* Sends a MIDI data message to this sampler channel. |
743 |
*/ |
*/ |
744 |
|
@Override |
745 |
public void |
public void |
746 |
sendBackendMidiData(MidiDataEvent e) { |
sendBackendMidiData(MidiDataEvent e) { |
747 |
sendBackendMidiData(e.getType(), e.getNote(), e.getVelocity()); |
sendBackendMidiData(e.getType(), e.getNote(), e.getVelocity()); |
753 |
* @param arg1 Depends on the message type. |
* @param arg1 Depends on the message type. |
754 |
* @param arg2 Depends on the message type. |
* @param arg2 Depends on the message type. |
755 |
*/ |
*/ |
756 |
|
@Override |
757 |
public void |
public void |
758 |
sendBackendMidiData(MidiDataEvent.Type type, int arg1, int arg2) { |
sendBackendMidiData(MidiDataEvent.Type type, int arg1, int arg2) { |
759 |
CC.getTaskQueue().add(new Channel.SendMidiMsg(getChannelId(), type, arg1, arg2)); |
CC.getTaskQueue().add(new Channel.SendMidiMsg(getChannelId(), type, arg1, arg2)); |
763 |
* Sets destination effect on the specified effect send. |
* Sets destination effect on the specified effect send. |
764 |
* @param fxSend The numerical ID of the effect send. |
* @param fxSend The numerical ID of the effect send. |
765 |
*/ |
*/ |
766 |
|
@Override |
767 |
public void |
public void |
768 |
setBackendFxSendEffect(int fxSend, int chainId, int chainPos) { |
setBackendFxSendEffect(int fxSend, int chainId, int chainPos) { |
769 |
CC.getTaskQueue().add ( |
CC.getTaskQueue().add ( |
775 |
* Removes the destination effect of the specified effect send. |
* Removes the destination effect of the specified effect send. |
776 |
* @param fxSend The numerical ID of the effect send. |
* @param fxSend The numerical ID of the effect send. |
777 |
*/ |
*/ |
778 |
|
@Override |
779 |
public void |
public void |
780 |
removeBackendFxSendEffect(int fxSend) { |
removeBackendFxSendEffect(int fxSend) { |
781 |
CC.getTaskQueue().add ( |
CC.getTaskQueue().add ( |
788 |
fireSamplerChannelChanged() { |
fireSamplerChannelChanged() { |
789 |
final SamplerChannelEvent e = new SamplerChannelEvent(this); |
final SamplerChannelEvent e = new SamplerChannelEvent(this); |
790 |
|
|
791 |
SwingUtilities.invokeLater(new Runnable() { |
PDUtils.runOnUiThread(new Runnable() { |
792 |
public void |
public void |
793 |
run() { fireSamplerChannelChanged(e); } |
run() { fireSamplerChannelChanged(e); } |
794 |
}); |
}); |
796 |
|
|
797 |
/** |
/** |
798 |
* Notifies listeners that the sampler channel settings has changed. |
* Notifies listeners that the sampler channel settings has changed. |
799 |
* This method should be invoked from the event-dispatching thread. |
* This method should be invoked from the UI thread. |
800 |
*/ |
*/ |
801 |
protected void |
protected void |
802 |
fireSamplerChannelChanged(SamplerChannelEvent e) { |
fireSamplerChannelChanged(SamplerChannelEvent e) { |
809 |
fireStreamCountChanged() { |
fireStreamCountChanged() { |
810 |
final SamplerChannelEvent e = new SamplerChannelEvent(this); |
final SamplerChannelEvent e = new SamplerChannelEvent(this); |
811 |
|
|
812 |
SwingUtilities.invokeLater(new Runnable() { |
PDUtils.runOnUiThread(new Runnable() { |
813 |
public void |
public void |
814 |
run() { fireStreamCountChanged(e); } |
run() { fireStreamCountChanged(e); } |
815 |
}); |
}); |
817 |
|
|
818 |
/** |
/** |
819 |
* Notifies listeners that the number of active disk streams has changed. |
* Notifies listeners that the number of active disk streams has changed. |
820 |
* This method should be invoked from the event-dispatching thread. |
* This method should be invoked from the UI thread. |
821 |
*/ |
*/ |
822 |
protected void |
protected void |
823 |
fireStreamCountChanged(SamplerChannelEvent e) { |
fireStreamCountChanged(SamplerChannelEvent e) { |
829 |
fireVoiceCountChanged() { |
fireVoiceCountChanged() { |
830 |
final SamplerChannelEvent e = new SamplerChannelEvent(this); |
final SamplerChannelEvent e = new SamplerChannelEvent(this); |
831 |
|
|
832 |
SwingUtilities.invokeLater(new Runnable() { |
PDUtils.runOnUiThread(new Runnable() { |
833 |
public void |
public void |
834 |
run() { fireVoiceCountChanged(e); } |
run() { fireVoiceCountChanged(e); } |
835 |
}); |
}); |
837 |
|
|
838 |
/** |
/** |
839 |
* Notifies listeners that the number of active voices has changed. |
* Notifies listeners that the number of active voices has changed. |
840 |
* This method should be invoked from the event-dispatching thread. |
* This method should be invoked from the UI thread. |
841 |
*/ |
*/ |
842 |
protected void |
protected void |
843 |
fireVoiceCountChanged(SamplerChannelEvent e) { |
fireVoiceCountChanged(SamplerChannelEvent e) { |
851 |
fireFxSendAdded(FxSend fxSend) { |
fireFxSendAdded(FxSend fxSend) { |
852 |
final EffectSendsEvent e = new EffectSendsEvent(this, fxSend); |
final EffectSendsEvent e = new EffectSendsEvent(this, fxSend); |
853 |
|
|
854 |
SwingUtilities.invokeLater(new Runnable() { |
PDUtils.runOnUiThread(new Runnable() { |
855 |
public void |
public void |
856 |
run() { fireFxSendAdded(e); } |
run() { fireFxSendAdded(e); } |
857 |
}); |
}); |
859 |
|
|
860 |
/** |
/** |
861 |
* Notifies listeners that the specified effect send has been added to the channel. |
* Notifies listeners that the specified effect send has been added to the channel. |
862 |
* This method should be invoked from the event-dispatching thread. |
* This method should be invoked from the UI thread. |
863 |
*/ |
*/ |
864 |
protected void |
protected void |
865 |
fireFxSendAdded(EffectSendsEvent e) { |
fireFxSendAdded(EffectSendsEvent e) { |
872 |
fireFxSendRemoved(FxSend fxSend) { |
fireFxSendRemoved(FxSend fxSend) { |
873 |
final EffectSendsEvent e = new EffectSendsEvent(this, fxSend); |
final EffectSendsEvent e = new EffectSendsEvent(this, fxSend); |
874 |
|
|
875 |
SwingUtilities.invokeLater(new Runnable() { |
PDUtils.runOnUiThread(new Runnable() { |
876 |
public void |
public void |
877 |
run() { fireFxSendRemoved(e); } |
run() { fireFxSendRemoved(e); } |
878 |
}); |
}); |
880 |
|
|
881 |
/** |
/** |
882 |
* Notifies listeners that the specified effect send has been removed. |
* Notifies listeners that the specified effect send has been removed. |
883 |
* This method should be invoked from the event-dispatching thread. |
* This method should be invoked from the UI thread. |
884 |
*/ |
*/ |
885 |
protected void |
protected void |
886 |
fireFxSendRemoved(EffectSendsEvent e) { |
fireFxSendRemoved(EffectSendsEvent e) { |
893 |
fireFxSendUpdated(FxSend fxSend) { |
fireFxSendUpdated(FxSend fxSend) { |
894 |
final EffectSendsEvent e = new EffectSendsEvent(this, fxSend); |
final EffectSendsEvent e = new EffectSendsEvent(this, fxSend); |
895 |
|
|
896 |
SwingUtilities.invokeLater(new Runnable() { |
PDUtils.runOnUiThread(new Runnable() { |
897 |
public void |
public void |
898 |
run() { fireFxSendUpdated(e); } |
run() { fireFxSendUpdated(e); } |
899 |
}); |
}); |
901 |
|
|
902 |
/** |
/** |
903 |
* Notifies listeners that the specified effect send has been updated. |
* Notifies listeners that the specified effect send has been updated. |
904 |
* This method should be invoked from the event-dispatching thread. |
* This method should be invoked from the UI thread. |
905 |
*/ |
*/ |
906 |
protected void |
protected void |
907 |
fireFxSendUpdated(EffectSendsEvent e) { |
fireFxSendUpdated(EffectSendsEvent e) { |