Hi, list !
Pd-extended version 0.42.5 and Windows 7.
Why can't I create Arrays with names like " $0-tab " ?
So i can actually create, but can't write into it.
PD writes " error: 0-tab: no such table " It doesn't see $ ??
so i rename the array to " 0-tab " . and now can write to it via message [ read -resize $1 $0-tab (
but the table is " 0-tab " - not " $0-tab " . So it is not unique inside-name ...
And i can't use the sampler as multi abstraction - i get crosstalks..
it is written in tutorials that i can name the table with $0-names ... but PD seems doesn't understand such array names..
so what to do if i need 50 samplers working each by it's own with unique samples ???
a bug maybe ?
Tanks in advance for help !!
serg
Le 2012-02-14 à 07:33:00, Фывапр Олджэвич a écrit :
Why can't I create Arrays with names like " $0-tab " ?
$0 has no effect in messageboxes. You need to generate it using a float box such as [f $0] or even just [$0].
Yes, this is a quite annoying shortcoming of Pd... especially because if you already are passing something to the messagebox, you have to add a [pack] and a [loadbang].
| Mathieu BOUCHARD ----- téléphone : +1.514.383.3801 ----- Montréal, QC
----- Original Message -----
From: Mathieu Bouchard matju@artengine.ca To: Фывапр Олджэвич tofuckof@inbox.ru Cc: PD-list pd-list@iem.at Sent: Monday, February 13, 2012 10:38 PM Subject: Re: [PD] Pd-extended can't see $0-arrays ???
Le 2012-02-14 à 07:33:00, Фывапр Олджэвич a écrit :
Why can't I create Arrays with names like " $0-tab " ?
$0 has no effect in messageboxes. You need to generate it using a float box such as [f $0] or even just [$0].
Yes, this is a quite annoying shortcoming of Pd... especially because if you already are passing something to the messagebox, you have to add a [pack] and a [loadbang].
Do gpointers only point to scalars? Because if you _could_ get a pointer to an array-- perhaps using my canvas 'get' method patch-- you could just make all arrays canvas local and forget all this $0- business:
So to [tabread] the array named 'foo' in the parent canvas:
[get array( <- get a list of "arrayName pointerToArray" pairs for the canvas | [sendtocanvas 1] | [route foo] | [set $1( | [tabread]
-Jonathan
| Mathieu BOUCHARD ----- téléphone : +1.514.383.3801 ----- Montréal, QC _______________________________________________ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Le 2012-02-13 à 20:07:00, Jonathan Wilkes a écrit :
Do gpointers only point to scalars? Because if you _could_ get a pointer to an array-- perhaps using my canvas 'get' method patch-- you could just make all arrays canvas local and forget all this $0- business:
AFAIK :
Pointers point either to scalars or to array elements. You can't point to a whole array in a way distinct from pointing to an element of it. Therefore, a pointer to the first element (0) of an array is the best equivalent of what would be a pointer to an array (like it is in C language).
| Mathieu BOUCHARD ----- téléphone : +1.514.383.3801 ----- Montréal, QC
----- Original Message -----
From: Mathieu Bouchard matju@artengine.ca To: Jonathan Wilkes jancsika@yahoo.com Cc: Фывапр Олджэвич tofuckof@inbox.ru; PD-list pd-list@iem.at Sent: Saturday, February 18, 2012 1:20 PM Subject: Re: [PD] Pd-extended can't see $0-arrays ???
Le 2012-02-13 à 20:07:00, Jonathan Wilkes a écrit :
Do gpointers only point to scalars? Because if you _could_ get a pointer
to an array-- perhaps using my canvas 'get' method patch-- you could just make all arrays canvas local and forget all this $0- business:
AFAIK :
Pointers point either to scalars or to array elements. You can't point to a whole array in a way distinct from pointing to an element of it. Therefore, a pointer to the first element (0) of an array is the best equivalent of what would be a pointer to an array (like it is in C language).
Hm, maybe it's simpler than that:
a different canvas for arrayname. (Since (gpointer) can point to the "head" of a glist.)
This could potentially double as a way to use ds-arrays inside tabread, tabwrite~, etc., since with "set array (gpointer)" $1 could specify the name of the [struct] that is used as a template for the array and $2 could point to scalar that contains it.
It wouldn't be hard to abstraction-ize it so the user doesn't even have to think about pointers or scalars or $0.
-Jonathan
| Mathieu BOUCHARD ----- téléphone : +1.514.383.3801 ----- Montréal, QC
On 14/02/12 04:38, Mathieu Bouchard wrote:
Le 2012-02-14 à 07:33:00, Фывапр Олджэвич a écrit :
Why can't I create Arrays with names like " $0-tab " ?
$0 has no effect in messageboxes. You need to generate it using a float box such as [f $0] or even just [$0].
For [soundfiler] you can also use a symbol to pass as the array name and that will correcly translate $0 Eg.
[bang( | [symbol $0-tab] | [read -resize myfile.aiff $1( | [soundfiler]
As for [tabwrite] and [tabread] using $0 will work fine (e.g. [tabwrite $0]
For sending messages to arrays such as resize, normalize etc. you can use [send $0-tab] objects instead of the [;resize tablename( notation
Lorenzo.
Yes, this is a quite annoying shortcoming of Pd... especially because if you already are passing something to the messagebox, you have to add a [pack] and a [loadbang].
| Mathieu BOUCHARD ----- téléphone : +1.514.383.3801 ----- Montréal, QC
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list