Get Current Pattern Position While Playing

Hello,

is it possible to get notified, when the current pattern position reaches a certain value while the pattern is playing?
I was thinking of creating another visual pattern position follower for my tool. But this sounds like creating a kind of thread and I do not know if it is possible.

Or maybe another idea would be to calculate the current song position via bpm and lines/beat and create a Timer when the user hits play…

The Lua scripting engine is not fast enough to do this on line interpolation level.
The lowest level of fast interrupts, you need the renoise.tool().app_idle_observable api feature and then poll for the current sequencer play position, but it ain’t as precise as faster compiled routines could provide for.

If all you want is visualizing a playback position, then renoise.tool().app_idle_observable will do the job just fine…

Great, thank you. It works. :)