IV. Reference
Reference
Every control, key, page, and factory rhythm of the drum machine, in tables the build makes from its code, and the drum machine's state as a song's file holds it.
The voices' controls
Each voice's controls, as the panel's column has them top to bottom, by
their names in song files and lanes. A switch's positions are its words.
Every knob runs from 0 to 100, and its curve is how its value follows its
travel: audio is an audio-taper potentiometer's, slow at first, as the
levels have.
Bass drum
| Name | Range | Default | Curve |
|---|---|---|---|
bd_level | 0% to 100% | 50% | audio |
bd_tune | 0% to 100% | 50% | linear |
bd_tone | 0% to 100% | 50% | linear |
bd_decay | 0% to 100% | 50% | linear |
bd_attack | 0% to 100% | 0% | linear |
Snare drum
| Name | Range | Default | Curve |
|---|---|---|---|
sd_level | 0% to 100% | 50% | audio |
sd_tune | 0% to 100% | 50% | linear |
sd_tone | 0% to 100% | 50% | linear |
sd_snappy | 0% to 100% | 50% | linear |
Toms and congas
| Name | Range | Default | Curve |
|---|---|---|---|
lt_level | 0% to 100% | 50% | audio |
lt_tune | 0% to 100% | 50% | linear |
lt_decay | 0% to 100% | 50% | linear |
lt_conga | tom / conga | tom | switch |
mt_level | 0% to 100% | 50% | audio |
mt_tune | 0% to 100% | 50% | linear |
mt_decay | 0% to 100% | 50% | linear |
mt_conga | tom / conga | tom | switch |
ht_level | 0% to 100% | 50% | audio |
ht_tune | 0% to 100% | 50% | linear |
ht_decay | 0% to 100% | 50% | linear |
ht_conga | tom / conga | tom | switch |
Rim shot and claves, hand clap and maracas, cowbell
| Name | Range | Default | Curve |
|---|---|---|---|
rs_level | 0% to 100% | 50% | audio |
rs_claves | rim / claves | rim | switch |
cp_level | 0% to 100% | 50% | audio |
cp_maracas | clap / maracas | clap | switch |
cb_level | 0% to 100% | 50% | audio |
Cymbal, hi-hats, and ride
| Name | Range | Default | Curve |
|---|---|---|---|
cy_level | 0% to 100% | 50% | audio |
cy_tune | 0% to 100% | 50% | linear |
cy_tone | 0% to 100% | 50% | linear |
cy_decay | 0% to 100% | 50% | linear |
oh_level | 0% to 100% | 50% | audio |
oh_decay | 0% to 100% | 50% | linear |
ch_level | 0% to 100% | 50% | audio |
ch_decay | 0% to 100% | 50% | linear |
rd_level | 0% to 100% | 50% | audio |
rd_tune | 0% to 100% | 50% | linear |
The machine's controls
| Name | Range | Default | Curve |
|---|---|---|---|
level | -60 dB to 6 dB | 0 dB | linear |
pan | -100% to 100% | 0% | linear |
muted | off / on | off | switch |
accent | 0% to 100% | 50% | linear |
auto_fill | manual / 16 / 12 / 8 / 4 / 2 | manual | switch |
fill | 1 / 2 / 3 / 4 | 1 | switch |
fill_variation | A / B | A | switch |
fill_variation | A / B | A | switch |
run | off / play | off | switch |
level and pan are the panel's volume and pan, and muted the track
list's mute. run is start/stop, which pattern clips turn on and off;
a song doesn't keep it.
How the voices are tuned
The voices' frequencies and decay times are the service notes' table of
typical values (page 14), with a decay time read as the time to fall to a
tenth, 20 dB. Where the 808 has no knob, the 909's spreads around the 808's
value. These are the drum machine's values, from drums/voices.zig and
drums/kit.zig, at a knob's 0, 50, and 100:
| Voice | Frequency | Decay to a tenth |
|---|---|---|
| bass drum | 38.5, 54.5, 77 Hz, by tune |
50, 300, 800 ms |
| snare drum | 238 and 476 Hz, ±0.4 octave | 68 and 45 ms; snares 150 ms |
| low tom | 80, 90, 100 Hz | 81, 200, 492 ms |
| mid tom | 120, 135, 160 Hz | 53, 130, 320 ms |
| hi tom | 165, 185, 220 Hz | 41, 100, 246 ms |
| low conga | 165, 185, 220 Hz | 73, 180, 443 ms |
| mid conga | 250, 280, 310 Hz | 41, 100, 246 ms |
| hi conga | 370, 400, 455 Hz | 32, 80, 197 ms |
| rim shot | 1667 and 455 Hz | 15 ms, gated to about 10 |
| claves | 2500 Hz | 35 ms |
| hand clap | noise around 1 kHz | three strikes 11 ms apart; 120 ms |
| maracas | noise above 5 kHz | 25 ms |
| cowbell | 540 and 800 Hz squares | 12 ms, then 75 ms |
| cymbal | six squares, ±half an octave | 350, 800, 1200 ms |
| open hi-hat | six squares | 87, 470, 610 ms |
| closed hi-hat | six squares | 20, 50, 160 ms |
| ride | six squares, 1.35 times higher | 1.4 s; its bell 80 ms |
The six squares are at 205.3, 369.6, 304.4, 522.7, 800, and 540 Hz, after Werner, Abel, and Smith's measurements of the 808's cymbal. A drum's frequency is where it settles: struck, it starts higher and sighs down, by up to 16% for the bass drum, 20% for a tom, and 6% for a conga, at the full accent. Each voice's levels with and without accent are in chapter 5.
Keys
The voices' keys, which Drum Edit's rows, the letter keys, and a controller's pads play:
| Key | Note | Name |
|---|---|---|
| 36 | C2 | bass drum |
| 38 | D2 | snare drum |
| 41 | F2 | low tom |
| 45 | A2 | mid tom |
| 48 | C3 | hi tom |
| 37 | C#2 | rim shot |
| 39 | D#2 | hand clap |
| 56 | G#3 | cowbell |
| 49 | C#3 | cymbal |
| 46 | A#2 | open hihat |
| 42 | F#2 | closed hihat |
| 51 | D#3 | ride |
Second keys, as on the 909: 35 plays the bass drum, 40 the snare, 43 the
low tom, 44 the closed hi-hat, 47 the mid tom, and 50 the hi tom. The other
keys play nothing. A key's velocity is its accent: 64 a plain hit, 96 one
at the accent level, growing between, softer below 64, and no more above
96.
The letter keys play from C2 on a drum track: A C2, W C#2, S D2, E
D#2, D E2, F F2, T F#2, G G2, Y G#2, H A2, U A#2, J B2,
K C3, O C#3, L D3, P D#3, ; E3, and ' F3, at velocity 127.
Z and X move them.
Pages
The pages of eight controls a controller's knobs turn, in order:
| Page | Knobs 1 to 8 |
|---|---|
| 1 kick snare | bd_tune, bd_tone, bd_decay, bd_attack, sd_tune, sd_tone, sd_snappy, accent |
| 2 toms | lt_tune, lt_decay, mt_tune, mt_decay, ht_tune, ht_decay, lt_level, mt_level |
| 3 cymbals | cy_tune, cy_tone, cy_decay, oh_decay, ch_decay, rd_tune, cy_level, rd_level |
| 4 levels | ht_level, rs_level, cp_level, cb_level, oh_level, ch_level, pan, level |
A controller's four faders, on the device's own, are bd_level,
sd_level, ch_level, and oh_level.
Factory rhythms
| Rhythm | Name | Steps | Steps a beat | Swing |
|---|---|---|---|---|
1-1 | rock | 16 | 4 | any |
1-2 | rock 2 | 16 | 4 | any |
1-3 | disco | 16 | 4 | any |
1-4 | backbeat | 16 | 4 | any |
1-5 | shuffle | 12 | 3 | any |
1-6 | bossa | 16 | 4 | any |
1-7 | march | 32 | 8 | any |
1-12 | rhythm 12 | 16 | 4 | any |
1-F1 | snare fill | 16 | 4 | any |
1-F2 | tom fill | 16 | 4 | any |
1-F3 | triplet fill | 24 | 6 | any |
1-F4 | crash | 16 | 4 | any |
2-1 | house | 16 | 4 | any |
2-2 | deep house | 16 | 4 | any |
2-3 | techno | 16 | 4 | any |
2-4 | electro | 16 | 4 | any |
2-5 | boom bap | 16 | 4 | 58% |
2-6 | breakbeat | 16 | 4 | any |
2-7 | two-step | 16 | 4 | 56% |
2-8 | dembow | 16 | 4 | any |
2-9 | trap | 32 | 8 | any |
2-10 | funk | 16 | 4 | any |
2-11 | half-time | 16 | 4 | any |
2-12 | synth-pop | 16 | 4 | any |
2-F1 | snare roll | 32 | 8 | any |
2-F2 | tom run | 16 | 4 | any |
2-F3 | build | 16 | 4 | any |
2-F4 | stop | 16 | 4 | any |
In song.json
A drum machine is a device of type drums in a song's devices, and its
state is its controls, the program selected, and its memory:
{
"name": "808",
"type": "drums",
"state": {
"level": 0, "pan": 0, "muted": false, "accent": 60,
"auto_fill": "manual", "fill": "1", "fill_variation": "A",
"program": "3-1A",
"voices": {
"bd": { "level": 70, "tune": 50, "tone": 40, "decay": 60, "attack": 0 },
"lt": { "conga": "tom" }
},
"rhythms": {
"3-1": {
"name": "mine", "swing": 54, "scale": 4, "steps": [16, 4], "flam": 3,
"A": ["BD x...x...x...x...", "SD ....x.......X... xxxX", "CH x.x.x.x.x.x.x.x.", "AC x...x...x...x..."],
"B": []
}
}
}
}
- The machine's controls come first, by their names in the table above;
a switch takes its position's word, such as
"manual"or"A", or for a two-way switchtrueorfalse. programis the basic rhythm selected, as"3-1A","3-1B", or"3-1AB"; a fill can't be.voicesholds each voice's controls under its two letters, by the name after the voice's, sobd_decayis"bd": { "decay": ... }.rhythmsholds rhythms by their place,1-1to3-12and1-F1to3-F4. A rhythm hasscale, its pre-scale in steps a beat, 3, 4, 6, or 8;steps, the 1st part's, or both parts' as[16, 4];flam, theflamselector's 1 to 8; and its variationsAandB, each a list of rows.name, up to 24 characters, andswing, the swing it wants from 50 to 75, are optional.- A row is a voice's two letters, as the panel writes them, or
AC, then its steps:.a rest,xa hit,Xan accented hit,fa flam, andFan accented flam. The 2nd part follows a space. Steps written past a part's last step follow a|, kept but not played. TheACrow takes.andx, and only the drums flam. - Leave out what's empty: a voice with no hits has no row, and an empty
rhythm no entry. With no
rhythmsat all, the drum machine holds the factory's; withrhythms, it holds only those. A rhythm without a name that plays as the factory's in its place takes the factory's name and swing.
Next: the studio's manual, of which this book is a part.