Offline Processing


#1

Is it theoretically possible to create an object that, for example, processes a recorded sample (stored in a table presumably) 'offline' (i.e. not in realtime), and writes the results back into a table/multiple tables for later recall?

Is there any way to allow a function in an object to monopolise all the resources on the MCU until a particular take is completed?

I realise this is quite an obscure thing to want to do, so just investigation possibilities...

a|x


#2

Try with a for loop, see if the patcher disconnects. If it doesn't you have what you need (also, axoloti patcher does not disconnect anymore, even with 100% dsp load).

IF it does disconnect you can try splitting the task over several k-rate cycles (i tried this road once but i did not succeed, maybe you'll have more luck)


#3

At the end of a dsp k-rate cycle, the consumed cpu time is measured, and if too close to 100%, a one milliseconds sleep is inserted, giving other (lower priority) threads a chance, maintaining the pc connection is one of them. Still, if it takes over a second the pc communication will disconnect, the since the sleep is only inserted at the end of the k-rate cycle. While running over-time the contents of the audio double buffer will keep on getting fed into the audio DAC, so you'll get buzz.
Alternative to using the dsp cycle, is doing <10 seconds of work in init code (the editor will disconnect when getting no response within 10 seconds), or using a low priority thread similar as script2 uses.


#4

I was thinking of silencing audio output while the processing took place, so that would get around the potential audio glitching issue.

Are there resource and other limits on objects using threads?

a|x