33 |
import org.jsampler.SamplerModel; |
import org.jsampler.SamplerModel; |
34 |
|
|
35 |
import org.linuxsampler.lscp.FxSend; |
import org.linuxsampler.lscp.FxSend; |
36 |
|
import org.linuxsampler.lscp.event.MidiDataEvent; |
37 |
|
|
38 |
import static org.jsampler.JSI18n.i18n; |
import static org.jsampler.JSI18n.i18n; |
39 |
import static org.jsampler.JSPrefs.*; |
import static org.jsampler.JSPrefs.*; |
1088 |
CC.getLogger().log(Level.FINE, getErrorMessage(), x); |
CC.getLogger().log(Level.FINE, getErrorMessage(), x); |
1089 |
} |
} |
1090 |
} |
} |
1091 |
|
} |
1092 |
|
|
1093 |
|
/** |
1094 |
|
* This task starts an instrument editor for editing the loaded instrument |
1095 |
|
* on the specified sampler channel. |
1096 |
|
*/ |
1097 |
|
public static class SendMidiMsg extends EnhancedTask { |
1098 |
|
private int chn; |
1099 |
|
private MidiDataEvent.Type type; |
1100 |
|
private int arg1; |
1101 |
|
private int arg2; |
1102 |
|
|
1103 |
|
/** |
1104 |
|
* Creates new instance of <code>SendMidiMsg</code>. |
1105 |
|
* @param channel The sampler channel number. |
1106 |
|
*/ |
1107 |
|
public |
1108 |
|
SendMidiMsg(int channel, MidiDataEvent.Type type, int arg1, int arg2) { |
1109 |
|
this.chn = channel; |
1110 |
|
this.type = type; |
1111 |
|
this.arg1 = arg1; |
1112 |
|
this.arg2 = arg2; |
1113 |
|
|
1114 |
|
setTitle("Channel.SendMidiMsg_task"); |
1115 |
|
String s = i18n.getMessage("Channel.SendMidiMsg.desc", channel); |
1116 |
|
setDescription(s); |
1117 |
|
|
1118 |
|
|
1119 |
|
} |
1120 |
|
|
1121 |
|
/** The entry point of the task. */ |
1122 |
|
public void |
1123 |
|
run() { |
1124 |
|
try { CC.getClient().sendChannelMidiData(chn, type, arg1, arg2); } |
1125 |
|
catch(Exception x) { |
1126 |
|
CC.getLogger().log(Level.FINE, getErrorMessage(), x); |
1127 |
|
} |
1128 |
|
} |
1129 |
} |
} |
1130 |
|
|
1131 |
} |
} |