diff options
author | David Runge <dave@sleepmap.de> | 2017-05-01 14:58:03 +0200 |
---|---|---|
committer | David Runge <dave@sleepmap.de> | 2017-05-01 14:58:03 +0200 |
commit | 1adb6394c57d55290d76c1d6eb039a478059db99 (patch) | |
tree | ab11f99c30b5909eec43da94a4dd422e976f8cca | |
parent | 3819ef4a768e87e00c3586591505638e6820976e (diff) | |
download | zzz-1adb6394c57d55290d76c1d6eb039a478059db99.tar.gz zzz-1adb6394c57d55290d76c1d6eb039a478059db99.tar.bz2 zzz-1adb6394c57d55290d76c1d6eb039a478059db99.tar.xz zzz-1adb6394c57d55290d76c1d6eb039a478059db99.zip |
classes/ZZZES3.sc: Adding class for direct initialization when using Expert Sleepers ES-3. Features convenience function to get the systems hardware output corresponding to the respective ES-3 output 1-8.
-rw-r--r-- | classes/ZZZES3.sc | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/classes/ZZZES3.sc b/classes/ZZZES3.sc new file mode 100644 index 0000000..686ad25 --- /dev/null +++ b/classes/ZZZES3.sc @@ -0,0 +1,33 @@ +ZZZES3 : ZZZ{ + + var out; + + *new{ + arg channels; + ^super.newCopyArgs(channels).init; + } + + init{ + out = Dictionary.new(); + "Interfacing ZZZ ES-3, using the following channels:".postln; + (1..8).do({ + arg item, i; + out.add(item -> super.channels[i]); + postln(item.asString ++ " -> " ++ super.channels[i].asString); + }); + } + + /** + * Returns the number of the hardware output on the system for a provided + * ES-3 output number + * @return system hardware output number + */ + out{ + arg output; + if((output > 0) && (output <= 8), { + ^out.at(output); + },{ + ^nil; + }); + } +} |