Version 10...
Aha - using plugin compensation really seems to have done the trick. Now that there's no "prediction guesswork" going on, I've been able to use a proper crossing detector to get the time intervals.
CPU load? Meh! Don't worry about it - I measure about 1-2% on my Q6700.
Testing in Reaper, I've managed some seriously swoopy tempo and time signature changes, and everything is bang on repeatable timing - for off-line renders too.
Also some other improvements...- Bar start position is now added, so you can find which beat or subdivision you are on within the bar for different time signatures.
- There's a separate output for the current position that updates when the song isn't playing, so you can display the current position when editing.
- The output hash now has the following parameters...
ppq[:step] = the number of step divisions since song start.
ppq[:beat] = the number of beats since the song start
ppq[:division] = which step of the current beat when you use the divider
ppq[:bar_beat] = which beat of the current bar you are on
ppq[:bar_div] = which divided step of the current bar you are on
This data is the same for the main output and the display output - the only difference is that the main output sends an event only when playback steps up by a division (sample accurate); the display one updates any time the visible values change (i.e. moving the playback cursor when editing).
Oh yes - silly me, should have said before. The 1-2% CPU load, I mentioned - that was for my entire test rig; including the CPU load for Reaper too!
Bugs!- Seems to be sometimes that the things doesn't start up at all - I think it may be if you load the host with the song cursor at certain positions somehow clashing with the saved values in the schematic. I've found I can usually fix it by moving the cursor to the song start, saving and re-loading.
- Sometimes doubled events if the note division is changed during playback. Might sound better if the changes only take effect at the next full beat,
That'll be the next stuff to work on, then!