I would like to use an array of floats as function arguments for OSC.sendMessage(). For example in PHP I'm aware of call_user_func_array(). Is there something similar availabe in sclang?
The context is that I would like to send lots of float values via OSC from sclang to Unity. AFAIK it's not possible to directly embed an array of values in an OSC message.
I'm also open for suggestions if there is better way to achieve this as my understanding is that there could be constraints regarding the amount of values I can pack into 1 OSC message and maybe I have to handle fragmentation / spanning over multiuple messages myself.
For a fixed array size / argument count I figured out this:
(
var floats = [13.37, 31337.1337, 1.0];
{ | a, b, c | o.sendMsg("/LoadAudioData", a, b, c); }.valueArray(floats);
)
But I need a more generic solution for different array sizes.