Does immediate_send with rel x and y broadcast or unicast? | Intech Studio
💬 general Grid

Does immediate_send with rel x and y broadcast or unicast?

mvdirty
mvdirty · · 9 replies

In firmware as of 2025-02-19, does immediate_send with relative x and y coordinates only forward the message along the most direct path to the appropriate coordinate, or does it broadcast to all modules and then be filtered by each individually?

For context: I’im weighing the efficiency of handling midi cc value feedback via a) midirx in the module at 0,0 using immediate_send to target the intended destination module versus b) midirx in all modules.

On a related note, is immediate_send fire and forget or is it waiting for the destination to receive the lua and execute it, similar to how midirx is stated to wait on all modules to complete processing of a given midi event before handling the next one?

Replies (9)

narayb narayb ·

Immediate can work either way. When using nil as parameters for the broadcast destination, the Grid module will broadcast to all modules.
When using discrete coordinates, it will send its message to that module determined by the coordinates

narayb narayb ·

Immediate tells the other module to do something right now which is why it's not really useful to overuse the command.

mvdirty mvdirty ·

Thanks! On that note, is there an async send which works similarly?

narayb narayb ·

This is the only way for now to communicate between modules directly.

mvdirty mvdirty ·

Thanks!

mvdirty mvdirty ·

Re: the second part of the initial question: does immediate_send block its caller until the destination module(s) finish executing the supplied lua code?

narayb narayb ·

It doesn't really, no

narayb narayb ·

But the lua engine will execute tasks in succession, so if you send two messages the second one will run second.

mvdirty mvdirty ·

Thanks. That seems reasonable.

Discord

View on Discord

This post is from the Intech Studio Discord community.

Open thread →