[PD] Simplest way for looping soudfiles

Roman Haefeli reduzent at gmail.com
Tue Jan 22 22:48:06 CET 2013


On Die, 2013-01-22 at 21:09 +0000, Pagano, Patrick wrote:
> Not Sure that one will not loop properly because of the need for an open message each time.

You are indeed right. It is not the proper way to do it. Even the
help-file of [readsf~] states it. However, in practice it usually works
flawlessly (probably nowadays disks seem fast enough and there is enough
memory for fs caches). Simply try it with the help of [readsf~ ].

Also the table based approach works, though I'd make two modifications
to the previously posted patch. Use the '-maxsize ' flag for the message
to [soundfiler] in order to allow bigger tables. Then, I'd get rid of
[tabread4~], as it is not needed when you only want to play at original
speed. Actually, I even wouldn't use [tabread~ ], because for very large
tables, the index from [phasor~ ] or [line~ ] will not be precise enough
to hit every sample after position 16'000'000 (limit of the 32bit
floating point format). If you use [tabplay~], it is as simple my
previous example with [readsf~ ]:


[r playagain]
|
[tabplay yourpreviouslyfilledtable]
                                  |
                                  [s playagain]


IIRC, [tabplay~] doesn't suffer from that precision problem described
before.

Roman




> -----Original Message-----
> From: pd-list-bounces at iem.at [mailto:pd-list-bounces at iem.at] On Behalf Of Roman Haefeli
> Sent: Tuesday, January 22, 2013 4:04 PM
> To: pd-list at iem.at
> Subject: Re: [PD] Simplest way for looping soudfiles
> 
> 
> 
> On Die, 2013-01-22 at 20:50 +0000, Pagano, Patrick wrote:
> >         Can people share their opinions on the simplest way to create
> >         a looping soundfile.
> 
> [r playagain]
> |
> [open /path/to/your/file.wav, 1(
> |
> [readsf~ ]
>          |
>          [s playagain]
> 
> 
> Roman
> 
> 
> 
> _______________________________________________
> Pd-list at iem.at mailing list
> UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list





More information about the Pd-list mailing list