1// This layout loosely follows the MiniMoog-V
2// Arturia-only features are labeled
3// Original versions also added where different
4
5// Need vrocker and hrocker toggle switches in Faust!
6// Need orange and blue color choices
7//   Orange => Connect modulation sources to their destinations
8//    Blue  => Turn audio sources On and Off
9// - and later -
10//   White  => Turn performance features On and Off
11//   Black  => Select between modulation sources
12//   Julius Smith for Analog Devices 3/1/2017
13
14vrocker(x) = checkbox("%%x [style:vrocker]");
15hrocker(x) = checkbox("%%x [style:hrocker]");
16vrockerblue(x) = checkbox("%x  [style:vrocker] [color:blue]");
17vrockerblue(x) = checkbox("%x [style:vrocker] [color:blue]");
18 // USAGE: vrockerorange("[0] ModulationEnable");
19
20hrockerblue(x) = checkbox("%%x [style:hrocker] [color:blue]");
21vrockerred(x) = checkbox("%%x [style:vrocker] [color:red]");
22hrockerred(x) = checkbox("%%x [style:hrocker] [color:red]");
23
24declare designer "Robert A. Moog";
25
26mmg(x) = hgroup("",x); // Minimoog + Effects
27  synthg(x) = mmg(vgroup("[0] Minimoog",x));
28  fxg(x) = mmg(hgroup("[1] Effects",x));
29  mg(x) = synthg(hgroup("[0]",x));
30    cg(x) = mg(vgroup("[0] Controllers",x)); // Formerly named "Modules" but "Minimoog" group-title is enough
31      vg(x) = cg(hgroup("[0] Master Volume", x));
32      dg(x) = cg(hgroup("[1] Oscillator Tuning & Switching", x));
33        // Tune knob = master tune
34        dsg(x) = dg(vgroup("[1] Switches", x));
35	  // Oscillator Modulation HrockerRed => apply Modulation Mix output to osc1&2 pitches
36	  // [MOVED here from osc3 group] Osc 3 Control VrockerRed => use osc3 as LFO instead of osc3
37      gmmg(x) = cg(hgroup("[2] Glide and ModMix", x));
38        // Glide knob [0:10] = portamento speed
39        // Modulation Mix knob [0:10] (between Osc3 and Noise) = mix of noise and osc3 modulating osc1&2 pitch and/or VCF freq
40    og(x) = mg(vgroup("[1] Oscillator Bank", x));
41      osc1(x) = og(hgroup("[1] Oscillator 1", x));
42        // UNUSED Control switch (for alignment) - Could put Oscillator Modulation switch there
43        // Range rotary switch: LO (slow pulses or rhythm), 32', 16', 8', 4', 2'
44        // Frequency <something> switch: LED to right
45        // Waveform rotary switch: tri, impulse/bent-triangle, saw, pulseWide, pulseMed, pulseNarrow
46      osc2(x) = og(hgroup("[2] Oscillator 2", x));
47        // UNUSED (originall) or Osc 2 Control VrockerRed
48        // Range rotary switch: LO, 32', 16', 8', 4', 2'
49        // Detuning knob: -7 to 7 [NO SWITCH]
50        // Waveform rotary switch: tri, impulse(?), saw, pulseWide, pulseMed, pulseNarrow
51      osc3(x) = og(hgroup("[3] Oscillator 3", x));
52        // Osc 3 Control VrockerRed => use osc3 as LFO instead of osc3
53        // Range rotary switch: LO, 32', 16', 8', 4', 2'
54        // Detuning knob: -7 to 7 [NO SWITCH]
55        // Waveform rotary switch: tri, impulse(?), saw, pulseWide, pulseMed, pulseNarrow
56    mixg(x) = mg(vgroup("[2] Mixer", x));
57      // Each row 5 slots to maintain alignment and include red rockers joining VCF area:
58      mr1(x) = mixg(hgroup("[0] Osc1", x)); // mixer row 1 =
59      // Osc1 Volume and Osc1 HrockerBlue & _ & _ & Filter Modulation HrockerRed
60      // Filter Modulation => Modulation Mix output to VCF freq
61      mr2(x) = mixg(hgroup("[1] Ext In, KeyCtl", x)); // row 2 = Ext In HrockerBlue and Vol and Overload LED and Keyboard Ctl HrockerRed 1
62      mr3(x) = mixg(hgroup("[2] Osc2", x)); // = Osc2 Volume and Osc2 HrockerBlue and Keyboard Ctl HrockerRed 2
63      // Keyboard Control Modulation 1&2 => 0, 1/3, 2/3, all of Keyboard Control Signal ("gate?") applied to VCF freq
64      mr4(x) = mixg(hgroup("[3] Noise", x)); // = Noise HrockerBlue and Volume and Noise Type VrockerBlue
65        mr4cbg(x) = mr4(vgroup("[1]", x)); // = Noise Off and White/Pink selection
66	// two rockers
67      mr5(x) = mixg(hgroup("[4] Osc3", x)); //  Osc3 Volume and Osc3 HrockerBlue
68    modg(x) = mg(vgroup("[3] Modifiers", x));
69      vcfg(x) = modg(vgroup("[0] Filter", x));
70        vcf1(x) = vcfg(hgroup("[0] [tooltip:freq, Q, ContourScale]", x));
71	  vcf1cbg(x) = vcf1(vgroup("[0] [tooltip:two checkboxes]", x));
72          // Filter Modulation switch
73          // VCF Off switch
74        // Corner Frequency knob
75        // Filter Emphasis knob
76        // Amount of Contour knob
77        vcf2(x) = vcfg(hgroup("[1] Filter Contour [tooltip:AttFilt, DecFilt, Sustain Level for Filter Contour]", x));
78        // Attack Time knob
79        // Decay Time knob
80        // Sustain Level knob
81      ng(x) = modg(hgroup("[1] Loudness Contour", x));
82        // Attack Time knob
83        // Decay Time knob
84        // Sustain Level knob
85    echog(x) = fxg(hgroup("[4] Echo",x));
86      ekg(x) = echog(vgroup("[0] Knobs",x));
87      esg(x) = echog(vgroup("[1] Switches",x));
88    flg(x) = fxg(hgroup("[5] Flanger",x));
89      flkg(x) = flg(vgroup("[0] Knobs",x));
90      flsg(x) = flg(vgroup("[1] Switches",x));
91    chg(x) = fxg(hgroup("[6] Chorus",x));
92      ckg(x) = chg(vgroup("[0] Knobs",x));
93      csg(x) = chg(vgroup("[1] Switches",x));
94    rg(x) = fxg(hgroup("[7] Reverb",x));
95      rkg(x) = rg(vgroup("[0] Knobs",x));
96      rsg(x) = rg(vgroup("[1] Switches",x));
97    outg(x) = fxg(vgroup("[8] Output", x));
98      volg(x) = outg(hgroup("[0] Volume Main Output", x));
99        // Volume knob [0-10]
100	// Unison switch (Arturia) or Output connect/disconnect switch (original)
101	//   When set, all voices are stacked and instrument is in mono mode
102      tunerg(x) = outg(hgroup("[1] A-440 Switch", x));
103      vdtpolyg(x) = outg(hgroup("[2] Voice Detune / Poly", x));
104        // Voice Detune knob [0-10] (Arturia) or
105	// Polyphonic switch [red LED below] (Arturia)
106	//   When set, instrument is in polyphonic mode with one oscillator per key
107    clipg(x) = fxg(vgroup("[9] Soft Clip", x));
108	// Soft Clipping switch [red LED above]
109  kg(x) = synthg(hgroup("[1] Keyboard Group", x)); // Keyboard was 3 1/2 octaves
110    ws(x) = kg(vgroup("[0] Wheels and Switches", x));
111      s1g(x) = ws(hgroup("[0] Jacks and Rockers", x));
112        jg(x) = s1g(vgroup("[0] MiniJacks",x));
113        gdlg(x) = s1g(vgroup("[1] Glide/Decay/Legato Enables",x)); // Arturia
114	// Glide Hrocker (see original Button version below)
115	// Decay Hrocker (see original Button version below) => Sets Release (R) of ADSR to either 0 or Decay (R)
116	// Legato Hrocker (not in original)
117      s2g(x) = ws(hgroup("[1] [tooltip:Wheels+]", x));
118        bg(x) = s2g(vgroup("[0] [tooltip:Bend Enable and Range]", x));
119        wg(x) = s2g(hgroup("[1] [tooltip:Bend and Mod Wheels]", x));
120	// Using Glide/Decay/Legato enables above following Arturia:
121	//   dg(x) = s2g(hgroup("[2] Glide and Decay momentary pushbuttons", x));
122	//   Glide Button injects portamento as set by Glide knob
123	//   Decay Button uses decay of Loudness Contour (else 0)
124    keys(x) = kg(hgroup("[1] [tooltip:Keys]", x));
125      gg(x) = keys(hgroup("[0] [tooltip: Gates]",x));
126      // leave slot 1 open for sustain (below)
127