31 |
|
|
32 |
|
|
33 |
/** |
/** |
34 |
* |
* This task sets the MIDI input channel the specified sampler channel should listen to. |
35 |
* @author Grigor Iliev |
* @author Grigor Iliev |
36 |
*/ |
*/ |
37 |
public class SetChannelMidiInputChannel extends EnhancedTask { |
public class SetChannelMidiInputChannel extends EnhancedTask { |
38 |
private int channel; |
private int channel; |
39 |
private int midiChannel; |
private int midiChannel; |
40 |
|
|
41 |
|
/** |
42 |
|
* Creates new instance of <code>SetChannelMidiInputChannel</code>. |
43 |
|
* @param channel The sampler channel number. |
44 |
|
* @param midiChannel The number of the new MIDI input channel where |
45 |
|
* <code>channel</code> should listen to or -1 to listen on all 16 MIDI channels. |
46 |
|
*/ |
47 |
public |
public |
48 |
SetChannelMidiInputChannel(int channel, int midiChannel) { |
SetChannelMidiInputChannel(int channel, int midiChannel) { |
49 |
setTitle("SetChannelMidiInputChannel_task"); |
setTitle("SetChannelMidiInputChannel_task"); |
55 |
this.midiChannel = midiChannel; |
this.midiChannel = midiChannel; |
56 |
} |
} |
57 |
|
|
58 |
|
/** The entry point of the task. */ |
59 |
public void |
public void |
60 |
run() { |
run() { |
61 |
try { CC.getClient().setChannelMidiInputChannel(channel, midiChannel); } |
try { CC.getClient().setChannelMidiInputChannel(channel, midiChannel); } |