aboutsummaryrefslogtreecommitdiff
path: root/Counter
diff options
context:
space:
mode:
Diffstat (limited to 'Counter')
-rwxr-xr-xCounter/Counter.cs18
1 files changed, 17 insertions, 1 deletions
diff --git a/Counter/Counter.cs b/Counter/Counter.cs
index bf1a9d1..9cb4801 100755
--- a/Counter/Counter.cs
+++ b/Counter/Counter.cs
@@ -6,10 +6,15 @@ using System;
public class Counter:
PureData.External
{
+ PureData.Atom[] args;
+
public Counter(PureData.AtomList args)
{
Post("Count.ctor "+args.ToString());
+ // 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);
}
@@ -21,6 +26,8 @@ public class Counter:
Add(new MethodFloat(obj.MyFloat));
Add(new MethodSymbol(obj.MySymbol));
Add(new MethodList(obj.MyList));
+ Add("set",new MethodList(obj.MySet));
+ Add(new MethodAnything(obj.MyAnything));
Post("Count.Main");
}
@@ -45,7 +52,16 @@ public class Counter:
Post("Count-LIST "+l.ToString());
}
-/*
+ protected virtual void MySet(PureData.AtomList l)
+ {
+ Post("Count-SET "+l.ToString());
+ }
+
+ protected virtual void MyAnything(PureData.Symbol s,PureData.AtomList l)
+ {
+ Post("Count-("+s.ToString()+") "+l.ToString());
+ }
+ /*
public void SendOut()
{
pd.SendToOutlet(x, 0, new Atom(curr));