aboutsummaryrefslogtreecommitdiff
path: root/external/Counter.cs
blob: 32f9409cc2733dc9bf8d402697dcbea782e59ca4 (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
62
63
64
65
66
67
68
69
70
71
72
73
74
using System;

/// <summary>
/// Descrizione di riepilogo per Counter.
/// </summary>
public class Counter:
	PureData.External
{
	public Counter()
	{
		Post("Count");

//        EventFloat += new MethodFloat(MyFloat);
    }

	public Counter(PureData.Atom[] args)
	{
        Post("Count with args");

//        pd.AddInlet(x, "init", ParametersType.Float);
//        pd.AddOutlet(x, ParametersType.Float);
    }

	// this function MUST exist
	public static void Main()
	{
        Post("Count.Main");       
	}

/*
    public void MyBang() 
    { 
        Post("Count-BANG"); 
    }

    public void MyFloat(float f)
    {
        Post(String.Format("Count-FLOAT {0}",f));       
    }
*/    
    protected override void MethodBang() 
    { 
        Post("Count-BANG"); 
    }

    protected override void MethodFloat(float f) 
    { 
        Post("Count-FLOAT "+f.ToString()); 
    }

    protected override void MethodSymbol(PureData.Symbol s) 
    { 
        Post("Count-SYMBOL "+s.ToString()); 
    }

    /*
	public void Init(float f)
	{
		curr  = (int) f;
	}

	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));
	}

*/
}