I tell them that I'm working with a MIDlet and I can not able to change any instrument midi channel.
I tried with .shortMidiEvent(0xC0 + channel, program, 0);
and setProgram(channel, -1, program)
without result.
on my phone is a Nokia X3-02 instrument change does not work, only midlet's emulators.
here is the code fragment
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);
}
is that you can change the instrument, as I have understood you use an array of player
in cases like these. I try and not worked.
saludos