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/NanoKontrol2.sc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'classes/NanoKontrol2.sc') 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{ -- cgit v1.2.3-54-g00ecf