I'm customizing a python midi remote script for my nanoKontrol2 and would like to have the leds of a track to flash for a few miliseconds when the selected track changes. I managed to do so with a time.sleep but it has a major drawback : it is a blocking function and during these few miliseconds, it blocks the midi script. What would be ideal would be a threading.timer, but apparently threading is not available (I'm on Windows 7 64 bits, if it changes anything).
Is there a way to use it, or is there another way to achieve what I want to do ?
tldr: how can I use the python threading module in Ableton Live MIDI Remote Scripts, in order to have a non-blocking timer ?
Thanks
Using Python's threading module in MIDI Remote Scripts ?
Re: Using Python's threading module in MIDI Remote Scripts ?
Well I found a way...
There is a timer that can call callback functions every 100ms in the scripts. There was already an "on_timer" function in the file I was editing so I just had to add some code in there and voila.
There is a timer that can call callback functions every 100ms in the scripts. There was already an "on_timer" function in the file I was editing so I just had to add some code in there and voila.