Bowelyzer{ var "++channelView.name); if(channelView.name.asSymbol == msg[1].asSymbol, { channelView.name = msg[3].asSymbol; }); }); //TODO: rename the LevelListener }.play(AppClock); // free the synth on the server and start a new one according to the config analyzer.freeAnalysisSynth(msg[1].asSymbol); analyzer.addSynthWithName(msg[3]); Routine{ 1.wait; analyzer.startSynthWithNameAndControls(msg[3].asSymbol, config.config.at(\controls).at(msg[3]), config.config.at(\inputs).at(msg[3])); }.play; hub.freeSynthListener(msg[1]); hub.addSynthListener(msg[3]); hub.startSynthListener(msg[3]); }); }, \input,{ // if the input name exists and the new is an Integer and greater/equal 0 if(((msg[3].isInteger) && (msg[3].asInteger >= 0)),{ // change the input in configuration config.config.at(\inputs).put(msg[1], msg[3].asInteger); analyzer.setSynthControl(msg[1].asSymbol, \inputChannel, msg[3].asInteger); }); } ); }); }); }, path: "/inputs", srcID: NetAddr.new("127.0.0.1", NetAddr.langPort) ); OSCdef.newMatching( key: \toggle, func: {|msg, time, addr, recvPort| postln("Received: "++msg); if(msg[1].notNil && msg[2].notNil && msg[3].notNil,{ if(config.config.at(\inputs).includesKey(msg[1]),{ switch(msg[3], 0,{analyzer.startAnalysisSynth(msg[1])}, 1,{analyzer.stopAnalysisSynth(msg[1])} ); }); }); }, path: "/toggle", srcID: NetAddr.new("127.0.0.1", NetAddr.langPort) ); } //TODO: add SimpleController //TODO: delegate changes to BowelyzerConfig.config and update analyzer and GUI with it }