blob: bf1a9d1b04cae86b5a73827101ef2d613901c463 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
using System;
/// <summary>
/// Descrizione di riepilogo per Counter.
/// </summary>
public class Counter:
PureData.External
{
public Counter(PureData.AtomList args)
{
Post("Count.ctor "+args.ToString());
// pd.AddInlet(x, "init", ParametersType.Float);
// pd.AddOutlet(x, ParametersType.Float);
}
// this function MUST exist
private static void Setup(Counter obj)
{
Add(new MethodBang(obj.MyBang));
Add(new MethodFloat(obj.MyFloat));
Add(new MethodSymbol(obj.MySymbol));
Add(new MethodList(obj.MyList));
Post("Count.Main");
}
protected virtual void MyBang()
{
Post("Count-BANG");
}
protected virtual void MyFloat(float f)
{
Post("Count-FLOAT "+f.ToString());
}
protected virtual void MySymbol(PureData.Symbol s)
{
Post("Count-SYMBOL "+s.ToString());
}
protected virtual void MyList(PureData.AtomList l)
{
Post("Count-LIST "+l.ToString());
}
/*
public void SendOut()
{
pd.SendToOutlet(x, 0, new Atom(curr));
}
public void Sum(float f)
{
curr += (int) f;
pd.SendToOutlet(x, 0, new Atom(curr));
}
*/
}
|