Send MIDI note on with velocity 0
I’m trying to interact with a MIDI controller which uses a note on message with velocity 127 to turn on a light, and the same note on message but with velocity 0 to turn it off. There’s no way to change the behaviour of the controller.
Using midiout in Max for Live (with or without xnoteout) it seems that a note on with velocity 0 automatically gets changed to a note off by Max. This is probably reasonable behaviour in many cases but won’t work for my situation.
Is there any way to force Max to send the exact MIDI message I want without it reinterpreting it? I’ve tried using the imp.midiout external but for some reason it results in invalid MIDI - it looks like the first bytes of the message is missing.
Thanks!
Tom
that is not really a reinterpretation, velocity 0 is normally used by all receiving devices as note off. event . of course with some devices it might be importaant to send exctly a certin string.
i dont know about [noteout] and [xnoteout] as i dont use them - but you can be sure that [midiout] will let you send exactly what you want, velocity 0 or a "true" note off message.
Some further investigation reveals that it’s Ableton that is messing with the MIDI - Max on its own outputs exactly what you ask it to, but Ableton’s MIDI engine seems to remap 0 velocity note on to note off. Known issue it would seem, I’ll have to work around it with third party MIDI translator software or something.
Thanks for your reply!
"A receiver must be capable of recognizing either method of turning off a note, and should treat them identically." (source)
if there is no other solution, try writing either side and tell them to keep the standards.
and yes, it is most likely live which changes this stuff.
while using velcity 0 as something different than note off isnt in the specs, you should always exspect from a sending device that it doesnt change your data. :)
You are exactly correct, m4L has a limited midi implementation due to Live commandeering your messages when they leave the device. I too, have had some infuriating spirals into confusion and self loathing fun experiences running up against theses limitations, and (to my knowledge) I don't think there is a doc that spells them out fully. To my knowledge midi beat clock and midi time code are strictly forbidden and midi channels are stripped and replaced with whatever the track's channel is (so one track = one channel). The sysex implementation has recently gone from completely non existent to limited and obtuse, so that is good. I haven't had any trouble with nprns, so that is also good.
Any way one solution (my fav solution) is to have max vanilla running alongside Live, and you can communicate between the midi them with sends and receives. just don't use the '- - - ' (three dashes) before the send/receive name. Buffers can communicate in this way too, although less suited for this purpose imo. You can even make a standalone max app to receive the midi if you want to get super slick.
You can use a similar technique in live to get around the channel & sysex limitation, using a send device on one track and a receive device on another, excluding the '- - -'. There is a set of example devices in the 'Max 7 Pitch and Time Machines Pack' that illustrate this technique, one device that sends and one that receives. There is a little latency introduced, but i find it to be tolerable, as long as you are careful not to add latency elsewhere (such as with js).
Thanks! Unfortunately I don’t have a full Max licence and wouldn’t have much use for one outside this context so I think I’ll just go with either an external (if I can get any to work!) or somethjng translating the midi in between
Would this be of any help :
https://cycling74.com/forums/cross-platform-max-for-live-sysex-and-unrestricted-midi-inout-externals
Thanks for that, I've already tried it and it doesn't seem to be working correctly - not sure if an Ableton or OS update might have broken it. I did contact the author but haven't heard back... I'll try a bit more though, as maybe I am using it wrong somehow!
By the way, if You really need proper midi output from Live,
maybe You could consider making a max standalone
that receives OSC via UDP from live, and outputs midi.
If one would use same raw midi data like 144 48 0 as OSC message,
than one would just pass the message to midiout...
And goodbye stupid Live ...
If You don't have max license, I'll be glad to make such simple standalone
for You.
hi, i've spent the weekend offline, and to some degree battling with the same problem.
did you find an elegant solution?
however, using the controller in live as a control surface, live is actually sending the note on with velocity zero. so, i might try the control surface route, but it's not really documented, preferably i would like to have some kind of state machine to read and update.
as ctrl surface in live:
Note On: A#5 ( 94) Vel: 0 Ch: 1
Note On: A5 ( 93) Vel: 127 Ch: 1
from midi track in live:
Note Off: F#1 ( 42) Vel: 64 Ch: 1 <-live "creates" a note off when velocity is zero
Note On: F#1 ( 42) Vel: 127 Ch: 1
i tried the "imp" midi out and it works, finally! https://www.theimpersonalstereo.com/max-externals/
i'm using ableton live 9.7.7 and max 7.3.6
i don't know about live 10, if it has the same problem?