Is there a way to run some code on midi port reopen?
I'm running a couple of commands at oscii-bot startup, which are shutting down all LEDs, switching the default mode, displaying text on LCD and other.
This all works when oscii-bot is started after the console.
But, if the console was turned on while oscii-bot is already running, one needs to active oscii-bot's window and press "script reload" button.
I'd prefer that the @init part of the script was executed each time when midi port is reopened. Is it possible?
Meanwhile, I'm trying to set the function running when SYSEX is received from the surface.
I know which sysex the surface is sending. Tracked it via midi-ox.
This is the one - "\xF0\x00\x20\x29\x03\x03\x12\x00\x02\x00\x01\x01\ xF7".
When I'm trying to log oscstr contents, this is the symbol that I'm getting: ð
With this code in @midimsg section:
Code:
printf("%s", oscstr);
What code should I use instead to display proper sysex message in console?