From 400e13a882ffa812387a35d91d7d39b90a16b4f8 Mon Sep 17 00:00:00 2001 From: David Runge Date: Sat, 9 Jul 2016 18:49:29 +0200 Subject: classes/Bowelyzer.sc: Moving the freeing of Synths up in the chain when calling freeChannel. Now using an ordered list of channel names, when freeing them. --- classes/Bowelyzer.sc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/classes/Bowelyzer.sc b/classes/Bowelyzer.sc index 6c0d963..db6913d 100644 --- a/classes/Bowelyzer.sc +++ b/classes/Bowelyzer.sc @@ -206,8 +206,8 @@ Bowelyzer{ fileName = msg[1]; postln("Received: "++msg); // free all channels - config.config.at(\inputs).keysDo({ |name| - this.freeChannel(name); + config.config.at(\inputs).order.do({ |name| + this.freeChannel(name.asSymbol); }); // read the configuration file if(config.readConfigurationFile(fileName),{ @@ -351,6 +351,8 @@ Bowelyzer{ freeChannel{ arg name; ("Removing channel: "++name).postln; + // free Synth + analyzer.freeAnalysisSynth(name); // remove OSCdefs for the channel OSCdef.all.pairsDo({|key, value| if(key == name.asSymbol,{ @@ -362,8 +364,6 @@ Bowelyzer{ value.free; }); }); - // free Synth - analyzer.freeAnalysisSynth(name); // remove configurations for the channel config.config.at(\inputs).removeAt(name); config.config.at(\controls).removeAt(name); -- cgit v1.2.3-70-g09d2