Notifier while song is playing?

hi everyone,

i’m still a beginner with renoise scripting so apologies if this is a really easy question!

is there a notifier for “a line in the song was played”? i’m basically looking to execute some code after each line is played (i.e. everytime the play position advances).

sh

The short answer is no.

ah ok thanks ;)

how about a larger level of granularity - is there a way for me to get a notifier for “a pattern has started playing”? (i.e. would be fired every time a pattern starts playing from 0x0).

sh

Reason for the lack of this notifier is that your routine would be fired every moment and could stall the whole Renoise process as the Lua engine runs in the graphics engine which updates every somewhat frames.
Firing a routine in a higher frequency than the engine can handle would clog up the CPU pretty fast.

You can use renoise.song().selected_pattern_observable in combination with renoise.song().transport.playing, but that would only work if you always have follow on…
At any point in time you can use renoise.song().transport.playback_pos, but there is no ‘trigger’ for it, no notifier to let a script know it’s in a next pattern

thanks for the help guys - i’m going to give this approach a shot but i imagine it won’t work when the song only has one pattern (i.e. if you are live looping on a single position in the sequence).

time to think of another approach!

sh