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, sendNote functionality
Page Index Toggle Pages: 1
ProMidi, sendNote functionality (Read 1106 times)
ProMidi, sendNote functionality
Dec 11th, 2007, 1:55pm
 
I am a bit confused by the way senNote works in ProMidi 2.0.
I am not sure to understand the logic of it.

To send a note, you first declare it with a pitch, velocity and a length. Then you send it. So all the parameter are fixed before sending. You can't change dynamaticly the lenght or velocity of the Note.

How do you make a note length as long as a bt is press for exemple? could someone explain to me ( quickly ) how the sendNote works? I just find it weird to have to set the parameters and then send them, instead of setting/sending at the same time in a realtime process. If it's not possible, does that mean that proMidi was created for rigid instrument ( you set it and then run it ) and not for realtime instrument ( like a midi piano).

Couldn't fine something about this in the forum, maybe because it's to obvious.
Re: ProMidi, sendNote functionality
Reply #1 - Dec 11th, 2007, 1:59pm
 
I must be wrong, it would be ridiculous not to be able to do this.
It works with the controller but you need to keep on sending it. If you do this with a note it will do some kind of repeat effect. Like if you were going crasy on the key.
Re: ProMidi, sendNote functionality
Reply #2 - Dec 13th, 2007, 12:08am
 
MidiOut has two methods, that are not documented so far
sendNoteOn(Note) and sendNoteOff(Note) so you can use these Methods to send the noteOn and noteOffs yourself. Sending notes with a length makes more sense for sequencing.

You can change velocity, length and pitch of a note see the methods setLength(), setPitch() and setVelocity() in the documentation.
Re: ProMidi, sendNote functionality
Reply #3 - Dec 13th, 2007, 10:29am
 
Cheers Tex,

I will try sendNoteOff(). I tried a cheap trick by using sendNote with a high velocity and a really long Length ( 10000 ) when you press a Bt. When released sendNote again with a lenght and velocity of 0. But It's not really 'clean' and not working properly in ableton for what I wanted.

I try the sendNoteOn & sendNoteOff then.

I've looked before at the setLength(),etc.. thinking it would solve my problem. It's like using a variable? But only work as a 'set it' before you send the note, no? Anyway I will find out by myself.

Thanks a lot for your time and your libraries Smiley
Page Index Toggle Pages: 1