forked from aolney/ct-modular-book
-
Notifications
You must be signed in to change notification settings - Fork 0
/
05-fun-mod-controllers.Rmd
401 lines (338 loc) · 32.4 KB
/
05-fun-mod-controllers.Rmd
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
# Controllers
Controllers initiate musical events, and in some cases, also define when musical events end.
Chapter \@ref(basic-modeling-concepts) introduced the keyboard controller, which is perhaps the most intuitive controller because it mirrors a traditional instrument.
Not all controllers are as obvious or as intuitive, however.
This chapter focuses on clocks and sequencers, which are canonical examples of modular controllers.
Unlike keyboards, clocks and sequencers are partially automated.
This means that, once started, they continue to produce control signals without additional manual control.
## Clocks
<!-- Things I skipped b/c they seem to advanced for this stage: -->
<!-- - sequencing drums off a clock using gate delays -->
<!-- - sequencing drums off a clock using clock divisions -->
Clocks in modular synthesis typically perform two functions.
The first function is synchronization.
Just like group of musicians may use a common reference to stay on the beat, e.g. drums, different modules can use a common clock to stay in time with each other.
A modular clock is similar in several respects to a metronome, which is a musical aid for keeping time.
Metronomes like the one shown in Figure \@ref(fig:metronome) create a regular click or pulse that is adjustable to a given beats per minute (BPM).
For reference, most current music ranges from 80-160 BPM.^[https://blog.musiio.com/2021/08/19/which-musical-tempos-are-people-streaming-the-most/]
Likewise, a modular clock creates a trigger pulse^[Some clocks will produce gates.] at a given BPM and makes this signal available on an output jack.
(ref:metronome) A metronome produces a periodic sound to help musicians keep rhythm. The mechanism is an inverted pendulum with a weight on the end; moving the weight up/down changes the speed of the metronome accordingly. Image [© Vincent Quach/CC-BY-3.0](https://commons.wikimedia.org/wiki/File:Metronome_Nikko.jpg).
```{r metronome, echo=F, out.width="50%", fig.cap="(ref:metronome)"}
knitr::include_graphics("images/514px-Metronome_Nikko.jpg")
```
Many clock modules also support ways of marking time off the main clock signal.
Most often these are clock divisions.
A clock division divides the clock frequency by an integer to get a new, lower frequency.
For example, if our clock is 120 BPM, then it is producing triggers at 2 Hz.
A clock division of 2 would therefore produce triggers at 1 Hz, or 60 BPM.
Clock divisions of 2, 4, and 8 are relatively common.
Each of these specialized signals often has its own jack, so typically only a few such divisions are available on a clock module.
Clock divisions can be used to implement [time signatures](https://en.wikipedia.org/wiki/Time_signature) that track how many beats occur in a measure (also known as a bar).
A common time signature in popular music is ${}^{4}_{4}$, which indicates there are four quarter notes per measure, in contrast to ${}^{3}_{4}$, which indicates there are three quarter notes per measure.
Assuming each pulse indicates a quarter note, an end of measure signal can be generated by using a clock division matching the top of the time signature.
Because a clock pulse represents the lowest resolution control signal and thus the shortest note, using more pulses per quarter note allows more resolution and shorter notes.^[Not all modules receiving clock will interpret a pulse as a quarter note. Some have higher resolutions and so require multiple pulses to advance. Twenty-four [pulses per quarter note](https://en.wikipedia.org/wiki/Pulses_per_quarter_note) is one such standard.]
The second function of a modular clock is [transport](https://en.wikipedia.org/wiki/Transport_(recording)) control, which is recording terminology for controls like play, pause, stop, rewind, etc.
Since clocks are not involved in recording per se, they typically have start, stop, and reset controls.
A reset signal is analogous to a rewind in the sense that all receiving modules will start at their initial states rather than where they left off.
Resets are a useful tool in both composition and recording.
Each of the transport controls is likely to have its own button for manual control, plus an output jack to send the control signal to downstream modules.
As with all things modular, it's important to realize that although there are specialized clock modules, anything that produces a trigger/gate pulse can be used as a clock.^[Some modules will accept non-rectangular signals as a clock signal as long as the voltage exceeds some internal threshold.]
Since clocks are sources of triggers, clocks can also be used for non-clock purposes.
### Clock under a scope
To get a better sense of what's going on, let's take a look at clock output on a scope.
Try connecting a scope to a clock's main output and bar output using the button in Figure \@ref(fig:bar-beat-bpm-scope).
You should see regular pulses off the main output and a different color bar output overlaid every 4th beat using the default time signature.
(ref:bar-beat-bpm-scope) [Virtual modular](https://olney.ai/ct-modular-book/modular-for-pdf.html?starter=empty.vcv&solution=%3cimg+class%3d%27rack-image%27+src%3d%27images%2fpatch-solutions%2fbar-beat-bpm-scope.png%27+style%3d%27height%3a+300px%3b+width%3a+auto%27%3e&instructions=%3cul%3e%0a%3cli%3eAdd+%e2%80%9cClock%e2%80%9d+and+Scope%3c%2fli%3e%0a%3cli%3eConnect+Clock+BEAT+to+Scope+In+1%3c%2fli%3e%0a%3cli%3eConnect+Clock+BAR+to+Scope+In+2%3c%2fli%3e%0a%3cli%3eSet+Scope+time+and+gain+so+you+can+see+bar+pulses+by+color%3b+at+4%2f4+time+these+should+be+every+4+pulses%3c%2fli%3e%0a%3c%2ful%3e%0a%3cimg+class%3d%27rack-image%27+src%3d%27images%2fsolo-modules%2fclock-solo.png%27+style%3d%27height%3a+300px%3b+width%3a+auto%27%3e%0a) for making a clock patch with a scope.
<!-- MODAL HTML BLOCK -->
```{r echo=F, out.width="100%"}
modular_modal("bar-beat-bpm-scope", starter_file="empty.vcv", instructions_html="<ul>
<li>Add “Clock” and Scope</li>
<li>Connect Clock BEAT to Scope In 1</li>
<li>Connect Clock BAR to Scope In 2</li>
<li>Set Scope time and gain so you can see bar pulses by color; at 4/4 time these should be every 4 pulses</li>
</ul>
<img class='rack-image' src='images/solo-modules/clock-solo.png' style='height: 300px; width: auto'>
",solution_html="<img class='rack-image' src='images/patch-solutions/bar-beat-bpm-scope.png' style='height: 300px; width: auto'>")
```
<!-- CAPTION BLOCK -->
```{r bar-beat-bpm-scope, echo=F, out.width="100%", fig.cap="(ref:bar-beat-bpm-scope)"}
modular_caption()
```
### Clock as a generator
Since clock modules produce a regular stream of pulses, we can hear them if they pulse at audio rates.
Recall the bottom threshold of human hearing is approximately 20 Hz (20 cycles per second).
Since 1200 BPM corresponds to 20 Hz, we should be able to hear clock signals above this BPM.
The clock module from the last patch only goes up to 300 BPM, but if we use the 16ths output^[This particular clock does not use division notation.], we can achieve four times that, or 1200 BPM.
Try adding an audio out module after the scope using the button in
Figure \@ref(fig:clock-sound-bpm-scope-out) to extend the last patch.
The sixteenth note pulses should show as approximately a square wave, and by moving the BPM up and down, you should hear a change in pitch.
(ref:clock-sound-bpm-scope-out) [Virtual modular](https://olney.ai/ct-modular-book/modular-for-pdf.html?starter=bar-beat-bpm-scope.vcv&solution=%3cimg+class%3d%27rack-image%27+src%3d%27images%2fpatch-solutions%2fclock-sound-bpm-scope-out.png%27+style%3d%27height%3a+300px%3b+width%3a+auto%27%3e&instructions=%3cul%3e%0a%3cli%3eAdd+Host+Audio%3c%2fli%3e%0a%3cli%3eRemove+all+patch+cables%3c%2fli%3e%0a%3cli%3eConnect+Clock+16th+to+Scope+In+1%3c%2fli%3e%0a%3cli%3eConnect+Scope+Out+1+to+Host+Audio+L+In%3c%2fli%3e%0a%3cli%3eSet+BPM+to+300%3c%2fli%3e%0a%3cli%3eTry+adjusting%3cul%3e%0a%3cli%3eTime+on+the+scope+so+you+see+a+square+wave+%2850%25+duty+cycle%29%3c%2fli%3e%0a%3cli%3eBPM+on+the+clock+to+create+different+pitches+%28you+may+need+good+headphones%29%3c%2fli%3e%0a%3c%2ful%3e%0a%3c%2ful%3e%0a) for making a clock-based drone patch with a scope.
<!-- MODAL HTML BLOCK -->
```{r echo=F, out.width="100%"}
modular_modal("clock-sound-bpm-scope-out", starter_file="bar-beat-bpm-scope.vcv", instructions_html="<ul>
<li>Add Host Audio</li>
<li>Remove all patch cables</li>
<li>Connect Clock 16th to Scope In 1</li>
<li>Connect Scope Out 1 to Host Audio L In</li>
<li>Set BPM to 300</li>
<li>Try adjusting<ul>
<li>Time on the scope so you see a square wave (50% duty cycle)</li>
<li>BPM on the clock to create different pitches (you may need good headphones)</li>
</ul>
</ul>
",solution_html="<img class='rack-image' src='images/patch-solutions/clock-sound-bpm-scope-out.png' style='height: 300px; width: auto'>")
```
<!-- CAPTION BLOCK -->
```{r clock-sound-bpm-scope-out, echo=F, out.width="100%", fig.cap="(ref:clock-sound-bpm-scope-out)"}
modular_caption()
```
## Sequencers
The basic idea of a sequencer is very simple: a sequencer replays a control signal at a particular moment in time.
To represent time, sequencers use the idea of a *step*.
Each pulse of the clock will advance the sequencer by one step.
Any given step will have one or more control signals pre-stored.
On each step, these control signals will be sent to the corresponding output jacks.
When a sequencer reaches the last available step, it will loop back to the first step.
Sequencers typically have a switch to lower the number of available steps from the hardware maximum, e.g. from eight steps to seven.
The steps for a given control signal are respectively referred to as a *channel*.
<!-- Sequencers are more general than clocks in both the variety of control signals they support as well as the timings of those signals. -->
In analogue hardware, sequencers supporting only one control signal tend to be very compact and require external clock inputs.
Sequencers supporting multiple control signals tend to have their own clock and transport controls.
When a sequencer has only one control signal, it can be anything, but is most frequently either a trigger or a control voltage.
When a sequencer has multiple control signals, they are frequently a combination of triggers and control voltages arranged in different channels.
As previously discussed, these control signals naturally correspond to initiating musical events and pitches for notes, but any musical parameter that can be controlled by voltage can be stored in an analogue sequencer.^[Some digital sequencers can replay voltage-based control signals, but not all.]
### Clocks as sequencers
You could consider a clock as a kind of sequencer that produces triggers on a single channel.
Let's look at this by making a bass drum patch driven by a clock, which will form the basis of other patches in this section.
You should refer back to Section \@ref(controlling-note-dynamics-volume-during-note) if you don't recall some of the modules involved.
This *very* basic kick patch uses a sine wave from the VCO and controls the amplitude of the sine wave with a fast attack, medium decay envelope.
Try making as much of the patch as possible using the button in
Figure \@ref(fig:clock-kick-bpm-vco-adsr-vca-scope-out) before referring to the instructions.
(ref:clock-kick-bpm-vco-adsr-vca-scope-out) [Virtual modular](https://olney.ai/ct-modular-book/modular-for-pdf.html?starter=empty.vcv&solution=%3cimg+class%3d%27rack-image%27+src%3d%27images%2fpatch-solutions%2fclock-kick-bpm-vco-adsr-vca-scope-out.png%27+style%3d%27height%3a+300px%3b+width%3a+auto%27%3e&instructions=%3cul%3e%0a%3cli%3eAdd+BPM+Clock%3c%2fli%3e%0a%3cli%3eAdd+VCO%3c%2fli%3e%0a%3cli%3eAdd+ADSR%3c%2fli%3e%0a%3cli%3eAdd+VCA%3c%2fli%3e%0a%3cli%3eConnect+VCO+sine+to+VCA+in%3c%2fli%3e%0a%3cli%3eConnect+ADSR+out+to+VCA+CV+in%3c%2fli%3e%0a%3cli%3eConnect+Clock+Beat+to+ADSR+gate%3c%2fli%3e%0a%3cli%3eAdd+Scope+and+Host+audio%3c%2fli%3e%0a%3cli%3eConnect+VCA+out+to+Scope+In+1%3c%2fli%3e%0a%3cli%3eConnect+Scope+Out+1+to+Host+audio+L%3c%2fli%3e%0a%3cli%3eTo+get+a+kick+sound%3cul%3e%0a%3cli%3eChange+VCO+frequency+to+around+40+Hz%3c%2fli%3e%0a%3cli%3eSet+ADSR+attack+to+about+1ms%2c+Decay+to+about+50ms%2c+and+the+rest+to+1.%3c%2fli%3e%0a%3c%2ful%3e%0a%3c%2fli%3e%0a%3c%2ful%3e%0a) for making a clock-driven kick patch.
<!-- MODAL HTML BLOCK -->
```{r echo=F, out.width="100%"}
modular_modal("clock-kick-bpm-vco-adsr-vca-scope-out", starter_file="empty.vcv", instructions_html="<ul>
<li>Add BPM Clock</li>
<li>Add VCO</li>
<li>Add ADSR</li>
<li>Add VCA</li>
<li>Connect VCO sine to VCA in</li>
<li>Connect ADSR out to VCA CV in</li>
<li>Connect Clock Beat to ADSR gate</li>
<li>Add Scope and Host audio</li>
<li>Connect VCA out to Scope In 1</li>
<li>Connect Scope Out 1 to Host audio L</li>
<li>To get a kick sound<ul>
<li>Change VCO frequency to around 40 Hz</li>
<li>Set ADSR attack to about 1ms, Decay to about 50ms, and the rest to 1.</li>
</ul>
</li>
</ul>
",solution_html="<img class='rack-image' src='images/patch-solutions/clock-kick-bpm-vco-adsr-vca-scope-out.png' style='height: 300px; width: auto'>")
```
<!-- CAPTION BLOCK -->
```{r clock-kick-bpm-vco-adsr-vca-scope-out, echo=F, out.width="100%", fig.cap="(ref:clock-kick-bpm-vco-adsr-vca-scope-out)"}
modular_caption()
```
We could expand this example by using clock divisions to add multiple percussion parts.
For example, a closed hi-hat on the clock, a kick drum on $/2$, and an open hi-hat on $/4$.
Keep the clock sequencer example in mind as your continue through this chapter.
Ultimately any module that produces the signals we want can be used as a sequencer, regardless of whether the module is called a sequencer.
### Trigger sequencers
The main difference between a clock and a trigger sequencer is the precise control over the timing of the triggers.
Let's look at a simple trigger-based sequencer to extend the previous kick patch.
Try adding the TRG module between the Clock and VCO using the button in
Figure \@ref(fig:trg-kick-bpm-trg-vco-adsr-vca-scope-out).
Once you have it set up, activate a pattern of steps that isn't strictly regular, e.g. some beats immediately after each other and some spaced apart.
Each activated step will issue a gate.
Control of irregular timings is where trigger sequencers really shine compared to sequencing off a clock.
(ref:trg-kick-bpm-trg-vco-adsr-vca-scope-out) [Virtual modular](https://olney.ai/ct-modular-book/modular-for-pdf.html?starter=clock-kick-bpm-vco-adsr-vca-scope-out.vcv&solution=%3cimg+class%3d%27rack-image%27+src%3d%27images%2fpatch-solutions%2ftrg-kick-bpm-trg-vco-adsr-vca-scope-out.png%27+style%3d%27height%3a+300px%3b+width%3a+auto%27%3e&instructions=%3cul%3e%0a%3cli%3eAdd+TRG+between+Clock+and+VCO%3c%2fli%3e%0a%3cli%3eConnect+Clock+Beat+to+TRG+CLK%3c%2fli%3e%0a%3cli%3eConnect+TRG+Gate+to+ADSR+Gate%3c%2fli%3e%0a%3cli%3eAdjust+TRG%3cul%3e%0a%3cli%3eActivate+steps+by+clicking+on+the+squares%3b+solid+yellow+is+active%3c%2fli%3e%0a%3cli%3eChange+length+to+8+using+LEN+knob%3c%2fli%3e%0a%3c%2ful%3e%0a%3c%2fli%3e%0a%3c%2ful%3e%0a%3cimg+class%3d%27rack-image%27+src%3d%27images%2fsolo-modules%2ftrg-solo.png%27+style%3d%27height%3a+300px%3b+width%3a+auto%27%3e%0a) for a trigger-sequenced kick patch.
<!-- MODAL HTML BLOCK -->
```{r echo=F, out.width="100%"}
modular_modal("trg-kick-bpm-trg-vco-adsr-vca-scope-out", starter_file="clock-kick-bpm-vco-adsr-vca-scope-out.vcv", instructions_html="<ul>
<li>Add TRG between Clock and VCO</li>
<li>Connect Clock Beat to TRG CLK</li>
<li>Connect TRG Gate to ADSR Gate</li>
<li>Adjust TRG<ul>
<li>Activate steps by clicking on the squares; solid yellow is active</li>
<li>Change length to 8 using LEN knob</li>
</ul>
</li>
</ul>
<img class='rack-image' src='images/solo-modules/trg-solo.png' style='height: 300px; width: auto'>
",solution_html="<img class='rack-image' src='images/patch-solutions/trg-kick-bpm-trg-vco-adsr-vca-scope-out.png' style='height: 300px; width: auto'>")
```
<!-- CAPTION BLOCK -->
```{r trg-kick-bpm-trg-vco-adsr-vca-scope-out, echo=F, out.width="100%", fig.cap="(ref:trg-kick-bpm-trg-vco-adsr-vca-scope-out)"}
modular_caption()
```
### Control voltage sequencers
Control voltage sequencers replay voltage for each step.
Typically the voltage is constant for the duration of the step, which is useful for sending V/Oct signals to play notes.
<!-- When sequencing multiple instruments, you have a choice between using a single sequencer that can handle everything or multiple separate sequencers. -->
To keep things simple and to build on the previous patch, let's create a saw-based synth voice whose pitch is controlled by a separate control voltage sequencer.
Try duplicating the VCO, ADSR, and VCA modules from the last patch and controlling the VCO with the ADDR-SEQ module by using the button in
Figure \@ref(fig:trg-kick-seqaddr-saw-bpm-vco-adsr-vca-mixer-out).
Each sequencer step has a voltage controlled by a knob, so turning these knobs sets the note pitch for each step.
Because the volumes of these two instruments, or voices, is so different, you'll need to run each into a mixer module rather than directly into the host audio.
(ref:trg-kick-seqaddr-saw-bpm-vco-adsr-vca-mixer-out) [Virtual modular](https://olney.ai/ct-modular-book/modular-for-pdf.html?starter=trg-kick-bpm-trg-vco-adsr-vca-scope-out.vcv&solution=%3cimg+class%3d%27rack-image%27+src%3d%27images%2fpatch-solutions%2ftrg-kick-seqaddr-saw-bpm-vco-adsr-vca-mixer-out.png%27+style%3d%27height%3a+600px%3b+width%3a+auto%27%3e&instructions=%3cul%3e%0a%3cli%3eAdd+ADDR-SEQ+to+the+row+below+the+other+modules%3c%2fli%3e%0a%3cli%3eDrag+select+VCO%2c+ADSR%2c+and+VCA%3c%2fli%3e%0a%3cli%3eRight+click+on+one+and+select+Duplicate%3c%2fli%3e%0a%3cli%3eDrag+the+duplicated+modules+down+to+the+same+row+as+ADDR-SEQ%3c%2fli%3e%0a%3cli%3eConnect+Clock+Beat+to+ADDR-SEQ+Clock%3c%2fli%3e%0a%3cli%3eConnect+ADDR-SEQ+Out+to+VCO+V%2fOct%3c%2fli%3e%0a%3cli%3eConnect+VCO+Saw+to+VCA+in%3c%2fli%3e%0a%3cli%3eConnect+Clock+Beat+to+ADSR+Gate%3c%2fli%3e%0a%3cli%3eConnect+ADSR+Out+to+VCA+CV+In%3c%2fli%3e%0a%3cli%3eChange+each+of+the+ADSR+settings+to+9-12+o%26%2339%3bclock%3c%2fli%3e%0a%3cli%3eAdd+QuadVCA%2fMixer%3c%2fli%3e%0a%3cli%3eConnect+each+of+the+VCA+outs+to+QuadVCA+inputs%3c%2fli%3e%0a%3cli%3eConnect+QuadVCA+Out+Mix+to+Host+Audio+L%3c%2fli%3e%0a%3cli%3eTry+starting%2fstopping+the+Clock.+Notice+how+everything+starts+mid-sequence%3f%3c%2fli%3e%0a%3cli%3eConnect+Clock+RST+%28reset%29+out+to+TRG+RST+and+ADDR-SEQ+Reset+in.+Now+you+can+reset+both+sequencers+by+pressing+the+RST+button.%3c%2fli%3e%0a%3c%2ful%3e%0a%3cimg+class%3d%27rack-image%27+src%3d%27images%2fsolo-modules%2faddr-seq-solo.png%27+style%3d%27height%3a+300px%3b+width%3a+auto%27%3e%0a%3cimg+class%3d%27rack-image%27+src%3d%27images%2fsolo-modules%2fquadvca-solo.png%27+style%3d%27height%3a+300px%3b+width%3a+auto%27%3e%0a) for a trigger-sequenced kick mixed with a control-voltage sequenced saw wave.
<!-- MODAL HTML BLOCK -->
```{r echo=F, out.width="100%"}
modular_modal("trg-kick-seqaddr-saw-bpm--vco-adsr-vca-mixer-out", starter_file="trg-kick-bpm-trg-vco-adsr-vca-scope-out.vcv", instructions_html="<ul>
<li>Add ADDR-SEQ to the row below the other modules</li>
<li>Drag select VCO, ADSR, and VCA</li>
<li>Right click on one and select Duplicate</li>
<li>Drag the duplicated modules down to the same row as ADDR-SEQ</li>
<li>Connect Clock Beat to ADDR-SEQ Clock</li>
<li>Connect ADDR-SEQ Out to VCO V/Oct</li>
<li>Connect VCO Saw to VCA in</li>
<li>Connect Clock Beat to ADSR Gate</li>
<li>Connect ADSR Out to VCA CV In</li>
<li>Change each of the ADSR settings to 9-12 o'clock</li>
<li>Add QuadVCA/Mixer</li>
<li>Connect each of the VCA outs to QuadVCA inputs</li>
<li>Connect QuadVCA Out Mix to Host Audio L</li>
<li>Try starting/stopping the Clock. Notice how everything starts mid-sequence?</li>
<li>Connect Clock RST (reset) out to TRG RST and ADDR-SEQ Reset in. Now you can reset both sequencers by pressing the RST button.</li>
</ul>
<img class='rack-image' src='images/solo-modules/addr-seq-solo.png' style='height: 300px; width: auto'>
<img class='rack-image' src='images/solo-modules/quadvca-solo.png' style='height: 300px; width: auto'>
",solution_html="<img class='rack-image' src='images/patch-solutions/trg-kick-seqaddr-saw-bpm-vco-adsr-vca-mixer-out.png' style='height: 600px; width: auto'>")
```
<!-- CAPTION BLOCK -->
```{r trg-kick-seqaddr-saw-bpm-vco-adsr-vca-mixer-out, echo=F, out.width="100%", fig.cap="(ref:trg-kick-seqaddr-saw-bpm-vco-adsr-vca-mixer-out)"}
modular_caption()
```
#### Sequencing rests
<!-- You've likely noticed a limitation with the ADDR-SEQ module, specifically that it always plays a note and the notes are of equal duration. -->
<!-- Let's consider each of these in turn. -->
A limitation with the ADDR-SEQ module is that it always plays a note and never pauses, or [rests](https://en.wikipedia.org/wiki/Rest_(music)).
One option would be to adjust the pitch on a step so it is outside the range of human hearing.
While this option is simple and effective, it's possible that the sound will interfere with other sound waves in ways that become audible.
Another option is to replace the clock signal into the ADDR-SEQ module with the output of the trigger sequencer.
Since the trigger sequencer has steps with no trigger, this means that no clock would be sent to ADDR-SEQ on these steps.
The effect of using the trigger sequencer as a clock depends, however, on how the VCO envelope is gated, either with the clock or with trigger sequencer.
Try this using the button in
Figure \@ref(fig:rests-trg-kick-seqaddr-saw-bpm-vco-adsr-vca-mixer-out) to explore the different combinations.
(ref:rests-trg-kick-seqaddr-saw-bpm-vco-adsr-vca-mixer-out) [Virtual modular](https://olney.ai/ct-modular-book/modular-for-pdf.html?starter=trg-kick-seqaddr-saw-bpm--vco-adsr-vca-mixer-out.vcv&solution=%3ch4%3eSolution+for+Trigger+Clock+and+Trigger+Gate+only%3c%2fh4%3e%3cimg+class%3d%27rack-image%27+src%3d%27images%2fpatch-solutions%2frests-trg-kick-seqaddr-saw-bpm-vco-adsr-vca-mixer-out.png%27+style%3d%27height%3a+600px%3b+width%3a+auto%27%3e&instructions=%3cul%3e%0a%3cli%3eClock+Clock%2c+Clock+Gate%3cul%3e%0a%3cli%3e%3cem%3eAlready+playing+from+the+last+patch%3c%2fem%3e%3c%2fli%3e%0a%3cli%3eListen+to+the+resulting+sound%3cul%3e%0a%3cli%3eIs+every+note+in+your+saw+voice+played%3f%3c%2fli%3e%0a%3cli%3eIf+you+increase+sustain%2frelease+on+the+saw+voice%2c+how+does+it+change+the+sound+of+notes%3f%3c%2fli%3e%0a%3c%2ful%3e%0a%3c%2fli%3e%0a%3c%2ful%3e%0a%3c%2fli%3e%0a%3cli%3eTrigger+Clock%2c+Trigger+Gate%3cul%3e%0a%3cli%3eConnect+TRG+Gate+to+ADDR-SEQ+Clock%3c%2fli%3e%0a%3cli%3eConnect+TRG+Gate+to+ADSR+Gate+%28for+the+saw+voice%29%3c%2fli%3e%0a%3cli%3eListen+to+the+resulting+sound%3cul%3e%0a%3cli%3eIs+every+note+in+your+saw+voice+played%3f%3c%2fli%3e%0a%3cli%3eIf+you+increase+sustain%2frelease+on+the+saw+voice%2c+how+does+it+change+the+sound+of+notes+that+are+not+back+to+back%3f%3c%2fli%3e%0a%3c%2ful%3e%0a%3c%2fli%3e%0a%3c%2ful%3e%0a%3c%2fli%3e%0a%3cli%3eTrigger+Clock%2c+Clock+Gate%3cul%3e%0a%3cli%3eConnect+TRG+Gate+to+ADDR-SEQ+Clock%3c%2fli%3e%0a%3cli%3eConnect+Clock+Beat+to+ADSR+Gate+%28for+the+saw+voice%29%3c%2fli%3e%0a%3cli%3eListen+to+the+resulting+sound%3cul%3e%0a%3cli%3eIs+every+note+in+your+saw+voice+played%3f%3c%2fli%3e%0a%3cli%3eWhen+are+notes+hit+twice%3f%3c%2fli%3e%0a%3c%2ful%3e%0a%3c%2fli%3e%0a%3c%2ful%3e%0a%3c%2fli%3e%0a%3cli%3eClock+Clock%2c+Trigger+Gate%3cul%3e%0a%3cli%3eConnect+Clock+Beat+to+ADDR-SEQ+Clock%3c%2fli%3e%0a%3cli%3eConnect+TRG+Gate+to+ADSR+Gate+%28for+the+saw+voice%29%3c%2fli%3e%0a%3cli%3eListen+to+the+resulting+sound%3cul%3e%0a%3cli%3eIs+every+note+in+your+saw+voice+played%3f%3c%2fli%3e%0a%3cli%3eIf+you+increase+sustain%2frelease+on+the+saw+voice%2c+how+does+it+change+the+sound+of+notes+that+are+not+back+to+back%3f%3c%2fli%3e%0a%3c%2ful%3e%0a%3c%2fli%3e%0a%3c%2ful%3e%0a%3c%2fli%3e%0a%3c%2ful%3e%0a) for a trigger-sequenced kick mixed with a control-voltage sequenced saw wave, using the trigger sequence as a clock on the voltage-controlled sequencer.
<!-- MODAL HTML BLOCK -->
```{r echo=F, out.width="100%"}
modular_modal("rests-trg-kick-seqaddr-saw-bpm--vco-adsr-vca-mixer-out", starter_file="trg-kick-seqaddr-saw-bpm--vco-adsr-vca-mixer-out.vcv", instructions_html="<ul>
<li>Clock Clock, Clock Gate<ul>
<li><em>Already playing from the last patch</em></li>
<li>Listen to the resulting sound<ul>
<li>Is every note in your saw voice played?</li>
<li>If you increase sustain/release on the saw voice, how does it change the sound of notes?</li>
</ul>
</li>
</ul>
</li>
<li>Trigger Clock, Trigger Gate<ul>
<li>Connect TRG Gate to ADDR-SEQ Clock</li>
<li>Connect TRG Gate to ADSR Gate (for the saw voice)</li>
<li>Listen to the resulting sound<ul>
<li>Is every note in your saw voice played?</li>
<li>If you increase sustain/release on the saw voice, how does it change the sound of notes that are not back to back?</li>
</ul>
</li>
</ul>
</li>
<li>Trigger Clock, Clock Gate<ul>
<li>Connect TRG Gate to ADDR-SEQ Clock</li>
<li>Connect Clock Beat to ADSR Gate (for the saw voice)</li>
<li>Listen to the resulting sound<ul>
<li>Is every note in your saw voice played?</li>
<li>When are notes hit twice?</li>
</ul>
</li>
</ul>
</li>
<li>Clock Clock, Trigger Gate<ul>
<li>Connect Clock Beat to ADDR-SEQ Clock</li>
<li>Connect TRG Gate to ADSR Gate (for the saw voice)</li>
<li>Listen to the resulting sound<ul>
<li>Is every note in your saw voice played?</li>
<li>If you increase sustain/release on the saw voice, how does it change the sound of notes that are not back to back?</li>
</ul>
</li>
</ul>
</li>
</ul>
",solution_html="<h4>Solution for Trigger Clock and Trigger Gate only</h4><img class='rack-image' src='images/patch-solutions/rests-trg-kick-seqaddr-saw-bpm-vco-adsr-vca-mixer-out.png' style='height: 600px; width: auto'>")
```
<!-- CAPTION BLOCK -->
```{r rests-trg-kick-seqaddr-saw-bpm-vco-adsr-vca-mixer-out, echo=F, out.width="100%", fig.cap="(ref:rests-trg-kick-seqaddr-saw-bpm-vco-adsr-vca-mixer-out)"}
modular_caption()
```
The patch in Figure \@ref(fig:rests-trg-kick-seqaddr-saw-bpm-vco-adsr-vca-mixer-out) illustrates that the way the sequencers are connected to each other and the clock plays a big difference on the resulting sound.
If the gate and the clock are from the same source, and therefore match, every sequenced note will be heard.
If the gate source is the trigger sequencer, rests will be produced.
These effects are summarized in Table \@ref(tab:trigger-clock-effects).
The second row is comparable to a multichannel sequencer that allows steps to be silenced, thus reducing the overall pitched steps available by replacing them with silence.
In contrast, the third row *inserts* silence between pitched steps, creating a longer sequence where no pitched steps are discarded.
Table: (\#tab:trigger-clock-effects) Effects of gate and clock mismatching when combining trigger and control voltage sequencers to produce rests.
| Clock source | Gate source | Effect |
|-------------------|-----------------|-------------------------------|
| Clock | Clock | Every note played, no rests |
| Clock | Trigger sequencer | Notes skipped, with rests |
| Trigger sequencer | Trigger sequencer | Every note played, with rests |
| Trigger sequencer | Clock | Notes repeated, no rests |
#### Sequencing note duration
A second limitation of the ADDR-SEQ is that all the notes are the same duration.
This limitation can be somewhat addressed by using variable length release on respective envelopes.
A longer release would lengthen the duration of the sound, but for any instrument that has a sustain, the volume would not be correct using this method.
The fundamental problem is that the gate into the ADSR is a fixed width which results in a fixed length note.
What is needed is to change the clock signal into a gate where the length of the gate matches the length of the desired note.
Ideally we'd use a separate control voltage sequencer to set the gate lengths for us, but in the interest of keeping things relatively simple, let's control gate length manually.
Try to add a trigger to gate module that takes the clock and sends out a gate to the saw envelope using the button in Figure \@ref(fig:rests-note-lengths-trg-kick-seqaddr-saw-bpm-vco-adsr-vca-mixer-out).
As you move the gate length knob, you'll hear that the note lengths change correspondingly.
(ref:rests-note-lengths-trg-kick-seqaddr-saw-bpm-vco-adsr-vca-mixer-out) [Virtual modular](https://olney.ai/ct-modular-book/modular-for-pdf.html?starter=rests-trg-kick-seqaddr-saw-bpm--vco-adsr-vca-mixer-out.vcv&solution=%3cimg+class%3d%27rack-image%27+src%3d%27images%2fpatch-solutions%2frests-note-lengths-trg-kick-seqaddr-saw-bpm-vco-adsr-vca-mixer-out.png%27+style%3d%27height%3a+600px%3b+width%3a+auto%27%3e&instructions=%3cul%3e%0a%3cli%3eAdd+DGATE+trigger+to+gate+module%3c%2fli%3e%0a%3cli%3eConnect+TRG+Gate+to+DGATE+Trig+in%3c%2fli%3e%0a%3cli%3eConnect+DGATE+Gate+to+saw+ADSR+Gate%3c%2fli%3e%0a%3cli%3eManually+change+DGATE+Gate+length+knob+as+the+sound+plays%3cul%3e%0a%3cli%3eHow+does+the+saw+voice+sound+on+notes+followed+by+rests%3f%3c%2fli%3e%0a%3cli%3eYou+may+need+reduce+your+ASDR+release+to+hear+the+gate+clearly%3c%2fli%3e%0a%3c%2ful%3e%0a%3c%2fli%3e%0a%3c%2ful%3e%0a%3cimg+class%3d%27rack-image%27+src%3d%27images%2fsolo-modules%2fdgate-solo.png%27+style%3d%27height%3a+300px%3b+width%3a+auto%27%3e%0a) for a trigger-sequenced kick mixed with a control-voltage sequenced saw wave, using the trigger sequence as a clock on the voltage-controlled sequencer and a trigger to gate module to control note length.
<!-- MODAL HTML BLOCK -->
```{r echo=F, out.width="100%"}
modular_modal("rests-note-lengths-trg-kick-seqaddr-saw-bpm--vco-adsr-vca-mixer-out", starter_file="rests-trg-kick-seqaddr-saw-bpm--vco-adsr-vca-mixer-out.vcv", instructions_html="<ul>
<li>Add DGATE trigger to gate module</li>
<li>Connect TRG Gate to DGATE Trig in</li>
<li>Connect DGATE Gate to saw ADSR Gate</li>
<li>Manually change DGATE Gate length knob as the sound plays<ul>
<li>How does the saw voice sound on notes followed by rests?</li>
<li>You may need reduce your ASDR release to hear the gate clearly</li>
</ul>
</li>
</ul>
<img class='rack-image' src='images/solo-modules/dgate-solo.png' style='height: 300px; width: auto'>
",solution_html="<img class='rack-image' src='images/patch-solutions/rests-note-lengths-trg-kick-seqaddr-saw-bpm-vco-adsr-vca-mixer-out.png' style='height: 600px; width: auto'>")
```
<!-- CAPTION BLOCK -->
```{r rests-note-lengths-trg-kick-seqaddr-saw-bpm-vco-adsr-vca-mixer-out, echo=F, out.width="100%", fig.cap="(ref:rests-note-lengths-trg-kick-seqaddr-saw-bpm-vco-adsr-vca-mixer-out)"}
modular_caption()
```
<!-- TODO: add envelopes on sequence steps example? -->
## Moving forward
<!-- Summing up -->
<!-- Clocks and sequencers are canonical modules for creating control signals in a modular system. -->
<!-- Unlike manual controller like a keyboard, both clocks and sequencers are semi-automated: once they are set up, they will continue to generate control signals without additional human intervention. -->
<!-- Sequencing can get complex rather quickly, and there has been a tremendous amount of innovation around the problem of sequencing, leading to a variety of different approaches. -->
The patches in this chapter explored more traditional analogue sequencing using separate modules.
Larger analogue sequencer modules with multiple channels and features can often be viewed as composites of these smaller modules, as shown in Figure \@ref(fig:seq3-annotated).
Perhaps the most powerful aspect of modular controllers is that anything generating a control signal can be used as a controller.
Thus one can build a custom sequencer out of basic components to solve a particular musical problem.
Future chapters will explore additional controllers and control techniques.
(ref:seq3-annotated) The SEQ3 sequencer module from VCVRack. The trigger sequence channel is highlighted in red and the control voltage channels are highlighted in blue.
```{r seq3-annotated, echo=F, out.width="50%", fig.cap="(ref:seq3-annotated)"}
knitr::include_graphics("images/seq3-annotated.png")
```
## Check your understanding
1. `r mc_question("Which of the following is not a main function of a clock?", list( answer="time signatures",
"synchronization",
"transport"
))`
2. `r mc_question("What basic waveshape best matches a clock signal?", list( answer="square",
"saw",
"triangle",
"sine"
))`
3. `r mc_question("Can a control voltage sequencer be used to create triggers?", list( answer="Yes, but only on every other step to reset the trigger",
"Yes, on every step because the voltage drops to zero anyways",
"No, control voltage and triggers are fundamentally different",
"No, because the control voltage can be negative"
))`