aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Runge <dave@sleepmap.de>2016-07-24 19:05:55 +0200
committerDavid Runge <dave@sleepmap.de>2016-07-24 19:05:55 +0200
commit9e1e9988c22a56526cc8d62305a1413fa53f76e5 (patch)
tree6256f57efb4d615b9b3638cf0c41c2b1b7021450
parent7d17cc0d6e9113e9e6f395348a6c614a676247b4 (diff)
downloadbowelyzer-9e1e9988c22a56526cc8d62305a1413fa53f76e5.tar.gz
bowelyzer-9e1e9988c22a56526cc8d62305a1413fa53f76e5.tar.bz2
bowelyzer-9e1e9988c22a56526cc8d62305a1413fa53f76e5.tar.xz
bowelyzer-9e1e9988c22a56526cc8d62305a1413fa53f76e5.zip
classes/BowelyzerConfig.sc: Adding freqRange with default values to he defaultControls. Adding freqRange to the class Arrays controlsWithRanger and hasToBeArray. Adding a ControlSpec for freqRange. Adding a return value in getControlValue for type Array (for now only with Float typ items).
-rw-r--r--classes/BowelyzerConfig.sc15
1 files changed, 13 insertions, 2 deletions
diff --git a/classes/BowelyzerConfig.sc b/classes/BowelyzerConfig.sc
index f6f1aa3..47c9238 100644
--- a/classes/BowelyzerConfig.sc
+++ b/classes/BowelyzerConfig.sc
@@ -19,7 +19,7 @@ BowelyzerConfig{
\sendReplyFreq
];
const <controlsWithRanger = #[
- \test
+ \freqRange
];
const <controlsWithKnob = #[
\test
@@ -65,6 +65,10 @@ BowelyzerConfig{
\active
];
+ const <hasToBeArray = #[
+ \freqRange
+ ];
+
const <controlGroupsGUI = #[
\general,
\amplitude,
@@ -138,6 +142,7 @@ BowelyzerConfig{
ControlSpec.specs[\pitchPeakThreshold] = ControlSpec(0.01, 1.0, \lin, 0.01, 0.5, units: "dB");
ControlSpec.specs[\pitchDownSample] = ControlSpec(1, 100, \lin, 1, 1, units: "samples");
ControlSpec.specs[\sendReplyFreq] = ControlSpec(1, 100, \exp, 0.1, 20, units: "Hz");
+ ControlSpec.specs[\freqRange] = ControlSpec(20, 20000, \exp, 0.01, 20, units: "Hz");
ControlSpec.specs[\input] = ControlSpec(0, Server.default.options.numInputBusChannels-1, \lin, 1, 0, units: "channels");
ControlSpec.specs[\port] = ControlSpec(1, 65535, \lin, 1, 0, units: "ports");
}
@@ -161,7 +166,8 @@ BowelyzerConfig{
\pitchAmpThreshold -> 0.01,
\pitchPeakThreshold -> 0.5,
\pitchDownSample -> 1,
- \sendReplyFreq ->20
+ \sendReplyFreq ->20,
+ \freqRange -> [20, 20000]
]);
defaultConfig = Dictionary.with(*[
\inputs -> Dictionary.with(*[
@@ -360,6 +366,11 @@ BowelyzerConfig{
"false",{^false}
);
});
+ if(hasToBeArray.includes(control.asSymbol), {
+ ^value.collect({|item, i|
+ item.asFloat;
+ });
+ });
},{
^nil;
});