-
Using AbletonJS, what code would be required to check that a clipslot in a particular scene is not playing, and then play that clip? |
Beta Was this translation helpful? Give feedback.
Answered by
leolabs
Feb 12, 2024
Replies: 1 comment 3 replies
-
Hey @bendorge, Here's a simple example that starts the clip in the first slot of the first track if it's not playing: const ableton = new Ableton();
await ableton.start();
const tracks = await ableton.song.get("tracks");
const clipSlots = await tracks[0].get("clip_slots");
const firstSlot = clipSlots[0];
const isPlaying = await firstSlot.get("is_playing");
if (!isPlaying) {
await firstSlot.fire();
} else {
await firstSlot.stop();
} Let me know if this helps! |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
bendorge
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey @bendorge,
Here's a simple example that starts the clip in the first slot of the first track if it's not playing:
Let me know if this helps!