From d11d37ada865ae9579c5eb0de1875e7cd77a6e02 Mon Sep 17 00:00:00 2001 From: David Runge Date: Mon, 19 Mar 2018 22:55:12 +0100 Subject: classes/MIDIStateManager.sc: Add verbose mode. Inserting linebreaks and passing on verbosity. Calling takeOver() on recycled MIDIStates. --- classes/MIDIStateManager.sc | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'classes') diff --git a/classes/MIDIStateManager.sc b/classes/MIDIStateManager.sc index ec4b53c..1566a58 100644 --- a/classes/MIDIStateManager.sc +++ b/classes/MIDIStateManager.sc @@ -1,9 +1,10 @@ MIDIStateManager{ - var verbose, = 0),{ deviceStates[devicePosition].connected=true; + deviceStates[devicePosition].takeOver(); ^deviceStates[devicePosition]; },{ deviceStates = deviceStates.add( - MIDIState.new(name, uid, inPortNum, outPortNum) + MIDIState.new(name, uid, inPortNum, outPortNum, verbose) ); ^deviceStates[deviceStates.size-1]; }); @@ -35,7 +38,10 @@ MIDIStateManager{ listStates{ deviceStates.do({|state, i| - postln(i.asString++": ["++state.name++", "++state.uid++", "++state.inPortNum++", "++state.outPortNum++", "++state.connected++"]"); + postln(i.asString++": ["++state.name++", "++state.uid++", " + ++state.inPortNum++", "++state.outPortNum++", " + ++state.connected++"]"); }); } + } -- cgit v1.2.3-70-g09d2