MCT Works on Leopard!

Discussions of any related software

Moderator: Related software moderators

Re: MCT Works on Leopard!

Postby Ken Forgettable » Thu Sep 17, 2009 10:21 pm

Is anyone out there checking that the standard Java SysEx calls *still* do not work on these new revisions?
Ken Forgettable
 
Posts: 402
Joined: Tue Jan 06, 2009 5:04 pm

Re: MCT Works on Leopard!

Postby davem » Thu Sep 17, 2009 10:41 pm

Hi Ken,

Sysex calls - or anything else to do with Java for that matter - on a standard installation will not work because Apple doesn't provide a Java wrapper for CoreMIDI anymore - I believe they stopped at 10.4.something. Literally without an external library you cannot even see the MegaDrum from Java. Up until this point I've been using mmj which has worked great, but since that no longer works on Snow Leopard I've written my own wrapper. The other library elrules linked I found just doesn't work with MCT in terms of Sysex messages.

I am pleased to report that after two days of reasonably hard coding, I have something to show for my efforts. Now, I am at the point where I can get MCT to reliably send and receive Sysex messages to/from MD. Standard MIDI messages are also transmitted without issue. As far as I can tell, it works great for short periods, long periods are completely untested. And the interface is hugely inefficient and needs quite a bit of work, plus there are a couple of glaring memory leaks that need patching up. But just bear in mind here that

(a) I have never used the JNI to code stuff natively and link it up to Java.
(b) I have never used CoreMIDI, or in fact coded pretty much anything vaguely related to MIDI applications before.
(c) I only really have a cursory knowledge of Cocoa and multi-threaded programming. In fact my Java isn't really that great.
(d) There is virtually no documentation or sample code on any of this (very irritating!)
(e) I only worked on this two days.

and I have something that works. Surely it wouldn't be beyond the realms of possibility that Apple could have given someone with far more experience and capability in this than me a week to do this properly?

Basically I have some fairly minimal Java code which implements the MidiDeviceProvider SPI in Java. Coupled with this is a native library which queries CoreMIDI for device information, and also sets up receivers and transmitters to input/output ports. When data becomes available, the native routines call the associated Java calls and that's about it.

Anyway, I don't plan on releasing source just yet unless people are desperate because of all the aforementioned reasons, but if people would like to test it on various architectures that would be good. In theory, given the source I can get this working with minimal effort on PPC, i386, x86_64 etc for Java 1.5 or 1.6 either 32- or 64-bit. I actually have nothing but Snow Leopard to test it on anymore here. I would also appreciate any help and comments people have!
davem
 
Posts: 71
Joined: Sun Jun 14, 2009 9:51 pm

Re: MCT Works on Leopard!

Postby Ken Forgettable » Thu Sep 17, 2009 11:22 pm

It occurs to me that that a way to bypass the MIDI problems on all platforms would be to use a serial to MIDI wrapper - which could have the advantage of an increase in throughput.

Succ-U-Bus could shave 25% off uname times this way :geek:

Megadrum regards IO as a serial stream and doesn't use any exotic MIDI protocols.
Then why don't we gain control, whap up the BAUD rates and have a sever side serial2MIDI driver - eh???

[edit]
... fiddled with an old Roland serial to MIDI driver and my idea sucks.

I just can't understand why there is there no JNI for the MAC already?!
Ken Forgettable
 
Posts: 402
Joined: Tue Jan 06, 2009 5:04 pm

Re: MCT Works on Leopard!

Postby alchemicus » Sat Oct 03, 2009 9:57 pm

No more working here...after all update (1.82) MCT doesn't work anymore...and it is really slow to open.i tried to install java library but nothing .
:cry:
alchemicus
 
Posts: 89
Joined: Sun Mar 01, 2009 10:51 am

Re: MCT Works on Leopard!

Postby Ken Forgettable » Mon Oct 05, 2009 3:35 pm

alchemicus wrote:No more working here...after all update (1.82) MCT doesn't work anymore...and it is really slow to open.i tried to install java library but nothing .
:cry:
You can test if your java installation is working ok here
Ken Forgettable
 
Posts: 402
Joined: Tue Jan 06, 2009 5:04 pm

Re: MCT Works on Leopard!

Postby davem » Mon Oct 12, 2009 5:52 pm

I've not forgotten about this thread... just trying to find the time to redo some of the coding to make it acceptable, and then I will release it. One thing I'm getting stuck up on at the moment is how, for example, one enumerates a 4-port MIDI hub in the Java API. For example, is it one MidiDevice with four receivers/transmitters, or four MidiDevices each with a single transmitter/receiver? It seems to me at least that the only way things make sense is the latter implementation.

By the way, I should point out that I've been using this with MCT and Snow Leopard with great success over the last few weeks. All seems fine at the moment.
davem
 
Posts: 71
Joined: Sun Jun 14, 2009 9:51 pm

Re: MCT Works on Leopard!

Postby Ken Forgettable » Mon Oct 12, 2009 7:36 pm

davem wrote:...how, for example, one enumerates a 4-port MIDI hub in the Java API.
Hubs are usually dumb devices. If you look at DIY MIDI hubs they are just extra sockets in parallel. So I'd say it's one addressable device with one TX/RX pair. Section 2.6 of this may be of help.
Ken Forgettable
 
Posts: 402
Joined: Tue Jan 06, 2009 5:04 pm

Re: MCT Works on Leopard!

Postby Ken Forgettable » Mon Oct 12, 2009 9:19 pm

There is also a global SysEx message "request id" - send this through each port in turn, if someone responds...
Ken Forgettable
 
Posts: 402
Joined: Tue Jan 06, 2009 5:04 pm

Re: MCT Works on Leopard!

Postby davem » Tue Oct 13, 2009 8:01 pm

Thanks Ken, that looks useful. I'll try and get on this when I next have access to my MegaDrum (on Saturday). Should be able to do a lot more work on these things once I'm properly up and running :)
davem
 
Posts: 71
Joined: Sun Jun 14, 2009 9:51 pm

Previous

Return to Related Software

Who is online

Users browsing this forum: No registered users and 33 guests