[Solved] Defer your response

689 viewsCSS QuestionsCSS Error
0

Hi, what does mean this:

> Changes cannot be triggered by notifications. You will need to defer your response.

Related to this script:

self.song().tracks[self.get_list_item("list1", 1)].color_index = self.get_list_item("list1", 0)

Fabrice Planquette Edited question December 25, 2024
0

Here’s a simplified script. Help!

Fabrice Planquette Changed status to publish December 23, 2024
Attached Files:
1

This 2021 answer from the Remotify admin might help you out.

Based on that answer, here’s what might be a work-around:
– Use the Reaction with the “Visible Tracks has changed” Listener to save an index to a Modifier.
– Create a second Reaction that Listens to that Modifier being updated; which then changes the Track Color to the index stored in that Modifier.

OR

Maybe you could make a separate thread, where you let the code wait for half a second before running the code that changes the color. That way the original Reaction will have completed already while the thread is waiting (or that’s what I’m guessing, not entirely sure I’m getting the logistics of threading right).

EDIT: JohnC also posted that work-around in a previous post

Glenn Verhaeghe Edited answer December 23, 2024
1

Ableton blocks UI to UI methods.
So in your case, the listener ‘songs visible tracks has changed’ is a UI based event and your action is setting the color index of the track. Ableton is blocking this with the ‘defer’ message.
You would need to change the listener to an even coming from the midi controller or explore what Glen mentioned above.

There’s also this user submitted solution to get around it: https://community.remotify.io/questions/question/solved-defer-your-response-workarounds/

JohnC Edited answer December 23, 2024
0

First solution with modifier doesn’t work here. Could you confirm?

Fabrice Planquette Edited answer December 24, 2024
Attached Files:
0

And scheduler solution reports errors.

Fabrice Planquette Posted new comment December 24, 2024
Attached Files:

What are the errors you are getting from this?

this:
Traceback (most recent call last):
File “output/Live/mac_universal_64_static/Release/python-bundle/MIDI Remote Scripts/_Framework/Task.py”, line 233, in do_update
File “output/Live/mac_universal_64_static/Release/python-bundle/MIDI Remote Scripts/_Framework/Task.py”, line 54, in update
File “output/Live/mac_universal_64_static/Release/python-bundle/MIDI Remote Scripts/_Framework/Task.py”, line 149, in do_update
File “output/Live/mac_universal_64_static/Release/python-bundle/MIDI Remote Scripts/_Framework/ControlSurface.py”, line 546, in message
TypeError: ‘int’ object is not callable


Don’t you have it if you try the script?
Does it work for you?