[PD] Strange "bug" with table behaviour
Miller Puckette
mpuckett at man104-1.ucsd.edu
Sat Jun 22 23:48:33 CEST 2002
OK, I think I found the problem at last, will try to fix it
now...
cheers
Miller
On Tue, Jun 18, 2002 at 03:53:06AM -0700, Burton Samograd wrote:
> Miller (or anyone else with more time to find this bug..ahem...feature
> :),
>
> I ran into quite a frustrating bug when designing my step sequencer.
> I'm currently running pd-0.35-test26 on linux. I was using the table
> object so i could create local arrays for each sequencer using $1. But
> it seems that when the patch is saved, it saves the array name in the
> patch file (ie. if you gave an argument test to the subpatch, the array
> $1_array would be saved as test_array instead of $1_array).
>
> The problem was that when I tried testing with 2 patches the array
> wasn't being created for each instance since it had already been
> created by the patch before it was saved (does that make any sense???)
> so i would get "test_array multiply defined" messages whenever i would
> try to write to it.
>
> I then remembered an email i read a while back saying that pd now
> allows $1's in array names so i tried that and it worked like a charm.
> My problem is solved but I thought i would inform you of this
> behaviour, or if you already knew it existed, maybe you could enlighten
> me on why it is done that way...
>
> Although I don't know the details of the internal structure of the
> program compeletely, I would think that when saving the table object
> should somehow hide the array so the name isn't written to the file,
> since i assume that on loading the table creates the array if it
> doesn't already exist...
>
> So there's a couple of my $0.02 on the subject.
>
> burton samograd
More information about the Pd-list
mailing list