Thread: Midi <-> OSC
View Single Post
Old 11-18-2017, 04:48 PM   #94
Join Date: Feb 2014
Location: Moscow, Russia
Posts: 554

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:
printf("%s", oscstr);
What code should I use instead to display proper sysex message in console?

Last edited by fundorin; 11-18-2017 at 05:11 PM.
fundorin is offline   Reply With Quote