A Java implementation of the RTP-MIDI protocol.
Currently this library can only be used as a RTP-MIDI session listener.
- Create a
AppleMidiServer
- Add a
AppleMidiSession
to the server
- Either a
MidiDeviceAppleMidiSession
if aMidiDevice
should be used - Or a
MidiReceiverAppleMidiSession
if only aReceiver
interface should be used. E.g. for direct processing of messages without aMidiDevice
.
start()
the server
To announce the server via Apple's bonjour the jMDNS library can be used.
###Demo
public class Application {
public static void main(final String[] args) throws InterruptedException {
try {
JmDNS jmdns = JmDNS.create(InetAddress.getLocalHost());
ServiceInfo serviceInfo =
ServiceInfo.create("_apple-midi._udp.local.", "rtpMidiJava", 50004, "apple-midi");
jmdns.registerService(serviceInfo);
MidiDevice midiDevice = ;//get MIDI device
AppleMidiServer server = new AppleMidiServer();
server.addAppleMidiSession(
new MidiDeviceAppleMidiSession(new MidiDeviceModePair(midiDevice, MidiDeviceMode.READ_ONLY)));
server.start();
System.in.read();
server.stop();
} catch (final IOException e) {
e.printStackTrace();
}
}
}
- Implement journaling
- Implement missing session protocol commands
- Implement session initiation