dear List,
This is a pretty basic query, I think. I am trying to make a sample-scrambler where I can nbavigate through a large database of samples. I'm using soundfiler to load all the samples and tabplay~ . I named all the samples array# (array1,array2,etc) I am trying to use list to allow me to shift the numeric value at the end of the array message, but how can I get rid of the space between 'array' and the new number? Or, is there another way to do this?
thanks
BG
gottlieb wrote:
dear List,
This is a pretty basic query, I think. I am trying to make a sample-scrambler where I can nbavigate through a large database of samples. I'm using soundfiler to load all the samples and tabplay~ . I named all the samples array# (array1,array2,etc) I am trying to use list to allow me to shift the numeric value at the end of
usually you don't do it like that.
the array message, but how can I get rid of the space between 'array' and the new number? Or, is there another way to do this?
several.
[makefilename array%d] will give what you asked for.
with older versions of pd (<0.40) you should probably use a naming scheme like 3array in order to be able to better modularize your patch. then you could construct the tablenames dynamically either with [makefilename %darray] or with [symbol $1array(, and you get the benefit of being able to easily expand the number of slots with stuff like [slot 3] which in turn calls [table $1array].
with newer versions of pd (>=0.40) you can also use $args within the symbols (e.g. [symbol array$1(
mfga.sdr IOhannes
see attachment
tjers
Steffen Leve Poulsen
gottlieb skrev:
dear List,
This is a pretty basic query, I think. I am trying to make a sample-scrambler where I can nbavigate through a large database of samples. I'm using soundfiler to load all the samples and tabplay~ . I named all the samples array# (array1,array2,etc) I am trying to use list to allow me to shift the numeric value at the end of the array message, but how can I get rid of the space between 'array' and the new number? Or, is there another way to do this?
thanks
BG
#N canvas 318 125 454 304 10; #X obj 147 171 print; #X obj 147 117 makefilename array%d.wav; #X msg 147 143 open $1; #X floatatom 147 94 5 0 0 0 - - -; #X connect 1 0 2 0; #X connect 2 0 0 0; #X connect 3 0 1 0;