aboutsummaryrefslogtreecommitdiffstats
path: root/classes/ZZZES3.sc
blob: 686ad25192c29a4796d201aa996b95c41ad310de (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
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;
    });
  }
}