From 9b7d0ee23c6a56df6e30be12b5b1e0b06972a896 Mon Sep 17 00:00:00 2001 From: David Runge Date: Sun, 29 May 2016 20:37:30 +0200 Subject: BowelyzerConfig.sc: Adding getter and setter for Synth controls, stored in the config Dictionary. --- BowelyzerConfig.sc | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/BowelyzerConfig.sc b/BowelyzerConfig.sc index 4af229d..6f35500 100644 --- a/BowelyzerConfig.sc +++ b/BowelyzerConfig.sc @@ -225,5 +225,24 @@ BowelyzerConfig{ }; } + getSynthControl{ + arg name, control; + if(config.at("controls").includesKey(name) && config.at("controls").at(name).includes(control),{ + ^config.at("controls").at(name).at(control); + },{ + ^false; + }); + } + + // sets a control to a value for a synth + setSynthControl{ + arg name, control; + if(config.at("controls").includesKey(name) && config.at("controls").at(name).includes(control[0]),{ + config.at("controls").at(name).put(control[0], control[1]); + ^true; + },{ + ^false; + }); + } } -- cgit v1.2.3-54-g00ecf