Re: [PD] loading samples in arrays

2007-06-12 Thread Frank Barknecht
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__


hd-sampleplayer~.pd
Description: application/puredata


hd-sampleplayer~-help.pd
Description: application/puredata
___
PD-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] loading samples in arrays

2007-06-12 Thread Frank Barknecht
Hallo,
Frank Barknecht hat gesagt: // Frank Barknecht wrote:

 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.

Small addition: Because of tabread4~'s interpolation it's probably
better to load some more samples into the table with soiundfiler, like
44103 instead of 44100.

Ciao
-- 
 Frank Barknecht _ __footils.org_ __goto10.org__

___
PD-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] loading samples in arrays

2007-06-11 Thread Johannes Krause
Frank Barknecht schrieb:
 Hallo,
 Johannes Krause hat gesagt: // Johannes Krause wrote:

   
 Georg Holzmann schrieb:
 
 Hallo Johannes!

   
   
 i am using the tabplay~ object to play out of 48 arrays.
 it takes alot of time to load the samples in the arrays.
 
 
 However, you can also try to stream it directly from the harddisk with 
 [readsf~] - then you don't have to load them at all !

 LG
 Georg

   
   
 gruss georg,

 i want to loop 4*4 samples at the same time. will readsf~ be good for that?
 

 It depends: You can just reopen the files of course. remeber to first
 send the open ... command before sending another 1 to resume
 playing. If this will be smooth depends on your material, but maybe
 you can mask the transition a bit, for example by using two readsf~ to
 play the same file and start them slightly shifted (maybe prepare your
 soundfiles accordingly).

 Another possibility is for example illustrated in the class material
 Tom Erbe just posted: It shows how you can load only part of a sample
 into a table.  See:
 http://music.ucsd.edu/~tre/172/w6a-soundfilerbuffering.pd
 http://music.ucsd.edu/~tre/classblog.php

 (Probably works best with a threaded soundfiler.)

 And finally you can combine the partial soundfiler loading (-skip
 ...) with readsf~ playing by loading e.g. the beginning of a sample
 into a table and then switch over to playing the rest of the sample
 from disk with readsf~. You can do this to smooth out possible
 loop-point clicks as well by fading out readsf~ and switching over to
 table-playing again. 

 Lots of possibilities, some slightly hackish, but that's part of the
 fun.

 Ciao
   
hey list,


i ve tried 2 options to play at least 7 quad-samples out of  the arrays.

first way is to play the sample with readsf~  and write it straight
into 4 arrays with tabwrite~.  when readsf~ finished then start  play
out of the
arrays.  this needs a lot of time to start playing - maybe depending on
the length
(each quad-sample is 90 sec) - and  interrupts before it plays out of
the arrays.


second way based on

http://music.ucsd.edu/~tre/172/w6a-soundfilerbuffering.pd

...is to use the soundfiler wich gets 2 messages by a bang and reading
the same
quad-sample into 8 arrays (2 buffer, each buffer 4 arrays)  and switch
betrween them
at a specified sample. (in this case 661500 samples)

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?




thanks and shouts . joh





___
PD-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] loading samples in arrays

2007-06-02 Thread Georg Holzmann
Hallo Johannes!

 i am using the tabplay~ object to play out of 48 arrays.
 it takes alot of time to load the samples in the arrays.
 
 what is the best way to load the samples into the arrays in less time?
 is it more efficient to use 4 channel audio files with soundfiler?

I don't know but I don't think that this will make much difference - it 
takes some time till you copy the data in memory ...
However, you can also try to stream it directly from the harddisk with 
[readsf~] - then you don't have to load them at all !

LG
Georg

___
PD-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] loading samples in arrays

2007-06-02 Thread Georg Holzmann
Georg Holzmann schrieb:
 Hallo Johannes!
 
 i am using the tabplay~ object to play out of 48 arrays.
 it takes alot of time to load the samples in the arrays.

 what is the best way to load the samples into the arrays in less time?
 is it more efficient to use 4 channel audio files with soundfiler?
 
 I don't know but I don't think that this will make much difference - it 
 takes some time till you copy the data in memory ...

hm ... I meant it WON'T make much difference !

___
PD-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] loading samples in arrays

2007-06-02 Thread Frank Barknecht
Hallo,
Johannes Krause hat gesagt: // Johannes Krause wrote:

 Georg Holzmann schrieb:
  Hallo Johannes!
 

  i am using the tabplay~ object to play out of 48 arrays.
  it takes alot of time to load the samples in the arrays.
  
 
  However, you can also try to stream it directly from the harddisk with 
  [readsf~] - then you don't have to load them at all !
 
  LG
  Georg
 

 gruss georg,
 
 i want to loop 4*4 samples at the same time. will readsf~ be good for that?

It depends: You can just reopen the files of course. remeber to first
send the open ... command before sending another 1 to resume
playing. If this will be smooth depends on your material, but maybe
you can mask the transition a bit, for example by using two readsf~ to
play the same file and start them slightly shifted (maybe prepare your
soundfiles accordingly).

Another possibility is for example illustrated in the class material
Tom Erbe just posted: It shows how you can load only part of a sample
into a table.  See:
http://music.ucsd.edu/~tre/172/w6a-soundfilerbuffering.pd
http://music.ucsd.edu/~tre/classblog.php

(Probably works best with a threaded soundfiler.)

And finally you can combine the partial soundfiler loading (-skip
...) with readsf~ playing by loading e.g. the beginning of a sample
into a table and then switch over to playing the rest of the sample
from disk with readsf~. You can do this to smooth out possible
loop-point clicks as well by fading out readsf~ and switching over to
table-playing again. 

Lots of possibilities, some slightly hackish, but that's part of the
fun.

Ciao
-- 
 Frank Barknecht _ __footils.org_ __goto10.org__

___
PD-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list