Just some other opinions here, since I like to promote the API
catching all lines in high BPM is possible even If lines are skipped inbetween two “idle bangs”. You’d process a range of lines and it won’t miss anything. However, I’d suspect it might be a very good idea to cache the pattern data instead of constantly accessing renoise.song() and note_columns. For caching, tostring(), lines_in_range and some pattern matching can be used for quickly building an internal “cache”. Now any searches here will be very fast.
Flashing buttons with a my_button_class:flash() method isn’t heavy, afaik. Use idle_notifier and os.clock comparison when setting the lightness. I think you’d have to add a lot of buttons before noticing large “steps” in the color fadings.
The main problem with explaining all of this, is that it requires quite a bit of prior knowledge from anyone trying to implement it.
PS. I think LUA is very fast! Accessing renoise.song() can be a bit slow, but as explained, this can be dealt with in many cases.
It seems that the solution is very complicated in this case. As I see it, the API does not have the opportune _observable to create it. Then is necessary try looking for tricks outside the API to build such a tool.
My idea was to build a simple GUI with 12 buttons representing only one octave. This octave would cover all notes (the 120 notes) and each button would automatically change the name of the note (octave number). Thus, constantly the 12 buttons would be updated only analyzing a single selected track with its 12 columns of note, only the visible note columns, nothing more (if only exist a note column visible, only analyze that note column).
Depending on the note, it would light one of the 12 corresponding buttons (green color), and off (gray color) with the note-off or other different note.This would be a step later. What I do not know how to build is to create a cache or use the correct notifiers, even if the tool is heavy. The issue is that I have not even seen a tool that works similar, and bewilders me :).
I am aware that there are several users in recent years who have tried to build tools reading data already written in the pattern editor without success.
Does anyone dare to build a single button that reacts to a single note already written?It could serve as a starting point and understand the operation.