Forums > MaxMSP

faster signal to float?

Feb 15 2011 | 7:48 pm

I’ve been using the right outlet of the number~ object to convert signal values to floats. But I assume that the UI aspects of that object slow down calculations some. Is there an object that can do this conversion without any UI stuff involved?


Feb 15 2011 | 9:26 pm

Yes, check out the [Snapshot~] object.

Feb 15 2011 | 10:15 pm

Ah, thanks for the tip. I’ve been testing and it doesn’t appear to be any more efficient though, even with the same update interval. Is this normal?

Feb 15 2011 | 10:23 pm

number~ has a minnimum update interval of 20ms, snapshot~ goes down to 1ms (maybe even less with the samples arg?)

Feb 15 2011 | 10:37 pm

Yes, I noticed that. But like I said, even with the update interval set the same in both objects, there’s hardly any difference.

Feb 15 2011 | 11:29 pm

Zach, you have your object?!

32 numbers~ with 20 ms update = 24 % CPU

32 snapshots~ with 20ms update = 11.2 % CPU

On my machine, I don’t suppose yours is much different.As I’ve been learning lately, quick graphics updates can be very taxing on CPU.

Feb 16 2011 | 2:22 am

Hmm, yeah. I just ran tests again and the snapshot~ gave much better performance. about 17% CPU with 32 number~s and 4% CPU with snapshots instead. My computer must be screwy or something…

Feb 16 2011 | 12:43 pm

Beware, that CPU utilization percentage in the DSP window will only show the time spend in audio routines (msp). With a message interval of 20 ms or so you will put a heavy load on the scheduler (max), which won’t be reflected in DSP’s % CPU.

Also keep in mind, that snapshot can only get one sample of the audio signal per vector size…

Feb 16 2011 | 8:36 pm

Yeah, I was checking CPI in the task manager. Thanks for the heads up about the vector size thing though.

Viewing 9 posts - 1 through 9 (of 9 total)

Forums > MaxMSP