aboutsummaryrefslogtreecommitdiffstats
path: root/classes/BowelyzerGUI.sc
diff options
context:
space:
mode:
Diffstat (limited to 'classes/BowelyzerGUI.sc')
-rw-r--r--classes/BowelyzerGUI.sc16
1 files changed, 16 insertions, 0 deletions
diff --git a/classes/BowelyzerGUI.sc b/classes/BowelyzerGUI.sc
index 99f271a..fc5444b 100644
--- a/classes/BowelyzerGUI.sc
+++ b/classes/BowelyzerGUI.sc
@@ -426,6 +426,7 @@ BowelyzerGUI{
});
});
},{
+ this.setupCheckBox(controlsSubView, \onlyForwardOnNewPitch);
config.at(\controls).at(name).order.do({|controlName, i|
var value = config.at(\controls).at(name).at(controlName),
type = BowelyzerConfig.controlContainedIn(controlName);
@@ -438,6 +439,21 @@ BowelyzerGUI{
controlsSubView.minSize_((controlsViewWidth-8)@(controlsSubView.children.size*(sliderHeight+4)));
}
+ // setup a CheckBox on whether to only forward OSC messages, if a new pitch was detected
+ setupCheckBox{
+ arg parent, control;
+ var unit = CheckBox.new(parent: parent, bounds: sliderWidth@buttonHeight);
+ if(control == \onlyForwardOnNewPitch, {
+ unit.string_("Only forward on new pitch");
+ unit.action_({|unit|
+ var address = NetAddr.new("127.0.0.1", NetAddr.langPort),
+ type = "/"++unit.parent.parent.name.asString,
+ name = unit.parent.parent.parent.parent.name.asString;
+ address.sendMsg(type, name, control, unit.value);
+ });
+ });
+ }
+
//setup a control from configuration (adhering to its type)
setupControlFromConfig{
arg parent, type, name, value;