Reconnecting a midi keyboard


    Feb 27 2008 | 1:19 pm
    Hi pals,
    I am working on something that I want my Max program running, while plug-and-unplug occasionally with a USB MIDI keyboard, that it can work and send notes to the computer.
    It seems to be fine in some of the software to support a hot-swap of MIDI keyboard, but not in Max/MSP.
    I have a little patch below which help me to test.
    If I plug in the keyboard, start the patch. The keyboard will be working. Then I unplug it and plug it in again, no error message, but the keyboard is now lose.
    The only way to 'awaken' it is restart the Max/MSP environment.
    I have already assign an abev. to the keyboard in 'midi setip..', but still no luck.
    Any light ?
    William

    • Feb 27 2008 | 2:41 pm
      my experience (on windows xp, though i'm not sure if that matters) is that programs request access to midi devices on startup only. so, unfortunately, you need to restart max every time your setup changes (assuming you want to continue using midi).
      a potential solution is to use a midi loopback driver (like midiyoke or maple) and use only the loopback port in max. since the loopback "device" is never disconnected, you'll never have a problem with it in max. then you can have your keyboard route (via something like midiox) to whichever loopback port you're using. so when you disconnect/reconnect the keyboard, you'll only need to restart the routing program, and not max.