I have a couple of questions about the /renoise/trigger/midi(number) OSC message.
First of all, can I use it to trigger a note, and how does this work? A note events consists of three bytes, but the OSC message only takes one argument. Should I convert the three bytes to one large number?
Secondly, what does Renoise do with these midi events? Are they treated the same way as midi events from external midi devices or as events from the ‘master midi keyboard’? Am I right in thinking that these notes are sent to the Renoise OSC device in the list of MIDI input devices in the instrument settings tab?
Technically; yes it does, as far as midi specification goes. Not many people implement it though. May be used for different lengths of Release stage of a envelope on a Note Off for an example.
@vV:
I know, that is how my script currently works. But I was wondering if I could use the API to access the “Renoise OSC device” in the list of midi inputs for each instrument. So I don’t want to specify an instrument or a track, but a midi channel. That way, the script could take advantage of the new midi routing in 2.7.
If this can’t be done, then why is the Renoise OSC device in the midi input list, anyway? How do you use it? You can specify a midi channel in the midi input box, so how do you get it to send a note on a certain channel?
Yeah, that last part is currently for me a question as well simply because this just got introduced in Renoise 2.7 and isn’t documented in the API yet (or not as far as i could find earlier).
Also the midi message i haven’t figured all out completely, but i simly suspect one can sent a CC message and the according value that comes with it, but i don’t know if that has to come in a binary format or separate arguments as they supposed to come along.
“Renoise OSC device” in the MIDI input routing simply allows routing any MIDI events that come from OSC to an instrument. Maybe not a killer feature, but we thought this may be useful.
Thanks for clearing that up, that is how I was hoping it would work. If I understand this correctly, it opens up some interesting possibilities. I’ll see if I can make something useful with this. (What I’m trying to achieve is triggering different instruments on different tracks from the computer keyboard, which is now only possible with external midi devices)
Exactly. It’s three separate bytes converted to one number (24 bits). You have to write down the three 2-digit hex numbers in sequence, so that you get one 6-digit number, then convert that to decimal. I used this formula to avoid all the hex stuff:
velocity * 65536 + note *256 + channel+143
or
velocity * 65536 + note *256 + channel+127 for note off events
(65536 = 256^2)
Side note: What I don’t understand is why velocity is the most significant byte here. Wouldn’t it make more sense if status was the most significant byte, since it is the first in the sequence of bytes normally transmitted through midi? Not that it matters, just wondering…