which one is the best, counting the leftmost inlet as #0, or counting it as #1 ? I ask because I have quite a bit of doc and code in which inlets are numbered, so before there's too much of it, i'd like to settle this issue.
so i'm looking to know what would be the advantages of doing it one way or another, and also, who standardized on calling it #0, and who instead chose #1.
Mathieu Bouchard http://artengine.ca/matju
Mathieu Bouchard wrote:
which one is the best, counting the leftmost inlet as #0, or counting it as #1 ? I ask because I have quite a bit of doc and code in which inlets are numbered, so before there's too much of it, i'd like to settle this issue.
so i'm looking to know what would be the advantages of doing it one way or another, and also, who standardized on calling it #0, and who instead chose #1.
By analogy with the 'main' function in c, where argv[0] points to the full pathname of the program, it would be interesting in pd if inlet 0 were to be reserved for a unique pathname to the object (such as a 'globally unique identifier' or the pointer to the object's own struct), allowing it to be targeted by other objects just like a [send]/[receive] pair. Then the visible inlets would be numbered from 1. Outlet 0 would emit the value of inlet 0.
Martin
Martin Peach wrote:
Mathieu Bouchard wrote:
which one is the best, counting the leftmost inlet as #0, or counting it as #1 ? I ask because I have quite a bit of doc and code in which inlets are numbered, so before there's too much of it, i'd like to settle this issue.
so i'm looking to know what would be the advantages of doing it one way or another, and also, who standardized on calling it #0, and who instead chose #1.
By analogy with the 'main' function in c, where argv[0] points to the full pathname of the program, it would be interesting in pd if inlet 0 were to be reserved for a unique pathname to the object (such as a 'globally unique identifier' or the pointer to the object's own struct), allowing it to be targeted by other objects just like a [send]/[receive] pair. Then the visible inlets would be numbered from 1. Outlet 0 would emit the value of inlet 0.
interesting idea. plus elseware in pd you start counting from 1, namely [$1] is the first argument to an abstraction, not [$0]
On May 31, 2004, at 12:24 PM, Josh Steiner wrote:
Martin Peach wrote:
Mathieu Bouchard wrote:
which one is the best, counting the leftmost inlet as #0, or
counting it as #1 ? I ask because I have quite a bit of doc and code in which
inlets are numbered, so before there's too much of it, i'd like to settle
this issue.so i'm looking to know what would be the advantages of doing it one
way or another, and also, who standardized on calling it #0, and who instead chose #1.By analogy with the 'main' function in c, where argv[0] points to the
full pathname of the program, it would be interesting in pd if inlet
0 were to be reserved for a unique pathname to the object (such as a
'globally unique identifier' or the pointer to the object's own
struct), allowing it to be targeted by other objects just like a
[send]/[receive] pair. Then the visible inlets would be numbered from
Outlet 0 would emit the value of inlet 0.
interesting idea. plus elseware in pd you start counting from 1,
namely [$1] is the first argument to an abstraction, not [$0]
Plus $0 is a unique identifier, so that also fits Martin's idea. Its
sounds like a good one to me.
.hc
"If nature has made any one thing less susceptible than all others of
exclusive property, it is the action of the thinking power called an
idea, which an individual may exclusively possess as long as he keeps
it to himself; but the moment it is divulged, it forces itself into the
possession of everyone, and the receiver cannot dispossess himself of
it."
- Thomas Jefferson
On Mon, 31 May 2004, Martin Peach wrote:
By analogy with the 'main' function in c, where argv[0] points to the full pathname of the program, it would be interesting in pd if inlet 0 were to be reserved for a unique pathname to the object (such as a 'globally unique identifier' or the pointer to the object's own struct), allowing it to be targeted by other objects just like a [send]/[receive] pair. Then the visible inlets would be numbered from
- Outlet 0 would emit the value of inlet 0.
Let's compare with jMax... it numbers its visible inlets from 0 to n-1. Then inlet -1 (aka SystemInlet) is the invisible one. jMax does not have an "; objectmaker", and instead relies on a method "init" defined for inlet -1 of a class. Similarly, the free-function and the save/properties/gui functions are all defined in inlet -1.
I suggest that in your proposal, inlet 0 would be that special inlet, and
so instead the pathname/pointer would be given by a method (of inlet 0)
called "self" or something.
Mathieu Bouchard http://artengine.ca/matju
well, if you are atleast looking for precedent to back up some other justification, the expr[~] objects count inlets starting with 1 ($f1 $f2 etc).
pix.
On Sun, May 30, 2004 at 01:19:29AM -0400, Mathieu Bouchard wrote:
which one is the best, counting the leftmost inlet as #0, or counting it as #1 ? I ask because I have quite a bit of doc and code in which inlets are numbered, so before there's too much of it, i'd like to settle this issue.
so i'm looking to know what would be the advantages of doing it one way or another, and also, who standardized on calling it #0, and who instead chose #1.
Mathieu Bouchard http://artengine.ca/matju
PD-list mailing list PD-list@iem.at to manage your subscription (including un-subscription) see http://iem.at/cgi-bin/mailman/listinfo/pd-list