aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Runge <dave@sleepmap.de>2016-05-29 20:37:30 +0200
committerDavid Runge <dave@sleepmap.de>2016-05-29 20:37:30 +0200
commit9b7d0ee23c6a56df6e30be12b5b1e0b06972a896 (patch)
tree309cacc392ef6b4ca8a4b90eb5f527f0b49ebbd7
parent71246e184f4d4f6962556b15ed132f6edc2c6c7d (diff)
downloadbowelyzer-9b7d0ee23c6a56df6e30be12b5b1e0b06972a896.tar.gz
bowelyzer-9b7d0ee23c6a56df6e30be12b5b1e0b06972a896.tar.bz2
bowelyzer-9b7d0ee23c6a56df6e30be12b5b1e0b06972a896.tar.xz
bowelyzer-9b7d0ee23c6a56df6e30be12b5b1e0b06972a896.zip
BowelyzerConfig.sc: Adding getter and setter for Synth controls, stored in the config Dictionary.
-rw-r--r--BowelyzerConfig.sc19
1 files changed, 19 insertions, 0 deletions
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;
+ });
+ }
}