On 11/01/15 21:39, katja wrote:
Any way to get the status on demand in a patch, using Pd core objects?
No built in object as far as I know (though there should be, given how often it is requested).
I can think of some ugly hacks, that have a slight delay (the time for at least one dsp block).
[bang~] doesn't output anything if dsp is off, so wait a few ms after loadbang to check if it did or did not output anything.
[sig~ 1]--[snapshot~] outputs 0 if dsp has never been turned on and computed a block, so wait a few ms after loadbang to check its value.
In either case, use [r pd]--[route dsp] in case the state changed before the result of the previous hacks arrived (and for updating later).
To be robust (eg user is running Pd at a low sample rate), maybe use [samplerate~] to work out how long you need to wait - probably relatively safe to assume block size 64?