aboutsummaryrefslogtreecommitdiff
path: root/Counter
diff options
context:
space:
mode:
authorThomas Grill <xovo@users.sourceforge.net>2006-03-08 16:48:29 +0000
committerThomas Grill <xovo@users.sourceforge.net>2006-03-08 16:48:29 +0000
commit0028a036b1823c364b8a3984bd6b836a15ab7b6f (patch)
tree09da3bd31d17d96aec2ebca84c838a15052156db /Counter
parent91a94f0946561a6343f6169b63e538776dca867b (diff)
added inlet and outlet functions
added send functions practically ready to work with! svn path=/trunk/externals/clr/; revision=4658
Diffstat (limited to 'Counter')
-rwxr-xr-xCounter/Counter.cs22
1 files changed, 19 insertions, 3 deletions
diff --git a/Counter/Counter.cs b/Counter/Counter.cs
index 9cb4801..b59945e 100755
--- a/Counter/Counter.cs
+++ b/Counter/Counter.cs
@@ -8,6 +8,8 @@ public class Counter:
{
PureData.Atom[] args;
+ float farg;
+
public Counter(PureData.AtomList args)
{
Post("Count.ctor "+args.ToString());
@@ -15,8 +17,9 @@ public class Counter:
// that's the way to store args (don't just copy an AtomList instance!!)
this.args = (PureData.Atom[])args;
-// pd.AddInlet(x, "init", ParametersType.Float);
-// pd.AddOutlet(x, ParametersType.Float);
+ AddInlet(s_list,new PureData.Symbol("list2"));
+ AddInlet(ref farg);
+ AddOutletBang();
}
// this function MUST exist
@@ -27,6 +30,7 @@ public class Counter:
Add(new MethodSymbol(obj.MySymbol));
Add(new MethodList(obj.MyList));
Add("set",new MethodList(obj.MySet));
+ Add("send",new MethodList(obj.MySend));
Add(new MethodAnything(obj.MyAnything));
Post("Count.Main");
@@ -34,32 +38,44 @@ public class Counter:
protected virtual void MyBang()
{
- Post("Count-BANG");
+ Post("Count-BANG "+farg.ToString());
+ Outlet(0);
}
protected virtual void MyFloat(float f)
{
Post("Count-FLOAT "+f.ToString());
+ Outlet(0,f);
}
protected virtual void MySymbol(PureData.Symbol s)
{
Post("Count-SYMBOL "+s.ToString());
+ Outlet(0,s);
}
protected virtual void MyList(PureData.AtomList l)
{
Post("Count-LIST "+l.ToString());
+ Outlet(0,l);
}
protected virtual void MySet(PureData.AtomList l)
{
Post("Count-SET "+l.ToString());
+ Outlet(0,new PureData.Symbol("set"),l);
+ }
+
+ protected virtual void MySend(PureData.AtomList l)
+ {
+ Send(new PureData.Symbol("receiver"),l);
+ Send(new PureData.Symbol("receiver2"),(PureData.Atom[])l);
}
protected virtual void MyAnything(PureData.Symbol s,PureData.AtomList l)
{
Post("Count-("+s.ToString()+") "+l.ToString());
+ Outlet(0,s,l);
}
/*
public void SendOut()