[PD] checking [readsf~]'s current position in wav-file
Federico Camara Halac
camarafede at gmail.com
Wed Nov 20 00:21:01 CET 2019
> In a former version of my patch, I did this successfully when I was using
> [tabread4~] as my file-playing-object, but I needed to switch to [readsf~]
> in order to implement dynamic loading of wav-files.
I would recommend you reconsider using [tabread4~] (or even tabplay~, see
below) as your tool to read a soundfile. If what you want is to load a
number of wav files, the best thing is to send several messages to
[soundfiler] to read (and resize) soundfiles into a set of [array define]s.
You can then either send a 'set' message to [tabread4~] to change the array
you are reading from, or have a bunch of dedicated [tabread4~]s one for
This is a more efficient way for your patch to load all sounds on startup
and *not* load each file every time you need to play it. It is a bit of an
extra effort, but you will gain much more from the fact that you are not
reading from disk on every soundfile loop.
That's why I want to constantly check the position of the wav-file that
> [readsf~] is currently at, when it plays the wav-file.
As a side effect from the [soundfiler] solution, you'll always know where
in the file you are because you need to control playback yourself. However,
it might just be quicker to use [tabplay~] instead, and just play a section
of the file by sending it a list instead of the usual 'bang'.
Hope it helps,
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Pd-list