Removing listener(s) #68
Unanswered
CrossmodGlennVS
asked this question in
Q&A
Replies: 1 comment 1 reply
-
Hey @CrossmodGlennVS, The value returned by the // Subscribe to a value:
const unsubscribe = await ableton.song.addListener("tempo", (t) => console.log("Tempo:", t));
// And to unsubscribe:
await unsubscribe(); I hope this helps :) |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I want to have a listener on a certain property of the selected clip.
But if I add a listener to the property, it will keep firing events even when the clip not selected.
So I need to remove the listener when the clip is deselected and add a new listener for the currently selected clip.
What is the best way to do this?
I've already tried this removePropListener function for the 'playing_position'-property.
When listening, I get the time value (like expected). After removing the listener, I still get the events, but the value is 0.
When selected the clip again, I get values again.
So, it seems to do something, but not like expected.
Beta Was this translation helpful? Give feedback.
All reactions