Deferring messages from a V8.codebox
Hi,
I'm trying to use the Max JS API to do parameter mapping in Live. When I send a message out of my codebox to a live.modulate~
object directly from a callback, I get the following error:
Setting the Id cannot be triggered by notifications. You will need to defer your response.
I tried to fix this by using a defer
and a deferlow
object, but neither worked. What worked was creating a Task
object and then scheduling it for 1ms, but I'm not sure that's the best approach?
deferlow
before the live.modulate~
seems like it ought to work. But anyway I've done similar using Tasks() from LiveAPI callbacks in order to get around those errors within JS contexts.