get_device_open_time
Hi there
I can't get "get_device_open_time" to work properly. Is there any examples for this that I have missed?
The idea is to check when Reaper is opened and if certain time has passed, do some stuff. I got it working when detecting my midi controller, but it seems it can't detect when Reaper is open. I tried this:
@input hw_input MIDI "mycontroller"
@input osc_input OSC "127.0.0.1:9000" // Reaper
@output hw_output MIDI "mycontroller"
@output osc_output OSC "127.0.0.1:8000" 1024 0 // Reaper
@timer
( ((get_device_open_time(hw_output)-start_time) > 0) && (lock==0) ) ? (
printf("\nDEVICE OPEN");
lock=1;
);
@init
start_time = time;
lock=0;
But as I say, if I substitute "hw_input" with "osc_input" this code is not working. Any ideas what am I doing wrong?
|