How do I save MIDI setup (or how do I set it up inside a patch)?


    Dec 13 2020 | 12:16 pm
    Hi,
    Perhaps this has been discussed recently - I find searching through the forum a bit difficult sometimes - but anyways, see topic title: How do I prevent Max from forgetting my Midi setup?
    On Windows, dealing with MIDI is a headache cause no two applications can use a midi device simultaneously. Meaning in my case the I need to tell Max explicitly NOT to address any of my midi devices. In "Midi Setup" under "Options", I uncheck all of them, but on subsequent start-ups some (but not all!) of the checkmarks sneak back in.
    If somehow this isn't directly solvable, alternatively I'd like to know if there's a way that I can have a patch itself deactivate any such midi activations on startup?
    Thanks! -t

    • Dec 20 2020 | 11:47 am
      So - no way to have max remember settings for midi devices?
    • Dec 20 2020 | 2:43 pm
      nope, a patch can not change settings in the operating system.
      but... why is it a problem that ports are available which wouldnt work when selected?
    • Dec 20 2020 | 2:57 pm
      Thanks Roman for your response!
      The problem is that the ports are being hogged by Max, making them unavailable for other software that I want to run simultaneously. To put it practically: I plug in my Nanokontrol, Max enables this device both as input and as output. I manually disable this, because I want the Nanokontrol to communicate with Ableton. Next time I start max, it might or might not have remembered my disabling of Nanokontrol. But I'll notice soon enough when I see that Ableton isn't responding to my slider movements. I believe that if I make sure that I ALWAYS religiously adhere to a strict order of starting softwares and plugging in devices, I might get some consistency here. But... it significantly speeds up my development time if I'm able to be flexible with plugging and unplugging stuff, quitting and restarting programs, etc
    • Dec 20 2020 | 3:51 pm
      oh, i see, of course. yes you dont want to be forced to start programs in a certain order, that must be fixed. i just remembered that we had it somewhere: https://cycling74.com/forums/disable-specific-midi-inputsoutputs-when-launching-a-patcher
    • Dec 20 2020 | 3:56 pm
      Wah! That's the holy grail I've been searching for... thanks, this really makes my life a lot easier.
    • Dec 20 2020 | 4:31 pm
      ...and just in case any future beings run into this post and want to know how I implemented this: I now have a bunch of messages like ;max midi portenable "KOMPLETE KONTROL M32 MIDI" 0 0 where the first 0 is for disable/enable, the second 0 is for input/output. And they're being triggered by a loadbang and by a midiinfo @autopollcontrollers 1 ...which sends out a new list every time a device is added or removed.