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/NanoKontrol2.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/NanoKontrol2.sc')
-rw-r--r-- | classes/NanoKontrol2.sc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/classes/NanoKontrol2.sc b/classes/NanoKontrol2.sc index d0f79c9..43fafe0 100644 --- a/classes/NanoKontrol2.sc +++ b/classes/NanoKontrol2.sc @@ -1,11 +1,11 @@ NanoKontrol2 : MIDIDevice{ *new{ - arg name, uid, inPort, outPort, verbose; + arg name, uid, inPort, outPort, verbose, states; var faderSize = 8, potiSize = 8, buttonSize = 36; - ^super.new(name, uid, inPort, outPort, verbose, faderSize, potiSize, buttonSize).init; + ^super.new(name, uid, inPort, outPort, verbose, states, faderSize, potiSize, buttonSize).init; } init{ @@ -16,6 +16,7 @@ NanoKontrol2 : MIDIDevice{ cleanup{ super.disconnectPorts(); + states.connected=false; } addButtons{ |