malc ·
I found a way to trigger timers from MIDI events.
At the moment, if MIDI data comes from an external source it arrives on a separate process (or thread). If you use this MIDI data via a MIDI splitter to trigger timer events then because of the way Windows timers work they get created on the same process as the MIDI data. Unfortunately, once the MIDI data has been sent the process dies and the timer dies along with it. The result is that nothing happens.
One solution is to use what I've called a de-threader. This takes a trigger created on one thread and just sets a flag. The flag is then continuously polled by the SM thread and a trigger is sent when it finds the flag is true. The flag is then reset.
This isn't very accurate but then neither are the Windows timers anyway.
Here's the osm: [old link]
This technique can also be used for MIDI events triggering Slide components which use windows timers internally.