Observe a n AudioDevice removal

Hi,

I would would like to observe the removal of an track dsp device. Cannot find a hint in the documentation. Also for instruments I cannot find such observable… e.g. I added observers to vst-parameters and suddenly the device was removed…

renoise.song().tracks_observable

renoise.song().tracks[].devices_observable

They will return an event - { type = “remove”, index = 2 }

If you need to recall some kind of information about the removed device, other than the old index number, you’d have to store this in some custom structure.

PS. Any old parameter notifiers (or something else) being active within the device will auto-destruct if the device is removed, so you won’t have to worry about removing these manually.

Thanks!

And any idea for instruments?

I was reading a bit too quickly.

renoise.song().instruments_observable

Will vst-parameter-notifiers be removed automatically, too? Since it seems that at sng.instruments_observable trigger the device at event.index already is destroyed and no way to remove it manually…?

Each notifier running from an observable should auto-destruct whenever a parent object or table is deleted. It seems to be very reliable. You shouldn’t have to worry that a single thing slips by :slight_smile: