From 32ab094864c3644093b5c765846a268d758f6614 Mon Sep 17 00:00:00 2001 From: David Runge Date: Sat, 9 Jul 2016 17:57:47 +0200 Subject: classes/BowelyzerAnalyzer.sc: Refactoring Routine with add and start of Synths into separate function, which is more convenient for outside calls. --- classes/BowelyzerAnalyzer.sc | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/classes/BowelyzerAnalyzer.sc b/classes/BowelyzerAnalyzer.sc index 39728bd..f0e984b 100644 --- a/classes/BowelyzerAnalyzer.sc +++ b/classes/BowelyzerAnalyzer.sc @@ -13,11 +13,7 @@ BowelyzerAnalyzer{ arg config; synths = Dictionary.new(config.at(\inputs).size); this.setupGroups; - this.addSynthsFromConfig(config); - Routine{ - 1.wait; - this.startSynthsFromConfig(config); - }.play; + this.setupSynthsFromConfig(config); } // setup a synth group for the analyzers @@ -28,6 +24,14 @@ BowelyzerAnalyzer{ NodeWatcher.register(monitoringGroup); } + setupSynthsFromConfig{ + arg config; + Routine{ + this.addSynthsFromConfig(config); + 1.wait; + this.startSynthsFromConfig(config); + }.play; + } // add synths for the defined channels addSynthsFromConfig{ arg config; -- cgit v1.2.3-70-g09d2