aboutsummaryrefslogtreecommitdiff
path: root/chuck/OSCGraphicsPort.ck
diff options
context:
space:
mode:
Diffstat (limited to 'chuck/OSCGraphicsPort.ck')
-rw-r--r--chuck/OSCGraphicsPort.ck15
1 files changed, 11 insertions, 4 deletions
diff --git a/chuck/OSCGraphicsPort.ck b/chuck/OSCGraphicsPort.ck
index b633aac..9c81e62 100644
--- a/chuck/OSCGraphicsPort.ck
+++ b/chuck/OSCGraphicsPort.ck
@@ -2,9 +2,14 @@ public class OSCGraphicsPort extends Chubgraph {
inlet => blackhole;
inlet => outlet;
- 50::ms => dur poll_interval;
+ second/20 => dur poll_interval;
- fun void tick(float in) {}
+ fun void tick(float in) {} /* virtual */
+ fun void
+ tick(float in, float prev) /* virtual */
+ {
+ in => tick;
+ }
fun void
poll()
@@ -12,8 +17,10 @@ public class OSCGraphicsPort extends Chubgraph {
inlet.last() => float prev;
while (poll_interval => now)
- if (inlet.last() != prev)
- inlet.last() => prev => tick;
+ if (inlet.last() != prev) {
+ tick(inlet.last(), prev);
+ inlet.last() => prev;
+ }
}
spork ~ poll();
}