programmatically adding latency
Is it possible to detect cpu %usage and add program latency when the usage goes above a threshold?
What do you mean by latency? In the scheduler or in signals? Please clarify.
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.
depending on your audio hardware it can be more safe to turn audio off before changing
the buffer setting.
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.
right click the window
hold down cmd (mac) / ctrl (win) and click on the ‘View’ toggle
copy anything you need…
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. :)
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.
Oops, found out you can actually change vector size inside poly~ as well, using the vs message (see docs).