Thread: Midi <-> OSC
View Single Post
Old 11-20-2017, 08:53 AM   #112
Join Date: Feb 2014
Location: Moscow, Russia
Posts: 554

In which section of the script should I put this code?
I want slStartup() function to run on midi port reopen.
When placed in to @init section, code run just once, on start of the oscii-bot, or when "script reload" is pressed.
Am I wrong, thinking that "dev" variable is an alias for device name? Tried leaving it as dev and renaming to my midi device in alias.

(tmp = get_device_open_time(midi_in)) > dev_last_time ? (
  dev_last_time = tmp;
  printf("reinitializing dev\n"); // executes on initial open and any subsequent re-opens
  // ... midisend(dev);
fundorin is offline   Reply With Quote