Reaction only fires in the last track created

594 viewsCSS Questionscss script
0

Hello dear remotify community, I currently have a problem that I can’t solve myself and I hope someone can help me.
I have created a reaction that fires whenever a certain parameter of a device within a device chain changes in the selected track.
Then there is a condition that asks whether the value is 1 or 0. If everything works, I send a sysex message to my controller.
If I now open the Ableton set and change the parameter value then it works great. As soon as I duplicate the track, it also works in the duplicated track
but no longer in the previous track. maybe someone has a tip


self.song().view.selected_track.devices[0].chains[0].devices[self.get_modifier_value("m15")].parameters[1].add_value_listener

								
therockdude Answered question January 8, 2025
0

I was able to examine it more closely. The error only occurs when parameters have a minimum value of 0 and a maximum value of 1. Most of the on/off parameters have a value of 1 or 0. I’m not sure what I’m missing?

therockdude Answered question January 5, 2025
0

Try reloading the mode when the tracks change (i.e. a track is duplicated)

Add a new reaction,
listener: live object mode > song > tracks value has changed
action: script > set active mode
In the parameter section (set input field to ‘custom code’):

self.set_active_mode(active_mode)

JohnC Answered question January 6, 2025
0
hi John, thanks, I tried that. If I now duplicate the track, 
the mode is activated again as expected. The behavior remains the same. 
The reaction only fires in the last track created. This is only the case 
if the value I query is a 1 or a 0. With values ​​from 0 to 127 it works. 
I removed the condition to test whether it had anything to do with it, 
but the same behavior can be observed here too.
therockdude Posted new comment January 8, 2025

I could be wrong but It sounds like the listener isn’t firing, reloading the mode will re-attach listeners, if it hasn’t fixed the problem I’m a bit stumped.
If you move to the problem track first, then reload the mode, does that fix it? (maybe reload the mode using a button press).

Hey John, i’ll try It today. Thx

0

I also got the following error message in the CSS log. I can’t say if it has anything to do with it:

/Applications/Ableton Live 12 Suite.app/Contents/App-Resources/MIDI Remote Scripts/css_device_parameter_listener/css_device_parameter_listener.py:891: SyntaxWarning: “is not” with a literal. Did you mean “!=”?

school Off

JohnC Posted new comment January 7, 2025

That’s just a warning which began being output since Live 12.1. It won’t break the script (the warning will be removed in the next version of CSS).

0

Hello John, I’ve tried it now. As soon as I use if selected track changes as a listener it works. When I use the listener tracks change it doesn’t work. Thank you for that. What surprises me, however, is that it works without this listener with values ​​from 0-127 and still not with values ​​from 0-1. anyway, this helped me a lot.

JohnC Posted new comment January 8, 2025

‘selected track changed’ should fire whenever you select a different track.
‘tracks changed’ should fire whenever a track is added/removed/moved.

I’m not sure about the 0-127 and 0-1 issue though sorry.