Forums > Java

Midi IO

May 18, 2009 | 1:42 pm

Hi MXJ experts

I need to send and receive MIDI between a mxj object and the BCF-2000 MIDI controller. I know about the BCF2000 javascript, but I’d like to write my own object that includes a visualisation of the mixer. My problem is that ‘javax.sound.midi.MidiSystem’ does not recognise BCF2000 as a device. I also tried using the Processing library proMIDI by Christian Riekoff, but BCF2000 is not listed among the found devices. It seems that Java and BCF2000 are not friends.

The Max object ‘ctlin’ finds the device just fine in a patcher window. I wonder how I can instantiate a ‘ctlin’-object in Java.

Can anyone throw me an example to get me started?

~ce


May 18, 2009 | 1:52 pm

What’s wrong with just using the max midi objects and feeding the data into mxj? I certainly would.

Given that you’re in the max environment anyway, you may as well play to its strengths.


May 18, 2009 | 2:22 pm
Quote:
What’s wrong with just using the max midi objects and feeding the data into mxj?

Just code aesthetics and the beauty of encapsulation. The ‘ctlin’ and ‘ctlout’ belongs to the BCF2000 object Im writing.


May 18, 2009 | 3:31 pm

With respect, it sounds like anti-encapsulation!

The point of encapsulation is to partition off units of singular functionality in order to promote re-use. Bundling midi i/o together with code for interpreting the resulting data doesn’t achieve this. I’d still concentrate on getting the BCF specifics working.

Anyway – AFAIK, Java MIDI support on OS X (if that’s what you’re on) has long been flaky, as Apple didn’t see fit to actually make working service provider classes.

Apparently http://www.humatic.de/htools/mmj.htm works quite well, YMMV.


May 19, 2009 | 4:08 pm
Quote:
The point of encapsulation is to partition off units of singular functionality in order to promote re-use. Bundling midi i/o together with code for interpreting the resulting data doesn’t achieve this. I’d still concentrate on getting the BCF specifics working.

Thanks Owen, I see your point. My idea was to re-use the Max MIDI objects inside the Java object (and they are in a sense already encapsulated). I still think that midi IO should be built into the java object (using Max objects) since a BCF2000 object without midi IO is pointless for any purpose I can think of. Also, I want the object to talk OSC externally and MIDI internally. Anyway, including an external Java library like proMIDI or mmj is not a pretty choice, so in case I can’t instantiate and use the Max midi objects inside Java, I will go for your first proposal and encapsulate the mxj object together with the midi objects in a sub-patcher.

And thank you for the heads-up on mmj, I’ve been looking for something like that for a while.

~ce


May 20, 2009 | 6:53 pm

For PPC Macs, there is the old freeware Plumstone SPI also.

http://www.mandolane.co.uk/swPlumstone.html
This has worked for me…

There is a shareware evolution for intel OS X java:
"Mandolane" at same site…
http://www.mandolane.co.uk/

mmj looks good, also…

ymmv
l&k
char lieb


Viewing 6 posts - 1 through 6 (of 6 total)