programmatically adding latency

Dec 4, 2009 at 7:07pm

programmatically adding latency

Is it possible to detect cpu %usage and add program latency when the usage goes above a threshold?

Dec 4, 2009 at 7:14pm

What do you mean by latency? In the scheduler or in signals? Please clarify.

Dec 5, 2009 at 2:26am

it might be risky to implement an automatic mechanism for that, but it
is definetly possible.

you will find out which two objects you will need by simply unlocking
the DSP preferences patch, it is all in there.


Dec 5, 2009 at 2:28am

depending on your audio hardware it can be more safe to turn audio off before changing
the buffer setting.

Dec 7, 2009 at 3:21pm

Thanks. I was out for the weekend, but I’m back. How can I unlock the DSP preferences patch? Are you referring to the DSPstatus.maxpat file in the interfaces folder in max (5 BTW)? I can’t get that patch to go out of presentation mode.

Dec 7, 2009 at 4:59pm


right click the window
choose ‘Edit’
hold down cmd (mac) / ctrl (win) and click on the ‘View’ toggle
copy anything you need…

Dec 7, 2009 at 5:41pm

i agree with roman here.
you could compromise the entire stability of the system by dynamically changing such settings.

i would recommend finding the worst case scenario and setting the patch accordingly upon init.

otherwise, you’ve got some troubleshooting and cleanup in store for your patch. :)


Dec 9, 2009 at 11:13pm

Concerning vector size I agree with previous posters, you don’t want to change this in a running patch.

It is possible to change sampling rate though, by encapsulating parts of your patch inside a poly~ and sending up/down.

Dec 9, 2009 at 11:15pm

Oops, found out you can actually change vector size inside poly~ as well, using the vs message (see docs).


You must be logged in to reply to this topic.