Dear list.
I'm now playing with the so powerful table object.
Is there a way to know the size of an array ?
I'm using tabread4~ and the "set" message to select witch table I whant to read. But all the diferent table i "set" have diferent size. So I whant that my algorithme know the size of the aray that tabread4~ is curently reading. In practice my tables are in another patch.
Does anyone have meet the same situation and find a solution ?
Thanks.
Cheers.
Damien.
two things that might be a first step on the way to a solution:
when you use soundfiler with -resize, i think it returns the new length of the array.. you would have to announce this on some gobal message..
the other thing that is really very much a hack...
when you send a "resize" message to an array, you can catch the message with a receive object... i dont think this will help you at load time however, unless you have loadbangs triggering a bunch of resize messages...
heres a little patch to illustrate the point..
On Tue, 16 Oct 2001 22:49:37 -0400 HENRY Damien damien_henry@libertysurf.fr wrote:
Dear list.
I'm now playing with the so powerful table object.
Is there a way to know the size of an array ?
I'm using tabread4~ and the "set" message to select witch table I whant
to
read. But all the diferent table i "set" have diferent size. So I whant
that
my algorithme know the size of the aray that tabread4~ is curently
reading.
In practice my tables are in another patch.
Does anyone have meet the same situation and find a solution ?
Thanks.
Cheers.
Damien.
Soundfiler will return the size of the array when you load a sample with -resize. I am using this in my 'general purpose sample player' ;) which I have attached. I use the arraysize to calculate phasor~ speed (which again triggers tabread4~). The variospeed is a nice touch, I think :)
Cheers Soeren
I'm now playing with the so powerful table object.
Is there a way to know the size of an array ?
I'm using tabread4~ and the "set" message to select witch table I whant to read. But all the diferent table i "set" have diferent size. So I whant that my algorithme know the size of the aray that tabread4~ is curently reading. In practice my tables are in another patch.
Hi again How typical of me. There is a small but important bug in the previously attached file.
's totsamps'
connected to soundfiler outlet should be:
's totsamps1'
instead.
Working version is attached. Sorry
Soeren