aboutsummaryrefslogtreecommitdiff
path: root/chuck/OSCGraphicsPort.ck
blob: b633aaca7c3dc1700f1f36ebf9ae3d8f2ab210c7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
public class OSCGraphicsPort extends Chubgraph {
	inlet => blackhole;
	inlet => outlet;

	50::ms => dur poll_interval;

	fun void tick(float in) {}

	fun void
	poll()
	{
		inlet.last() => float prev;

		while (poll_interval => now)
			if (inlet.last() != prev)
				inlet.last() => prev => tick;
	}
	spork ~ poll();
}