[PD] loading samples in arrays

Frank Barknecht fbar at footils.org
Tue Jun 12 12:35:49 CEST 2007


Hallo,
Johannes Krause hat gesagt: // Johannes Krause wrote:

> so when i try to play 7 samples, iam going to read in 56 arrays at
> same time, with tabplay~ it needs 10 sec to start playing.
> 
> when i read the second buffer later the the the first one it takes
> about 5 sec to play and it interrupts at the transition.
> 
> any idea to handle that kind of problem?
> 
> other ways to get much better results?

As you use tabplay~ and thus no change of speed, you can mask the
loading time of [readsf~] by preloading the beginning of a sample into
a table, play this with tabread4~, while readsf~ is still loading the
file, and then switch over from tabread4~ to readsf~ after a certain
time. See attached harddisk sample player for an implementation in
mono. For 4-channel playback you need to modify this of course. Note
that it assumes that your sample has a samplerate of 44.1 kHz and that
Pd is running at 44.1 kHz as well, because readsf~ always plays with
Pd's samplerate.

Ciao
-- 
 Frank Barknecht                 _ ______footils.org_ __goto10.org__
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hd-sampleplayer~.pd
Type: application/puredata
Size: 1986 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20070612/18c28af1/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hd-sampleplayer~-help.pd
Type: application/puredata
Size: 724 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20070612/18c28af1/attachment-0001.bin>


More information about the Pd-list mailing list