Is there anotifier on changing order of the instruments/moving an instrument available?
renoise.song().instruments_observable
How the object of a particular instrument_index is moving can be tracked by checking:
-
if event[“type”] is “insert”, is event[“index”] smaller or equal to the particular instrument index? This would imply that the instrument was moved upwards.
-
if event[“type”] is “remove”, is event[“index”] smaller or equal to the particular instrument index? This would imply that the instrument was moved downwards (or deleted).
-
if event[“type”] is “swap”, is event[“index1”] or event[“index2”] equal to the particular instrument index? This would imply that the instrument has swapped place with some other instrument.
-
All other conditions mean that that something happened to the instrument list, but it didn’t lead to the particular instrument being moved.
Thanks!
Hm, I always get 3 notifiers at once, on dragging (2 x insert, 1x swap) and inserting (3 x insert) … Any idea way? Only one move, I get one event only…
Ok, I think I understood this now… Just do what the events say, don’t think on the other hand, it would be helpful to maybe have a “numEvents” in the event, so you could trigger something one time only per operation.