faster signal to float?

Feb 15, 2011 at 7:48pm

faster signal to float?

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 at 9:26pm

Yes, check out the [Snapshot~] object.

Feb 15, 2011 at 10:15pm

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 at 10:23pm

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

Feb 15, 2011 at 10:37pm

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 at 11:29pm

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 at 2:22am

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 at 12:43pm

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 at 8:36pm

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


You must be logged in to reply to this topic.