Is it possible to write a Java program that OSX will see as a virtual MIDI device (just like it might see a real MIDI USB keyboard) so that I can programmatically generate and send MIDI sequences through GarageBand?
I am experienced with Java and C and I have written device drivers. But I am not sure where to begin because I have zero experience with the javax.sound.midi package.
I envision the following: When I run the program from a terminal it initializes a virtual device and then pauses. At this point if GarageBand is running I should see the familiar "The number of midi inputs has changed" message. Then each time I hit <Enter> and it plays my coded MIDI sequence. I can select a different instrument in GarageBand and hit <Enter> again and it will play the sequence again using the new instrument. Pressing 'x' or a special character will cause the device to deinitialize again triggering the aforementioned GarageBand message and the Java program will exit.
I have a similar question, so I'm curious if you ever found an answer to yours. I was wondering if I could get a Java sound Synthesizer for a native synthesizer AudioUnit (specifically Ivory Pianos). It doesn't look like it.