summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Runge <dave@sleepmap.de>2018-03-19 22:51:35 +0100
committerDavid Runge <dave@sleepmap.de>2018-03-19 22:51:35 +0100
commitfc36452315295b79c4b43155e228e38b47ab13e5 (patch)
tree606cc3b464f6efeedf4ce52cbba7f0eb2e5153ef
parent4608fe081f768110465966386f8aedcd6d6bd807 (diff)
downloadusbmidiism-fc36452315295b79c4b43155e228e38b47ab13e5.tar.gz
usbmidiism-fc36452315295b79c4b43155e228e38b47ab13e5.tar.bz2
usbmidiism-fc36452315295b79c4b43155e228e38b47ab13e5.tar.xz
usbmidiism-fc36452315295b79c4b43155e228e38b47ab13e5.zip
classes/USBMIDIIsm.sc: Cleanup verbosity setting. Init MIDIStateManager with verbosity. Properly placing try-message when doing MIDIClient init.
-rw-r--r--classes/USBMIDIIsm.sc13
1 files changed, 5 insertions, 8 deletions
diff --git a/classes/USBMIDIIsm.sc b/classes/USBMIDIIsm.sc
index 63f3412..b5b547c 100644
--- a/classes/USBMIDIIsm.sc
+++ b/classes/USBMIDIIsm.sc
@@ -1,27 +1,24 @@
USBMIDIIsm{
- var <devices, <stateManager, verbose;
+ var <>verbose, <devices, <stateManager;
*new{
- arg setVerbose=false;
- ^super.new.init(setVerbose);
+ arg verbose=false;
+ ^super.newCopyArgs(verbose).init();
}
init{
- arg setVerbose;
devices = Array();
- stateManager = MIDIStateManager();
- verbose = setVerbose;
+ stateManager = MIDIStateManager(verbose);
this.discoverDevices();
}
discoverDevices{
if(MIDIClient.initialized.not,{
- postln("Initializing MIDIClient...");
{
MIDIClient.init(verbose: verbose);
}.try(
- postln("Failed!")
+ postln("Initializing MIDIClient...")
);
},{
if(devices.size > 0, {