leolabs / ableton-js

Control Ableton Live with Node.js
MIT License
368 stars 46 forks source link

listener "playing_status" not working correctly #25

Closed sfxter closed 3 years ago

sfxter commented 3 years ago

Hello, I can't get to add "playing_status" listener, either to clipslot or clip itselft. Am I doing this correctly?

ableton.song.get("scenes").then(async (scenes) => {
  const firsScene = scenes[0];
  const clipSlots = await firsScene.get("clip_slots");
  const firstClipslot = clipSlots[0];
  firstClipslot.addListener("playing_status", (p) => console.log("status", p));
});

Clipslot works with listeners "is_triggered" and "has_clip", but not with "playing_status".

Is there a recommended practice to remove listener from clip or clipslot?

Thank you once again.

leolabs commented 3 years ago

I've tried and could reproduce the issue. It's a bit odd though, it seems that Ableton itself isn't sending any events to the playing_status listener. I'll do more testing and report the error to Ableton if it's really an issue on their side :)

leolabs commented 3 years ago

I've tried different methods and I can't get Ableton to fire on changes to this property. I've contacted Ableton about this and will add a comment to the findings section of the readme.

nilsmango commented 1 year ago

I think I found what the problem was: in the Python midi script you need to attach the playing status listener to the clip of the clip_slot, not the slot directly. Worked for my script.

leolabs commented 1 year ago

Thanks for sharing your solution!

nilsmango commented 1 year ago

No problem. I still can't really use the playing status listener as it still does not seem to fire when you stop a clip, really odd.