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/MIDIState.sc | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 classes/MIDIState.sc (limited to 'classes/MIDIState.sc') diff --git a/classes/MIDIState.sc b/classes/MIDIState.sc new file mode 100644 index 0000000..2b3da3c --- /dev/null +++ b/classes/MIDIState.sc @@ -0,0 +1,21 @@ +MIDIState{ + var uid, <>inPortNum, <>outPortNum, connected=false; + + *new{ + arg name, uid, inPortNum, outPortNum; + ^super.newCopyArgs( + name, + uid, + inPortNum, + outPortNum + ).initState(); + } + + initState{ + data = Dictionary(); + connected = true; + } + + + +} -- cgit v1.2.3