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
*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@lists.iem.at wrote:
Message: 1
Date: Mon, 4 Mar 2024 12:55:54 +0100
From: Christof Ressi <info@christofressi.com>
To: pd-list@lists.iem.at
Subject: Re: [PD] help making sense of [readsf~]
Message-ID: <2176516f-edbe-4982-bcfa-b7002952abc1@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