[PD] checking [readsf~]'s current position in wav-file
hard.off at gmail.com
Wed Nov 20 02:21:14 CET 2019
You can get the samplerate and file length of your file by sending a read
message to soundfiler and not specifying a table to write to. From that you
can calculate the expected play time.
On Wed, 20 Nov 2019 at 04:42, Jakob Laue <jakkesprinter at web.de> wrote:
> Hey all,
> I want to play a wav-file with [readsf~] and I want to loop the wav-file.
> This can easily be done by connecting [readsf~]'s right outlet it its
> The problem is that I have a metronome in my patch which is the master of
> the tempo.
> The [readsf~] object will get out of sync with the metronome when it loops
> the same file over a longer period of time.
> 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.
> By this, I can restart/loop the wav-file in sync with the metronome, as
> soon as it has almost reached its end.
> Do you have an idea how I could do that?
> 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.
> Thanks, Jakob
> Pd-list at lists.iem.at mailing list
> UNSUBSCRIBE and account-management ->
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Pd-list