undocumented or unsupported? midi object enable 0/1
I’ve been getting into trouble with midi objects automatically selecting an in or out when their designated port doesn’t exist.. I don’t always have all my (USB) hardware with me and things go a little unpredictable..
somy patch now creates a virtual ‘dummyin’ and ‘dummyout’ midiport: when the ‘right’port (the hardware) is not available, I route the ins and outs to the dummyports that don’t connect to anything.
BUT I was on the (excellent) Max Advanced course last week by Sebastian Lexer – and saw a [enable $1] going into midi objects.
Is this enable function for midi objects ‘official’? It would make my patch cleaner but I don’t want to use it if it may not work in future generations. There is no mention of ‘enable’ in the documentation (other than in the ‘pcontrol’ context which is not what I want to use)
so you want to be able to change to incoming port of Max objects such as notein midiin… right?
you can have a general receive to these objects and lodbang a [port blablabla] message
then if you don’t have your blablabla gear you just send a [port bliblibli] message in order to use your bliblibli gear
hope this answers your question
Hi Florent, it’s actually a little different: I have a patch (part of a system of patches) that communicates with the launchpad. So with a loadbang I set the midi objects to the launchpad port.
BUT if the the launchpad is not present, these midi objects automatically default to other midi in and out ports, with unpredictable results. So I want to be able to switch them off if the port does not exist (eg when the device is not plugged in)
I used to do it by assigning dummy ports to make suer that there was nothing going wrong, but I’d rather completely switch them off.. which seems to be possible (it works) but it is not mentioned anywhere in the documentation. I want to know if it is ‘supported’ (futureproof) or not (it happens to work right now, but who knows what will happen in the next version of Max)
I never heard about [enable $1] to midi objects. It should be documented somewhere.
I’ve just checked and found that enable 0/1 works for all midi input objects, even in M4L.
But it must be used carefully to avoid hanging notes.
Exactly! So I was quite excited to learn that this works – I could use it well. BUT I don’t want to start using it if it is offically unsupported and it will stop working in future versions. Hence my question…
Is there any way to attract attention from MAX/MSP guys on this list?
It has been intentionally omitted from the reference.
Although it does basically work, I would not rely on it remaining a valid message to midi objects.
Without knowing your exact issue, it seems like a simple gate or something could be used instead.
Thanks Ben! that’s really useful. Just FYI, the issue is that I have part of my setup responding to hardware controllers that may or may not be present (I don’t always bring all my great to a gig).
I set the midiports during an initialisation routine – but when that port doesn’t exist the midi object automatically takes a different input causing all kinds of unpredictable behaviour. it seemed ‘cleaner’ to me to just switch the object off (which is why I got a little excited :-) ) then to put a gate after it, or like I did, to assign it to a virtual ‘dummy’ input.