summaryrefslogtreecommitdiffstats
path: root/classes/MIDIState.sc
diff options
context:
space:
mode:
authorDavid Runge <dave@sleepmap.de>2018-03-18 00:57:06 +0100
committerDavid Runge <dave@sleepmap.de>2018-03-18 00:57:06 +0100
commit6a213f643bcee208afe6f1808e7ce4b634e39852 (patch)
tree44f738a741ab1dd3fd4df01522455cff0facecf4 /classes/MIDIState.sc
parent755cc2bc11e9c571c08df809935b68c5f4cf6652 (diff)
downloadusbmidiism-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/MIDIState.sc')
-rw-r--r--classes/MIDIState.sc21
1 files changed, 21 insertions, 0 deletions
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 <name, <>uid, <>inPortNum, <>outPortNum, <data, <>connected=false;
+
+ *new{
+ arg name, uid, inPortNum, outPortNum;
+ ^super.newCopyArgs(
+ name,
+ uid,
+ inPortNum,
+ outPortNum
+ ).initState();
+ }
+
+ initState{
+ data = Dictionary();
+ connected = true;
+ }
+
+
+
+}