In a kind of related question, I was wondering whether it would be
possible to get the next $0 number from Pd using a message, i.e. the
number that the next object to be instantiated will be assigned. I
wanted to script something that sent messages to a bunch of patches
that were dynamically created and I found myself wanting that number.
This also gives rise to the question of whether objects or messages
are the most appropriate for this kind of thing. I think mostly Pd
uses objects right now, like [samplerate~], [block~], etc. Perhaps
an object would be more appropriate since it would have an outlet to
report that number on.
.hc
On Aug 13, 2006, at 1:10 PM, Miller Puckette wrote:
That's funny... the reason $0 starts at 1000 and not 0 is because in Max the $ variables were printffed into the boxes themselves and I wanted to keep all the $ variables (at least the first 8999 of them) to the same width as a character string.
Anyway, $0 uses true integers, so that it's unlikely they will ever
reach zero (you'd have to fill your address speace 100s of times)... so I
think you're safe.cheers Miller On Sun, Aug 13, 2006 at 10:04:02AM +0200, Frank Barknecht wrote:
Hi,
I would like to check, if $0 was passed as an argument to an abstraction. The usual idiom is:
[loadbang] | [f $1] assuming, $0 was passed as $1 | [select 0] | this is $0 now
Now of course this fails, if $0 also can be zero itself. I know, that currently this is very unlikely, because $0 starts at 1000 and grows. But it would be great if possible future changes to the $0-implementation would still rule out 0 as a value for $0, so that the test from above will keep working.
Ciao
Frank Barknecht _ ______footils.org_ __goto10.org__
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