diff options
Diffstat (limited to 'BowelyzerGUI.sc')
-rw-r--r-- | BowelyzerGUI.sc | 62 |
1 files changed, 3 insertions, 59 deletions
diff --git a/BowelyzerGUI.sc b/BowelyzerGUI.sc index f50ac63..99d1f47 100644 --- a/BowelyzerGUI.sc +++ b/BowelyzerGUI.sc @@ -1,11 +1,10 @@ BowelyzerGUI{ - var mainView, - channelContainerView, + var mainView, channelContainerView, <channels, <indicators, //TODO: move to BowelyzerConfig - fadeOutTime = 1.0, + fadeOutTime = 0.5, fadeOutSteps = 20, minWidth=1280, minHeight=720; @@ -81,12 +80,9 @@ BowelyzerGUI{ // setup a small View as indicator for incoming/outgoing OSC messages for each input this.setupOSCIndicator(meterView); this.addOSCIndicatorFadeOutTask(name); - indicators.at(name).play(AppClock); - // setup LevelIndicator for each input this.setupLevelIndicator(meterView); - this.setupLevelListener(name, NetAddr.new(config.at(\synthServerAddress), config.at(\synthServerPort))); controlsView = View(controlMeterContainerView.asView, Rect(0,0, channelView.bounds.width*0.9, channelView.bounds.height)); controlsView.asView.background = Color.fromHexString("#EEEFEE"); @@ -117,7 +113,6 @@ BowelyzerGUI{ ^View(parent, Rect(0,0,40,40)) .name_(\OSCIndicator) .background_(Color.fromHexString("#EEEFEE")) - //.background_(Color.fromHexString("#99EF99")) .maxSize_(40@20) .visible_(true) ; @@ -159,56 +154,6 @@ BowelyzerGUI{ } - // setup a listener for a level indicator by name and source (of synth server) - setupLevelListener{ - arg name, source; - postln("Setting up LevelListener for: "++name); - OSCdef.newMatching( - key: \levels++name, - func: {|msg, time, addr, recvPort| - var msgName = msg[0].asString.replace("/levels/", "").asSymbol; - { - channels.do({|channel| - if(channel.name.asSymbol == msgName,{ - channel.children.do({|channelChild| - if(channelChild.name.asSymbol == \meterAndControls,{ - channelChild.children.do({|meterAndControls| - if(meterAndControls.name.asSymbol == \meterView, { - meterAndControls.children.do({|meterView| - if(meterView.isKindOf(LevelIndicator), { - //postln("Setting up LevelIndicator for "++msgName); - meterView.value = msg[3].ampdb.linlin(-40, 0, 0, 1); - meterView.peakLevel = msg[4].ampdb.linlin(-40, 0, 0, 1); - }); - }); - }); - }); - }); - }); - }); - }); - }.defer; - }, - path: "/levels/"++name, - srcID: source - ); - } - - startLevelListener{ - arg name; - OSCdef(\levels++name).enable; - } - - stopLevelListener{ - arg name; - OSCdef(\levels++name).disable; - } - - freeLevelListener{ - arg name; - OSCdef(\levels++name).free; - } - setupLevelIndicator{ arg parent; ^LevelIndicator( @@ -230,9 +175,8 @@ BowelyzerGUI{ var address = NetAddr.new("127.0.0.1", NetAddr.langPort), type = "/toggle", name = controlUnit.parent.parent.parent.name.asSymbol, - controlName = \active, controlValue = controlUnit.value; - address.sendMsg(type, name, controlName, controlValue); + address.sendMsg(type, name, controlValue); }) .maxSize_(40@20); } |