observer on any note_columns or effect_columns ?

Is there a way of catching any change in all notes_columns or effect_columns ?

i have started writing some musical analysis tools in python and a Renoise tool to communicate with.

When the tool start i send all the notes and effects that modify pith to python though sockets.

But now i want to catch only changes in song for avoiding resending all each time !

Yes! It is done via line_notifiers.

https://github.com/renoise/xrnx/blob/master/Documentation/Renoise.Song.API.lua#L2684

The general rule is to handle line notifiers with care, as they can easily become very intensive otherwise. For example:

  1. You might wanna add/remove these notifiers dynamically when changing pattern.

  2. User triggered actions like copy/cut/paste track data will flood the line notifier for each line having pattern data (or maybe even each column… can’t remember). This can be circumvented by using a one-shot scheme based on an idle_notifier or a timer, checking periodically if something happened.

  3. Furthermore, dismiss any irrelevant changes at an early stage (like pattern data that was changed in a track that you’re not interested in).

Thx Joule !

i have tested this notifier and it can do the job.

i can get the line pos in callback, ex:

[line] => 22

[pattern] => 1

[track] => 1

Is there any way to get column too ?

column_notifier :slight_smile: ? (but if it exist i think i will have to register many many notifier …)

Nope, I don’t think there is.

It would be possible to make a custom comparison to a cached version of the patterns/tracks data (that gets properly updated), but I can imagine that such a scheme would easily introduce some noticable lag (quite a bit of song data scanning involved when caching stuff). It’s theoretically possible and probably “fast enough”, if really really needed. I am guessing that the net gain in speed won’t be much, compared to sending values from columns that weren’t updated.