encountered a bug;
I uploaded a new version, in which it's fixed.
I am not convinced your version is more optimized. As I see it, in your version, the not necessary useful code executed each idle time is [lua]if (enabled and (
not renoise.song().transport.edit_mode or
[/lua] while in my version it's [lua] local loop_start = renoise.song().transport.loop_sequence_start
local loop_end = renoise.song().transport.loop_sequence_end
local new_loop_start = loop_end + 1
local new_loop_end = new_loop_start + (loop_end - loop_start)
if renoise.song().transport.playback_pos.sequence == loop_end then[/lua] and is executed every idle time only if edit mode is on. The notifier checks are called when edit mode is toggled, not every idle time. So I agree, your version requires less API calls, but does that really make a difference at that point? In my opinion, the fact that my version uses the app_idle notifier only when edit mode is on makes a bigger difference.