From 6a213f643bcee208afe6f1808e7ce4b634e39852 Mon Sep 17 00:00:00 2001 From: David Runge Date: Sun, 18 Mar 2018 00:57:06 +0100 Subject: Adding classes/MIDIState{,Manager}.sc, taking care of early stages of state management. Making constructors more readable. Adding MIDIStateManager to USBMIDIIsm. Creating/recycling states for new and re-recognized MIDI devices. --- classes/PlatformMPlus.sc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'classes/PlatformMPlus.sc') diff --git a/classes/PlatformMPlus.sc b/classes/PlatformMPlus.sc index fc10aa1..999786d 100644 --- a/classes/PlatformMPlus.sc +++ b/classes/PlatformMPlus.sc @@ -1,12 +1,12 @@ PlatformMPlus : MIDIDevice{ *new{ - arg name, uid, inPort, outPort, verbose; + arg name, uid, inPort, outPort, verbose, states; var faderSize = 9, potiSize = 8, buttonSize = 48, jogwheelSize = 1; - ^super.new(name, uid, inPort, outPort, verbose, faderSize, potiSize, buttonSize, jogwheelSize).init; + ^super.new(name, uid, inPort, outPort, verbose, states, faderSize, potiSize, buttonSize, jogwheelSize).init; } init{ @@ -21,6 +21,7 @@ PlatformMPlus : MIDIDevice{ cleanup{ super.disconnectPorts(); super.disconnectPassThroughs(); + states.connected=false; } addPassThroughs{ -- cgit v1.2.3