Skip to content
This repository has been archived by the owner on Jun 9, 2023. It is now read-only.

Question: How to handle a large number of Messages? #17

Open
StudioOnno opened this issue Mar 7, 2021 · 3 comments
Open

Question: How to handle a large number of Messages? #17

StudioOnno opened this issue Mar 7, 2021 · 3 comments

Comments

@StudioOnno
Copy link

I would like to make some optimalisations for sending a large amount of messages

  • Only send message on value change
  • Reuse message() function
  • Control the speed at which messages are send

any advice for me?

Greetings, Marijn

@glynternet
Copy link

It will, most likely, depend on your use cases.

Only sensing a message when a value changes can work if your receiver doesn't need to know of a new value, but in some cases a receiver being passed the same value again can have a different meaning to not receiving one at all.

Do you have some examples of where you are experiencing performance issues?
Have you done benchmarking to see where your bottlenecks are?

@StudioOnno
Copy link
Author

StudioOnno commented Mar 8, 2021

Hi,

My usecase is this:

I am sending lots of OSC messages from Unity3D to Ableton Live. Using Ircam tools for spatialisation.

When I send all these params, my max for live device uses up a lot of CPU. It seems like just sending messages to the UDPRECEIVE in Maxmsp is already a big workload.

So I am looking for a way to send these value's only

  • when the user changes them,
  • when the game launches (initialize)
  • Decrease sending rate?

What would be the best approach?

Schermafbeelding 2021-03-08 om 09 45 21

Spatial Engine(5-3-2021).unitypackage.zip

@thomasfredericks
Copy link
Owner

Hum, I have an installation running with an OSC link between Max and Live without any major incident. I do not think the problem is with the actual reception of the UDP messages, but rather the code that is triggered inside the Max for Live patch when it receives them.

My solution was to do most of the processing outside of Max 4 Live and only send the minimum to Live through OSC. Remember that Live has a lot of stuff to manage between audio blocks and that a lot of Max computation can slow things down.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants