How to add listener for current clip slot

400 viewsCSS Questions
0

Hi, I am trying to build a Reaction that listens for the current clip slot to have a clip or not have a clip. I want to send LED feedback to my controller’s delete clip button to tell it to light up if the current clip slot has a clip in it, and to turn off if the clip slot doesn’t have a clip (or after I click delete and it no longer has a clip).

I think I have my Actions working correctly, but I can’t figure out how to write a Listener that notices if the current slot has a clip?

admin Changed status to publish May 22, 2024
Attached Files:
1

Hello infinitystairs,
Try as listener:
self.song().view.add_detail_clip_listener
and for condition 1 (when clip is empty):
self.song().view.highlighted_clip_slot.has_clip == False
condition 2 (when clip has audio or midi):
self.song().view.highlighted_clip_slot.has_clip == True
Success!

admin Changed status to publish May 22, 2024
Attached Files:
0

Arrghh, getting closer still..
First issue, you could try adding listener “self.song().add_record_mode_listener” or “self.song().view.highlighted_clip_slot.clip.add_is_recording_listener”? You probably already tried that..
I think both issues are related, it seems that after creating a new clip, the listener is not listening anymore 😉
Tried numerous ways to retrigger the listener, but no luck.
No idea if this is a bug or simply the way Ableton works, it might be inherent to the way this listener works.
Someone with more experience in that area might explain this behavior.

admin Changed status to publish May 22, 2024
Attached Files: