11-20-2017, 08:55 AM
|
#113
|
Administrator
Join Date: Jan 2005
Location: NYC
Posts: 15,721
|
Quote:
Originally Posted by fundorin
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.
Code:
(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
slStartup();
// ... midisend(dev);
);
|
@timer preferably
|
|
|