Hi: I'm trying to get an instance of the MIDI Sequencer sync to an external clock. I did:
S_p = MidiSystem.getSequencer(false);
D2 = MidiSystem.getMidiDevice(MidiSystem.getMidiDeviceInfo()[1]);
S_p.open();
D2.open();
R2=S_p.getReceiver();
T2=D2.getTransmitter();
T2.setReceiver(R2);
but
for(int i=0;i<S_p.getMasterSyncModes().length;i++)
{System.out.println("Available modes are "+i+ " "+S_p.getMasterSyncModes()[i].toString());}
returns
Available modes are 0 Internal Clock
which means this will be useless.
S_p.setMasterSyncMode(Sequencer.SyncMode.MIDI_SYNC);
What am I doing wrong ? Of course I have confirmation of messages going out of D2 and into another receiver custom written to notify to system.out, and sequencer plays normally, it just appears that it doesn't support the SyncModes docs say it should. Specifically this phrase confuses me (from MIDI_SYNC: "This mode only applies as the master sync mode for sequencers that are also MIDI receivers."
What's the meaning of the sequencer BEING a receiver. I thought it should be enough with my approach of getReceiver()
Regards and thanks !