How can I restart midi port after my device disconnects mid-patch?
On computer I just reset the midi dialog with message to pd (a bunch of numbers).

I know on bela it is [hw 1 0 0], but doing this midpatch does not reconnect the device and I get this error:

ALSA lib rawmidi_hw.c:233πŸ™snd_rawmidi_hw_open) open /dev/snd/midiC1D0 failed: Device or resource busyFailed call to __wrap_bindError while creating pipe bela-midiOut_hw:1,0,0: Operation not permittedFailed to open MIDI device hw:1,0,0

I am not sure I can trust bela for my live perfomance this way..

i requested exactly this a few months ago and there is a fix for it in the dev branch, it automatically reconnects midi devices once they are reattached.

    lokki
    This is good news, thanks!
    Forgive me for being incredibly dumb on this subject, but how can I get this branch to my bela (I do not even own a user in github, so this area is completely new to me)? Just wait until official update?

    Edit: So I just downloaded Bela-dev branch, do I now just make the update as shown here? https://github.com/BelaPlatform/Bela/wiki/Updating-Bela

      radiowaves

      yes, just update using the IDE with the zip you downloaded from GitHub.

      what version are you on currently?

      My version is v0.3.4, 31 May 2018 that came with the salt module. Never updated, so I can not update it with IDE, currently in the turmoil of trying to run those linux scripts on windows.

      Ok I updated to latest experimental. But my midi device still does not reconnect.
      When I send hw 1 0 0 it says it is not permitted -- am I able to override this somehow?

        radiowaves When I send hw 1 0 0 it says it is not permitted

        that is the default port, it should work without need to send [hw 1 0 0(, so maybe when you send it you get "not permitted" because it is already enabled. Is the device connected when you start the patch?

        Yes it is connected when patch starts, I also send hw 1 0 0 with loadbang and I see no error then. Error only appears when I disconnect, reconnect and send the message again (connected digital trigger input for that).

        What I want is to disconnect it and then reconnect it during the patch. This is as a safe measure when I am patching my modular and something accidentally disconnects...

          radiowaves en I disconnect, reconnect and send the message again (connected digital trigger input for that).

          There should be no need to send the message again when reconnecting. If the "automatic reconnect" is working correctly, which I understand from @lokki's tests it is, then you shouldn't need to send the message again. I am wondering if sending that message is what is breaking it somehow? Try again without that message.

            giuliomoro
            I removed the message (no loadbang or triggered message) and it works! At least when running fro graphical IDE.
            Thank you!

            great! I will look into why sending the message breaks it (it shouldn't)