diff options
author | David Runge <dave@sleepmap.de> | 2018-03-18 00:57:06 +0100 |
---|---|---|
committer | David Runge <dave@sleepmap.de> | 2018-03-18 00:57:06 +0100 |
commit | 6a213f643bcee208afe6f1808e7ce4b634e39852 (patch) | |
tree | 44f738a741ab1dd3fd4df01522455cff0facecf4 /classes/PlatformMPlus.sc | |
parent | 755cc2bc11e9c571c08df809935b68c5f4cf6652 (diff) | |
download | usbmidiism-6a213f643bcee208afe6f1808e7ce4b634e39852.tar.gz usbmidiism-6a213f643bcee208afe6f1808e7ce4b634e39852.tar.bz2 usbmidiism-6a213f643bcee208afe6f1808e7ce4b634e39852.tar.xz usbmidiism-6a213f643bcee208afe6f1808e7ce4b634e39852.zip |
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.
Diffstat (limited to 'classes/PlatformMPlus.sc')
-rw-r--r-- | classes/PlatformMPlus.sc | 5 |
1 files changed, 3 insertions, 2 deletions
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{ |