How to detect number of devices in track?

Post Reply New Topic
RELATED
PRODUCTS

Post

Hi all scripting brothers and sisters here ;)

Just a little question: I want to have an observer which observes the number of devices in the currently selected track. I need this for a) detecting whether devices have been added to/removed from the track and b) to see whether the track device chain is empty.

Not so important but the cursor track is created inside the init() function like this:

Code: Select all

cursorTrack = host.createArrangerCursorTrack(0,0);
Then I tried to set up the observer like this (also inside the init() function ):

Code: Select all

cursorTrack.createDeviceBank(1).addDeviceCountObserver(function(on){
   cursorTrackDeviceCount = on;  //write the new value to variable cursorTrackDeviceCount
})
This caused a reproducable crash which I already reported to the devs. But maybe it was my fault and someone here could help me here? (maybe also another method/workaround)

Cheers,
u-u-u

Post

crashed for me aswell. Did you every find an alternative way to find the count of devices on a track/device chain?

Post

Tried it with 1.2 beta 7 and it was finally fixed there. :)

Post Reply

Return to “Controller Scripting”