[PD] local arrays again...
Michal Seta
mis at music.mcgill.ca
Wed Aug 15 06:44:37 CEST 2001
On 8/14/01 12:38 PM, "Yves Degoyon*" <ydegoyon at audientia.com> wrote:
> Well, hello, hope you had your third coffee now
> because I think Nicolas meant making a table
> with a $1 in its name
( I know Nicolas a little bit ).
Unfortunately I left the house after only one coffee.... Don't ask about
the consequences....
On 8/14/01 6:08 PM, "Yves Degoyon" <degoyon at freesurf.fr> wrote:
> Hi, Miller,
>
> I tried to follow your instructions but
> although the names correctly expands
> when used as variables in tabwrite~, tabread~,...
> they don't expand when referring to the array name itself,
> e.g. var expands to "1001-bigsample"
> but array name
> expands to "0-bigsample"
> although what's written in the patdh is
>
> X array $0-bigsample 100 float 1;
>
> it wouldn't work with :
>
> X array \$0-bigsample 100 float 1;
>
> which really means "$0-bigsample", o' course.
>
> Any hint ??
Yeah.
I tested your patches...
I think this works if you create the array inside the table object:
[table $0-bigsample]
(it didn't work for me as well when creating simply an array named
$0-bigsample).
The tabwrite~ objects inside that patch need to have $0-bigsample argument
as well.
Attached is a solution to your problem (note that I added adc~ for testing).
Lemme know if it works...
Also, in this case you don't need to add arguments your abstractions as your
arrays get named automatically.
However, I don't know of a way of supplying creation arguments to messages
(is there a way???) so your message will not work as you expected.
Therefore, AFAIK, the bang to the [openpanel] will not work as expected (in
fact, when I was playing with this pd has returned an error saying "inlet:
no method for symbol". I moved the openpanel into the abstraction (I did
that while replying to the message so this change is not in the attachment,
should I have included it?) and then it worked when sending bang into the
inlet). So my suggestion is to make an argument $1-bigsample where you
supply an argument and everything gets named after that argument (you gave
an argument anyways...) and you can use that little trick with
symbol->makefilename to make sure the message gets sent properly. If
there's a more elegant way of doing this I'd be interested in it.
./MiS
============================
"To be is to do" - Socrates
"To do is to be" - Sartre
"Do be do be do" - Sinatra
"Just do it!" - NIKE
"It" - Stephen King
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/binary
Size: 458 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20010815/6ba09e3e/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/binary
Size: 2988 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20010815/6ba09e3e/attachment-0001.bin>
More information about the Pd-list
mailing list