我告诉他们我正在使用 MIDlet,我无法更改任何乐器的 midi 通道。我试过有无.shortMidiEvent(0xC0 + channel, program, 0);
结果setProgram(channel, -1, program)
。在我的手机上是诺基亚X3-02 仪器更改不起作用,只有midlet 的模拟器。这是代码片段
public final class Dmgcpu implements Runnable {
private Player player;
private static MIDIControl synth;
private void initSound() {
try {
player = Manager.createPlayer(Manager.MIDI_DEVICE_LOCATOR);
player.prefetch();
synth = (MIDIControl) player.getControl("javax.microedition.media.control.MIDIControl");
} catch (Exception ex) {
}
synth.setProgram(0, -1, instSound_a);
//synth.shortMidiEvent(0xC0, instSound_a, 0);
//sound test
synth.shortMidiEvent(0x90 + channel, note[i], volume * MASTER_VOLUME);
thread_sleep(300);
synth.shortMidiEvent(0x80 + channel, note[i], 0);
}
是你可以改变仪器,因为我知道你使用这样的player
情况下的数组。我尝试并没有奏效。萨卢多斯