Jump to content


Photo

observer on any note_columns or effect_columns ?


  • Please log in to reply
3 replies to this topic

#1 stygmate

stygmate

    Member

  • Normal Members
  • PipPip
  • 14 posts

Posted 28 March 2017 - 12:16

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 !



#2 joule

joule

    Guruh Motha Fakka is Levitating and Knows Everything About Renoise Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • 1467 posts
  • Gender:Not Telling
  • Location:Sweden
  • Interests:music, philosophy, engineering

Posted 28 March 2017 - 15:59

Yes! It is done via line_notifiers.

 

https://github.com/r...g.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).



#3 stygmate

stygmate

    Member

  • Normal Members
  • PipPip
  • 14 posts

Posted 28 March 2017 - 17:51

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 :) ? (but if it exist i think i will have to register many many notifier ...)
 


#4 joule

joule

    Guruh Motha Fakka is Levitating and Knows Everything About Renoise Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • 1467 posts
  • Gender:Not Telling
  • Location:Sweden
  • Interests:music, philosophy, engineering

Posted 28 March 2017 - 18:07

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.


Edited by joule, 28 March 2017 - 18:08.