Moving session box while a button is pressed / repeating an action while a condition is met

2.84K viewsCSS Community Scriptssession box
0

Hello everyone,

So I’d like to get a ‘long’ button pressed to continuously move the session box, so that it stops only when I release the button (e.g. when I press down and the box goes down several scenes until I release the button). Right now, I can only get one button press = one move. I tried a bit through both Session box navigation and through reactions (for instance by creating several times the same action) but I did not manage to create this behavior – but to be honest my knowledge at this point is still very limited.
Is there a way to mimic such behavior?  (it’s the original behavior for the APC40 MK2 but could be useful to anyone).

More generally I think the issue is about: “How can we repeat any action (like moving session box down one scene) as long as a condition is met (like button X is still pressed) ?” A bit like a ‘while’ condition in programming.

In the case ‘a button still pressed’ cannot be detected, I guess we could have something like “move the box down” several times with a very short delay between each move (so it’s not instantenous) when the button is pressed, and when the button is released, end this action (a bit like in the shift mode tutorial). But I have no clue how to programm that – I did’nt manage to get a box moving down several times in a row, and not idea how to implement a short delay between actions.

Any help is welcome!

Cheers

neoseed Answered question
0

Hi Glenn,

Many thanks for your suggestion. To be honest I don’t really know how to code, I survived thanks to ChatGPT and lots of trial and errors, sometimes barely understanding what I was trying… For now on that part I have a workable solution (with the exception it does not fully work with the color clips system you set up- see my other post) so I stick to the method I found for now.

From my experience, I had the impression the issue was the “while” itself (in one of my test – I removed the time.sleep and Ableton still froze).

Still, I intend to learn more as time goes and will have a look at the threading module, many thanks !

Cheers

neoseed Answered question
You are viewing 1 out of 6 answers, click here to view all answers.