Maybe using tabplay~ and soufiler would work best ? Would tabread~ be better ?
aalex
#N canvas 360 220 667 690 10; #N canvas 0 0 450 300 sub 0; #X obj 10 10 foo 1; #X obj 10 10 foo 3; #X obj 10 10 foo 5; #X obj 10 10 foo 7; #X obj 10 10 foo 9; #X obj 10 10 foo 11; #X obj 10 10 foo 12; #X obj 10 10 foo 13; #X obj 10 10 foo 14; #X obj 10 10 foo 16; #X obj 10 10 foo 18; #X obj 10 10 foo 19; #X obj 10 10 foo 20; #X obj 10 10 foo 22; #X obj 10 10 foo 23; #X obj 10 10 foo 25; #X obj 10 10 foo 27; #X obj 10 10 foo 29; #X obj 10 10 foo 31; #X obj 10 10 foo 33; #X obj 10 10 foo 34; #X obj 10 10 foo 36; #X obj 10 10 foo 38; #X obj 10 10 foo 39; #X obj 10 10 foo 40; #X obj 10 10 foo 42; #X obj 10 10 foo 47; #X obj 10 10 foo 48; #X obj 10 10 foo 49; #X obj 10 10 foo 50; #X obj 10 10 foo 52; #X obj 10 10 foo 54; #X obj 10 10 foo 55; #X obj 10 10 foo 56; #X obj 10 10 foo 57; #X obj 10 10 foo 58; #X obj 10 10 foo 59; #X restore 78 53 pd sub; #X msg 73 154 ; pd-sub obj 10 10 foo $1; #X msg 159 55 ; pd-sub clear; #X msg 289 110 ; pd-sub vis $1; #X obj 287 85 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1 ; #X msg 158 101 ; pd-sub loadbang; #X floatatom 74 101 5 0 0 0 - - -; #X obj 351 450 soundfiler; #X floatatom 351 474 0 0 0 0 - - -; #X msg 351 424 read -resize $1 $2; #X obj 351 389 pack s s; #X obj 350 356 openpanel; #X msg 322 214 bang; #X obj 432 343 makesymbol %s-arr; #X obj 433 320 f $0; #X obj 432 298 loadbang; #X obj 228 427 symbol; #X obj 431 365 t s s; #X msg 228 456 ; $1 normalize; #X obj 323 317 t b b; #X obj 38 459 throw~ out; #X obj 38 431 tabplay~ $0-arr; #X msg 72 325 stop; #X msg 73 386 0 44100; #X msg 74 365 44100; #X msg 73 345 bang; #X msg 72 406 44100 1000; #X text 369 215 open file; #X text 65 20 future dynamic patching; #X text 61 288 playing the array; #X obj 45 583 catch~ out; #X obj 65 618 dac~; #X text 59 560 mixer ?; #X connect 4 0 3 0; #X connect 6 0 1 0; #X connect 7 0 8 0; #X connect 9 0 7 0; #X connect 10 0 9 0; #X connect 11 0 10 0; #X connect 12 0 19 0; #X connect 13 0 17 0; #X connect 14 0 13 0; #X connect 15 0 14 0; #X connect 16 0 18 0; #X connect 17 0 16 1; #X connect 17 1 10 1; #X connect 19 0 16 0; #X connect 19 1 11 0; #X connect 21 0 20 0; #X connect 22 0 21 0; #X connect 23 0 21 0; #X connect 24 0 21 0; #X connect 25 0 21 0; #X connect 26 0 21 0;
On 6/14/06, Alexandre Quessy listes@sourcelibre.com wrote:
I think one advantage of using tables is the fact that one could start playing anywhere in the sound file. It is not the case with reasf~, right ? (might not interest Patrick, but it is interesting for me)
Then, using tabread4~ would consume too much CPU, right ?
So, dynamic table + tabread creation with throws would be the way to go.
Do you guys know a way to clear only several objects of a subpatch ? I use [; pd-subpatch clear< for now. But I would prefer not to clear everything.
aalex
On 6/14/06, IOhIannes m zmoelnig zmoelnig@iem.at wrote:
Frank Barknecht wrote:
Hallo, patrick hat gesagt: // patrick wrote:
I think, the problem more is how to load so many samples clickfree into memory. As samples loaded into an array get blown up in size, for
300 2MB samples you already need a lot of memory. It probably will be better to load only the samples to play currently and next into memory, and reuse the tables that store the samples to save memory.
If the samples only need to be played, [readsf~] would be the easiest, almost trivial solution to this. If you need [table]-based processing things will be quite a bit trickier, as soundfiler in standard Pd can lead to dropouts. pd-devel can be one way out, using [readsf~] to write into a [table] faster than realtime could be another way (by upsampling using [block~]).
i guess the simplest thing would be to use [readsf~] for playback of the
samples from a ramdisk: this way the samples will still be kept at 16bit (or whatever you choose) and thus take little memory and the access to the ramdisk will be lightning fast.
mfg.asdr. IOhannes
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
-- Alexandre Quessy http://alexandre.quessy.net