Skip to content

Getting clip info #89

Answered by leolabs
jonathan3692bf asked this question in Q&A
Mar 25, 2023 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

Hey @jonathan3692bf,

Observing a value on all clips isn't trivial since you need to manually add the event listener to each clip in your session. In arrangement view, a basic solution that just covers the first track might look like this:

const tracks = await ableton.song.get("tracks");
const clips = await tracks[0].get("arrangement_clips");

for(const clip of clips) {
  await clip.addListener("name", (name) => console.log("New name:", name))
}

For session view, it would look like this:

const tracks = await ableton.song.get("tracks");
const clipSlots = await tracks[0].get("clip_slots");

for (const clipSlot of clipSlots) {
  const clip = await clipSlot.get("clip"); // might be null if the…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@jonathan3692bf
Comment options

Answer selected by jonathan3692bf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #88 on March 26, 2023 22:12.