How To Remove Notifiers

I’ve a several notifiers on different tracks (prefx_volume, prefx_pan, mute_state, solo_state). Can i remove all this notifiers ON ALL tracks by one command? Now i’m using next code for each track:


where fn - is separate function for each track. Troubles starting after i insert/remove tracks. It’s hard to code tracing channels movements (and looking for observed). Im prefer to kill all notifiers and setup new ones. Is it possible?

Please, help ! :)

Theres a syntax in Lua to call functions with variable names. (eg functions stored in global space)

function foo1()  
 print "Foo 1"  
function foo2()  
 print "Foo 2"  
function foo3()  
 print "Foo 3"  
-- rprint(_G)  
for i=1,3 do  
 local x = 'foo' .. i  

maybe you can do something clever like

for i=1, do  
 -- Be clever?  
 if __REPLACE_ME__:has_notifier(_G[x]) then  

Hope this helps.

Great. It’s really helps :) Thanx

Watch out when creating a new song - trying to removing a notifier which is attached to a gone song would result in an error.
In such a case, you can safely skip removing the notifiers, and just define new ones, as the old song will never trigger the now-obsolete ones…