We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpSound,  Music Libraries › ProMIDI outputting problem
Page Index Toggle Pages: 1
ProMIDI outputting problem (Read 1168 times)
ProMIDI outputting problem
Mar 7th, 2007, 12:14am
 
I'm using ProMIDI to output from Processing into Propellerhead's Reason, via a UAC driver (this is under OSX Panther on a PPC, using Plumstone). When I record the MIDI that's being sent from my Java app, the note lengths seem to indicate Reason is not receiving a MIDI note off message, as the sounds accumulate until the polyphony of the instrument is reached, at which point the newest notes replace the oldest ones. While recording, all notes appear on the piano roll as very short (irrespective of the duration specified in the code), but as soon as I press stop most notes are extended from whenever they were triggered to the current play point. Some even extend beyond the play point- this seems to happen whenever a note is used for the second time in the same recording, and the distance it overshoots the play point by is the same as the distance between the first and second use of that MIDI note.

I've been informed that there's two different forms of MIDI note off messages; one which sends a status code of 0x80, and another which uses a note on message with a velocity of zero. The problem may be that Reason's expecting one form, and ProMIDI uses the other, but I can't find relevant documentation about either.

Does anyone know which form ProMIDI outputs, or have any other information on this? If that does turn out to be the problem, are there methods of converting between the two forms within the code before it is output, or possibly even an app that translates the messages on the fly?

Thanks in advance.

- Jim
Re: ProMIDI outputting problem
Reply #1 - Apr 12th, 2007, 11:02am
 
Hi There!

Can't help you, sorry! But perhaps you can help me. I'm trying to do a similar thing, but making processing send to Ableton Live. Exept I can't make it work... I've downloaded plumstone and everything, but I can't seem to get Ableton to recognize processing as a MidiInput source...

Can I maybe see your code? It's for a school project, and I'm starting to get stressed for time so any help will be very much appretiated!

Thanks
Morten_B
Re: ProMIDI outputting problem
Reply #2 - Apr 24th, 2007, 10:29pm
 
I'm looking at the same thing. The issue appears to be the sequencer. MIDI Monitor reports invalid messages where the note offs are being sent. And Max/MSP just doesn't see anything at all. Obviously, a bug -- and the same issue exists with mjj (alternative Java MIDI library), so perhaps not related to the intermediate software.
Re: ProMIDI outputting problem
Reply #3 - Apr 24th, 2007, 11:41pm
 
Hmmm, for the record, the sequencing example doesn't work on Windows -- even with the Java Sound Synthesizer. Something's not quite right here. I dug into the code and all of this comes from the existing Sun API; I'm guessing the problem may be there. Maybe the API changed implementation of note off events.
Re: ProMIDI outputting problem
Reply #4 - Apr 24th, 2007, 11:53pm
 
I did double-check, and ProMIDI is using the ShortMessage class from javax.sound.midi, the standard Sun API for MIDI, which uses 0x80 for note off messages. But that should *not* be the problem, as far as I know, as virtually any instrument (and certainly the Sun and Microsoft soft synths) will interpret 0x80 as a note off. There's some problem elsewhere.

In the meantime, you can use the other method -- velocities of zero -- as a workaround for note off messages. So, for instance, using the sequencing example, you'd do something like this:

track.addEvent(new Note(36, 127,40), 0);
track.addEvent(new Note(36, 0,40), 1);

In addition, ProMIDI and Java do work well with both MIDI-Yoke on Windows XP and the IAC bus on Mac (with mmj installed in my test), so this is a solution for using Processing to send MIDI to other applications.

I'm confirming with Christian why there may be this other problem, and I'll post a tutorial once I'm certain of the details.
Re: ProMIDI outputting problem
Reply #5 - Nov 8th, 2007, 4:21pm
 
Any word on this yet?  I was browsing the boards because I am also trying to get MIDI data from Processing into Reason.  I'm not having that specific problem, but I wanted to research how to do it.
Page Index Toggle Pages: 1