When sending a blob to all clients at the same time it must be more effect than having to loop through each client separately no?
Good question. I've never used OSC together with the Arduino so I don't know the ins and outs. But in general there are several aspects to it:
- framerate you are sending with
- baudRate of the serial sender/client
- size of the data you are sending
- overhead of the osc protocol
- serial buffer size of the AtMega you are using
- clock speed the AtMega is running with
I certainly would first try the OSC multicasting method and then offset on the reading side.
It's true my blob is just a 1D array but each element only needs to be a byte not an int or string. This would make it less data to transfer, no?
Keep in mind that an (unsigned) char is one byte. And a std::string is basically a series of chars + one termination character.
Even better/smaller would be to send 6 bools per pixel
3 bits (2^3) would be enough to encode 6 different states per pixel.
That said, I would start with sending a string via OSC multicast and just offset (by 18) on every client. If you then experience performance problems I would further optimize and try to crank more then one pixel into one char or even use a light compression algorithm (but I really don't think that's needed).