[PD] help making sense of [readsf~]

Christof Ressi info at christofressi.com
Mon Mar 4 13:33:45 CET 2024


> not necessarily as a "always delay before playing" sort of thing but 
> more a short description of how it works,
I agree! It's always better when the user actually understands *why* 
they need to do something.

In general, though, I would advice everyone to consider a delay between 
"open" and "start" when you design your patches, in particular if you 
plan to distribute it to other people.

[open <f>, start( is convenient, but it can be hard to refactor at a 
later stage!

Personally, when I build a playlist in Pd, I have one or more [readsf~] 
objects and cycle between them. For example:

| cue  | readsf~ 1 | readsf~ 2 |
| ---- | --------- | --------- |
| 1    | play 1    | open 2    |
| 2    | open 3    | play 2    |
| 3    | play 3    | open 4    |
| 4    | open 5    | play 4    |
| 5    | play 5    | open 6    |

etc.

I think you get the pattern.

Christof

On 04.03.2024 13:07, Dan Wilcox wrote:
> *This* is a good point and worth noting, not necessarily as a "always 
> delay before playing" sort of thing but more a short description of 
> how it works, then a note like "if you experience occasional dropouts 
> on first accessing a file, consider adding a small delay after opening 
> but *before* playing."
>
>> On Mar 4, 2024, at 1:01 PM, pd-list-request at lists.iem.at wrote:
>>
>> Message: 1
>> Date: Mon, 4 Mar 2024 12:55:54 +0100
>> From: Christof Ressi <info at christofressi.com>
>> To:pd-list at lists.iem.at
>> Subject: Re: [PD] help making sense of [readsf~]
>> Message-ID: <2176516f-edbe-4982-bcfa-b7002952abc1 at christofressi.com>
>> Content-Type: text/plain; charset="utf-8"; Format="flowed"
>>
>> Actually, I forgot something important:
>>
>> Of course, the worker thread must also *open* the file! If the file is
>> not yet cached by the OS, this can indeed take a few milliseconds.If you
>> don't add some delay between "open" and "start", you might notice that
>> you get a dropout the very first time, but not on subsequent times.
>>
>> In fact, if you don't wait between "open" and "start", the perform
>> method almost certainly blocks. However, often we don't notice because
>> it may be "absorbed" by Pd's own ringbuffer (= "Delay" in the audio
>> settings).
>>
>> Anyway, I agree that the help needs some more clarification! (Just make
>> sure you really understand how the object works before changing the help
>> patch :)
>>
>> ?Christof
>
> --------
> Dan Wilcox
> danomatika.com <http://danomatika.com>
> robotcowboy.com <http://robotcowboy.com>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20240304/7a128cb3/attachment-0001.htm>


More information about the Pd-list mailing list