aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--BowelyzerOSCHub.sc12
1 files changed, 7 insertions, 5 deletions
diff --git a/BowelyzerOSCHub.sc b/BowelyzerOSCHub.sc
index 14ec940..ba3a9c9 100644
--- a/BowelyzerOSCHub.sc
+++ b/BowelyzerOSCHub.sc
@@ -41,7 +41,6 @@ BowelyzerOSCHub{
OSCdef.newMatching(
name,
{|msg, time, addr, recvPort|
- local.sendMsg("/indicate", msg[0].asString.replace("/","").asSymbol);
this.forwardToNetAddress(msg, time);
},
name,
@@ -73,10 +72,13 @@ BowelyzerOSCHub{
pitch = msg[4],
hasPitch = msg[5],
onsetDetect = msg[7];
- if(forward.isLocal && (forward.port == NetAddr.langPort), {
- postln(msg[0]++" (amplitude: "++amplitude++"; pitch: "++pitch++"; has pitch: "++hasPitch);
- },{
- forward.sendMsg(name,"/amplitude", amplitude, "/pitch", pitch, "/hasPitch", hasPitch, "/detect", onsetDetect);
+ if(amplitude != 0,{
+ local.sendMsg("/indicate", msg[0].asString.replace("/","").asSymbol);
+ if(forward.isLocal && (forward.port == NetAddr.langPort), {
+ postln(msg[0]++" (amplitude: "++amplitude++"; pitch: "++pitch++"; has pitch: "++hasPitch);
+ },{
+ forward.sendMsg(name,"/amplitude", amplitude, "/pitch", pitch, "/hasPitch", hasPitch, "/detect", onsetDetect);
+ });
});
}