34 |
|
|
35 |
|
|
36 |
/** |
/** |
37 |
* |
* This task loads and assigns an instrument to a sampler channel. |
38 |
* @author Grigor Iliev |
* @author Grigor Iliev |
39 |
*/ |
*/ |
40 |
public class LoadInstrument extends EnhancedTask { |
public class LoadInstrument extends EnhancedTask { |
42 |
private int instrIndex; |
private int instrIndex; |
43 |
private int channel; |
private int channel; |
44 |
|
|
45 |
|
/** |
46 |
|
* Creates new instance of <code>LoadInstrument</code>. |
47 |
|
* @param filename The name of the instrument file |
48 |
|
* on the LinuxSampler instance's host system. |
49 |
|
* @param instrIndex The index of the instrument in the instrument file. |
50 |
|
* @param channel The number of the sampler channel the instrument should be assigned to. |
51 |
|
*/ |
52 |
public |
public |
53 |
LoadInstrument(String filename, int instrIndex, int channel) { |
LoadInstrument(String filename, int instrIndex, int channel) { |
54 |
this.filename = filename; |
this.filename = filename; |
59 |
setDescription(i18n.getMessage("LoadInstrument.description")); |
setDescription(i18n.getMessage("LoadInstrument.description")); |
60 |
} |
} |
61 |
|
|
62 |
|
/** The entry point of the task. */ |
63 |
public void |
public void |
64 |
run() { |
run() { |
65 |
try { CC.getClient().loadInstrument(filename, instrIndex, channel, true); } |
try { CC.getClient().loadInstrument(filename, instrIndex, channel, true); } |