From 1adb6394c57d55290d76c1d6eb039a478059db99 Mon Sep 17 00:00:00 2001 From: David Runge Date: Mon, 1 May 2017 14:58:03 +0200 Subject: 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. --- classes/ZZZES3.sc | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 classes/ZZZES3.sc 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; + }); + } +} -- cgit v1.2.3-70-g09d2