[PD] meaning of delay(msec) and use callbacks in audio settings

Jonghyun Kim agitato816 at gmail.com
Sun Feb 22 17:22:03 CET 2015


I found some links for understanding callback scenario in realtime audio.

https://ccrma.stanford.edu/software/stk/crealtime.html
http://portaudio.com/docs/v19-doxydocs/blocking_read_write.html
http://www.rossbencina.com/code/real-time-audio-programming-101-time-waits-for-nothing

cheers,
akntk

On Sun, Feb 22, 2015 at 2:36 AM, Jonghyun Kim <agitato816 at gmail.com> wrote:

> Thanks David for your answer.
>
> I understand what mean audio buffer and block size. Now I'm on Linux with
> Jack backend, and the block size controlled by jack. I know how to change
> the block size with [block~] or [switch~] in sub-patch.
>
> But I still don't understand the difference between Callback scenario and
> Block method. I think that I don't know what is Callback in audio settings.
> I searched about that, but I couldn't see good answer for me.
>
> Thanks in advance,
> akntk
>
>
>
> On Wed, Feb 18, 2015 at 11:26 AM, David Medine <dmedine at ucsd.edu> wrote:
>
>>  Basically these things have to do with performance.
>>
>> 'Use callbacks' has to do with how Pd communicates with your soundcard.
>> There are two options, using callbacks, and blocking. In the callbacks
>> scenario, your computer processes samples then asks the sound card to 'call
>> you back' when it's ready to receive those samples (i.e. when it is out of
>> audio to play and needs some more). In the meantime, you can process more
>> samples, or check out what's going on on CNN.com or whatever.
>>
>> In the blocking method the computer hands the samples to the soundcard by
>> calling a function and if the sound card is not ready, it 'blocks' meaning
>> it stops your function in its tracks until it is ready to receive the data.
>> Your thread (Pd) will halt until the function that sends the audio has
>> finished.
>>
>> Anybody out there, please correct me if I am spreading misinformation
>> here, but this is my understanding of this distinction.
>>
>> Delay(msec) is a delay between logical time (when your computer computes
>> the audio) and real time (when the sound comes out the speaker). You want
>> to have some head room here. I've seen really good setups get down to below
>> 10ms (as low as 4) without any glitches, but usually you want much more
>> time ~50ms or so.
>>
>>
>> On 2/17/2015 5:42 PM, Jonghyun Kim wrote:
>>
>> Fyi, I use jack on Linux for PD.
>> On Feb 18, 2015 8:16 AM, "Jonghyun Kim" <agitato816 at gmail.com> wrote:
>>
>>> Hi list,
>>>
>>>  I would like to know about some features in audio settings.
>>>
>>>  I don't understand what mean these options.
>>>
>>>  *Delay(msec)* and *Use callbacks*
>>>
>>>  I googled these options, but still I don't understand. Is there some
>>> document about it?
>>>
>>>  Thanks in advance,
>>> akntk
>>>
>>
>>
>> _______________________________________________Pd-list at lists.iem.at mailing list
>> UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
>>
>>
>>
>> _______________________________________________
>> Pd-list at lists.iem.at mailing list
>> UNSUBSCRIBE and account-management ->
>> http://lists.puredata.info/listinfo/pd-list
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20150223/0eb0cf78/attachment.html>


More information about the Pd-list mailing list