Hello,
2 questions:
I defined (in self-creating patches) canvas names according to the dynamic-receive-patch, which was posted on this mailing list by putting $0 as the property-name. Is it possible to trigger, send the resulting canvas-number anywhere?
Is there a way to define global variables (like a=1)? If yes: how can I do it, and how can I access them?
Thanks and regards, Michael
Am Dienstag, den 09. April 2002 um 15:47:30 Uhr (+0200) schrieb Michael Iber:
Is there a way to define global variables (like a=1)?
Take a look at the maphash, mapwrite and mapread object (icem-www.folkwang-hochschule.de/~finnendahl/pd.html), if the variables have to be accessed by a symbol name or if you want to store other things than simple floats. Otherwise you could use tables (Arrays).
Although the bindings are local to the specified hashtable/table, the hashtable/table is global to pd and thus globally accessible.
If yes: how can I do it
create an array from the menu (and give it a name) or create a maphash object (giving the name of it as creation argument).
and how can I access them?
write-access with tabwrite <array-name> or mapwrite <hashtablename> read-access with tabread <array-name> or mapread <hashtablename>
-- Orm
Hi, Michael Iber hat gesagt: // Michael Iber wrote:
I defined (in self-creating patches) canvas names according to the dynamic-receive-patch, which was posted on this mailing list by putting $0 as the property-name. Is it possible to trigger, send the resulting canvas-number anywhere?
$0 gets the same unique value everytime it is used in a certain abstraction. So if you create a [float $0] along with your canvas, you should be able to send this value anywhere you need it.
Is there a way to define global variables (like a=1)? If yes: how can I do it, and how can I access them?
All variables (the read-send somethings) are global by default. You have to take special care, if you want them to be only seen locally (use $0) bye,
Hello Frank,
At 08:39 10.04.02 +0200, you wrote:
Hi, Michael Iber hat gesagt: // Michael Iber wrote:
I defined (in self-creating patches) canvas names according to the dynamic-receive-patch, which was posted on this mailing list by putting $0 as the property-name. Is it possible to trigger, send the resulting canvas-number anywhere?
$0 gets the same unique value everytime it is used in a certain abstraction. So if you create a [float $0] along with your canvas, you should be able to send this value anywhere you need it.
That helped a lot. Thanks.
Is there a way to define global variables (like a=1)? If yes: how can I do it, and how can I access them?
All variables (the read-send somethings) are global by default. You have to take special care, if you want them to be only seen locally (use $0) bye, --
I was more looking for some simular solution to the actual jMAX-version, where you define the variables in an object (like e.g. in C, which I would prefer to a table). I thought this might have been one of the not yet documented features of the actual version Miller was talking about (and working with both PD and jMAX, I always get confused, what which program is capable of.)
Michael
Michael Iber
http://www.iberspace.de mailto://mail@iber-online.de