hi all,
until now i was working with few samples, but for an electronic project that i have in mind and on the breadboard (using the multio of mamalala), i will need to load 300 mono samples and be able to play 6 at the same time.
what is the best solution ? pat
need to load 300 mono samples and be able to play 6 at the same time. what is the best solution ?
-50 groups..
AvS
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .....................................................................
` |Schreck Ensemble . . . . . . . . . . . . . . . . . . . . +
` |# -laboratory for live electro-acoustic music- # |
| http://www.schreck.nl/ |
| http://www.xs4all.nl/~schreck/ |
` *===========================================================++
` |Compositions http://www.xs4all.nl/~schreck/html/compo.html |
` |Samples http://www.xs4all.nl/~schreck/html/samp.html |
` |Patches http://www.xs4all.nl/~schreck/html/pat.html |
` |Videos http://www.xs4all.nl/~schreck/html/video.html |
` |Scores http://www.xs4all.nl/~schreck/html/scores.html |
*===========================================================++
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .....................................................................
i will precise more... i need advice on how to patch dynamically. is dyn or dyn~ the only solution for dynamic patching in pure data? i guess i can write a script to produce the patch (.pd).
-50 groups..
i really don't understand this advice.
pat
----- Original Message ----- From: "Arie van Schutterhoef" arsche@xs4all.nl To: PD-list@iem.at Sent: Tuesday, June 13, 2006 1:43 PM Subject: Re: [PD] advice on loading 300 samples
need to load 300 mono samples and be able to play 6 at the same time. what is the best solution ?
-50 groups..
AvS
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .....................................................................
` |Schreck Ensemble . . . . . . . . . . . . . . . . . . . . +
|# -laboratory for live electro-acoustic music- # | | http://www.schreck.nl/ | | http://www.xs4all.nl/~schreck/ |
*===========================================================++|Compositions http://www.xs4all.nl/~schreck/html/compo.html |
|Samples http://www.xs4all.nl/~schreck/html/samp.html ||Patches http://www.xs4all.nl/~schreck/html/pat.html |
|Videos http://www.xs4all.nl/~schreck/html/video.html |` |Scores http://www.xs4all.nl/~schreck/html/scores.html | *===========================================================++
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .....................................................................
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Hi patrick,
patrick wrote:
i will precise more... i need advice on how to patch dynamically. is dyn or dyn~ the only solution for dynamic patching in pure data? i guess i can write a script to produce the patch (.pd).
I use dyn~ to generate dynamically different number of [sfread~] objects. You could do it this way, as long as your hard disk manages to stream all the files simultanously.
br, Piotr
hi patrick
you can programm one instance (inculding the array and tabread~ etc.) in an abstraction and create it dynamically.
[pd subpatch]
[nbx
|
[;
pd-subpatch obj 10 10 myabstraction $1(
you might want to add an argument to distinguish the created instances. in your abstraction it'd look like this [tabread~ $1-sample] [table $1-sample]
if you work with loadbang in that abstraction you'll have to do that after creating it.
[; pd-subpatch loadbang(
regards
eni
On Jun 13, 2006, at 8:10 PM, patrick wrote:
i will precise more... i need advice on how to patch dynamically. is dyn or dyn~ the only solution for dynamic patching in pure data? i guess i can write a script to produce the patch (.pd).
[nqpoly4] would work quite well for this. Write a patch for nqpoly4
that accepted a message that tells each instance which sample to
play, and any control variables you might want.
.hc
On Jun 13, 2006, at 2:10 PM, patrick wrote:
i will precise more... i need advice on how to patch dynamically.
is dyn or dyn~ the only solution for dynamic patching in pure data?
i guess i can write a script to produce the patch (.pd).-50 groups..
i really don't understand this advice.
pat
----- Original Message ----- From: "Arie van Schutterhoef"
arsche@xs4all.nl To: PD-list@iem.at Sent: Tuesday, June 13, 2006 1:43 PM Subject: Re: [PD] advice on loading 300 samplesneed to load 300 mono samples and be able to play 6 at the same
time.
what is the best solution ?
-50 groups..
AvS
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .....................................................................
` |Schreck Ensemble . . . . . . . . . . . . . . . . . . . . +
|# -laboratory for live electro-acoustic music- # | | http://www.schreck.nl/ | | http://www.xs4all.nl/~schreck/ |
*===========================================================++|Compositions http://www.xs4all.nl/~schreck/html/compo.html |
|Samples http://www.xs4all.nl/~schreck/html/samp.html ||Patches http://www.xs4all.nl/~schreck/html/pat.html |
|Videos http://www.xs4all.nl/~schreck/html/video.html |` |Scores http://www.xs4all.nl/~schreck/html/scores.html | *===========================================================++
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .....................................................................
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/ listinfo/pd-list
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/ listinfo/pd-list
Using ReBirth is like trying to play an 808 with a long stick. - David Zicarelli
how big are the samples? what do you need to play, just playback 1:1 or
something that requires an array?
Am 13.06.2006, 18:44 Uhr, schrieb patrick patrick@11h11.com:
hi all,
until now i was working with few samples, but for an electronic project
that i have in mind and on the breadboard (using the multio of
mamalala), i will need to load 300 mono samples and be able to play 6 at
the same time.what is the best solution ? pat
_______________________________________________ PD-list@iem.at mailing list UNSUBSCRIBE and account-management ->
http://lists.puredata.info/listinfo/pd-list
Hi Patrick,
patrick wrote:
how big are the samples?
+- 2 mb each sample
A "brute force" approach would be to load all the samples into RAM with arrays. You're talking about +/- 600 mB of data if I understand right. You could get away with it if you had a Gig of RAM I think. I don't use Xgroove for sample playback, I prefer to work with tabread4~ since it eats less resources and isn't as dodgy.
But my real advice is to try Frank Barknecht's [fluid] external, in the Footils library. It's based on the MIDI sampler Fluidsynth:
And it does a great job of voice allocation (you could play hundreds of notes simultaneously if you wanted to!) and sample management. You'll need to assemble a soundfont of your audio first, however, so check out Swami for that:
Don't know what OS you have. I know it's flawless on Linux, haven't tried it anyplace else.
good luck! d.
derek holzer wrote:
Hi Patrick,
patrick wrote:
how big are the samples?
+- 2 mb each sample
A "brute force" approach would be to load all the samples into RAM with arrays. You're talking about +/- 600 mB of data if I understand right. You could get away with it if you had a Gig of RAM I think. I don't use Xgroove for sample playback, I prefer to work with tabread4~ since it eats less resources and isn't as dodgy.
Oh wait, forget about the 32-bit expansion! Or is it only 24? Anyway, PD expands your audio to a greater bit-depth (if necessary) to do the 4-point interpolation with [tabread4~]. Maybe for so much audio this isn't such a good idea! I'd still recommend trying to make a SoundFont out of it. Is it necessary to have EVERY note sampled, or could you spread it out a bit by skipping every Nth note and using the sampler to pitch things up or down a bit?
d.
Is it necessary to have EVERY note sampled
not really, if i go with soundfont i will skip some (thanks!). but i feel brutal about it - to push a little (cpu glitches are wonderful) - i will try to load all the samples on loadbang.
i am working with jack, pd 0.39.2 on linux @ 44100 / 128 buffer on a 2.4 - P4. if i go for [soundfiler] what should i know about the 32 / 24 bit expension? or maybe it's the spec of the samples?
pat
At 02:22 14.06.2006, you wrote:
Is it necessary to have EVERY note sampled
not really, if i go with soundfont i will skip some (thanks!). but i feel brutal about it - to push a little (cpu glitches are wonderful)
- i will try to load all the samples on loadbang.
i am working with jack, pd 0.39.2 on linux @ 44100 / 128 buffer on a 2.4 - P4. if i go for [soundfiler] what should i know about the 32 / 24 bit expension? or maybe it's the spec of the samples?
you should know that data in tables in pd is always stored as 32bit floats. so if you have 600MB of 16Bit samples 16bit they will take up 1.2GB RAM once loaded into pd. but theres the iem16 external which has offers a 16bit table and suitable tabread / write etc.
sven.
2006/6/13, derek holzer derek@x-i.net: (...)
And it does a great job of voice allocation (you could play hundreds of
notes simultaneously if you wanted to!) and sample management. You'll need to assemble a soundfont of your audio first, however, so check out Swami for that:
(...)
by the way... does anybody here tried to WRITE soundfonts inside pd? I mean: how could we have something similar to the Swami API "inside" PD? Do you think worth research on soundfount file specification for that to write inside PD? Is anybody working on it? I think it could be an excelent issue...
cheers
glerm
i was thinking... why limiting the number of samples being played simultaneously to 6... i never built a patch like that, but i guess it's a little bit like a synth where you can trig lots of notes together (poly something). so dynamic xgroove~ depending on how much notes i am playing? hum... i guess i am thinking too much and too loud. will do some homeworks and ask real question sorry...
pat
Hallo, patrick hat gesagt: // patrick wrote:
i was thinking... why limiting the number of samples being played simultaneously to 6... i never built a patch like that, but i guess it's a little bit like a synth where you can trig lots of notes together (poly something). so dynamic xgroove~ depending on how much notes i am playing? hum... i guess i am thinking too much and too loud. will do some homeworks and ask real question sorry...
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~]).
Frank Barknecht _ ______footils.org_ __goto10.org__
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
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
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
make sure you put [switch~] objects in all your player patches so you don't waste cpu. i doubt you'll be playing 300 audio files at once.
also, you do know that you can send [set (name of array)< messages, don't you???