@hraness/dawg 0.6.1 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (253) hide show
  1. package/CHANGELOG.md +92 -0
  2. package/DAWG.md +343 -116
  3. package/README.md +27 -25
  4. package/core/autotune.ts +1119 -0
  5. package/core/chords.ts +271 -23
  6. package/core/clips.ts +499 -0
  7. package/core/diff.ts +182 -104
  8. package/core/expression.ts +15 -0
  9. package/core/fx.ts +99 -29
  10. package/core/instruments.ts +19 -0
  11. package/core/keys.ts +3 -3
  12. package/core/loop.ts +5 -0
  13. package/core/lyrics.ts +297 -0
  14. package/core/master.ts +3 -3
  15. package/core/resonators.ts +16 -2
  16. package/core/routing.ts +165 -0
  17. package/core/score.ts +832 -13
  18. package/core/sdk/eval-child.ts +7 -2
  19. package/core/sdk/eval.ts +35 -6
  20. package/core/sdk/print.ts +276 -3
  21. package/core/sdk/sync-lyrics.ts +49 -0
  22. package/core/sdk/v1.ts +1849 -42
  23. package/core/sections.ts +292 -26
  24. package/core/sing.ts +815 -0
  25. package/core/style-provenance.ts +80 -0
  26. package/core/styles/africa-mena-southasia.ts +2893 -0
  27. package/core/styles/americas.ts +3810 -0
  28. package/core/styles/art.ts +4993 -0
  29. package/core/styles/base.ts +123 -0
  30. package/core/styles/cycles.ts +106 -0
  31. package/core/styles/electronic.ts +2723 -0
  32. package/core/styles/europe-asia-pacific.ts +2838 -0
  33. package/core/styles/excerpt.ts +29 -0
  34. package/core/styles/gamelan.ts +283 -0
  35. package/core/styles/generate.ts +2199 -0
  36. package/core/styles/index.ts +515 -0
  37. package/core/styles/parts.ts +106 -0
  38. package/core/styles/pop.ts +3189 -0
  39. package/core/styles/rock.ts +2993 -0
  40. package/core/styles/roots.ts +4175 -0
  41. package/core/styles/schema.ts +429 -0
  42. package/core/styles/taxonomy.ts +940 -0
  43. package/core/styles/validate.ts +528 -0
  44. package/core/tempo.ts +32 -2
  45. package/core/tuning.ts +19 -3
  46. package/core/vocoder.ts +524 -0
  47. package/guides/agent.md +29 -0
  48. package/guides/arrange.md +30 -0
  49. package/guides/audition.md +20 -14
  50. package/guides/automation.md +12 -7
  51. package/guides/chords.md +15 -15
  52. package/guides/effects.md +17 -16
  53. package/guides/faders.md +20 -16
  54. package/guides/files.md +13 -9
  55. package/guides/getting-started.md +15 -11
  56. package/guides/keys.md +19 -15
  57. package/guides/media.md +17 -12
  58. package/guides/mix.md +12 -6
  59. package/guides/music.md +23 -8
  60. package/guides/notes.md +15 -9
  61. package/guides/performance.md +15 -13
  62. package/guides/play.md +21 -13
  63. package/guides/project.md +25 -8
  64. package/guides/providers.md +20 -14
  65. package/guides/resample.md +15 -9
  66. package/guides/rhythm.md +17 -13
  67. package/guides/sessions.md +17 -7
  68. package/guides/show-me.md +31 -0
  69. package/guides/sound.md +25 -9
  70. package/guides/sounds.md +15 -13
  71. package/guides/styles.md +31 -0
  72. package/guides/tempo.md +15 -10
  73. package/guides/tracks.md +15 -10
  74. package/guides/tuning.md +32 -0
  75. package/guides/voice.md +31 -0
  76. package/guides/web-search.md +18 -8
  77. package/native/prebuilt/darwin-arm64/libdawg_sink.dylib +0 -0
  78. package/native/prebuilt/darwin-x64/libdawg_sink.dylib +0 -0
  79. package/native/prebuilt/linux-arm64/libdawg_sink.so +0 -0
  80. package/native/prebuilt/linux-x64/libdawg_sink.so +0 -0
  81. package/native/prebuilt/manifest.json +21 -0
  82. package/package.json +5 -2
  83. package/src/agent/agent.ts +126 -14
  84. package/src/agent/calibration-tools.ts +53 -0
  85. package/src/agent/clip-tools.ts +453 -0
  86. package/src/agent/command-agent.ts +369 -0
  87. package/src/agent/drum-tools.ts +2 -2
  88. package/src/agent/expression-tools.ts +1 -1
  89. package/src/agent/gateway.ts +246 -60
  90. package/src/agent/models.ts +53 -12
  91. package/src/agent/ops.ts +12 -1
  92. package/src/agent/pack-tools.ts +1 -1
  93. package/src/agent/planner.ts +13 -0
  94. package/src/agent/portable-schema.ts +80 -0
  95. package/src/agent/preview-tool.ts +4 -1
  96. package/src/agent/provider.ts +22 -8
  97. package/src/agent/rhythm-tools.ts +1 -1
  98. package/src/agent/section-tools.ts +1 -1
  99. package/src/agent/show-me.ts +497 -0
  100. package/src/agent/steer.ts +15 -0
  101. package/src/agent/style-tools.ts +217 -0
  102. package/src/agent/tool-error.ts +12 -0
  103. package/src/agent/tools.ts +108 -23
  104. package/src/agent/usage.ts +2 -2
  105. package/src/agent/voice-tools.ts +925 -0
  106. package/src/agent/xcb-agent.ts +11 -7
  107. package/src/argv.ts +38 -0
  108. package/src/audio/analysis.ts +253 -0
  109. package/src/audio/arrange.ts +37 -3
  110. package/src/audio/autotune-engine.ts +101 -0
  111. package/src/audio/autotune.ts +640 -0
  112. package/src/audio/clips.ts +240 -0
  113. package/src/audio/doctor.ts +86 -0
  114. package/src/audio/dsp/bandbank.ts +138 -0
  115. package/src/audio/dsp/envelope.ts +10 -0
  116. package/src/audio/dsp/follow.ts +120 -0
  117. package/src/audio/dsp/formant.ts +427 -0
  118. package/src/audio/dsp/glottal.ts +243 -0
  119. package/src/audio/dsp/interp.ts +7 -2
  120. package/src/audio/dsp/lpc.ts +50 -0
  121. package/src/audio/dsp/periodicity.ts +59 -0
  122. package/src/audio/dsp/pitch.ts +995 -0
  123. package/src/audio/dsp/psola.ts +199 -0
  124. package/src/audio/effects/chain.ts +3 -1
  125. package/src/audio/effects/common.ts +43 -0
  126. package/src/audio/effects/convolution.ts +7 -4
  127. package/src/audio/effects/filter.ts +48 -69
  128. package/src/audio/effects/formant.ts +263 -0
  129. package/src/audio/engine.ts +160 -28
  130. package/src/audio/fit.ts +35 -3
  131. package/src/audio/instrument-check.ts +59 -43
  132. package/src/audio/instruments.ts +4 -0
  133. package/src/audio/keys/calibration.ts +56 -0
  134. package/src/audio/keys/electric.ts +8 -1
  135. package/src/audio/keys/engine.ts +13 -1
  136. package/src/audio/keys/piano.ts +22 -2
  137. package/src/audio/kits.ts +135 -6
  138. package/src/audio/live.ts +114 -20
  139. package/src/audio/native.ts +615 -0
  140. package/src/audio/preview.ts +30 -2
  141. package/src/audio/render-worker.ts +2 -0
  142. package/src/audio/renderer.ts +2 -0
  143. package/src/audio/resample.ts +2 -1
  144. package/src/audio/sampler.ts +85 -4
  145. package/src/audio/samples.ts +20 -2
  146. package/src/audio/sing/analysis.ts +193 -0
  147. package/src/audio/sing/engine.ts +949 -0
  148. package/src/audio/strings/bow.ts +48 -5
  149. package/src/audio/strings/engine.ts +8 -2
  150. package/src/audio/synth/oscillators.ts +31 -21
  151. package/src/audio/synth/voice.ts +34 -1
  152. package/src/audio/vocoder/bank.ts +314 -0
  153. package/src/audio/vocoder/carrier.ts +165 -0
  154. package/src/audio/vocoder/control.ts +68 -0
  155. package/src/audio/vocoder/detect.ts +50 -0
  156. package/src/audio/vocoder/index.ts +304 -0
  157. package/src/audio/vocoder/talkbox.ts +143 -0
  158. package/src/audio/wav.ts +500 -77
  159. package/src/audio/winds/engine.ts +5 -1
  160. package/src/audio/winds/trim.ts +28 -4
  161. package/src/audio/winds/trims1.ts +297 -0
  162. package/src/audio/winds/voice.ts +15 -2
  163. package/src/auth/cli.ts +38 -36
  164. package/src/auth/credentials.ts +30 -1
  165. package/src/auth/login.ts +15 -9
  166. package/src/auth/tui.ts +19 -10
  167. package/src/commands/arrange.ts +44 -29
  168. package/src/commands/autotune.ts +421 -0
  169. package/src/commands/calibration.ts +74 -0
  170. package/src/commands/clips.ts +887 -0
  171. package/src/commands/drums.ts +3 -2
  172. package/src/commands/edit.ts +11 -4
  173. package/src/commands/expression.ts +1 -1
  174. package/src/commands/formant.ts +221 -0
  175. package/src/commands/fx.ts +101 -32
  176. package/src/commands/grammar.ts +558 -0
  177. package/src/commands/help.ts +610 -380
  178. package/src/commands/history.ts +18 -0
  179. package/src/commands/keys.ts +8 -8
  180. package/src/commands/modal.ts +1 -1
  181. package/src/commands/music.ts +1 -1
  182. package/src/commands/nearest.ts +53 -0
  183. package/src/commands/pack.ts +9 -2
  184. package/src/commands/param-range.ts +56 -0
  185. package/src/commands/parses.ts +130 -0
  186. package/src/commands/progression.ts +170 -0
  187. package/src/commands/rhythm.ts +3 -0
  188. package/src/commands/rig.ts +3 -24
  189. package/src/commands/sing.ts +478 -0
  190. package/src/commands/strum.ts +13 -1
  191. package/src/commands/style.ts +415 -0
  192. package/src/commands/time.ts +6 -3
  193. package/src/commands/tuning.ts +3 -3
  194. package/src/commands/vocal-pitch.ts +616 -0
  195. package/src/commands/vocal.ts +147 -0
  196. package/src/commands/vocoder.ts +627 -0
  197. package/src/commands/wind.ts +2 -2
  198. package/src/fs/durable.ts +50 -0
  199. package/src/lang/glossary.ts +493 -0
  200. package/src/launch-args.ts +163 -0
  201. package/src/main.ts +1397 -253
  202. package/src/media/cli.ts +20 -3
  203. package/src/media/import.ts +3 -1
  204. package/src/project/check.ts +21 -2
  205. package/src/project/clip-pins.ts +72 -0
  206. package/src/project/init.ts +23 -8
  207. package/src/project/sync.ts +418 -86
  208. package/src/render.ts +20 -1
  209. package/src/session/daemon.ts +3 -0
  210. package/src/session/meta.ts +14 -0
  211. package/src/session/origin.ts +154 -0
  212. package/src/session/port.ts +22 -4
  213. package/src/session/presence.ts +34 -4
  214. package/src/session/protocol.ts +5 -1
  215. package/src/session/rebase.ts +18 -5
  216. package/src/session/receipt.ts +258 -0
  217. package/src/session/store.ts +65 -43
  218. package/src/tui/arrange-menu.ts +65 -31
  219. package/src/tui/audition.ts +1 -1
  220. package/src/tui/euclid.ts +18 -13
  221. package/src/tui/fader.ts +228 -41
  222. package/src/tui/granular-menu.ts +2 -4
  223. package/src/tui/menu-clips.ts +297 -0
  224. package/src/tui/menu-time.ts +20 -13
  225. package/src/tui/menu-voice.ts +405 -0
  226. package/src/tui/menu.ts +759 -177
  227. package/src/tui/modal-menu.ts +6 -6
  228. package/src/tui/performance-menu.ts +5 -2
  229. package/src/tui/play-chords.ts +4 -2
  230. package/src/tui/play-mode.ts +15 -1
  231. package/src/tui/play-session.ts +47 -7
  232. package/src/tui/sing-menu.ts +278 -0
  233. package/src/tui/style-menu.ts +104 -0
  234. package/src/tui/vocoder-menu.ts +244 -0
  235. package/src/tui/wind-menu.ts +3 -3
  236. package/src/version.ts +8 -0
  237. package/src/web/fetch.ts +115 -29
  238. package/tui/activity.ts +180 -9
  239. package/tui/app.ts +274 -40
  240. package/tui/clip-row.ts +132 -0
  241. package/tui/delight.ts +144 -0
  242. package/tui/drawer.ts +70 -22
  243. package/tui/frame-gate.ts +76 -0
  244. package/tui/grammar.ts +112 -63
  245. package/tui/guide.ts +42 -4
  246. package/tui/highway.ts +269 -25
  247. package/tui/hints.ts +192 -0
  248. package/tui/input.ts +60 -9
  249. package/tui/keys.ts +1 -1
  250. package/tui/play-strip.ts +68 -14
  251. package/tui/prompt.ts +1 -1
  252. package/tui/screen.ts +144 -14
  253. package/tui/theme.ts +27 -0
@@ -0,0 +1,4993 @@
1
+ /**
2
+ * Art, experimental, screen and functional styles (quality-08 family
3
+ * `art`). Root and branch cards set the theory each branch shares; the
4
+ * family lane adds a leaf by appending a card whose id is a taxonomy leaf.
5
+ */
6
+
7
+ import { grid, intervals, kit, kitRoles, maybe, role } from "./parts.ts";
8
+ import { card, type StyleCard } from "./schema.ts";
9
+
10
+ const CONJUNCT = intervals(5, 2, 0.6, 0.6);
11
+ /** Steps and repeats only: chant, tintinnabuli melody voice. */
12
+ const STEPWISE = intervals(5, 0.4, 0, 0.8);
13
+ /** Wide leaps (sevenths, ninths folded): post-tonal lines. */
14
+ const ANGULAR = intervals(0.8, 1, 3, 0.2);
15
+ /** 3/4 in twelve sixteenths: bass on one, chords on two and three. */
16
+ const WALTZ_BASS = grid("x...........");
17
+ const WALTZ_CHORDS = grid("....x...x...");
18
+ /** Off-beat after-beats (march and oom-pah). */
19
+ const AFTERBEATS = grid("..x...x...x...x.");
20
+ const ON_BEATS = grid("x...x...x...x...");
21
+ const STRINGS_ONLY = { kick: null, snare: null, hat: null } as const;
22
+
23
+ const BRANCH_CARDS: readonly StyleCard[] = Object.freeze([
24
+ card({
25
+ id: "western-art",
26
+ abstract: true,
27
+ summary:
28
+ "common-practice tonality: functional progressions, cadences that close phrases, voice-led chords, conjunct melody, no kit",
29
+ tempo: { bpm: [60, 140], typical: 92 },
30
+ groove: { subdivision: 4, humanize: { timingMs: 10, velocity: 0.08 } },
31
+ rhythm: {
32
+ onsets: { chords: grid("x...x...x...x...") },
33
+ fills: null,
34
+ },
35
+ pitch: {
36
+ scales: [
37
+ ["major", 0.6],
38
+ ["minor", 0.3],
39
+ ["harmonic-minor", 0.1],
40
+ ],
41
+ },
42
+ harmony: {
43
+ presets: [
44
+ ["canon", 0.4],
45
+ ["fifties", 0.2],
46
+ ["turnaround", 0.2],
47
+ ["andalusian", 0.2],
48
+ ],
49
+ chain: {
50
+ I: [
51
+ ["IV", 2],
52
+ ["V", 2],
53
+ ["vi", 1.5],
54
+ ["ii", 1.5],
55
+ ["iii", 0.3],
56
+ ],
57
+ ii: [
58
+ ["V", 3],
59
+ ["viio", 0.5],
60
+ ],
61
+ iii: [
62
+ ["vi", 2],
63
+ ["IV", 1],
64
+ ],
65
+ IV: [
66
+ ["V", 2],
67
+ ["I", 1],
68
+ ["ii", 1],
69
+ ],
70
+ V: [
71
+ ["I", 3],
72
+ ["vi", 1],
73
+ ],
74
+ vi: [
75
+ ["ii", 2],
76
+ ["IV", 2],
77
+ ["V", 0.5],
78
+ ],
79
+ viio: [["I", 2]],
80
+ i: [
81
+ ["iv", 2],
82
+ ["V", 2],
83
+ ["VI", 1.5],
84
+ ["iiø", 1],
85
+ ["III", 1],
86
+ ],
87
+ iv: [
88
+ ["V", 2],
89
+ ["i", 1],
90
+ ],
91
+ VI: [
92
+ ["iv", 1],
93
+ ["iiø", 1],
94
+ ["V", 1],
95
+ ],
96
+ iiø: [["V", 3]],
97
+ III: [
98
+ ["VI", 1],
99
+ ["iv", 1],
100
+ ],
101
+ },
102
+ sources: { presets: 1, chain: 3 },
103
+ cadences: [
104
+ ["V-I", 0.6],
105
+ ["IV-I", 0.15],
106
+ ["half", 0.25],
107
+ ],
108
+ rhythm: [
109
+ [1, 0.6],
110
+ [2, 0.4],
111
+ ],
112
+ sevenths: 0.15,
113
+ voicing: {
114
+ types: [
115
+ ["close", 0.5],
116
+ ["open", 0.5],
117
+ ],
118
+ range: [48, 76],
119
+ notes: [3, 4],
120
+ },
121
+ },
122
+ melody: {
123
+ contour: [
124
+ ["arch", 0.6],
125
+ ["descending", 0.2],
126
+ ["wave", 0.2],
127
+ ],
128
+ ambitus: [7, 14],
129
+ range: [60, 86],
130
+ intervals: CONJUNCT,
131
+ chordToneRate: 0.75,
132
+ density: [1, 3],
133
+ phraseBars: [
134
+ [4, 0.7],
135
+ [2, 0.3],
136
+ ],
137
+ repetition: 0.5,
138
+ },
139
+ bass: {
140
+ behaviour: [
141
+ ["root", 0.4],
142
+ ["arpeggio", 0.3],
143
+ ["walking", 0.3],
144
+ ],
145
+ range: [36, 55],
146
+ onsets: grid("x...x...x...x..."),
147
+ walk: { chordToneOnOne: 0.95, chromaticApproach: 0.05 },
148
+ },
149
+ form: {
150
+ plans: [
151
+ [["intro", "verse", "bridge", "verse", "outro"], 0.5],
152
+ [["verse", "chorus", "verse", "chorus"], 0.5],
153
+ ],
154
+ archetype: "ternary",
155
+ },
156
+ texture: {
157
+ kind: "homophonic",
158
+ roles: {
159
+ kick: null,
160
+ snare: null,
161
+ hat: null,
162
+ bass: role("cello", "contrabass:0.5"),
163
+ chords: role("strings", "piano:0.6", "harpsichord:0.2"),
164
+ lead: role("violin", "flute:0.5", "oboe:0.4", "piano:0.4"),
165
+ counter: maybe("viola", "clarinet:0.5"),
166
+ },
167
+ },
168
+ expression: {
169
+ dynamics: [0.3, 0.9],
170
+ articulation: {
171
+ lead: [
172
+ ["legato", 0.5],
173
+ ["tenuto", 0.3],
174
+ ["staccato", 0.2],
175
+ ],
176
+ },
177
+ },
178
+ mix: {
179
+ levels: { bass: -4, chords: -6, lead: -1, counter: -5 },
180
+ space: 0.55,
181
+ loudness: "classical",
182
+ },
183
+ }),
184
+ card({
185
+ id: "early-music",
186
+ abstract: true,
187
+ summary:
188
+ "modal counterpoint: church modes, cadences by step, open fifths, triple and duple tactus",
189
+ meter: {
190
+ signatures: [
191
+ ["4/4", 0.5],
192
+ ["3/4", 0.3],
193
+ ["6/4", 0.2],
194
+ ],
195
+ },
196
+ pitch: {
197
+ scales: [
198
+ ["dorian", 0.35],
199
+ ["mixolydian", 0.2],
200
+ ["phrygian", 0.15],
201
+ ["major", 0.15],
202
+ ["minor", 0.15],
203
+ ],
204
+ },
205
+ harmony: {
206
+ presets: [["dorian-vamp", 1]],
207
+ sources: { presets: 0.3, chain: 3 },
208
+ cadences: [
209
+ ["V-I", 0.5],
210
+ ["IV-I", 0.5],
211
+ ],
212
+ sevenths: 0,
213
+ voicing: { types: [["open", 1]], notes: [2, 3] },
214
+ },
215
+ melody: { intervals: intervals(6, 1.5, 0.3, 0.4), density: [0.5, 2] },
216
+ bass: {
217
+ behaviour: [
218
+ ["root", 0.5],
219
+ ["pedal", 0.2],
220
+ ["arpeggio", 0.3],
221
+ ],
222
+ walk: null,
223
+ },
224
+ texture: {
225
+ kind: "polyphonic",
226
+ roles: {
227
+ chords: role("organ", "lute:0.6", "harpsichord:0.4"),
228
+ lead: role("choir", "recorder:0.6", "violin:0.3"),
229
+ counter: role("choir", "recorder:0.5"),
230
+ },
231
+ },
232
+ }),
233
+ card({
234
+ id: "baroque",
235
+ abstract: true,
236
+ summary:
237
+ "basso continuo and motor rhythm: sequences by fifths, running bass, terraced dynamics",
238
+ tempo: { bpm: [60, 132], typical: 96 },
239
+ pitch: {
240
+ scales: [
241
+ ["major", 0.55],
242
+ ["minor", 0.35],
243
+ ["harmonic-minor", 0.1],
244
+ ],
245
+ },
246
+ harmony: {
247
+ chain: {
248
+ I: [
249
+ ["IV", 2],
250
+ ["V", 2],
251
+ ["vi", 2],
252
+ ["ii", 1],
253
+ ],
254
+ vi: [
255
+ ["ii", 3],
256
+ ["IV", 1],
257
+ ],
258
+ ii: [["V", 3]],
259
+ IV: [
260
+ ["viio", 1],
261
+ ["V", 2],
262
+ ["ii", 1],
263
+ ],
264
+ viio: [
265
+ ["iii", 1],
266
+ ["I", 1],
267
+ ],
268
+ iii: [["vi", 2]],
269
+ V: [
270
+ ["I", 3],
271
+ ["vi", 0.5],
272
+ ],
273
+ },
274
+ sources: { presets: 0.3, chain: 3 },
275
+ rhythm: [
276
+ [1, 0.5],
277
+ [2, 0.5],
278
+ ],
279
+ sevenths: 0.2,
280
+ },
281
+ melody: {
282
+ density: [2, 4],
283
+ contour: [
284
+ ["wave", 0.5],
285
+ ["arch", 0.3],
286
+ ["terraced", 0.2],
287
+ ],
288
+ repetition: 0.6,
289
+ },
290
+ bass: {
291
+ behaviour: [
292
+ ["walking", 0.6],
293
+ ["arpeggio", 0.4],
294
+ ],
295
+ onsets: grid("x.x.x.x.x.x.x.x."),
296
+ },
297
+ texture: {
298
+ roles: {
299
+ chords: role("harpsichord", "organ:0.4", "strings:0.4"),
300
+ bass: role("cello", "bassoon:0.3"),
301
+ lead: role("violin", "oboe:0.5", "trumpet:0.3", "recorder:0.3"),
302
+ },
303
+ },
304
+ expression: { dynamics: [0.45, 0.85] },
305
+ }),
306
+ card({
307
+ id: "classical-period",
308
+ abstract: true,
309
+ summary:
310
+ "periodic phrases in 4+4, Alberti and arpeggio accompaniment, clear tonic-dominant polarity",
311
+ harmony: {
312
+ cadences: [
313
+ ["V-I", 0.6],
314
+ ["half", 0.4],
315
+ ],
316
+ sevenths: 0.1,
317
+ },
318
+ melody: {
319
+ phraseBars: [
320
+ [4, 0.8],
321
+ [2, 0.2],
322
+ ],
323
+ repetition: 0.6,
324
+ contour: [
325
+ ["arch", 0.7],
326
+ ["descending", 0.3],
327
+ ],
328
+ },
329
+ bass: {
330
+ behaviour: [
331
+ ["arpeggio", 0.6],
332
+ ["root", 0.4],
333
+ ],
334
+ onsets: grid("x.x.x.x.x.x.x.x."),
335
+ },
336
+ texture: { roles: { chords: role("piano", "strings:0.6") } },
337
+ form: {
338
+ plans: [
339
+ [["verse", "verse", "bridge", "verse"], 0.6],
340
+ [["intro", "verse", "bridge", "verse", "outro"], 0.4],
341
+ ],
342
+ archetype: "sonata",
343
+ },
344
+ }),
345
+ card({
346
+ id: "romantic",
347
+ abstract: true,
348
+ summary:
349
+ "chromatic tonality: secondary dominants, borrowed iv and bVI, wide-range singing lines, rubato",
350
+ tempo: { bpm: [50, 132], typical: 76 },
351
+ groove: { humanize: { timingMs: 18, velocity: 0.1 } },
352
+ pitch: {
353
+ scales: [
354
+ ["minor", 0.45],
355
+ ["major", 0.45],
356
+ ["harmonic-minor", 0.1],
357
+ ],
358
+ },
359
+ harmony: {
360
+ chain: {
361
+ I: [
362
+ ["vi", 1.5],
363
+ ["IV", 1.5],
364
+ ["iv", 1],
365
+ ["bVI", 0.7],
366
+ ["V7/IV", 0.6],
367
+ ["ii", 1],
368
+ ],
369
+ "V7/IV": [["IV", 2]],
370
+ IV: [
371
+ ["iv", 1],
372
+ ["V", 2],
373
+ ["ii", 1],
374
+ ],
375
+ iv: [
376
+ ["V", 1.5],
377
+ ["I", 1],
378
+ ],
379
+ bVI: [
380
+ ["V", 1.5],
381
+ ["iv", 1],
382
+ ],
383
+ vi: [
384
+ ["ii", 2],
385
+ ["V7/V", 1],
386
+ ],
387
+ "V7/V": [["V", 3]],
388
+ ii: [["V", 3]],
389
+ V: [
390
+ ["I", 3],
391
+ ["vi", 0.8],
392
+ ["bVI", 0.4],
393
+ ],
394
+ i: [
395
+ ["iv", 2],
396
+ ["VI", 2],
397
+ ["V", 2],
398
+ ["bII", 0.5],
399
+ ],
400
+ bII: [["V", 3]],
401
+ VI: [
402
+ ["iv", 1],
403
+ ["V", 1],
404
+ ],
405
+ },
406
+ sevenths: 0.35,
407
+ voicing: {
408
+ types: [
409
+ ["open", 0.7],
410
+ ["wide", 0.3],
411
+ ],
412
+ range: [43, 79],
413
+ notes: [3, 5],
414
+ },
415
+ },
416
+ melody: { ambitus: [10, 19], intervals: intervals(4, 2.5, 1.2, 0.5) },
417
+ texture: { roles: { chords: role("piano", "strings:0.8", "grand:0.4") } },
418
+ expression: { dynamics: [0.2, 1] },
419
+ }),
420
+ card({
421
+ id: "modern-art",
422
+ abstract: true,
423
+ summary:
424
+ "post-tonal color: symmetric and modal scales, quartal chords, irregular meter",
425
+ meter: {
426
+ signatures: [
427
+ ["4/4", 0.4],
428
+ ["5/4", 0.2],
429
+ ["7/8", 0.2],
430
+ ["3/4", 0.2],
431
+ ],
432
+ grouping: [
433
+ [[2, 2, 3], 0.5],
434
+ [[3, 2, 2], 0.5],
435
+ ],
436
+ },
437
+ pitch: {
438
+ scales: [
439
+ ["messiaen-1", 0.2],
440
+ ["messiaen-2", 0.25],
441
+ ["messiaen-3", 0.15],
442
+ ["lydian", 0.2],
443
+ ["phrygian", 0.2],
444
+ ],
445
+ },
446
+ harmony: {
447
+ model: "modal",
448
+ voicing: {
449
+ types: [
450
+ ["quartal", 0.6],
451
+ ["open", 0.4],
452
+ ],
453
+ },
454
+ },
455
+ melody: {
456
+ intervals: intervals(2, 2, 2, 0.3),
457
+ ambitus: [10, 22],
458
+ chordToneRate: 0.3,
459
+ },
460
+ }),
461
+ card({
462
+ id: "contemporary-art",
463
+ abstract: true,
464
+ summary:
465
+ "minimal and spectral: repeated cells, slow harmonic rhythm, pedal bass, additive meter",
466
+ meter: {
467
+ signatures: [
468
+ ["4/4", 0.5],
469
+ ["6/8", 0.2],
470
+ ["7/8", 0.15],
471
+ ["5/4", 0.15],
472
+ ],
473
+ },
474
+ harmony: {
475
+ model: "modal",
476
+ rhythm: [
477
+ [0.5, 0.6],
478
+ [0.25, 0.4],
479
+ ],
480
+ voicing: {
481
+ types: [
482
+ ["open", 0.6],
483
+ ["quartal", 0.4],
484
+ ],
485
+ },
486
+ },
487
+ melody: {
488
+ repetition: 0.85,
489
+ density: [2, 4],
490
+ contour: [
491
+ ["flat", 0.4],
492
+ ["wave", 0.6],
493
+ ],
494
+ },
495
+ bass: {
496
+ behaviour: [
497
+ ["pedal", 0.5],
498
+ ["ostinato", 0.5],
499
+ ],
500
+ },
501
+ texture: {
502
+ roles: { arp: maybe("marimba", "piano:0.6", "vibes:0.4") },
503
+ kind: "polyphonic",
504
+ },
505
+ rhythm: { onsets: { arp: grid("xxxxxxxxxxxxxxxx") } },
506
+ }),
507
+ card({
508
+ id: "concert-band",
509
+ abstract: true,
510
+ summary:
511
+ "wind band and march: 2/4 and 6/8 strains, oom-pah bass, brass melody, snare cadence",
512
+ meter: {
513
+ signatures: [
514
+ ["4/4", 0.4],
515
+ ["2/4", 0.3],
516
+ ["6/8", 0.3],
517
+ ],
518
+ },
519
+ tempo: { bpm: [88, 128], typical: 116 },
520
+ rhythm: {
521
+ onsets: {
522
+ kick: grid("x.......x......."),
523
+ snare: grid("x.x.x.xxx.x.x.xx"),
524
+ },
525
+ fills: { every: 4, density: [0.4, 0.7] },
526
+ },
527
+ harmony: {
528
+ presets: [
529
+ ["fifties", 0.5],
530
+ ["turnaround", 0.5],
531
+ ],
532
+ cadences: [
533
+ ["V-I", 0.8],
534
+ ["half", 0.2],
535
+ ],
536
+ },
537
+ bass: { behaviour: [["root-fifth", 1]], onsets: grid("x.......x.......") },
538
+ texture: {
539
+ roles: {
540
+ kick: role("drums"),
541
+ snare: role("drums"),
542
+ bass: role("tuba"),
543
+ chords: role("horn", "trombone:0.6"),
544
+ lead: role("trumpet", "clarinet:0.6", "flute:0.4"),
545
+ },
546
+ },
547
+ form: {
548
+ plans: [[["intro", "verse", "verse", "chorus", "chorus"], 1]],
549
+ archetype: "march",
550
+ },
551
+ }),
552
+ card({
553
+ id: "experimental",
554
+ abstract: true,
555
+ summary:
556
+ "process over song: drones, clusters, sparse events, free meter feel, indeterminate density",
557
+ tempo: { bpm: [40, 120], typical: 70 },
558
+ groove: { humanize: { timingMs: 25, velocity: 0.15 } },
559
+ pitch: {
560
+ scales: [
561
+ ["messiaen-3", 0.3],
562
+ ["phrygian", 0.3],
563
+ ["locrian", 0.2],
564
+ ["messiaen-7", 0.2],
565
+ ],
566
+ },
567
+ harmony: { model: "drone", rhythm: [[0.5, 1]] },
568
+ melody: {
569
+ density: [0, 1],
570
+ intervals: intervals(1.5, 1.5, 2, 0.8),
571
+ chordToneRate: 0.2,
572
+ contour: [
573
+ ["flat", 0.5],
574
+ ["wave", 0.5],
575
+ ],
576
+ },
577
+ bass: {
578
+ behaviour: [
579
+ ["pedal", 0.7],
580
+ ["none", 0.3],
581
+ ],
582
+ },
583
+ form: {
584
+ plans: [[["intro", "build", "breakdown", "outro"], 1]],
585
+ archetype: "process",
586
+ },
587
+ texture: {
588
+ kind: "heterophonic",
589
+ roles: {
590
+ kick: null,
591
+ snare: null,
592
+ hat: null,
593
+ chords: null,
594
+ drone: role("granular", "organ:0.5", "cloud:0.5"),
595
+ pad: maybe("strings", "granular:0.6"),
596
+ lead: role("prepared", "bell:0.6", "cello:0.4"),
597
+ },
598
+ },
599
+ mix: { space: 0.8 },
600
+ }),
601
+ card({
602
+ id: "screen-stage",
603
+ abstract: true,
604
+ summary:
605
+ "cue writing: ostinato under sustained strings, minor-mode tension, rising hits, builds into a peak",
606
+ tempo: { bpm: [70, 140], typical: 100 },
607
+ pitch: {
608
+ scales: [
609
+ ["minor", 0.6],
610
+ ["dorian", 0.2],
611
+ ["harmonic-minor", 0.2],
612
+ ],
613
+ },
614
+ harmony: {
615
+ presets: [
616
+ ["aeolian", 0.5],
617
+ ["andalusian", 0.2],
618
+ ["sad-pop", 0.3],
619
+ ],
620
+ rhythm: [
621
+ [0.5, 0.6],
622
+ [1, 0.4],
623
+ ],
624
+ voicing: {
625
+ types: [
626
+ ["open", 0.6],
627
+ ["wide", 0.4],
628
+ ],
629
+ range: [43, 79],
630
+ },
631
+ },
632
+ bass: {
633
+ behaviour: [
634
+ ["ostinato", 0.6],
635
+ ["pedal", 0.4],
636
+ ],
637
+ onsets: grid("x.x.x.x.x.x.x.x."),
638
+ },
639
+ rhythm: {
640
+ onsets: {
641
+ kick: grid("x.......x......."),
642
+ snare: grid("............x..."),
643
+ },
644
+ },
645
+ form: {
646
+ plans: [
647
+ [["intro", "build", "chorus", "breakdown", "chorus", "outro"], 1],
648
+ ],
649
+ archetype: "cue",
650
+ },
651
+ texture: {
652
+ roles: {
653
+ hat: null,
654
+ kick: role("drums"),
655
+ snare: maybe("drums"),
656
+ chords: role("strings"),
657
+ pad: maybe("choir", "strings:0.5"),
658
+ lead: role("horn", "violin:0.6", "piano:0.4"),
659
+ },
660
+ },
661
+ mix: { space: 0.6 },
662
+ }),
663
+ card({
664
+ id: "childrens",
665
+ abstract: true,
666
+ summary:
667
+ "nursery and functional song: major key, I-IV-V, short repeating phrases, small range",
668
+ tempo: { bpm: [90, 132], typical: 112 },
669
+ pitch: {
670
+ scales: [
671
+ ["major", 0.8],
672
+ ["major-pentatonic", 0.2],
673
+ ],
674
+ },
675
+ harmony: {
676
+ presets: [
677
+ ["fifties", 0.5],
678
+ ["axis", 0.5],
679
+ ],
680
+ cadences: [
681
+ ["V-I", 0.8],
682
+ ["IV-I", 0.2],
683
+ ],
684
+ sevenths: 0,
685
+ },
686
+ melody: {
687
+ ambitus: [4, 9],
688
+ range: [60, 79],
689
+ repetition: 0.8,
690
+ phraseBars: [
691
+ [2, 0.6],
692
+ [4, 0.4],
693
+ ],
694
+ intervals: intervals(5, 3, 0.6, 1.5),
695
+ },
696
+ bass: {
697
+ behaviour: [
698
+ ["root-fifth", 0.7],
699
+ ["root", 0.3],
700
+ ],
701
+ },
702
+ texture: {
703
+ roles: {
704
+ chords: role("piano", "acoustic:0.5"),
705
+ lead: role("glockenspiel", "piano:0.6", "flute:0.4"),
706
+ },
707
+ },
708
+ }),
709
+ ]);
710
+
711
+ // ---------------------------------------------------------------------------
712
+ // Early music. References: Richard Hoppin, "Medieval Music" (1978); Gustave
713
+ // Reese, "Music in the Renaissance" (1954); Peter Schubert, "Modal
714
+ // Counterpoint, Renaissance Style" (2008).
715
+
716
+ const EARLY_LEAVES: readonly StyleCard[] = Object.freeze([
717
+ card({
718
+ id: "plainchant",
719
+ summary:
720
+ "eight church modes with finalis and reciting tenor; unmeasured monophony, neumatic steps inside one octave, phrases close on the final",
721
+ tempo: { bpm: [50, 80], typical: 64 },
722
+ pitch: {
723
+ scales: [
724
+ ["dorian", 0.35],
725
+ ["phrygian", 0.2],
726
+ ["lydian", 0.15],
727
+ ["mixolydian", 0.3],
728
+ ],
729
+ },
730
+ harmony: { model: "none" },
731
+ melody: {
732
+ intervals: STEPWISE,
733
+ ambitus: [5, 9],
734
+ range: [55, 72],
735
+ density: [1, 2],
736
+ chordToneRate: 0,
737
+ contour: [["arch", 1]],
738
+ finals: [[0, 1]],
739
+ repetition: 0.3,
740
+ },
741
+ bass: { behaviour: [["none", 1]] },
742
+ texture: {
743
+ kind: "monophonic",
744
+ roles: { bass: null, chords: null, counter: null, lead: role("choir") },
745
+ },
746
+ expression: {
747
+ dynamics: [0.4, 0.7],
748
+ articulation: { lead: [["legato", 1]] },
749
+ },
750
+ mix: { space: 0.85 },
751
+ }),
752
+ card({
753
+ id: "byzantine-chant",
754
+ summary:
755
+ "oktoechos echoi incl. the chromatic hijaz-like second echos; ison drone holds the tonic under a stepwise melos",
756
+ tempo: { bpm: [50, 80], typical: 62 },
757
+ pitch: {
758
+ scales: [
759
+ ["phrygian", 0.3],
760
+ ["dorian", 0.3],
761
+ ["hijaz", 0.25],
762
+ ["mixolydian", 0.15],
763
+ ],
764
+ },
765
+ harmony: { model: "drone", rhythm: [[0.25, 1]] },
766
+ melody: {
767
+ intervals: STEPWISE,
768
+ ambitus: [5, 9],
769
+ range: [55, 72],
770
+ density: [1, 2.5],
771
+ finals: [[0, 1]],
772
+ },
773
+ bass: { behaviour: [["none", 1]] },
774
+ texture: {
775
+ kind: "monophonic",
776
+ roles: {
777
+ bass: null,
778
+ chords: null,
779
+ counter: null,
780
+ drone: role("choir"),
781
+ lead: role("choir"),
782
+ },
783
+ },
784
+ mix: { levels: { drone: -8 }, space: 0.85 },
785
+ }),
786
+ card({
787
+ id: "organum",
788
+ summary:
789
+ "vox organalis in parallel fourths and fifths; sustained tenor under a melismatic duplum; first rhythmic mode long-short in compound time",
790
+ meter: { signatures: [["6/8", 1]], grouping: [[[3, 3], 1]] },
791
+ tempo: { bpm: [50, 76], typical: 60 },
792
+ pitch: {
793
+ scales: [
794
+ ["dorian", 0.5],
795
+ ["mixolydian", 0.3],
796
+ ["lydian", 0.2],
797
+ ],
798
+ },
799
+ harmony: {
800
+ model: "drone",
801
+ rhythm: [[0.25, 1]],
802
+ voicing: { types: [["open", 1]], notes: [2, 2] },
803
+ },
804
+ melody: { intervals: STEPWISE, density: [1, 3], ambitus: [5, 10] },
805
+ bass: { behaviour: [["pedal", 1]] },
806
+ texture: {
807
+ kind: "polyphonic",
808
+ roles: {
809
+ bass: role("choir"),
810
+ chords: null,
811
+ counter: null,
812
+ drone: role("organ", "choir:0.5"),
813
+ lead: role("choir"),
814
+ },
815
+ },
816
+ mix: { space: 0.85 },
817
+ }),
818
+ card({
819
+ id: "ars-nova",
820
+ summary:
821
+ "isorhythmic tenor (talea and color repeat), perfect and imperfect prolation, hocket, double-leading-tone cadence to open fifth",
822
+ meter: {
823
+ signatures: [
824
+ ["6/8", 0.5],
825
+ ["3/4", 0.5],
826
+ ],
827
+ },
828
+ pitch: {
829
+ scales: [
830
+ ["dorian", 0.4],
831
+ ["lydian", 0.3],
832
+ ["mixolydian", 0.3],
833
+ ],
834
+ },
835
+ harmony: { cadences: [["V-I", 1]], voicing: { types: [["open", 1]] } },
836
+ melody: { repetition: 0.85, density: [1.5, 3] },
837
+ bass: { behaviour: [["ostinato", 1]] },
838
+ texture: {
839
+ roles: {
840
+ bass: role("cello", "organ:0.5"),
841
+ chords: role("organ", "harp:0.5"),
842
+ counter: role("recorder", "choir:0.5"),
843
+ lead: role("choir", "recorder:0.4"),
844
+ },
845
+ },
846
+ form: { archetype: "isorhythmic motet" },
847
+ }),
848
+ card({
849
+ id: "troubadour",
850
+ summary:
851
+ "strophic monophonic song in dorian and mixolydian, triple modal rhythm, harp or fiddle doubling the line, refrain returns",
852
+ meter: {
853
+ signatures: [
854
+ ["3/4", 0.6],
855
+ ["6/8", 0.4],
856
+ ],
857
+ },
858
+ tempo: { bpm: [70, 110], typical: 88 },
859
+ pitch: {
860
+ scales: [
861
+ ["dorian", 0.5],
862
+ ["mixolydian", 0.5],
863
+ ],
864
+ },
865
+ harmony: { model: "drone" },
866
+ melody: { ambitus: [5, 10], repetition: 0.7 },
867
+ bass: { behaviour: [["pedal", 1]] },
868
+ rhythm: { onsets: { bass: WALTZ_BASS } },
869
+ texture: {
870
+ kind: "heterophonic",
871
+ roles: {
872
+ chords: null,
873
+ counter: maybe("cello", "harp:0.6"),
874
+ bass: role("harp", "lute:0.5"),
875
+ lead: role("vocal", "recorder:0.5"),
876
+ },
877
+ },
878
+ form: {
879
+ plans: [[["verse", "chorus", "verse", "chorus", "verse"], 1]],
880
+ archetype: "strophic",
881
+ },
882
+ }),
883
+ card({
884
+ id: "medieval-dance",
885
+ summary:
886
+ "estampie puncta with ouvert and clos endings (half then full cadence), drone fifths, tabor in compound meter",
887
+ meter: {
888
+ signatures: [
889
+ ["6/8", 0.7],
890
+ ["3/4", 0.3],
891
+ ],
892
+ },
893
+ tempo: { bpm: [96, 140], typical: 120 },
894
+ rhythm: {
895
+ onsets: {
896
+ perc: grid("x.....x.x..."),
897
+ },
898
+ },
899
+ pitch: {
900
+ scales: [
901
+ ["dorian", 0.5],
902
+ ["mixolydian", 0.5],
903
+ ],
904
+ },
905
+ harmony: {
906
+ model: "drone",
907
+ cadences: [
908
+ ["half", 0.5],
909
+ ["V-I", 0.5],
910
+ ],
911
+ },
912
+ melody: { density: [2, 3], repetition: 0.75, phraseBars: [[2, 1]] },
913
+ bass: { behaviour: [["pedal", 1]] },
914
+ texture: {
915
+ kind: "heterophonic",
916
+ roles: {
917
+ chords: null,
918
+ counter: null,
919
+ perc: role("framedrum", "bodhran:0.5"),
920
+ drone: role("reeds", "organ:0.4"),
921
+ bass: role("cello"),
922
+ lead: role("recorder", "oboe:0.5", "fiddle:0.3"),
923
+ },
924
+ },
925
+ form: {
926
+ archetype: "estampie",
927
+ plans: [[["verse", "verse", "chorus", "chorus"], 1]],
928
+ },
929
+ }),
930
+ card({
931
+ id: "franco-flemish",
932
+ summary:
933
+ "pervading imitation between four equal voices, cantus firmus, clausula vera (6-8 by contrary step) closes each point",
934
+ tempo: { bpm: [60, 96], typical: 76 },
935
+ pitch: {
936
+ scales: [
937
+ ["dorian", 0.35],
938
+ ["mixolydian", 0.25],
939
+ ["major", 0.25],
940
+ ["phrygian", 0.15],
941
+ ],
942
+ },
943
+ harmony: {
944
+ cadences: [["V-I", 1]],
945
+ rhythm: [
946
+ [1, 0.5],
947
+ [2, 0.5],
948
+ ],
949
+ },
950
+ melody: { intervals: CONJUNCT, repetition: 0.75, phraseBars: [[4, 1]] },
951
+ bass: {
952
+ behaviour: [
953
+ ["root", 0.6],
954
+ ["arpeggio", 0.4],
955
+ ],
956
+ },
957
+ texture: {
958
+ kind: "polyphonic",
959
+ roles: {
960
+ bass: role("choir"),
961
+ chords: role("choir"),
962
+ counter: role("choir"),
963
+ lead: role("choir"),
964
+ },
965
+ },
966
+ form: { archetype: "mass movement" },
967
+ }),
968
+ card({
969
+ id: "roman-school",
970
+ summary:
971
+ "stile antico: dissonance only as passing or suspension, leaps recovered by step, arch lines, smooth a cappella consonance",
972
+ tempo: { bpm: [56, 84], typical: 70 },
973
+ pitch: {
974
+ scales: [
975
+ ["dorian", 0.4],
976
+ ["major", 0.3],
977
+ ["mixolydian", 0.3],
978
+ ],
979
+ },
980
+ harmony: {
981
+ cadences: [
982
+ ["V-I", 0.7],
983
+ ["IV-I", 0.3],
984
+ ],
985
+ },
986
+ melody: {
987
+ intervals: intervals(6, 1.2, 0.2, 0.4),
988
+ chordToneRate: 0.85,
989
+ contour: [["arch", 1]],
990
+ ambitus: [5, 10],
991
+ },
992
+ texture: {
993
+ kind: "polyphonic",
994
+ roles: {
995
+ bass: role("choir"),
996
+ chords: role("choir"),
997
+ counter: role("choir"),
998
+ lead: role("choir"),
999
+ },
1000
+ },
1001
+ expression: { dynamics: [0.4, 0.75] },
1002
+ }),
1003
+ card({
1004
+ id: "venetian-polychoral",
1005
+ summary:
1006
+ "cori spezzati: two spatially split choirs answer in homophonic blocks, cornett and sackbut doubling, plagal and authentic closes",
1007
+ tempo: { bpm: [72, 104], typical: 88 },
1008
+ pitch: {
1009
+ scales: [
1010
+ ["major", 0.6],
1011
+ ["mixolydian", 0.4],
1012
+ ],
1013
+ },
1014
+ harmony: {
1015
+ cadences: [
1016
+ ["V-I", 0.6],
1017
+ ["IV-I", 0.4],
1018
+ ],
1019
+ rhythm: [[1, 1]],
1020
+ },
1021
+ texture: {
1022
+ kind: "homophonic",
1023
+ roles: {
1024
+ chords: role("choir"),
1025
+ counter: role("trombone", "trumpet:0.5"),
1026
+ bass: role("trombone", "organ:0.5"),
1027
+ lead: role("trumpet", "choir:0.6"),
1028
+ },
1029
+ },
1030
+ mix: { pan: { chords: -0.7, counter: 0.7 }, space: 0.85 },
1031
+ }),
1032
+ card({
1033
+ id: "madrigal",
1034
+ summary:
1035
+ "word painting, chromatic inflection (raised leading tones, harmonic minor), alternating imitative and homophonic passages for five voices",
1036
+ tempo: { bpm: [64, 100], typical: 82 },
1037
+ pitch: {
1038
+ scales: [
1039
+ ["minor", 0.4],
1040
+ ["harmonic-minor", 0.3],
1041
+ ["dorian", 0.3],
1042
+ ],
1043
+ },
1044
+ harmony: {
1045
+ cadences: [
1046
+ ["V-I", 0.7],
1047
+ ["half", 0.3],
1048
+ ],
1049
+ rhythm: [
1050
+ [1, 0.5],
1051
+ [2, 0.5],
1052
+ ],
1053
+ },
1054
+ melody: { ambitus: [7, 13], intervals: intervals(4, 2, 1, 0.5) },
1055
+ texture: {
1056
+ kind: "polyphonic",
1057
+ roles: {
1058
+ bass: role("choir"),
1059
+ chords: role("choir"),
1060
+ counter: role("choir"),
1061
+ lead: role("choir", "vocal:0.5"),
1062
+ },
1063
+ },
1064
+ }),
1065
+ card({
1066
+ id: "lute-song",
1067
+ summary:
1068
+ "strophic ayre: one voice over broken lute chords and a bass viol, minor-mode melancholy, phrygian half cadences",
1069
+ tempo: { bpm: [60, 96], typical: 76 },
1070
+ pitch: {
1071
+ scales: [
1072
+ ["minor", 0.5],
1073
+ ["dorian", 0.3],
1074
+ ["major", 0.2],
1075
+ ],
1076
+ },
1077
+ harmony: {
1078
+ cadences: [
1079
+ ["V-I", 0.6],
1080
+ ["iv-V", 0.4],
1081
+ ],
1082
+ },
1083
+ bass: { behaviour: [["root", 1]] },
1084
+ texture: {
1085
+ kind: "homophonic",
1086
+ roles: {
1087
+ chords: role("lute"),
1088
+ bass: role("cello"),
1089
+ counter: null,
1090
+ lead: role("vocal", "recorder:0.5"),
1091
+ },
1092
+ },
1093
+ rhythm: { onsets: { chords: grid("x.x.x.x.x.x.x.x.") } },
1094
+ form: { archetype: "strophic", plans: [[["verse", "verse", "verse"], 1]] },
1095
+ }),
1096
+ card({
1097
+ id: "iberian-renaissance",
1098
+ summary:
1099
+ "villancico with estribillo and coplas; sesquialtera hemiola (6/8 against 3/4), vihuela strum, tabor on the shifted accents",
1100
+ meter: {
1101
+ signatures: [["6/8", 1]],
1102
+ grouping: [
1103
+ [[3, 3], 0.5],
1104
+ [[2, 2, 2], 0.5],
1105
+ ],
1106
+ },
1107
+ tempo: { bpm: [80, 120], typical: 100 },
1108
+ rhythm: { onsets: { perc: grid("x.....x.x.x.") } },
1109
+ pitch: {
1110
+ scales: [
1111
+ ["major", 0.4],
1112
+ ["minor", 0.3],
1113
+ ["mixolydian", 0.3],
1114
+ ],
1115
+ },
1116
+ harmony: {
1117
+ presets: [
1118
+ ["fifties", 0.5],
1119
+ ["andalusian", 0.5],
1120
+ ],
1121
+ sources: { presets: 2, chain: 1 },
1122
+ },
1123
+ texture: {
1124
+ roles: {
1125
+ perc: role("framedrum"),
1126
+ chords: role("lute", "nylon:0.6", "harp:0.4"),
1127
+ bass: role("cello", "harp:0.4"),
1128
+ lead: role("vocal", "choir:0.5", "recorder:0.4"),
1129
+ },
1130
+ },
1131
+ form: {
1132
+ plans: [[["chorus", "verse", "chorus", "verse", "chorus"], 1]],
1133
+ archetype: "estribillo-coplas",
1134
+ },
1135
+ }),
1136
+ card({
1137
+ id: "renaissance-dance",
1138
+ summary:
1139
+ "pavane and galliard pairs over standard grounds: passamezzo moderno I-IV-I-V and bergamasca I-IV-V-I, tabor marks the step",
1140
+ meter: {
1141
+ signatures: [
1142
+ ["4/4", 0.5],
1143
+ ["3/4", 0.5],
1144
+ ],
1145
+ },
1146
+ tempo: { bpm: [72, 132], typical: 100 },
1147
+ rhythm: { onsets: { perc: grid("x...x.x.x...x.x.") } },
1148
+ pitch: { scales: [["major", 1]] },
1149
+ harmony: {
1150
+ forms: [
1151
+ [["I", "IV", "I", "V", "I", "IV", "V", "I"], 0.6],
1152
+ [["I", "IV", "V", "I"], 0.4],
1153
+ ],
1154
+ sources: { forms: 3, chain: 0.5, presets: 0 },
1155
+ cadences: [["V-I", 1]],
1156
+ },
1157
+ melody: { repetition: 0.7, phraseBars: [[4, 1]] },
1158
+ texture: {
1159
+ kind: "homophonic",
1160
+ roles: {
1161
+ perc: role("framedrum"),
1162
+ chords: role("lute", "harpsichord:0.4"),
1163
+ bass: role("cello", "trombone:0.4"),
1164
+ lead: role("recorder", "cello:0.5"),
1165
+ counter: maybe("recorder"),
1166
+ },
1167
+ },
1168
+ form: { archetype: "pavane-galliard" },
1169
+ }),
1170
+ ]);
1171
+
1172
+ // ---------------------------------------------------------------------------
1173
+ // Baroque and classical. References: Manfred Bukofzer, "Music in the
1174
+ // Baroque Era" (1947); Robert Gjerdingen, "Music in the Galant Style"
1175
+ // (2007); Charles Rosen, "The Classical Style" (1971).
1176
+
1177
+ const BAROQUE_LEAVES: readonly StyleCard[] = Object.freeze([
1178
+ card({
1179
+ id: "early-baroque",
1180
+ summary:
1181
+ "monody over basso continuo, seconda pratica dissonance for the text, romanesca ground III-VII-i-V, phrygian half cadence iv-V",
1182
+ tempo: { bpm: [56, 96], typical: 72 },
1183
+ pitch: {
1184
+ scales: [
1185
+ ["minor", 0.7],
1186
+ ["dorian", 0.3],
1187
+ ],
1188
+ },
1189
+ harmony: {
1190
+ forms: [[["III", "VII", "i", "V", "III", "VII", "i", "V", "i"], 1]],
1191
+ sources: { forms: 2, chain: 1, presets: 0 },
1192
+ cadences: [
1193
+ ["V-i", 0.6],
1194
+ ["iv-V", 0.4],
1195
+ ],
1196
+ rhythm: [[1, 1]],
1197
+ },
1198
+ melody: { density: [1, 3], repetition: 0.4 },
1199
+ bass: { behaviour: [["root", 1]], onsets: grid("x.......x.......") },
1200
+ texture: {
1201
+ kind: "homophonic",
1202
+ roles: {
1203
+ chords: role("lute", "harpsichord:0.5", "organ:0.3"),
1204
+ bass: role("cello", "cello:0.5"),
1205
+ counter: null,
1206
+ lead: role("vocal", "violin:0.5"),
1207
+ },
1208
+ },
1209
+ }),
1210
+ card({
1211
+ id: "italian-baroque",
1212
+ summary:
1213
+ "ritornello form, concertino against ripieno, descending-fifths sequence I-IV-viio-iii-vi-ii-V-I, motor sixteenths",
1214
+ tempo: { bpm: [96, 140], typical: 120 },
1215
+ pitch: {
1216
+ scales: [
1217
+ ["major", 0.6],
1218
+ ["minor", 0.4],
1219
+ ],
1220
+ },
1221
+ harmony: {
1222
+ forms: [[["I", "IV", "viio", "iii", "vi", "ii", "V", "I"], 1]],
1223
+ sources: { forms: 3, chain: 1, presets: 0 },
1224
+ },
1225
+ melody: { density: [3, 4], repetition: 0.7 },
1226
+ rhythm: { onsets: { chords: grid("x.x.x.x.x.x.x.x.") } },
1227
+ texture: {
1228
+ roles: {
1229
+ chords: role("strings", "harpsichord:0.5"),
1230
+ bass: role("cello", "contrabass:0.4"),
1231
+ lead: role("violin"),
1232
+ counter: maybe("violin", "oboe:0.4"),
1233
+ },
1234
+ },
1235
+ form: { archetype: "ritornello" },
1236
+ }),
1237
+ card({
1238
+ id: "french-baroque",
1239
+ summary:
1240
+ "notes inegales (paired eighths played long-short), dotted French overture, ornamented oboe and harpsichord, minuet and sarabande in 3/4",
1241
+ // Minuet, sarabande, courante and passacaille are triple; the dotted
1242
+ // overture is the duple exception.
1243
+ meter: {
1244
+ signatures: [
1245
+ ["3/4", 0.75],
1246
+ ["4/4", 0.25],
1247
+ ],
1248
+ },
1249
+ tempo: { bpm: [60, 112], typical: 84 },
1250
+ groove: { swingRatio: [1.4, 1.8] },
1251
+ melody: { density: [1, 2], repetition: 0.7 },
1252
+ pitch: {
1253
+ scales: [
1254
+ ["minor", 0.5],
1255
+ ["major", 0.5],
1256
+ ],
1257
+ },
1258
+ harmony: {
1259
+ cadences: [
1260
+ ["V-I", 0.7],
1261
+ ["half", 0.3],
1262
+ ],
1263
+ },
1264
+ expression: {
1265
+ articulation: {
1266
+ lead: [
1267
+ ["accent", 0.4],
1268
+ ["staccato", 0.3],
1269
+ ["legato", 0.3],
1270
+ ],
1271
+ },
1272
+ },
1273
+ texture: {
1274
+ roles: {
1275
+ chords: role("harpsichord", "strings:0.5"),
1276
+ bass: role("cello", "bassoon:0.5"),
1277
+ lead: role("oboe", "flute:0.6", "violin:0.4"),
1278
+ counter: maybe("bassoon", "flute:0.5"),
1279
+ },
1280
+ },
1281
+ form: { archetype: "french overture" },
1282
+ }),
1283
+ card({
1284
+ id: "german-baroque",
1285
+ summary:
1286
+ "fugal counterpoint: subject answered at the fifth, invertible countersubject, chorale harmony thick with sevenths, walking continuo",
1287
+ tempo: { bpm: [66, 112], typical: 88 },
1288
+ pitch: {
1289
+ scales: [
1290
+ ["minor", 0.5],
1291
+ ["major", 0.4],
1292
+ ["harmonic-minor", 0.1],
1293
+ ],
1294
+ },
1295
+ harmony: {
1296
+ sevenths: 0.45,
1297
+ rhythm: [
1298
+ [2, 0.6],
1299
+ [1, 0.4],
1300
+ ],
1301
+ },
1302
+ meter: { signatures: [["4/4", 1]] },
1303
+ melody: { repetition: 0.8, density: [3, 4] },
1304
+ bass: { behaviour: [["walking", 1]] },
1305
+ texture: {
1306
+ kind: "polyphonic",
1307
+ roles: {
1308
+ chords: role("organ", "harpsichord:0.5"),
1309
+ bass: role("organ", "cello:0.5"),
1310
+ lead: role("organ", "violin:0.4", "oboe:0.3"),
1311
+ counter: role("organ", "viola:0.5"),
1312
+ },
1313
+ },
1314
+ form: { archetype: "fugue" },
1315
+ }),
1316
+ card({
1317
+ id: "english-baroque",
1318
+ summary:
1319
+ "ground bass on the descending minor tetrachord (lament i-v-iv-V), triple meter, divisions over the ground, oratorio choruses",
1320
+ meter: { signatures: [["3/4", 1]] },
1321
+ tempo: { bpm: [56, 100], typical: 72 },
1322
+ pitch: { scales: [["minor", 1]] },
1323
+ harmony: {
1324
+ forms: [[["i", "v", "iv", "V"], 1]],
1325
+ sources: { forms: 4, chain: 0.3, presets: 0 },
1326
+ cadences: [["V-i", 1]],
1327
+ rhythm: [[1, 1]],
1328
+ },
1329
+ bass: { behaviour: [["ostinato", 1]], onsets: grid("x...x...x...") },
1330
+ rhythm: { onsets: { chords: WALTZ_CHORDS } },
1331
+ texture: {
1332
+ roles: {
1333
+ chords: role("strings", "harpsichord:0.5"),
1334
+ bass: role("cello", "cello:0.5"),
1335
+ lead: role("vocal", "violin:0.6", "trumpet:0.3"),
1336
+ },
1337
+ },
1338
+ form: { archetype: "ground" },
1339
+ }),
1340
+ card({
1341
+ id: "opera-seria",
1342
+ summary:
1343
+ "da capo aria A-B-A with ornamented return, string ritornelli frame the voice, cadenza on the cadential six-four",
1344
+ tempo: { bpm: [60, 120], typical: 84 },
1345
+ harmony: {
1346
+ cadences: [
1347
+ ["V-I", 0.8],
1348
+ ["half", 0.2],
1349
+ ],
1350
+ },
1351
+ melody: { ambitus: [10, 15], density: [1, 3] },
1352
+ texture: {
1353
+ kind: "homophonic",
1354
+ roles: {
1355
+ chords: role("strings", "harpsichord:0.4"),
1356
+ bass: role("cello", "harpsichord:0.4"),
1357
+ lead: role("vocal"),
1358
+ counter: maybe("violin", "oboe:0.5"),
1359
+ },
1360
+ },
1361
+ form: {
1362
+ plans: [[["intro", "verse", "bridge", "verse", "outro"], 1]],
1363
+ archetype: "da capo",
1364
+ },
1365
+ }),
1366
+ card({
1367
+ id: "harpsichord-suite",
1368
+ summary:
1369
+ "binary dances AABB (allemande, courante, sarabande with second-beat stress, gigue in 6/8), style brise broken chords",
1370
+ meter: {
1371
+ signatures: [
1372
+ ["4/4", 0.3],
1373
+ ["3/4", 0.4],
1374
+ ["6/8", 0.3],
1375
+ ],
1376
+ },
1377
+ tempo: { bpm: [60, 132], typical: 96 },
1378
+ melody: { repetition: 0.65 },
1379
+ bass: {
1380
+ behaviour: [
1381
+ ["walking", 0.5],
1382
+ ["arpeggio", 0.5],
1383
+ ],
1384
+ },
1385
+ texture: {
1386
+ kind: "polyphonic",
1387
+ roles: {
1388
+ chords: role("harpsichord"),
1389
+ bass: role("harpsichord"),
1390
+ lead: role("harpsichord"),
1391
+ counter: null,
1392
+ },
1393
+ },
1394
+ form: {
1395
+ plans: [[["verse", "verse", "chorus", "chorus"], 1]],
1396
+ archetype: "binary",
1397
+ },
1398
+ }),
1399
+ card({
1400
+ id: "style-galant",
1401
+ summary:
1402
+ "galant schemata as stock phrases: romanesca, Prinner IV-I-viio-I, Fonte V/ii-ii-V-I, Monte V/IV-IV-V/V-V; light texture, singing treble",
1403
+ tempo: { bpm: [72, 120], typical: 96 },
1404
+ pitch: {
1405
+ scales: [
1406
+ ["major", 0.8],
1407
+ ["minor", 0.2],
1408
+ ],
1409
+ },
1410
+ harmony: {
1411
+ forms: [
1412
+ [["I", "V", "vi", "iii", "IV", "I", "IV", "V"], 0.3],
1413
+ [["IV", "I", "viio", "I"], 0.25],
1414
+ [["V7/ii", "ii", "V7", "I"], 0.25],
1415
+ [["V7/IV", "IV", "V7/V", "V"], 0.2],
1416
+ ],
1417
+ sources: { forms: 4, chain: 0, presets: 0 },
1418
+ },
1419
+ melody: {
1420
+ phraseBars: [
1421
+ [2, 0.5],
1422
+ [4, 0.5],
1423
+ ],
1424
+ },
1425
+ texture: {
1426
+ roles: {
1427
+ chords: role("harpsichord", "piano:0.5"),
1428
+ bass: role("cello", "harpsichord:0.4"),
1429
+ lead: role("flute", "violin:0.6"),
1430
+ },
1431
+ },
1432
+ form: { archetype: "schemata" },
1433
+ }),
1434
+ card({
1435
+ id: "viennese-classical",
1436
+ summary:
1437
+ "sonata form; 4+4 period with half-cadence antecedent and authentic consequent; Alberti bass (low-high-middle-high) under a singing line",
1438
+ tempo: { bpm: [76, 144], typical: 116 },
1439
+ bass: {
1440
+ behaviour: [["arpeggio", 1]],
1441
+ onsets: grid("xxxxxxxxxxxxxxxx"),
1442
+ },
1443
+ harmony: {
1444
+ cadences: [
1445
+ ["V-I", 0.55],
1446
+ ["half", 0.45],
1447
+ ],
1448
+ },
1449
+ texture: {
1450
+ roles: {
1451
+ chords: role("strings", "piano:0.6"),
1452
+ bass: role("piano", "cello:0.5"),
1453
+ lead: role("piano", "violin:0.6", "flute:0.3"),
1454
+ },
1455
+ },
1456
+ form: {
1457
+ plans: [
1458
+ [["intro", "verse", "chorus", "bridge", "verse", "chorus", "outro"], 1],
1459
+ ],
1460
+ archetype: "sonata",
1461
+ },
1462
+ }),
1463
+ card({
1464
+ id: "opera-buffa",
1465
+ summary:
1466
+ "patter song (fast repeated notes, syllabic), 2/4 and 6/8 comic ensembles, tonic-dominant oscillation, crescendo finale",
1467
+ meter: {
1468
+ signatures: [
1469
+ ["2/4", 0.5],
1470
+ ["6/8", 0.5],
1471
+ ],
1472
+ },
1473
+ tempo: { bpm: [120, 168], typical: 144 },
1474
+ harmony: {
1475
+ forms: [[["I", "V7", "I", "V7", "I", "IV", "V7", "I"], 1]],
1476
+ sources: { forms: 2, chain: 1, presets: 0 },
1477
+ },
1478
+ melody: {
1479
+ density: [3, 4],
1480
+ intervals: intervals(4, 1.5, 0.5, 3),
1481
+ repetition: 0.75,
1482
+ },
1483
+ texture: {
1484
+ roles: {
1485
+ chords: role("strings"),
1486
+ bass: role("cello", "bassoon:0.5"),
1487
+ lead: role("vocal", "bassoon:0.4"),
1488
+ },
1489
+ },
1490
+ expression: {
1491
+ articulation: {
1492
+ lead: [
1493
+ ["staccato", 0.7],
1494
+ ["accent", 0.3],
1495
+ ],
1496
+ },
1497
+ },
1498
+ }),
1499
+ card({
1500
+ id: "singspiel",
1501
+ summary:
1502
+ "German song-play: strophic folk-like Lied tunes in major, I-IV-V, horn and flute color, spoken dialogue between numbers",
1503
+ meter: {
1504
+ signatures: [
1505
+ ["2/4", 0.4],
1506
+ ["6/8", 0.3],
1507
+ ["3/4", 0.3],
1508
+ ],
1509
+ },
1510
+ tempo: { bpm: [80, 126], typical: 100 },
1511
+ pitch: { scales: [["major", 1]] },
1512
+ harmony: {
1513
+ presets: [
1514
+ ["fifties", 0.6],
1515
+ ["turnaround", 0.4],
1516
+ ],
1517
+ sources: { presets: 2, chain: 1 },
1518
+ sevenths: 0.05,
1519
+ },
1520
+ melody: { ambitus: [5, 10], repetition: 0.75 },
1521
+ texture: {
1522
+ roles: {
1523
+ chords: role("strings"),
1524
+ bass: role("cello"),
1525
+ lead: role("vocal", "flute:0.5"),
1526
+ counter: maybe("horn", "clarinet:0.5"),
1527
+ },
1528
+ },
1529
+ form: {
1530
+ archetype: "strophic",
1531
+ plans: [[["verse", "chorus", "verse", "chorus"], 1]],
1532
+ },
1533
+ }),
1534
+ ]);
1535
+
1536
+ // ---------------------------------------------------------------------------
1537
+ // Romantic. References: Carl Dahlhaus, "Nineteenth-Century Music" (1989);
1538
+ // Richard Cohn, "Audacious Euphony" (2012) for chromatic-mediant and
1539
+ // hexatonic relations.
1540
+
1541
+ const ROMANTIC_LEAVES: readonly StyleCard[] = Object.freeze([
1542
+ card({
1543
+ id: "early-romantic",
1544
+ summary:
1545
+ "classical periods colored by chromatic mediants (I-bVI), the augmented-sixth approach to V and lyrical second themes over arpeggiated accompaniment",
1546
+ tempo: { bpm: [84, 132], typical: 104 },
1547
+ harmony: {
1548
+ forms: [
1549
+ [["I", "bVI", "iv", "V", "I", "vi", "ii", "V"], 0.5],
1550
+ [["i", "VI", "iv", "V", "i", "III", "iv", "V"], 0.5],
1551
+ ],
1552
+ sources: { forms: 1, chain: 2 },
1553
+ cadences: [
1554
+ ["V-I", 0.7],
1555
+ ["half", 0.3],
1556
+ ],
1557
+ },
1558
+ bass: {
1559
+ behaviour: [
1560
+ ["arpeggio", 0.6],
1561
+ ["root", 0.4],
1562
+ ],
1563
+ },
1564
+ texture: {
1565
+ roles: {
1566
+ chords: role("strings", "piano:0.6"),
1567
+ bass: role("cello", "contrabass:0.5"),
1568
+ lead: role("violin", "clarinet:0.5", "piano:0.5"),
1569
+ },
1570
+ },
1571
+ form: { archetype: "sonata" },
1572
+ }),
1573
+ card({
1574
+ id: "romantic-miniature",
1575
+ summary:
1576
+ "nocturne and character piece: wide left-hand arpeggio spanning a tenth under a bel-canto treble, rubato, ternary ABA with a contrasting middle",
1577
+ meter: {
1578
+ signatures: [
1579
+ ["4/4", 0.4],
1580
+ ["3/4", 0.3],
1581
+ ["6/8", 0.3],
1582
+ ],
1583
+ },
1584
+ tempo: { bpm: [50, 96], typical: 66 },
1585
+ groove: { humanize: { timingMs: 24, velocity: 0.12 } },
1586
+ bass: {
1587
+ behaviour: [["arpeggio", 1]],
1588
+ onsets: grid("x.x.x.x.x.x.x.x."),
1589
+ range: [33, 57],
1590
+ },
1591
+ harmony: {
1592
+ voicing: { types: [["wide", 1]] },
1593
+ rhythm: [
1594
+ [1, 0.6],
1595
+ [0.5, 0.4],
1596
+ ],
1597
+ },
1598
+ melody: {
1599
+ density: [1, 3],
1600
+ contour: [
1601
+ ["arch", 0.7],
1602
+ ["wave", 0.3],
1603
+ ],
1604
+ },
1605
+ texture: {
1606
+ kind: "homophonic",
1607
+ roles: {
1608
+ chords: role("piano", "grand:0.5"),
1609
+ bass: role("piano", "grand:0.5"),
1610
+ lead: role("piano", "grand:0.5"),
1611
+ counter: null,
1612
+ },
1613
+ },
1614
+ form: {
1615
+ plans: [[["verse", "bridge", "verse", "outro"], 1]],
1616
+ archetype: "ternary",
1617
+ },
1618
+ }),
1619
+ card({
1620
+ id: "lied",
1621
+ summary:
1622
+ "art song: voice and piano as equal partners, through-composed or modified strophic, tonicizations and major-minor mixture follow the poem",
1623
+ tempo: { bpm: [52, 112], typical: 72 },
1624
+ harmony: {
1625
+ rhythm: [
1626
+ [1, 0.6],
1627
+ [0.5, 0.4],
1628
+ ],
1629
+ },
1630
+ melody: { ambitus: [8, 14], density: [1, 2.5] },
1631
+ rhythm: { onsets: { chords: grid("x.x.x.x.x.x.x.x.") } },
1632
+ texture: {
1633
+ kind: "homophonic",
1634
+ roles: {
1635
+ chords: role("piano"),
1636
+ bass: role("piano"),
1637
+ lead: role("vocal"),
1638
+ counter: null,
1639
+ },
1640
+ },
1641
+ form: {
1642
+ plans: [[["verse", "verse", "bridge", "verse"], 1]],
1643
+ archetype: "modified strophic",
1644
+ },
1645
+ }),
1646
+ card({
1647
+ id: "bel-canto",
1648
+ summary:
1649
+ "cantabile line over guitar-like um-pa-pa strings, cabaletta doubles the tempo, appoggiaturas and a cadenza on the cadential six-four",
1650
+ meter: {
1651
+ signatures: [
1652
+ ["3/4", 0.5],
1653
+ ["4/4", 0.5],
1654
+ ],
1655
+ },
1656
+ tempo: { bpm: [60, 132], typical: 84 },
1657
+ harmony: {
1658
+ presets: [
1659
+ ["fifties", 0.5],
1660
+ ["turnaround", 0.5],
1661
+ ],
1662
+ sources: { presets: 2, chain: 1 },
1663
+ sevenths: 0.15,
1664
+ },
1665
+ bass: { behaviour: [["root", 1]], onsets: grid("x...x...x...x...") },
1666
+ rhythm: { onsets: { chords: AFTERBEATS } },
1667
+ melody: { ambitus: [10, 16], intervals: intervals(4, 2, 1, 0.4) },
1668
+ texture: {
1669
+ kind: "homophonic",
1670
+ roles: {
1671
+ chords: role("strings", "pizzicato:0.5"),
1672
+ bass: role("cello", "contrabass:0.5"),
1673
+ lead: role("vocal"),
1674
+ counter: maybe("flute", "clarinet:0.5"),
1675
+ },
1676
+ },
1677
+ form: { archetype: "cavatina-cabaletta" },
1678
+ }),
1679
+ card({
1680
+ id: "grand-opera",
1681
+ summary:
1682
+ "massed chorus and brass tableaux, march and ballet numbers, dramatic diminished-seventh tremolo before the cadence",
1683
+ tempo: { bpm: [66, 132], typical: 96 },
1684
+ harmony: {
1685
+ chain: {
1686
+ V: [
1687
+ ["I", 3],
1688
+ ["viio7/V", 0.6],
1689
+ ],
1690
+ "viio7/V": [["V", 3]],
1691
+ },
1692
+ voicing: { notes: [4, 6] },
1693
+ },
1694
+ texture: {
1695
+ roles: {
1696
+ kick: maybe("drums"),
1697
+ perc: maybe("timpani"),
1698
+ chords: role("strings", "choir:0.6"),
1699
+ pad: role("choir", "frenchhorn:0.5"),
1700
+ bass: role("contrabass", "tuba:0.4"),
1701
+ lead: role("vocal", "trumpet:0.4"),
1702
+ },
1703
+ },
1704
+ expression: { dynamics: [0.3, 1] },
1705
+ }),
1706
+ card({
1707
+ id: "music-drama",
1708
+ summary:
1709
+ "endless melody without full cadences, leitmotif cells transformed, deceptive V-bVI and the half-diminished chord resolving by semitone voice leading",
1710
+ tempo: { bpm: [40, 76], typical: 54 },
1711
+ pitch: {
1712
+ scales: [
1713
+ ["minor", 0.5],
1714
+ ["harmonic-minor", 0.5],
1715
+ ],
1716
+ },
1717
+ harmony: {
1718
+ chain: {
1719
+ V: [
1720
+ ["bVI", 2],
1721
+ ["vi", 1.5],
1722
+ ["I", 0.5],
1723
+ ],
1724
+ I: [
1725
+ ["iiø7", 1],
1726
+ ["bVI", 1],
1727
+ ["iv", 1],
1728
+ ],
1729
+ iiø7: [["V7", 3]],
1730
+ },
1731
+ cadences: [
1732
+ ["V-vi", 0.6],
1733
+ ["half", 0.4],
1734
+ ],
1735
+ sevenths: 0.6,
1736
+ },
1737
+ melody: { phraseBars: [[8, 1]], repetition: 0.55, ambitus: [10, 17] },
1738
+ texture: {
1739
+ roles: {
1740
+ chords: role("strings", "horn:0.5"),
1741
+ pad: role("frenchhorn", "strings:0.5"),
1742
+ bass: role("contrabass", "tuba:0.4"),
1743
+ lead: role("vocal", "cello:0.4", "frenchhorn:0.3"),
1744
+ },
1745
+ },
1746
+ form: { archetype: "through-composed" },
1747
+ }),
1748
+ card({
1749
+ id: "verismo",
1750
+ summary:
1751
+ "melodic climax doubled in unison by full strings, sudden dynamic swells, parlando recitative, minor-key tragedy closing on the tonic",
1752
+ tempo: { bpm: [50, 88], typical: 66 },
1753
+ pitch: {
1754
+ scales: [
1755
+ ["minor", 0.6],
1756
+ ["harmonic-minor", 0.2],
1757
+ ["major", 0.2],
1758
+ ],
1759
+ },
1760
+ melody: {
1761
+ ambitus: [12, 17],
1762
+ contour: [
1763
+ ["ascending", 0.4],
1764
+ ["arch", 0.6],
1765
+ ],
1766
+ },
1767
+ texture: {
1768
+ roles: {
1769
+ chords: role("strings"),
1770
+ bass: role("cello", "contrabass:0.5"),
1771
+ lead: role("vocal", "violins:0.5"),
1772
+ counter: maybe("violins"),
1773
+ },
1774
+ },
1775
+ expression: { dynamics: [0.25, 1] },
1776
+ }),
1777
+ card({
1778
+ id: "romantic-symphonic",
1779
+ summary:
1780
+ "four-movement symphony: horn-call themes, cyclic motifs, brass chorales at the climax, timpani on tonic and dominant",
1781
+ tempo: { bpm: [60, 144], typical: 100 },
1782
+ rhythm: { onsets: { kick: grid("x.......x.......") } },
1783
+ texture: {
1784
+ roles: {
1785
+ kick: role("timpani"),
1786
+ chords: role("strings"),
1787
+ pad: maybe("frenchhorn", "trombone:0.5"),
1788
+ bass: role("contrabass", "cellos:0.6"),
1789
+ lead: role("violins", "frenchhorn:0.5", "clarinet:0.3"),
1790
+ counter: maybe("cellos", "bassoon:0.4"),
1791
+ },
1792
+ },
1793
+ form: {
1794
+ plans: [
1795
+ [["intro", "verse", "chorus", "bridge", "verse", "chorus", "outro"], 1],
1796
+ ],
1797
+ archetype: "symphonic sonata",
1798
+ },
1799
+ }),
1800
+ card({
1801
+ id: "tone-poem",
1802
+ summary:
1803
+ "programmatic single movement: thematic transformation of one idea, chromatic-mediant shifts between scenes, orchestral color as narrative",
1804
+ tempo: { bpm: [44, 96], typical: 66 },
1805
+ groove: { humanize: { timingMs: 30, velocity: 0.15 } },
1806
+ harmony: {
1807
+ chain: {
1808
+ I: [
1809
+ ["bVI", 1.5],
1810
+ ["III", 1],
1811
+ ["vi", 1],
1812
+ ["IV", 1],
1813
+ ],
1814
+ bVI: [
1815
+ ["I", 1],
1816
+ ["iv", 1],
1817
+ ["V", 1],
1818
+ ],
1819
+ III: [
1820
+ ["vi", 1.5],
1821
+ ["I", 1],
1822
+ ],
1823
+ },
1824
+ },
1825
+ melody: { repetition: 0.75 },
1826
+ texture: {
1827
+ roles: {
1828
+ chords: role("strings"),
1829
+ pad: maybe("frenchhorn", "celesta:0.4"),
1830
+ arp: role("harp"),
1831
+ bass: role("contrabass", "cellos:0.5"),
1832
+ lead: role("clarinet", "oboe:0.5", "flute:0.4", "violins:0.5"),
1833
+ },
1834
+ },
1835
+ form: {
1836
+ plans: [
1837
+ [
1838
+ ["intro", "verse", "build", "chorus", "breakdown", "chorus", "outro"],
1839
+ 1,
1840
+ ],
1841
+ ],
1842
+ archetype: "programmatic",
1843
+ },
1844
+ }),
1845
+ card({
1846
+ id: "nationalist-romantic",
1847
+ summary:
1848
+ "folk modes inside the orchestra: dorian and mixolydian tunes, drone fifths, dance rhythms, bVII-I and modal plagal cadences",
1849
+ pitch: {
1850
+ scales: [
1851
+ ["dorian", 0.35],
1852
+ ["mixolydian", 0.25],
1853
+ ["minor", 0.25],
1854
+ ["major", 0.15],
1855
+ ],
1856
+ },
1857
+ harmony: {
1858
+ forms: [
1859
+ [["i", "bVII", "i", "bVII", "i", "iv", "bVII", "i"], 0.5],
1860
+ [["I", "bVII", "IV", "I"], 0.5],
1861
+ ],
1862
+ sources: { forms: 2, chain: 1 },
1863
+ cadences: [
1864
+ ["bVII-I", 0.5],
1865
+ ["V-I", 0.5],
1866
+ ],
1867
+ },
1868
+ bass: {
1869
+ behaviour: [
1870
+ ["root-fifth", 0.5],
1871
+ ["pedal", 0.5],
1872
+ ],
1873
+ },
1874
+ texture: {
1875
+ roles: {
1876
+ chords: role("strings"),
1877
+ bass: role("contrabass", "cellos:0.5"),
1878
+ lead: role("oboe", "clarinet:0.6", "violin:0.6"),
1879
+ },
1880
+ },
1881
+ }),
1882
+ card({
1883
+ id: "late-romantic",
1884
+ summary:
1885
+ "saturated chromaticism: ninth chords, long appoggiaturas, enharmonic pivots, slow-building climaxes for a very large orchestra",
1886
+ tempo: { bpm: [52, 112], typical: 72 },
1887
+ pitch: {
1888
+ scales: [
1889
+ ["major", 0.6],
1890
+ ["lydian", 0.2],
1891
+ ["minor", 0.2],
1892
+ ],
1893
+ },
1894
+ harmony: {
1895
+ sevenths: 0.7,
1896
+ voicing: { notes: [4, 6], range: [38, 84] },
1897
+ chain: {
1898
+ I: [
1899
+ ["bVI", 1.2],
1900
+ ["bIII", 0.8],
1901
+ ["iv", 1],
1902
+ ["vi", 1],
1903
+ ["IV", 1],
1904
+ ],
1905
+ bIII: [
1906
+ ["iv", 1],
1907
+ ["bVI", 1],
1908
+ ],
1909
+ },
1910
+ },
1911
+ melody: { ambitus: [12, 22], intervals: intervals(4, 2, 1.6, 0.3) },
1912
+ texture: {
1913
+ roles: {
1914
+ chords: role("strings"),
1915
+ pad: role("frenchhorn", "choir:0.4"),
1916
+ bass: role("contrabass", "tuba:0.4"),
1917
+ lead: role("violins", "frenchhorn:0.6", "vocal:0.3"),
1918
+ },
1919
+ },
1920
+ expression: { dynamics: [0.15, 1] },
1921
+ }),
1922
+ card({
1923
+ id: "operetta",
1924
+ summary:
1925
+ "light stage music: waltz refrains with oom-pah-pah, can-can galops in 2/4, tuneful major-key couplets, I-V7 oscillation",
1926
+ meter: {
1927
+ signatures: [
1928
+ ["3/4", 0.6],
1929
+ ["2/4", 0.4],
1930
+ ],
1931
+ },
1932
+ tempo: { bpm: [120, 168], typical: 144 },
1933
+ pitch: {
1934
+ scales: [
1935
+ ["major", 0.8],
1936
+ ["minor", 0.2],
1937
+ ],
1938
+ },
1939
+ harmony: {
1940
+ forms: [[["I", "I", "V7", "V7", "V7", "V7", "I", "I"], 1]],
1941
+ sources: { forms: 2, chain: 1 },
1942
+ },
1943
+ bass: { behaviour: [["root", 1]], onsets: WALTZ_BASS },
1944
+ rhythm: { onsets: { chords: WALTZ_CHORDS } },
1945
+ melody: { repetition: 0.75, phraseBars: [[4, 1]] },
1946
+ texture: {
1947
+ roles: {
1948
+ chords: role("strings", "pizzicato:0.5"),
1949
+ bass: role("contrabass", "tuba:0.4"),
1950
+ lead: role("vocal", "violin:0.6", "flute:0.3"),
1951
+ },
1952
+ },
1953
+ form: { archetype: "number opera" },
1954
+ }),
1955
+ card({
1956
+ id: "zarzuela",
1957
+ summary:
1958
+ "Spanish stage music: jota in fast triple time, sesquialtera hemiola, Andalusian cadence i-bVII-bVI-V, guitar strum and castanet figures",
1959
+ meter: {
1960
+ signatures: [
1961
+ ["3/4", 0.6],
1962
+ ["6/8", 0.4],
1963
+ ],
1964
+ grouping: [
1965
+ [[3, 3], 0.5],
1966
+ [[2, 2, 2], 0.5],
1967
+ ],
1968
+ },
1969
+ tempo: { bpm: [100, 176], typical: 138 },
1970
+ groove: { humanize: { timingMs: 6, velocity: 0.08 } },
1971
+ pitch: {
1972
+ scales: [
1973
+ ["minor", 0.5],
1974
+ ["major", 0.3],
1975
+ ["harmonic-minor", 0.2],
1976
+ ],
1977
+ },
1978
+ harmony: {
1979
+ presets: [["andalusian", 1]],
1980
+ sources: { presets: 3, chain: 1 },
1981
+ cadences: [["V-i", 1]],
1982
+ },
1983
+ rhythm: { onsets: { perc: grid("x.xx..x.x.x.") } },
1984
+ texture: {
1985
+ roles: {
1986
+ perc: role("framedrum"),
1987
+ chords: role("nylon", "strings:0.6"),
1988
+ bass: role("contrabass", "cello:0.5"),
1989
+ lead: role("vocal", "violin:0.5", "oboe:0.3"),
1990
+ },
1991
+ },
1992
+ }),
1993
+ card({
1994
+ id: "salon-music",
1995
+ summary:
1996
+ "parlour waltzes, polkas and romances: bright major, decorated melody, secondary dominants, waltz bass on one and chords on two and three",
1997
+ meter: {
1998
+ signatures: [
1999
+ ["3/4", 0.6],
2000
+ ["2/4", 0.4],
2001
+ ],
2002
+ },
2003
+ tempo: { bpm: [72, 112], typical: 92 },
2004
+ pitch: {
2005
+ scales: [
2006
+ ["major", 0.8],
2007
+ ["minor", 0.2],
2008
+ ],
2009
+ },
2010
+ bass: { behaviour: [["root-fifth", 1]], onsets: WALTZ_BASS },
2011
+ rhythm: { onsets: { chords: WALTZ_CHORDS } },
2012
+ expression: { dynamics: [0.3, 0.8] },
2013
+ texture: {
2014
+ roles: {
2015
+ chords: role("piano", "upright:0.5"),
2016
+ bass: role("piano", "upright:0.5"),
2017
+ lead: role("piano", "violin:0.6", "flute:0.4"),
2018
+ },
2019
+ },
2020
+ }),
2021
+ ]);
2022
+
2023
+ // ---------------------------------------------------------------------------
2024
+ // Modern and contemporary. References: Robert Morgan, "Twentieth-Century
2025
+ // Music" (1991); Joseph Straus, "Introduction to Post-Tonal Theory"
2026
+ // (2016); Keith Potter, "Four Musical Minimalists" (2000).
2027
+
2028
+ const MODERN_LEAVES: readonly StyleCard[] = Object.freeze([
2029
+ card({
2030
+ id: "impressionism",
2031
+ summary:
2032
+ "planing (parallel ninth chords), whole-tone and pentatonic collections, added-note chords, pedal points and blurred harp and flute color",
2033
+ meter: {
2034
+ signatures: [
2035
+ ["4/4", 0.5],
2036
+ ["3/4", 0.3],
2037
+ ["6/8", 0.2],
2038
+ ],
2039
+ grouping: null,
2040
+ },
2041
+ tempo: { bpm: [48, 100], typical: 66 },
2042
+ pitch: {
2043
+ scales: [
2044
+ ["messiaen-1", 0.3],
2045
+ ["major-pentatonic", 0.25],
2046
+ ["lydian", 0.25],
2047
+ ["dorian", 0.2],
2048
+ ],
2049
+ },
2050
+ harmony: {
2051
+ voicing: {
2052
+ types: [
2053
+ ["open", 0.6],
2054
+ ["wide", 0.4],
2055
+ ],
2056
+ notes: [4, 5],
2057
+ },
2058
+ rhythm: [
2059
+ [1, 0.5],
2060
+ [0.5, 0.5],
2061
+ ],
2062
+ },
2063
+ melody: { intervals: intervals(3, 2.5, 1, 0.5), chordToneRate: 0.55 },
2064
+ bass: {
2065
+ behaviour: [
2066
+ ["pedal", 0.7],
2067
+ ["root", 0.3],
2068
+ ],
2069
+ },
2070
+ texture: {
2071
+ roles: {
2072
+ chords: role("piano", "harp:0.6", "strings:0.5"),
2073
+ bass: role("piano", "contrabass:0.5"),
2074
+ lead: role("flute", "oboe:0.5", "piano:0.5"),
2075
+ pad: maybe("strings", "celesta:0.4"),
2076
+ },
2077
+ },
2078
+ mix: { space: 0.7 },
2079
+ }),
2080
+ card({
2081
+ id: "expressionism",
2082
+ summary:
2083
+ "free atonality: no tonic, wide leaps of sevenths and ninths, extreme registers and dynamics, short motivic cells with no repetition",
2084
+ tempo: { bpm: [40, 132], typical: 72 },
2085
+ pitch: { scales: [["chromatic", 1]] },
2086
+ harmony: {
2087
+ model: "modal",
2088
+ voicing: {
2089
+ types: [
2090
+ ["cluster", 0.5],
2091
+ ["wide", 0.5],
2092
+ ],
2093
+ },
2094
+ },
2095
+ melody: {
2096
+ intervals: ANGULAR,
2097
+ chordToneRate: 0.15,
2098
+ repetition: 0.15,
2099
+ ambitus: [14, 24],
2100
+ },
2101
+ expression: {
2102
+ dynamics: [0.1, 1],
2103
+ articulation: {
2104
+ lead: [
2105
+ ["accent", 0.5],
2106
+ ["staccato", 0.2],
2107
+ ["legato", 0.3],
2108
+ ],
2109
+ },
2110
+ },
2111
+ texture: {
2112
+ roles: {
2113
+ chords: role("strings", "piano:0.6"),
2114
+ bass: role("cello", "bassclarinet:0.5"),
2115
+ lead: role("violin", "clarinet:0.5", "vocal:0.3"),
2116
+ },
2117
+ },
2118
+ }),
2119
+ card({
2120
+ id: "twelve-tone",
2121
+ summary:
2122
+ "the tone row: all twelve pitch classes before any repeats, prime, inversion, retrograde and retrograde inversion forms, no tonal center",
2123
+ tempo: { bpm: [48, 120], typical: 72 },
2124
+ pitch: { scales: [["chromatic", 1]] },
2125
+ harmony: {
2126
+ model: "modal",
2127
+ voicing: {
2128
+ types: [
2129
+ ["wide", 0.6],
2130
+ ["open", 0.4],
2131
+ ],
2132
+ },
2133
+ },
2134
+ melody: {
2135
+ intervals: ANGULAR,
2136
+ chordToneRate: 0.1,
2137
+ repetition: 0.2,
2138
+ row: "pitch",
2139
+ },
2140
+ texture: {
2141
+ kind: "polyphonic",
2142
+ roles: {
2143
+ chords: role("strings", "piano:0.5"),
2144
+ bass: role("cello", "piano:0.5"),
2145
+ lead: role("violin", "clarinet:0.5", "piano:0.4"),
2146
+ counter: maybe("viola", "bassoon:0.5"),
2147
+ },
2148
+ },
2149
+ form: { archetype: "serial" },
2150
+ }),
2151
+ card({
2152
+ id: "integral-serialism",
2153
+ summary:
2154
+ "series applied to pitch, duration, dynamics and attack alike; pointillist isolated events spread across registers",
2155
+ tempo: { bpm: [40, 112], typical: 60 },
2156
+ pitch: { scales: [["chromatic", 1]] },
2157
+ harmony: { model: "none" },
2158
+ melody: {
2159
+ row: "integral",
2160
+ intervals: ANGULAR,
2161
+ chordToneRate: 0,
2162
+ repetition: 0.05,
2163
+ density: [0.5, 2],
2164
+ ambitus: [18, 30],
2165
+ range: [40, 96],
2166
+ },
2167
+ bass: { behaviour: [["none", 1]] },
2168
+ expression: {
2169
+ dynamics: [0.05, 1],
2170
+ articulation: {
2171
+ lead: [
2172
+ ["staccato", 0.3],
2173
+ ["accent", 0.3],
2174
+ ["tenuto", 0.2],
2175
+ ["marcato", 0.2],
2176
+ ],
2177
+ },
2178
+ },
2179
+ texture: {
2180
+ kind: "polyphonic",
2181
+ roles: {
2182
+ chords: null,
2183
+ bass: null,
2184
+ lead: role("piano", "vibes:0.5"),
2185
+ counter: maybe("flute", "piano:0.5"),
2186
+ },
2187
+ },
2188
+ form: { archetype: "serial" },
2189
+ }),
2190
+ card({
2191
+ id: "neoclassicism",
2192
+ summary:
2193
+ "baroque and classical forms with wrong-note diatonicism, dry motor rhythm, polytonal shading and lean winds",
2194
+ meter: {
2195
+ signatures: [
2196
+ ["4/4", 0.5],
2197
+ ["3/4", 0.2],
2198
+ ["5/4", 0.15],
2199
+ ["7/8", 0.15],
2200
+ ],
2201
+ },
2202
+ tempo: { bpm: [84, 144], typical: 112 },
2203
+ pitch: {
2204
+ scales: [
2205
+ ["major", 0.5],
2206
+ ["mixolydian", 0.25],
2207
+ ["lydian", 0.25],
2208
+ ],
2209
+ },
2210
+ harmony: {
2211
+ model: "functional",
2212
+ presets: [
2213
+ ["turnaround", 0.5],
2214
+ ["canon", 0.5],
2215
+ ],
2216
+ sevenths: 0.3,
2217
+ },
2218
+ melody: { intervals: intervals(3, 2, 1.5, 0.6), chordToneRate: 0.55 },
2219
+ bass: {
2220
+ behaviour: [
2221
+ ["walking", 0.5],
2222
+ ["ostinato", 0.5],
2223
+ ],
2224
+ },
2225
+ expression: {
2226
+ articulation: {
2227
+ lead: [
2228
+ ["staccato", 0.5],
2229
+ ["accent", 0.5],
2230
+ ],
2231
+ },
2232
+ },
2233
+ texture: {
2234
+ roles: {
2235
+ chords: role("strings", "piano:0.5"),
2236
+ bass: role("bassoon", "contrabass:0.6"),
2237
+ lead: role("oboe", "trumpet:0.5", "clarinet:0.5"),
2238
+ },
2239
+ },
2240
+ }),
2241
+ card({
2242
+ id: "primitivism",
2243
+ summary:
2244
+ "ostinato blocks, shifting irregular accents and additive meters, polychords (two triads stacked), percussive tutti stabs",
2245
+ meter: {
2246
+ signatures: [
2247
+ ["7/8", 0.3],
2248
+ ["5/8", 0.2],
2249
+ ["4/4", 0.3],
2250
+ ["3/4", 0.2],
2251
+ ],
2252
+ grouping: [
2253
+ [[2, 2, 3], 0.4],
2254
+ [[3, 2, 2], 0.3],
2255
+ [[2, 3], 0.3],
2256
+ ],
2257
+ },
2258
+ tempo: { bpm: [96, 160], typical: 126 },
2259
+ pitch: {
2260
+ scales: [
2261
+ ["dorian", 0.4],
2262
+ ["messiaen-2", 0.3],
2263
+ ["phrygian", 0.3],
2264
+ ],
2265
+ },
2266
+ harmony: {
2267
+ voicing: {
2268
+ types: [
2269
+ ["cluster", 0.5],
2270
+ ["quartal", 0.5],
2271
+ ],
2272
+ },
2273
+ },
2274
+ bass: { behaviour: [["ostinato", 1]] },
2275
+ rhythm: { onsets: { kick: grid("x..x..x.x..x.x..") } },
2276
+ expression: {
2277
+ dynamics: [0.4, 1],
2278
+ articulation: {
2279
+ chords: [
2280
+ ["marcato", 0.6],
2281
+ ["accent", 0.4],
2282
+ ],
2283
+ },
2284
+ },
2285
+ melody: { repetition: 0.8, intervals: intervals(4, 2, 0.6, 1) },
2286
+ texture: {
2287
+ roles: {
2288
+ kick: role("timpani", "drums:0.4"),
2289
+ chords: role("strings", "horn:0.5"),
2290
+ bass: role("contrabass", "bassoon:0.5"),
2291
+ lead: role("bassoon", "horn:0.5", "oboe:0.4"),
2292
+ },
2293
+ },
2294
+ }),
2295
+ card({
2296
+ id: "futurism",
2297
+ summary:
2298
+ "noise intoners and machine rhythm: mechanical repeated pulses, clusters, ostinato motor patterns, noise as material",
2299
+ tempo: { bpm: [100, 168], typical: 132 },
2300
+ pitch: {
2301
+ scales: [
2302
+ ["messiaen-7", 0.5],
2303
+ ["messiaen-2", 0.5],
2304
+ ],
2305
+ },
2306
+ harmony: { voicing: { types: [["cluster", 1]] } },
2307
+ rhythm: {
2308
+ onsets: {
2309
+ kick: grid("x.x.x.x.x.x.x.x."),
2310
+ snare: grid("..x...x...x...x."),
2311
+ },
2312
+ },
2313
+ bass: { behaviour: [["ostinato", 1]], onsets: grid("x.x.x.x.x.x.x.x.") },
2314
+ melody: {
2315
+ repetition: 0.9,
2316
+ chordToneRate: 0.3,
2317
+ intervals: intervals(3, 1, 1, 2),
2318
+ },
2319
+ texture: {
2320
+ kind: "interlocking",
2321
+ roles: {
2322
+ kick: role("drums"),
2323
+ snare: role("drums"),
2324
+ chords: role("organ", "piano:0.5"),
2325
+ bass: role("bassoon", "contrabass:0.5"),
2326
+ lead: role("trumpet", "granular:0.5"),
2327
+ },
2328
+ },
2329
+ mix: { fx: { lead: { distort: "crunch" } } },
2330
+ }),
2331
+ card({
2332
+ id: "folk-modernism",
2333
+ summary:
2334
+ "village modes made modern: acoustic (lydian-dominant) and dorian scales, Bulgarian additive meters 2+2+3, bitonal folk tune harmonisation",
2335
+ meter: {
2336
+ signatures: [
2337
+ ["7/8", 0.4],
2338
+ ["5/8", 0.2],
2339
+ ["2/4", 0.4],
2340
+ ],
2341
+ grouping: [
2342
+ [[2, 2, 3], 0.5],
2343
+ [[3, 2, 2], 0.2],
2344
+ [[2, 3], 0.3],
2345
+ ],
2346
+ },
2347
+ tempo: { bpm: [92, 168], typical: 132 },
2348
+ pitch: {
2349
+ scales: [
2350
+ ["lydian", 0.35],
2351
+ ["dorian", 0.35],
2352
+ ["mixolydian", 0.3],
2353
+ ],
2354
+ },
2355
+ melody: {
2356
+ repetition: 0.75,
2357
+ chordToneRate: 0.45,
2358
+ intervals: intervals(4, 2, 0.8, 0.8),
2359
+ },
2360
+ bass: {
2361
+ behaviour: [
2362
+ ["ostinato", 0.6],
2363
+ ["pedal", 0.4],
2364
+ ],
2365
+ },
2366
+ texture: {
2367
+ roles: {
2368
+ chords: role("strings", "piano:0.5"),
2369
+ bass: role("cello", "contrabass:0.5"),
2370
+ lead: role("violin", "clarinet:0.5"),
2371
+ },
2372
+ },
2373
+ }),
2374
+ card({
2375
+ id: "soviet-modernism",
2376
+ summary:
2377
+ "sardonic marches and tragic slow movements: octatonic flavour, chromatic lowered degrees, motor ostinato under brass, DSCH-type motto cells",
2378
+ meter: {
2379
+ signatures: [
2380
+ ["4/4", 0.5],
2381
+ ["2/4", 0.3],
2382
+ ["3/4", 0.2],
2383
+ ],
2384
+ grouping: null,
2385
+ },
2386
+ tempo: { bpm: [56, 160], typical: 112 },
2387
+ pitch: {
2388
+ scales: [
2389
+ ["minor", 0.3],
2390
+ ["phrygian", 0.3],
2391
+ ["messiaen-2", 0.2],
2392
+ ["locrian", 0.2],
2393
+ ],
2394
+ },
2395
+ rhythm: { onsets: { snare: grid("x.xxx.x.x.xxx.x.") } },
2396
+ bass: {
2397
+ behaviour: [
2398
+ ["ostinato", 0.6],
2399
+ ["root-fifth", 0.4],
2400
+ ],
2401
+ },
2402
+ texture: {
2403
+ roles: {
2404
+ snare: maybe("drums"),
2405
+ chords: role("strings", "horn:0.5"),
2406
+ bass: role("contrabass", "tuba:0.5"),
2407
+ lead: role("trumpet", "violins:0.5", "clarinet:0.4"),
2408
+ },
2409
+ },
2410
+ }),
2411
+ card({
2412
+ id: "modal-mysticism",
2413
+ summary:
2414
+ "modes of limited transposition (messiaen 2 and 3), non-retrogradable rhythms and added values, birdsong-like lines, static ecstatic chords",
2415
+ meter: {
2416
+ signatures: [
2417
+ ["5/4", 0.3],
2418
+ ["7/8", 0.3],
2419
+ ["4/4", 0.4],
2420
+ ],
2421
+ },
2422
+ tempo: { bpm: [40, 88], typical: 56 },
2423
+ pitch: {
2424
+ scales: [
2425
+ ["messiaen-2", 0.5],
2426
+ ["messiaen-3", 0.3],
2427
+ ["messiaen-7", 0.2],
2428
+ ],
2429
+ },
2430
+ harmony: {
2431
+ rhythm: [
2432
+ [0.5, 0.5],
2433
+ [0.25, 0.5],
2434
+ ],
2435
+ voicing: { notes: [4, 6], types: [["wide", 1]] },
2436
+ },
2437
+ melody: { intervals: intervals(3, 3, 1.2, 0.4), chordToneRate: 0.4 },
2438
+ bass: { behaviour: [["pedal", 1]] },
2439
+ texture: {
2440
+ roles: {
2441
+ chords: role("organ", "piano:0.5"),
2442
+ bass: role("organ"),
2443
+ lead: role("flute", "piano:0.5", "glock:0.3"),
2444
+ pad: maybe("strings", "organ:0.5"),
2445
+ },
2446
+ },
2447
+ mix: { space: 0.8 },
2448
+ }),
2449
+ card({
2450
+ id: "american-modernism",
2451
+ summary:
2452
+ "open fifths and quartal spacing, hymn and folk quotations as types, polytonal collage, syncopated prairie and jazz-tinged rhythm",
2453
+ meter: {
2454
+ signatures: [
2455
+ ["4/4", 0.5],
2456
+ ["3/4", 0.2],
2457
+ ["5/4", 0.15],
2458
+ ["7/8", 0.15],
2459
+ ],
2460
+ },
2461
+ pitch: {
2462
+ scales: [
2463
+ ["mixolydian", 0.3],
2464
+ ["major", 0.3],
2465
+ ["lydian", 0.2],
2466
+ ["major-pentatonic", 0.2],
2467
+ ],
2468
+ },
2469
+ harmony: {
2470
+ voicing: {
2471
+ types: [
2472
+ ["quartal", 0.6],
2473
+ ["open", 0.4],
2474
+ ],
2475
+ },
2476
+ rhythm: [
2477
+ [0.5, 0.6],
2478
+ [1, 0.4],
2479
+ ],
2480
+ },
2481
+ melody: { intervals: intervals(3, 2, 1.6, 0.5), chordToneRate: 0.55 },
2482
+ texture: {
2483
+ roles: {
2484
+ chords: role("strings", "horn:0.4"),
2485
+ bass: role("contrabass", "cello:0.5"),
2486
+ lead: role("trumpet", "clarinet:0.5", "oboe:0.4"),
2487
+ },
2488
+ },
2489
+ }),
2490
+ card({
2491
+ id: "neo-romantic",
2492
+ summary:
2493
+ "return to tonal lyricism after modernism: modal-tinged diatonic harmony, added sixths and ninths, broad string melody, slow harmonic rhythm",
2494
+ meter: {
2495
+ signatures: [
2496
+ ["4/4", 0.6],
2497
+ ["3/4", 0.4],
2498
+ ],
2499
+ grouping: null,
2500
+ },
2501
+ tempo: { bpm: [48, 96], typical: 66 },
2502
+ pitch: {
2503
+ scales: [
2504
+ ["major", 0.4],
2505
+ ["minor", 0.3],
2506
+ ["dorian", 0.3],
2507
+ ],
2508
+ },
2509
+ harmony: {
2510
+ model: "functional",
2511
+ presets: [
2512
+ ["axis", 0.4],
2513
+ ["aeolian", 0.3],
2514
+ ["canon", 0.3],
2515
+ ],
2516
+ sevenths: 0.4,
2517
+ voicing: {
2518
+ types: [
2519
+ ["open", 0.6],
2520
+ ["wide", 0.4],
2521
+ ],
2522
+ },
2523
+ },
2524
+ melody: { intervals: intervals(4, 2.5, 1, 0.4), chordToneRate: 0.65 },
2525
+ texture: {
2526
+ roles: {
2527
+ chords: role("strings"),
2528
+ bass: role("contrabass", "cellos:0.5"),
2529
+ lead: role("violins", "oboe:0.4", "frenchhorn:0.3"),
2530
+ },
2531
+ },
2532
+ }),
2533
+ ]);
2534
+
2535
+ // ---------------------------------------------------------------------------
2536
+ // Contemporary art music. References: Keith Potter, "Four Musical
2537
+ // Minimalists" (2000); Julian Anderson, "A Provisional History of
2538
+ // Spectral Music" (Contemporary Music Review 19, 2000); Kyle Gann, "The
2539
+ // Arithmetic of Listening" (2019) for just intonation.
2540
+
2541
+ const CONTEMPORARY_LEAVES: readonly StyleCard[] = Object.freeze([
2542
+ card({
2543
+ id: "aleatoric",
2544
+ summary:
2545
+ "indeterminacy: chance-ordered events, mobile form, unmeasured gestures in a time frame, pitch fields instead of progressions",
2546
+ tempo: { bpm: [40, 96], typical: 60 },
2547
+ groove: { humanize: { timingMs: 30, velocity: 0.2 } },
2548
+ pitch: {
2549
+ scales: [
2550
+ ["messiaen-7", 0.5],
2551
+ ["messiaen-3", 0.5],
2552
+ ],
2553
+ },
2554
+ harmony: { rhythm: [[0.25, 1]] },
2555
+ melody: {
2556
+ intervals: ANGULAR,
2557
+ density: [0.5, 2],
2558
+ chordToneRate: 0.15,
2559
+ repetition: 0.2,
2560
+ contour: [
2561
+ ["wave", 0.5],
2562
+ ["flat", 0.5],
2563
+ ],
2564
+ },
2565
+ bass: { behaviour: [["pedal", 1]] },
2566
+ texture: {
2567
+ roles: {
2568
+ arp: null,
2569
+ chords: role("strings", "piano:0.5"),
2570
+ bass: role("contrabass", "cello:0.5"),
2571
+ lead: role("flute", "clarinet:0.6", "prepared:0.5"),
2572
+ counter: maybe("vibes", "harp:0.5"),
2573
+ },
2574
+ },
2575
+ expression: { dynamics: [0.1, 0.8] },
2576
+ form: { archetype: "mobile" },
2577
+ mix: { space: 0.6, loudness: "classical" },
2578
+ }),
2579
+ card({
2580
+ id: "sonorism",
2581
+ summary:
2582
+ "texture as subject: tone clusters, string glissando bands and tremolo masses, density and register replacing melody and harmony",
2583
+ tempo: { bpm: [40, 90], typical: 56 },
2584
+ pitch: {
2585
+ scales: [
2586
+ ["messiaen-7", 0.7],
2587
+ ["phrygian", 0.3],
2588
+ ],
2589
+ },
2590
+ harmony: {
2591
+ rhythm: [[0.25, 1]],
2592
+ voicing: { types: [["close", 1]], range: [40, 84], notes: [5, 6] },
2593
+ },
2594
+ melody: {
2595
+ density: [0, 1],
2596
+ chordToneRate: 0.4,
2597
+ intervals: intervals(4, 1, 0.3, 1.5),
2598
+ contour: [
2599
+ ["ascending", 0.5],
2600
+ ["descending", 0.5],
2601
+ ],
2602
+ },
2603
+ bass: { behaviour: [["pedal", 1]] },
2604
+ texture: {
2605
+ roles: {
2606
+ arp: null,
2607
+ chords: role("tremolo", "strings:0.6"),
2608
+ pad: role("strings", "violins:0.5"),
2609
+ bass: role("contrabasses", "cellos:0.5"),
2610
+ lead: role("violins", "tremolo:0.5"),
2611
+ },
2612
+ },
2613
+ expression: { dynamics: [0.05, 1] },
2614
+ mix: { space: 0.7, loudness: "classical" },
2615
+ }),
2616
+ card({
2617
+ id: "spectralism",
2618
+ summary:
2619
+ "harmony from the overtone series: a low fundamental pedal, partials stacked as wide chords, slow spectral interpolation instead of progression",
2620
+ tempo: { bpm: [40, 72], typical: 52 },
2621
+ pitch: {
2622
+ tuning: "harmonic-series",
2623
+ scales: [["harmonic-series", 1]],
2624
+ },
2625
+ harmony: {
2626
+ rhythm: [[0.25, 1]],
2627
+ sevenths: 0.8,
2628
+ voicing: { types: [["wide", 1]], range: [36, 88], notes: [5, 6] },
2629
+ },
2630
+ melody: {
2631
+ density: [0.5, 1],
2632
+ chordToneRate: 0.85,
2633
+ intervals: intervals(2, 2, 1, 1),
2634
+ },
2635
+ bass: { behaviour: [["pedal", 1]], range: [28, 43] },
2636
+ texture: {
2637
+ roles: {
2638
+ arp: null,
2639
+ drone: role("contrabass", "organ:0.5"),
2640
+ chords: role("strings", "organ:0.4"),
2641
+ pad: maybe("cloud", "strings:0.5"),
2642
+ bass: role("contrabass"),
2643
+ lead: role("horn", "clarinet:0.5", "cello:0.4"),
2644
+ },
2645
+ },
2646
+ expression: { dynamics: [0.15, 0.85] },
2647
+ mix: { space: 0.75, loudness: "classical" },
2648
+ }),
2649
+ card({
2650
+ id: "new-complexity",
2651
+ summary:
2652
+ "maximal notational density: irrational subdivisions, wide angular leaps, constantly shifting meter and dynamics, no repetition",
2653
+ meter: {
2654
+ signatures: [
2655
+ ["5/4", 0.3],
2656
+ ["7/8", 0.3],
2657
+ ["4/4", 0.2],
2658
+ ["3/4", 0.2],
2659
+ ],
2660
+ grouping: [
2661
+ [[3, 2, 2], 0.5],
2662
+ [[2, 3, 2], 0.5],
2663
+ ],
2664
+ },
2665
+ tempo: { bpm: [48, 80], typical: 60 },
2666
+ groove: { humanize: { timingMs: 22, velocity: 0.2 } },
2667
+ pitch: { scales: [["messiaen-7", 1]] },
2668
+ melody: {
2669
+ intervals: ANGULAR,
2670
+ density: [3, 4],
2671
+ chordToneRate: 0.1,
2672
+ repetition: 0.05,
2673
+ ambitus: [18, 30],
2674
+ range: [52, 92],
2675
+ },
2676
+ bass: {
2677
+ behaviour: [
2678
+ ["arpeggio", 0.5],
2679
+ ["walking", 0.5],
2680
+ ],
2681
+ },
2682
+ texture: {
2683
+ roles: {
2684
+ arp: null,
2685
+ chords: role("piano"),
2686
+ bass: role("cello", "bassclarinet:0.5"),
2687
+ lead: role("flute", "violin:0.6", "clarinet:0.5"),
2688
+ counter: role("piano", "viola:0.5"),
2689
+ },
2690
+ },
2691
+ expression: {
2692
+ dynamics: [0.1, 1],
2693
+ articulation: {
2694
+ lead: [
2695
+ ["accent", 0.4],
2696
+ ["staccato", 0.3],
2697
+ ["marcato", 0.3],
2698
+ ],
2699
+ },
2700
+ },
2701
+ mix: { space: 0.4, loudness: "classical" },
2702
+ }),
2703
+ card({
2704
+ id: "drone-minimalism",
2705
+ summary:
2706
+ "sustained just-intoned intervals over a held tonic drone: no progression, overtones heard as harmony, events measured in minutes",
2707
+ tempo: { bpm: [40, 66], typical: 48 },
2708
+ pitch: {
2709
+ tuning: "just",
2710
+ scales: [
2711
+ ["mixolydian", 0.6],
2712
+ ["major", 0.4],
2713
+ ],
2714
+ },
2715
+ harmony: { model: "drone", rhythm: [[0.25, 1]] },
2716
+ melody: {
2717
+ density: [0, 0.5],
2718
+ chordToneRate: 0.9,
2719
+ repetition: 0.9,
2720
+ intervals: intervals(2, 2, 2, 2),
2721
+ contour: [["flat", 1]],
2722
+ },
2723
+ bass: { behaviour: [["pedal", 1]] },
2724
+ texture: {
2725
+ kind: "heterophonic",
2726
+ roles: {
2727
+ arp: null,
2728
+ chords: null,
2729
+ drone: role("organ", "tanpura:0.6", "strings:0.4"),
2730
+ pad: maybe("cloud", "strings:0.5"),
2731
+ bass: role("contrabass", "organ:0.5"),
2732
+ lead: role("sing", "violin:0.5", "sax:0.3"),
2733
+ },
2734
+ },
2735
+ expression: { dynamics: [0.3, 0.7] },
2736
+ mix: { space: 0.85 },
2737
+ }),
2738
+ card({
2739
+ id: "pulse-minimalism",
2740
+ summary:
2741
+ "an unbroken sixteenth-note pulse, interlocking repeated cells shifting by phase, harmony changing only every few bars",
2742
+ tempo: { bpm: [100, 160], typical: 132 },
2743
+ pitch: {
2744
+ scales: [
2745
+ ["dorian", 0.35],
2746
+ ["mixolydian", 0.3],
2747
+ ["major", 0.35],
2748
+ ],
2749
+ },
2750
+ harmony: {
2751
+ rhythm: [
2752
+ [0.25, 0.5],
2753
+ [0.5, 0.5],
2754
+ ],
2755
+ },
2756
+ melody: { density: [2, 4], repetition: 0.9 },
2757
+ bass: { behaviour: [["ostinato", 1]], onsets: grid("x.x.x.x.x.x.x.x.") },
2758
+ rhythm: { onsets: { arp: grid("xxxxxxxxxxxxxxxx") } },
2759
+ texture: {
2760
+ kind: "interlocking",
2761
+ roles: {
2762
+ arp: role("marimba", "piano:0.6", "vibes:0.4"),
2763
+ chords: role("piano", "organ:0.4"),
2764
+ bass: role("piano", "bassclarinet:0.5"),
2765
+ lead: role("marimba", "clarinet:0.4", "vibes:0.4"),
2766
+ },
2767
+ },
2768
+ groove: { humanize: { timingMs: 2, velocity: 0.04 } },
2769
+ form: {
2770
+ roleMap: {
2771
+ intro: ["arp"],
2772
+ build: ["arp", "chords", "bass"],
2773
+ breakdown: ["arp", "bass"],
2774
+ outro: ["arp"],
2775
+ },
2776
+ },
2777
+ }),
2778
+ card({
2779
+ id: "additive-minimalism",
2780
+ summary:
2781
+ "additive process: a figure grows one note per repeat (1, 1+2, 1+2+3), arpeggiated triads over slow minor-key cycles",
2782
+ meter: {
2783
+ signatures: [
2784
+ ["4/4", 0.5],
2785
+ ["6/8", 0.3],
2786
+ ["3/4", 0.2],
2787
+ ],
2788
+ },
2789
+ tempo: { bpm: [96, 160], typical: 132 },
2790
+ harmony: {
2791
+ model: "functional",
2792
+ presets: [
2793
+ ["aeolian", 0.5],
2794
+ ["andalusian", 0.5],
2795
+ ],
2796
+ sources: { presets: 3 },
2797
+ rhythm: [[0.5, 1]],
2798
+ },
2799
+ pitch: {
2800
+ scales: [
2801
+ ["minor", 0.7],
2802
+ ["dorian", 0.3],
2803
+ ],
2804
+ },
2805
+ melody: { density: [2, 4], repetition: 0.95, chordToneRate: 0.9 },
2806
+ bass: { behaviour: [["arpeggio", 1]] },
2807
+ rhythm: { onsets: { arp: grid("xxx.xxxxx.xxxxx.") } },
2808
+ texture: {
2809
+ roles: {
2810
+ arp: role("organ", "piano:0.6", "farfisa:0.3"),
2811
+ chords: role("organ", "strings:0.5"),
2812
+ bass: role("organ", "bassclarinet:0.4"),
2813
+ lead: role("sax", "flute:0.5", "sing:0.4"),
2814
+ },
2815
+ },
2816
+ }),
2817
+ card({
2818
+ id: "holy-minimalism",
2819
+ summary:
2820
+ "tintinnabuli: a stepwise melody voice around the tonic against a voice sounding only the tonic triad, slow chant-like tempo",
2821
+ tempo: { bpm: [40, 72], typical: 52 },
2822
+ pitch: {
2823
+ scales: [
2824
+ ["minor", 0.6],
2825
+ ["dorian", 0.4],
2826
+ ],
2827
+ },
2828
+ harmony: { model: "drone", rhythm: [[0.25, 1]] },
2829
+ melody: {
2830
+ intervals: STEPWISE,
2831
+ density: [0.5, 1],
2832
+ ambitus: [4, 7],
2833
+ chordToneRate: 0.5,
2834
+ repetition: 0.6,
2835
+ contour: [
2836
+ ["flat", 0.5],
2837
+ ["descending", 0.25],
2838
+ ["ascending", 0.25],
2839
+ ],
2840
+ },
2841
+ bass: { behaviour: [["pedal", 1]] },
2842
+ texture: {
2843
+ kind: "homophonic",
2844
+ roles: {
2845
+ arp: null,
2846
+ chords: null,
2847
+ drone: role("strings", "organ:0.5"),
2848
+ bass: role("contrabass", "organ:0.5"),
2849
+ lead: role("choir", "violin:0.6", "cello:0.4"),
2850
+ counter: maybe("bell", "piano:0.6", "tubular:0.4"),
2851
+ },
2852
+ },
2853
+ expression: { dynamics: [0.2, 0.7] },
2854
+ mix: { space: 0.85, loudness: "classical" },
2855
+ }),
2856
+ card({
2857
+ id: "choral-art",
2858
+ summary:
2859
+ "contemporary choral: added-second and ninth clusters, slow homophonic chords, modal and lydian color, a cappella or organ support",
2860
+ tempo: { bpm: [44, 84], typical: 60 },
2861
+ pitch: {
2862
+ scales: [
2863
+ ["major", 0.4],
2864
+ ["lydian", 0.3],
2865
+ ["dorian", 0.3],
2866
+ ],
2867
+ },
2868
+ harmony: {
2869
+ model: "functional",
2870
+ presets: [
2871
+ ["canon", 0.5],
2872
+ ["axis", 0.5],
2873
+ ],
2874
+ sevenths: 0.6,
2875
+ rhythm: [
2876
+ [1, 0.6],
2877
+ [0.5, 0.4],
2878
+ ],
2879
+ voicing: {
2880
+ types: [
2881
+ ["close", 0.7],
2882
+ ["open", 0.3],
2883
+ ],
2884
+ notes: [4, 6],
2885
+ },
2886
+ },
2887
+ melody: { intervals: CONJUNCT, density: [0.5, 1.5], chordToneRate: 0.7 },
2888
+ bass: { behaviour: [["root", 1]] },
2889
+ texture: {
2890
+ kind: "homophonic",
2891
+ roles: {
2892
+ arp: null,
2893
+ chords: role("choir", "chorale:0.6"),
2894
+ bass: role("choir", "organ:0.4"),
2895
+ lead: role("choir", "aah:0.5"),
2896
+ pad: maybe("organ"),
2897
+ },
2898
+ },
2899
+ expression: { dynamics: [0.15, 0.8] },
2900
+ mix: { space: 0.8, loudness: "classical" },
2901
+ }),
2902
+ card({
2903
+ id: "postminimalism",
2904
+ summary:
2905
+ "minimalist pulse loosened by lyric melody: tonal progressions return, repetition with variation, pop-tinged diatonic harmony",
2906
+ tempo: { bpm: [80, 140], typical: 108 },
2907
+ harmony: {
2908
+ model: "functional",
2909
+ presets: [
2910
+ ["axis", 0.4],
2911
+ ["sad-pop", 0.3],
2912
+ ["aeolian", 0.3],
2913
+ ],
2914
+ rhythm: [
2915
+ [0.5, 0.5],
2916
+ [1, 0.5],
2917
+ ],
2918
+ },
2919
+ pitch: {
2920
+ scales: [
2921
+ ["major", 0.5],
2922
+ ["minor", 0.3],
2923
+ ["mixolydian", 0.2],
2924
+ ],
2925
+ },
2926
+ melody: { repetition: 0.6, intervals: CONJUNCT, chordToneRate: 0.6 },
2927
+ bass: {
2928
+ behaviour: [
2929
+ ["arpeggio", 0.5],
2930
+ ["root", 0.5],
2931
+ ],
2932
+ },
2933
+ rhythm: { onsets: { arp: grid("x.xxx.xxx.xxx.xx") } },
2934
+ texture: {
2935
+ roles: {
2936
+ arp: maybe("piano", "marimba:0.5"),
2937
+ chords: role("strings", "piano:0.5"),
2938
+ bass: role("cello", "contrabass:0.5"),
2939
+ lead: role("violin", "clarinet:0.5", "piano:0.4"),
2940
+ },
2941
+ },
2942
+ }),
2943
+ card({
2944
+ id: "polystylism",
2945
+ summary:
2946
+ "postmodern collage: tonal and atonal idioms side by side, baroque sequence against cluster, abrupt style cuts between sections",
2947
+ meter: {
2948
+ signatures: [
2949
+ ["4/4", 0.5],
2950
+ ["3/4", 0.3],
2951
+ ["5/4", 0.2],
2952
+ ],
2953
+ },
2954
+ tempo: { bpm: [60, 132], typical: 92 },
2955
+ pitch: {
2956
+ scales: [
2957
+ ["minor", 0.35],
2958
+ ["major", 0.25],
2959
+ ["messiaen-2", 0.2],
2960
+ ["messiaen-7", 0.2],
2961
+ ],
2962
+ },
2963
+ harmony: {
2964
+ model: "functional",
2965
+ presets: [
2966
+ ["canon", 0.4],
2967
+ ["andalusian", 0.3],
2968
+ ["minor-ii-v", 0.3],
2969
+ ],
2970
+ sevenths: 0.3,
2971
+ },
2972
+ melody: {
2973
+ intervals: intervals(2.5, 2, 2, 0.5),
2974
+ chordToneRate: 0.45,
2975
+ repetition: 0.4,
2976
+ },
2977
+ bass: {
2978
+ behaviour: [
2979
+ ["walking", 0.5],
2980
+ ["root", 0.5],
2981
+ ],
2982
+ },
2983
+ texture: {
2984
+ roles: {
2985
+ arp: null,
2986
+ chords: role("harpsichord", "strings:0.6", "prepared:0.4"),
2987
+ bass: role("cello", "contrabass:0.5"),
2988
+ lead: role("violin", "piano:0.5"),
2989
+ counter: maybe("prepared", "celesta:0.5"),
2990
+ },
2991
+ },
2992
+ expression: { dynamics: [0.1, 1] },
2993
+ mix: { space: 0.55, loudness: "classical" },
2994
+ }),
2995
+ card({
2996
+ id: "microtonal-art",
2997
+ summary:
2998
+ "beyond twelve equal steps: quarter tones in 24-EDO (Haba, Wyschnegradsky, Ives), neutral seconds, thirds and sixths sounding beside the tempered ones",
2999
+ tempo: { bpm: [48, 96], typical: 66 },
3000
+ // Quarter tones as note cents: each tempered degree keeps its shadow.
3001
+ pitch: { scales: [["quarter-tone", 1]] },
3002
+ harmony: {
3003
+ rhythm: [
3004
+ [0.5, 0.6],
3005
+ [1, 0.4],
3006
+ ],
3007
+ sevenths: 0,
3008
+ },
3009
+ melody: { intervals: CONJUNCT, chordToneRate: 0.6, density: [1, 2] },
3010
+ bass: {
3011
+ behaviour: [
3012
+ ["root", 0.6],
3013
+ ["pedal", 0.4],
3014
+ ],
3015
+ },
3016
+ texture: {
3017
+ roles: {
3018
+ arp: null,
3019
+ chords: role("organ", "strings:0.5"),
3020
+ bass: role("organ", "cello:0.5"),
3021
+ lead: role("violin", "clarinet:0.5"),
3022
+ },
3023
+ },
3024
+ mix: { space: 0.65, loudness: "classical" },
3025
+ }),
3026
+ card({
3027
+ id: "modern-classical",
3028
+ summary:
3029
+ "contemporary neoclassical: felt piano ostinato, string pads, aeolian loops with suspended chords, intimate close-miked dynamics",
3030
+ tempo: { bpm: [56, 96], typical: 72 },
3031
+ pitch: {
3032
+ scales: [
3033
+ ["minor", 0.6],
3034
+ ["major", 0.4],
3035
+ ],
3036
+ },
3037
+ harmony: {
3038
+ model: "functional",
3039
+ presets: [
3040
+ ["aeolian", 0.4],
3041
+ ["sad-pop", 0.3],
3042
+ ["axis", 0.3],
3043
+ ],
3044
+ sources: { presets: 3 },
3045
+ rhythm: [
3046
+ [1, 0.6],
3047
+ [0.5, 0.4],
3048
+ ],
3049
+ sevenths: 0.3,
3050
+ },
3051
+ melody: {
3052
+ intervals: CONJUNCT,
3053
+ chordToneRate: 0.7,
3054
+ density: [0.5, 2],
3055
+ repetition: 0.7,
3056
+ },
3057
+ bass: {
3058
+ behaviour: [
3059
+ ["root", 0.6],
3060
+ ["arpeggio", 0.4],
3061
+ ],
3062
+ },
3063
+ rhythm: { onsets: { arp: grid("x.x.x.x.x.x.x.x.") } },
3064
+ texture: {
3065
+ kind: "homophonic",
3066
+ roles: {
3067
+ arp: role("felt", "piano:0.6"),
3068
+ chords: role("strings", "felt:0.4"),
3069
+ bass: role("cello", "felt:0.4"),
3070
+ lead: role("felt", "cello:0.5", "violin:0.4"),
3071
+ },
3072
+ },
3073
+ expression: { dynamics: [0.15, 0.6] },
3074
+ mix: { space: 0.6 },
3075
+ }),
3076
+ ]);
3077
+
3078
+ // ---------------------------------------------------------------------------
3079
+ // Bands and marches. References: Frank Battisti, "The Winds of Change"
3080
+ // (2002); Paul E. Bierley, "John Philip Sousa: American Phenomenon" (1973)
3081
+ // for march form; William Ross, "Pipe Band Drumming" (Scottish Pipe Band
3082
+ // Association tutor) for the pipe-band snare idiom.
3083
+
3084
+ const BAND_LEAVES: readonly StyleCard[] = Object.freeze([
3085
+ card({
3086
+ id: "military-march",
3087
+ summary:
3088
+ "march form: strains of 16 bars, a trio in the subdominant, oom-pah bass on the strong beats, snare rudiments and a breakstrain",
3089
+ meter: {
3090
+ signatures: [
3091
+ ["2/4", 0.5],
3092
+ ["6/8", 0.5],
3093
+ ],
3094
+ },
3095
+ tempo: { bpm: [108, 132], typical: 120 },
3096
+ groove: { humanize: { timingMs: 4, velocity: 0.05 } },
3097
+ harmony: {
3098
+ model: "functional",
3099
+ chain: {
3100
+ I: [
3101
+ ["IV", 1.5],
3102
+ ["V", 2],
3103
+ ["V7/V", 0.6],
3104
+ ["vi", 0.5],
3105
+ ],
3106
+ IV: [
3107
+ ["I", 1.5],
3108
+ ["V", 1],
3109
+ ["iv", 0.3],
3110
+ ],
3111
+ iv: [["I", 1]],
3112
+ "V7/V": [["V", 3]],
3113
+ vi: [["ii", 1]],
3114
+ ii: [["V", 2]],
3115
+ V: [["I", 3]],
3116
+ },
3117
+ sources: { presets: 0.5, chain: 3 },
3118
+ rhythm: [[1, 1]],
3119
+ },
3120
+ melody: {
3121
+ intervals: intervals(4, 3, 1, 1.2),
3122
+ density: [1, 3],
3123
+ phraseBars: [[4, 1]],
3124
+ repetition: 0.6,
3125
+ },
3126
+ expression: {
3127
+ dynamics: [0.55, 1],
3128
+ articulation: {
3129
+ lead: [
3130
+ ["marcato", 0.4],
3131
+ ["staccato", 0.3],
3132
+ ["accent", 0.3],
3133
+ ],
3134
+ },
3135
+ },
3136
+ texture: {
3137
+ roles: {
3138
+ kick: role("drums"),
3139
+ snare: role("drums"),
3140
+ bass: role("tuba"),
3141
+ chords: role("horn", "trombone:0.5"),
3142
+ lead: role("cornet", "trumpet:0.6", "clarinet:0.4"),
3143
+ counter: maybe("trombone", "horn:0.5"),
3144
+ },
3145
+ },
3146
+ }),
3147
+ card({
3148
+ id: "brass-band",
3149
+ summary:
3150
+ "the cornet-and-saxhorn band: hymn-tune homophony, warm close brass voicing, plagal IV-I amens and slow-march or contest-piece strains",
3151
+ meter: {
3152
+ signatures: [
3153
+ ["4/4", 0.6],
3154
+ ["3/4", 0.4],
3155
+ ],
3156
+ },
3157
+ tempo: { bpm: [66, 116], typical: 84 },
3158
+ rhythm: {
3159
+ onsets: { kick: grid("x.......x.......") },
3160
+ fills: { every: 8, density: [0.2, 0.4] },
3161
+ },
3162
+ harmony: {
3163
+ model: "functional",
3164
+ presets: [
3165
+ ["canon", 0.5],
3166
+ ["fifties", 0.3],
3167
+ ["turnaround", 0.2],
3168
+ ],
3169
+ cadences: [
3170
+ ["IV-I", 0.5],
3171
+ ["V-I", 0.5],
3172
+ ],
3173
+ sevenths: 0.15,
3174
+ voicing: { types: [["close", 1]], notes: [4, 4] },
3175
+ },
3176
+ melody: { intervals: CONJUNCT, chordToneRate: 0.75, density: [1, 2] },
3177
+ bass: {
3178
+ behaviour: [
3179
+ ["root", 0.6],
3180
+ ["walking", 0.4],
3181
+ ],
3182
+ onsets: grid("x...x...x...x..."),
3183
+ },
3184
+ texture: {
3185
+ roles: {
3186
+ kick: maybe("drums"),
3187
+ snare: null,
3188
+ bass: role("tuba"),
3189
+ chords: role("horn", "trombone:0.6"),
3190
+ lead: role("cornet"),
3191
+ counter: maybe("trombone", "horn:0.5"),
3192
+ },
3193
+ },
3194
+ expression: { dynamics: [0.3, 0.95] },
3195
+ mix: { space: 0.5 },
3196
+ }),
3197
+ card({
3198
+ id: "concert-wind-band",
3199
+ summary:
3200
+ "the symphonic wind ensemble: folk-song settings, modal mixture and bVII color, chorale tutti against woodwind solos, mixed meter",
3201
+ meter: {
3202
+ signatures: [
3203
+ ["4/4", 0.5],
3204
+ ["3/4", 0.3],
3205
+ ["5/4", 0.2],
3206
+ ],
3207
+ },
3208
+ tempo: { bpm: [60, 132], typical: 96 },
3209
+ rhythm: {
3210
+ onsets: {
3211
+ kick: grid("x..............."),
3212
+ snare: grid("............x..."),
3213
+ },
3214
+ fills: { every: 8, density: [0.2, 0.5] },
3215
+ },
3216
+ pitch: {
3217
+ scales: [
3218
+ ["major", 0.4],
3219
+ ["mixolydian", 0.3],
3220
+ ["dorian", 0.3],
3221
+ ],
3222
+ },
3223
+ harmony: {
3224
+ model: "functional",
3225
+ presets: [
3226
+ ["mixolydian-rock", 0.3],
3227
+ ["canon", 0.4],
3228
+ ["aeolian", 0.3],
3229
+ ],
3230
+ sevenths: 0.2,
3231
+ voicing: {
3232
+ types: [
3233
+ ["open", 0.6],
3234
+ ["wide", 0.4],
3235
+ ],
3236
+ },
3237
+ },
3238
+ melody: { intervals: CONJUNCT, chordToneRate: 0.65 },
3239
+ bass: {
3240
+ behaviour: [
3241
+ ["root", 0.6],
3242
+ ["pedal", 0.4],
3243
+ ],
3244
+ onsets: grid("x.......x......."),
3245
+ },
3246
+ texture: {
3247
+ roles: {
3248
+ kick: maybe("drums"),
3249
+ perc: maybe("timpani"),
3250
+ snare: maybe("drums"),
3251
+ bass: role("tuba", "bassoon:0.4"),
3252
+ chords: role("horn", "clarinet:0.6", "trombone:0.4"),
3253
+ lead: role("flute", "oboe:0.6", "clarinet:0.5", "trumpet:0.4"),
3254
+ counter: maybe("bassclarinet", "horn:0.5"),
3255
+ },
3256
+ },
3257
+ form: {
3258
+ plans: [[["intro", "verse", "bridge", "chorus", "outro"], 1]],
3259
+ archetype: "through-composed",
3260
+ },
3261
+ expression: { dynamics: [0.2, 1] },
3262
+ mix: { space: 0.55, loudness: "classical" },
3263
+ }),
3264
+ card({
3265
+ id: "pipe-band",
3266
+ summary:
3267
+ "Highland pipes and drums: a mixolydian chanter over a constant tonic-and-fifth drone, grace-note gracing, 2/4 and 6/8 marches, rolling snare",
3268
+ meter: {
3269
+ signatures: [
3270
+ ["2/4", 0.4],
3271
+ ["6/8", 0.4],
3272
+ ["3/4", 0.2],
3273
+ ],
3274
+ },
3275
+ tempo: { bpm: [80, 120], typical: 96 },
3276
+ groove: { humanize: { timingMs: 4, velocity: 0.06 } },
3277
+ pitch: { scales: [["mixolydian", 1]] },
3278
+ harmony: { model: "drone", rhythm: [[0.25, 1]] },
3279
+ melody: {
3280
+ intervals: intervals(5, 3, 1, 0.5),
3281
+ density: [2, 3],
3282
+ range: [67, 81],
3283
+ ambitus: [9, 9],
3284
+ chordToneRate: 0.5,
3285
+ repetition: 0.6,
3286
+ },
3287
+ bass: { behaviour: [["none", 1]] },
3288
+ rhythm: {
3289
+ onsets: {
3290
+ kick: grid("x.......x......."),
3291
+ snare: grid("x.xxx.xxx.xxx.xx"),
3292
+ },
3293
+ fills: { every: 4, density: [0.5, 0.8] },
3294
+ },
3295
+ texture: {
3296
+ kind: "heterophonic",
3297
+ roles: {
3298
+ kick: role("drums"),
3299
+ snare: role("drums"),
3300
+ bass: null,
3301
+ chords: null,
3302
+ counter: null,
3303
+ drone: role("reeds", "oboe:0.4"),
3304
+ lead: role("oboe", "tinwhistle:0.4"),
3305
+ },
3306
+ },
3307
+ expression: {
3308
+ dynamics: [0.7, 1],
3309
+ articulation: { lead: [["legato", 1]] },
3310
+ },
3311
+ }),
3312
+ card({
3313
+ id: "marching-band",
3314
+ summary:
3315
+ "field show and drumline: a cadence of snare rudiments and multi-tom grooves, unison brass hits, backbeat on 2 and 4 in the stand tunes",
3316
+ meter: {
3317
+ signatures: [
3318
+ ["4/4", 0.7],
3319
+ ["2/4", 0.3],
3320
+ ],
3321
+ },
3322
+ tempo: { bpm: [112, 148], typical: 128 },
3323
+ rhythm: {
3324
+ onsets: {
3325
+ kick: grid("x.......x......."),
3326
+ snare: grid("x.xxx.x.x.xxx.xx"),
3327
+ tom: grid("..x...x...x...x."),
3328
+ },
3329
+ fills: { every: 4, density: [0.5, 0.9] },
3330
+ },
3331
+ harmony: {
3332
+ model: "functional",
3333
+ presets: [
3334
+ ["axis", 0.4],
3335
+ ["mixolydian-rock", 0.3],
3336
+ ["fifties", 0.3],
3337
+ ],
3338
+ },
3339
+ melody: {
3340
+ density: [1, 3],
3341
+ repetition: 0.7,
3342
+ intervals: intervals(4, 3, 1, 1.5),
3343
+ },
3344
+ expression: {
3345
+ dynamics: [0.6, 1],
3346
+ articulation: {
3347
+ lead: [
3348
+ ["accent", 0.5],
3349
+ ["marcato", 0.5],
3350
+ ],
3351
+ },
3352
+ },
3353
+ texture: {
3354
+ roles: {
3355
+ kick: role("drums"),
3356
+ snare: role("drums"),
3357
+ tom: role("drums"),
3358
+ bass: role("tuba"),
3359
+ chords: role("trombone", "horn:0.5"),
3360
+ lead: role("trumpet", "altosax:0.4"),
3361
+ },
3362
+ },
3363
+ mix: { space: 0.3 },
3364
+ }),
3365
+ ]);
3366
+
3367
+ // ---------------------------------------------------------------------------
3368
+ // Children's and functional. References: Patricia Shehan Campbell and Carol
3369
+ // Scott-Kassner, "Music in Childhood" (4th ed., 2013); the Kodaly sol-mi-la
3370
+ // sequence for the small singing range.
3371
+
3372
+ const CHILDRENS_LEAVES: readonly StyleCard[] = Object.freeze([
3373
+ card({
3374
+ id: "childrens-song",
3375
+ summary:
3376
+ "sing-along teaching song: sol-mi-la cells inside a sixth, call and echo, two-bar repeats, I-IV-V with a clear V-I close",
3377
+ tempo: { bpm: [92, 126], typical: 108 },
3378
+ melody: {
3379
+ ambitus: [4, 9],
3380
+ intervals: intervals(5, 3.5, 0.5, 1.5),
3381
+ chordToneRate: 0.8,
3382
+ repetition: 0.85,
3383
+ finals: [[0, 1]],
3384
+ },
3385
+ harmony: {
3386
+ model: "functional",
3387
+ chain: {
3388
+ I: [
3389
+ ["IV", 2],
3390
+ ["V", 2],
3391
+ ],
3392
+ IV: [
3393
+ ["I", 1],
3394
+ ["V", 1.5],
3395
+ ],
3396
+ V: [["I", 3]],
3397
+ },
3398
+ sources: { presets: 0.5, chain: 3 },
3399
+ },
3400
+ rhythm: {
3401
+ onsets: {
3402
+ kick: grid("x.......x......."),
3403
+ snare: grid("....x.......x..."),
3404
+ },
3405
+ },
3406
+ texture: {
3407
+ roles: {
3408
+ kick: maybe("drums"),
3409
+ snare: maybe("drums"),
3410
+ hat: null,
3411
+ bass: role("bass", "ebass:0.5"),
3412
+ chords: role("acoustic", "piano:0.6", "banjo:0.2"),
3413
+ lead: role("sing", "glockenspiel:0.5", "xylophone:0.4"),
3414
+ },
3415
+ },
3416
+ }),
3417
+ card({
3418
+ id: "lullaby",
3419
+ summary:
3420
+ "cradle song and berceuse: a rocking 6/8 lilt at a slow dotted-quarter, tonic pedal rocking to the dominant, a falling stepwise tune inside a sixth, hushed and dark",
3421
+ meter: { signatures: [["6/8", 1]], grouping: [[[3, 3], 1]] },
3422
+ tempo: { bpm: [52, 72], typical: 60 },
3423
+ groove: { humanize: { timingMs: 14, velocity: 0.06 } },
3424
+ pitch: {
3425
+ scales: [
3426
+ ["major", 0.7],
3427
+ ["minor", 0.3],
3428
+ ],
3429
+ },
3430
+ harmony: {
3431
+ model: "functional",
3432
+ chain: {
3433
+ I: [
3434
+ ["V", 3],
3435
+ ["IV", 1],
3436
+ ],
3437
+ IV: [["I", 2]],
3438
+ V: [["I", 3]],
3439
+ },
3440
+ sources: { presets: 0, chain: 1 },
3441
+ rhythm: [[1, 1]],
3442
+ },
3443
+ melody: {
3444
+ ambitus: [4, 9],
3445
+ intervals: intervals(6, 3, 0.3, 0.7, 0.7),
3446
+ chordToneRate: 0.8,
3447
+ repetition: 0.85,
3448
+ finals: [[0, 1]],
3449
+ phraseBars: [[2, 1]],
3450
+ contour: [["descending", 1]],
3451
+ },
3452
+ bass: {
3453
+ behaviour: [
3454
+ ["pedal", 0.5],
3455
+ ["root", 0.5],
3456
+ ],
3457
+ },
3458
+ texture: {
3459
+ roles: {
3460
+ kick: null,
3461
+ snare: null,
3462
+ hat: null,
3463
+ bass: role("felt", "nylon:0.4", "harp:0.4"),
3464
+ chords: role("harp", "nylon:0.6", "felt:0.5"),
3465
+ lead: role("musicbox", "celesta:0.6", "sing:0.5", "flute:0.3"),
3466
+ },
3467
+ },
3468
+ expression: { dynamics: [0.15, 0.5] },
3469
+ mix: { space: 0.6, loudness: "ambient" },
3470
+ }),
3471
+ card({
3472
+ id: "novelty",
3473
+ summary:
3474
+ "comic and novelty song: oom-pah two-beat, ragtime-ish V7/V turnarounds, staccato toy timbres, a punch-line stop before the last chorus",
3475
+ tempo: { bpm: [104, 152], typical: 128 },
3476
+ harmony: {
3477
+ model: "functional",
3478
+ presets: [
3479
+ ["turnaround", 0.5],
3480
+ ["fifties", 0.5],
3481
+ ],
3482
+ chain: {
3483
+ I: [
3484
+ ["V7/V", 1],
3485
+ ["IV", 1],
3486
+ ["vi", 1],
3487
+ ],
3488
+ vi: [["V7/V", 1]],
3489
+ "V7/V": [["V", 2]],
3490
+ IV: [["V", 1]],
3491
+ V: [["I", 2]],
3492
+ },
3493
+ sources: { presets: 1, chain: 2 },
3494
+ sevenths: 0.4,
3495
+ },
3496
+ bass: {
3497
+ behaviour: [["root-fifth", 1]],
3498
+ onsets: grid("x.......x......."),
3499
+ },
3500
+ rhythm: {
3501
+ onsets: {
3502
+ kick: grid("x.......x......."),
3503
+ snare: grid("....x.......x..."),
3504
+ chords: grid("....x.......x..."),
3505
+ },
3506
+ },
3507
+ melody: { density: [2, 3], repetition: 0.7 },
3508
+ texture: {
3509
+ roles: {
3510
+ kick: role("drums"),
3511
+ snare: role("drums"),
3512
+ hat: null,
3513
+ bass: role("tuba", "upright:0.5"),
3514
+ chords: role("honkytonk", "banjo:0.5"),
3515
+ lead: role("xylophone", "toypiano:0.5", "clarinet:0.4"),
3516
+ },
3517
+ },
3518
+ expression: {
3519
+ dynamics: [0.5, 0.9],
3520
+ articulation: {
3521
+ lead: [
3522
+ ["staccato", 0.7],
3523
+ ["accent", 0.3],
3524
+ ],
3525
+ },
3526
+ },
3527
+ }),
3528
+ card({
3529
+ id: "wellness",
3530
+ summary:
3531
+ "meditation and relaxation: an unpulsed tonic drone, pentatonic bell tones that never resolve away, slow breath-length phrases, soft dynamics",
3532
+ tempo: { bpm: [48, 72], typical: 60 },
3533
+ groove: { humanize: { timingMs: 20, velocity: 0.08 } },
3534
+ pitch: {
3535
+ scales: [
3536
+ ["major-pentatonic", 0.6],
3537
+ ["lydian", 0.4],
3538
+ ],
3539
+ },
3540
+ harmony: { model: "drone", rhythm: [[0.25, 1]] },
3541
+ melody: {
3542
+ density: [0, 1],
3543
+ chordToneRate: 0.7,
3544
+ repetition: 0.7,
3545
+ phraseBars: [[4, 1]],
3546
+ contour: [["wave", 1]],
3547
+ },
3548
+ bass: { behaviour: [["pedal", 1]] },
3549
+ texture: {
3550
+ kind: "heterophonic",
3551
+ roles: {
3552
+ kick: null,
3553
+ snare: null,
3554
+ hat: null,
3555
+ chords: null,
3556
+ drone: role("singingbowl", "tanpura:0.5", "cloud:0.4"),
3557
+ pad: role("cloud", "strings:0.5"),
3558
+ bass: maybe("felt"),
3559
+ lead: role("bowl", "kalimba:0.5", "flute:0.4", "felt:0.4"),
3560
+ },
3561
+ },
3562
+ expression: { dynamics: [0.15, 0.55] },
3563
+ mix: { space: 0.9, loudness: "ambient" },
3564
+ }),
3565
+ ]);
3566
+
3567
+ // ---------------------------------------------------------------------------
3568
+ // Experimental. References: Pierre Schaeffer, "Traite des objets musicaux"
3569
+ // (1966) for the sound object and reduced listening; Denis Smalley,
3570
+ // "Spectromorphology" (Organised Sound 2/2, 1997); Curtis Roads,
3571
+ // "Microsound" (2001); Paul Hegarty, "Noise/Music" (2007).
3572
+
3573
+ const EXPERIMENTAL_LEAVES: readonly StyleCard[] = Object.freeze([
3574
+ card({
3575
+ id: "musique-concrete",
3576
+ summary:
3577
+ "the sound object: recorded material looped, cut and transposed on tape, reduced listening to timbre, closed grooves instead of themes",
3578
+ tempo: { bpm: [50, 100], typical: 72 },
3579
+ melody: { density: [0.5, 2], repetition: 0.6, chordToneRate: 0.2 },
3580
+ rhythm: { onsets: { perc: grid("x..x....x.x.....") } },
3581
+ texture: {
3582
+ roles: {
3583
+ drone: role("microloop", "granular:0.6"),
3584
+ pad: maybe("grains", "cloud:0.5"),
3585
+ lead: role("prepared", "microloop:0.5", "bell:0.4"),
3586
+ perc: maybe("prepared", "gong:0.5"),
3587
+ },
3588
+ },
3589
+ mix: {
3590
+ fx: { lead: { wobble: "tape" }, drone: { wobble: "seasick" } },
3591
+ space: 0.7,
3592
+ },
3593
+ }),
3594
+ card({
3595
+ id: "elektronische-musik",
3596
+ summary:
3597
+ "the studio as instrument: sine-tone and filtered-noise synthesis, serial ordering of pitch, duration and loudness, pointillist events",
3598
+ tempo: { bpm: [48, 96], typical: 66 },
3599
+ pitch: { scales: [["chromatic", 1]] },
3600
+ melody: {
3601
+ row: "integral",
3602
+ intervals: ANGULAR,
3603
+ density: [0.5, 2],
3604
+ repetition: 0.1,
3605
+ ambitus: [18, 30],
3606
+ range: [48, 96],
3607
+ },
3608
+ texture: {
3609
+ roles: {
3610
+ drone: role("triangle", "square:0.4"),
3611
+ pad: null,
3612
+ lead: role("triangle", "bell:0.6", "square:0.4"),
3613
+ counter: maybe("bell", "triangle:0.5"),
3614
+ },
3615
+ },
3616
+ expression: {
3617
+ dynamics: [0.1, 0.9],
3618
+ articulation: {
3619
+ lead: [
3620
+ ["staccato", 0.6],
3621
+ ["tenuto", 0.4],
3622
+ ],
3623
+ },
3624
+ },
3625
+ mix: { fx: { lead: { autofilter: "s&h" } }, space: 0.6 },
3626
+ }),
3627
+ card({
3628
+ id: "electroacoustic",
3629
+ summary:
3630
+ "acousmatic composition: spectromorphology of gesture and texture, an acoustic source spread into granular clouds, onset-sustain-decay shaped by space",
3631
+ tempo: { bpm: [44, 90], typical: 60 },
3632
+ melody: {
3633
+ density: [0.5, 1.5],
3634
+ contour: [
3635
+ ["ascending", 0.3],
3636
+ ["descending", 0.3],
3637
+ ["arch", 0.4],
3638
+ ],
3639
+ },
3640
+ texture: {
3641
+ roles: {
3642
+ drone: role("granular", "cloud:0.6"),
3643
+ pad: role("swarm", "grains:0.6"),
3644
+ lead: role("cello", "clarinet:0.5", "flute:0.4"),
3645
+ },
3646
+ },
3647
+ expression: { dynamics: [0.05, 0.9] },
3648
+ mix: {
3649
+ fx: { lead: { swell: "slow" }, pad: { chorus: "wide" } },
3650
+ space: 0.85,
3651
+ },
3652
+ }),
3653
+ card({
3654
+ id: "sound-collage",
3655
+ summary:
3656
+ "plunderphonics and cut-up: borrowed-sounding tonal fragments spliced against each other, abrupt edits, a lo-fi sampler loop as the glue",
3657
+ tempo: { bpm: [80, 120], typical: 96 },
3658
+ groove: { humanize: { timingMs: 12, velocity: 0.12 } },
3659
+ pitch: {
3660
+ scales: [
3661
+ ["major", 0.5],
3662
+ ["minor", 0.5],
3663
+ ],
3664
+ },
3665
+ harmony: {
3666
+ model: "functional",
3667
+ presets: [
3668
+ ["fifties", 0.4],
3669
+ ["turnaround", 0.3],
3670
+ ["aeolian", 0.3],
3671
+ ],
3672
+ rhythm: [[1, 1]],
3673
+ },
3674
+ melody: { chordToneRate: 0.6, repetition: 0.7, density: [1, 2] },
3675
+ bass: { behaviour: [["root", 1]] },
3676
+ rhythm: {
3677
+ onsets: {
3678
+ kick: grid("x.....x...x....."),
3679
+ snare: grid("....x.......x..."),
3680
+ },
3681
+ },
3682
+ texture: {
3683
+ roles: {
3684
+ ...kitRoles("lofi", ["kick", "snare"]),
3685
+ drone: null,
3686
+ chords: role("lofi", "microloop:0.5"),
3687
+ bass: role("upright", "bass:0.5"),
3688
+ lead: role("microloop", "honkytonk:0.5", "vibes:0.4"),
3689
+ },
3690
+ },
3691
+ mix: { fx: { chords: { crush: "lofi" } }, space: 0.4 },
3692
+ }),
3693
+ card({
3694
+ id: "free-improvisation",
3695
+ summary:
3696
+ "non-idiomatic improvisation: no shared meter, key or form, extended techniques, collective listening, density rising and thinning by consensus",
3697
+ tempo: { bpm: [60, 160], typical: 100 },
3698
+ groove: { humanize: { timingMs: 35, velocity: 0.25 } },
3699
+ pitch: {
3700
+ scales: [
3701
+ ["messiaen-7", 0.6],
3702
+ ["blues", 0.4],
3703
+ ],
3704
+ },
3705
+ melody: {
3706
+ intervals: ANGULAR,
3707
+ density: [1, 4],
3708
+ chordToneRate: 0.1,
3709
+ repetition: 0.15,
3710
+ ambitus: [14, 28],
3711
+ },
3712
+ bass: {
3713
+ behaviour: [
3714
+ ["walking", 0.5],
3715
+ ["none", 0.5],
3716
+ ],
3717
+ },
3718
+ texture: {
3719
+ kind: "polyphonic",
3720
+ roles: {
3721
+ drone: null,
3722
+ pad: null,
3723
+ bass: maybe("upright", "doublebass:0.5"),
3724
+ lead: role("sax", "tenorsax:0.5", "trumpet:0.3"),
3725
+ counter: role("prepared", "piano:0.5", "cello:0.4"),
3726
+ },
3727
+ },
3728
+ expression: {
3729
+ dynamics: [0.1, 1],
3730
+ articulation: {
3731
+ lead: [
3732
+ ["accent", 0.4],
3733
+ ["staccato", 0.3],
3734
+ ["legato", 0.3],
3735
+ ],
3736
+ },
3737
+ },
3738
+ mix: { space: 0.4 },
3739
+ }),
3740
+ card({
3741
+ id: "onkyo",
3742
+ summary:
3743
+ "onkyo and lowercase: near-silence, sine tones and small clicks at the threshold of hearing, long rests that are part of the piece",
3744
+ tempo: { bpm: [40, 72], typical: 52 },
3745
+ melody: { density: [0, 0.5], repetition: 0.5, contour: [["flat", 1]] },
3746
+ bass: { behaviour: [["none", 1]] },
3747
+ texture: {
3748
+ roles: {
3749
+ drone: role("triangle", "microloop:0.4"),
3750
+ pad: null,
3751
+ lead: role("triangle", "prepared:0.5", "bell:0.3"),
3752
+ },
3753
+ },
3754
+ expression: { dynamics: [0.03, 0.3] },
3755
+ mix: { space: 0.5, loudness: "ambient" },
3756
+ }),
3757
+ card({
3758
+ id: "drone",
3759
+ summary:
3760
+ "a single sustained sonority held for the whole piece: tonic and fifth pedal, slow beating partials, timbre and loudness as the only motion",
3761
+ tempo: { bpm: [40, 66], typical: 48 },
3762
+ pitch: {
3763
+ scales: [
3764
+ ["mixolydian", 0.4],
3765
+ ["dorian", 0.3],
3766
+ ["phrygian", 0.3],
3767
+ ],
3768
+ },
3769
+ harmony: { model: "drone", rhythm: [[0.25, 1]] },
3770
+ melody: { density: [0, 0.5], contour: [["flat", 1]], chordToneRate: 0.9 },
3771
+ texture: {
3772
+ roles: {
3773
+ drone: role("organ", "tanpura:0.5", "cloud:0.5"),
3774
+ pad: role("strings", "granular:0.6", "ebow:0.4"),
3775
+ lead: maybe("ebow", "cello:0.5"),
3776
+ },
3777
+ },
3778
+ expression: { dynamics: [0.3, 0.8] },
3779
+ mix: { fx: { drone: { bloom: "fifth" } }, space: 0.9, loudness: "ambient" },
3780
+ }),
3781
+ card({
3782
+ id: "harsh-noise",
3783
+ summary:
3784
+ "noise as material: saturated feedback, fold-back distortion and bit destruction, sudden cuts between walls of sound, maximum loudness",
3785
+ tempo: { bpm: [60, 180], typical: 120 },
3786
+ groove: { humanize: { timingMs: 30, velocity: 0.3 } },
3787
+ pitch: {
3788
+ scales: [
3789
+ ["locrian", 0.5],
3790
+ ["messiaen-7", 0.5],
3791
+ ],
3792
+ },
3793
+ melody: { density: [2, 4], intervals: ANGULAR, chordToneRate: 0.1 },
3794
+ texture: {
3795
+ roles: {
3796
+ drone: role("swarm", "saw:0.6"),
3797
+ pad: role("granular", "saw:0.5"),
3798
+ lead: role("saw", "square:0.5"),
3799
+ },
3800
+ },
3801
+ expression: { dynamics: [0.8, 1] },
3802
+ mix: {
3803
+ fx: {
3804
+ drone: { distort: "fold" },
3805
+ lead: { crush: "destroy" },
3806
+ pad: { distort: "fuzz" },
3807
+ },
3808
+ space: 0.2,
3809
+ loudness: "loud",
3810
+ },
3811
+ }),
3812
+ card({
3813
+ id: "harsh-noise-wall",
3814
+ summary:
3815
+ "the static wall: one dense unchanging noise texture for the whole duration, no gesture, no rhythm, no development, detail heard from inside",
3816
+ tempo: { bpm: [40, 80], typical: 60 },
3817
+ groove: { humanize: { timingMs: 8, velocity: 0.03 } },
3818
+ pitch: { scales: [["locrian", 1]] },
3819
+ harmony: { model: "drone", rhythm: [[0.25, 1]] },
3820
+ melody: { density: [0, 0.5], contour: [["flat", 1]] },
3821
+ bass: { behaviour: [["pedal", 1]] },
3822
+ texture: {
3823
+ roles: {
3824
+ drone: role("swarm", "saw:0.5"),
3825
+ pad: role("granular", "swarm:0.5"),
3826
+ bass: role("saw"),
3827
+ lead: role("swarm"),
3828
+ },
3829
+ },
3830
+ expression: { dynamics: [0.9, 1] },
3831
+ form: {
3832
+ plans: [[["intro", "verse", "outro"], 1]],
3833
+ archetype: "static",
3834
+ },
3835
+ mix: {
3836
+ fx: { drone: { distort: "fold" }, pad: { crush: "destroy" } },
3837
+ space: 0.1,
3838
+ loudness: "loud",
3839
+ },
3840
+ }),
3841
+ card({
3842
+ id: "power-electronics",
3843
+ summary:
3844
+ "power electronics: a slow distorted pulse, feedback squeal over a sub-bass pedal, a ranting processed voice, confrontational dynamics",
3845
+ tempo: { bpm: [60, 100], typical: 80 },
3846
+ rhythm: { onsets: { kick: grid("x.......x.......") } },
3847
+ pitch: {
3848
+ scales: [
3849
+ ["phrygian", 0.6],
3850
+ ["locrian", 0.4],
3851
+ ],
3852
+ },
3853
+ melody: { density: [1, 2], repetition: 0.6, intervals: ANGULAR },
3854
+ bass: { behaviour: [["pedal", 1]], range: [28, 40] },
3855
+ texture: {
3856
+ roles: {
3857
+ ...kitRoles("syn909", ["kick"]),
3858
+ drone: role("swarm", "saw:0.6"),
3859
+ bass: role("saw", "square:0.5"),
3860
+ lead: role("vocoder", "vocal:0.5"),
3861
+ },
3862
+ },
3863
+ expression: { dynamics: [0.7, 1] },
3864
+ mix: {
3865
+ fx: {
3866
+ kick: { distort: "crunch" },
3867
+ drone: { distort: "fuzz" },
3868
+ lead: { distort: "crunch" },
3869
+ },
3870
+ space: 0.3,
3871
+ loudness: "loud",
3872
+ },
3873
+ }),
3874
+ card({
3875
+ id: "field-recording",
3876
+ summary:
3877
+ "soundscape composition: a keynote ambience bed, sparse signal sounds and soundmarks, no meter, the place itself as the form",
3878
+ tempo: { bpm: [40, 80], typical: 56 },
3879
+ groove: { humanize: { timingMs: 40, velocity: 0.2 } },
3880
+ pitch: { scales: [["major-pentatonic", 1]] },
3881
+ melody: {
3882
+ density: [0, 1],
3883
+ intervals: intervals(1, 1, 2, 1),
3884
+ contour: [
3885
+ ["descending", 0.5],
3886
+ ["wave", 0.5],
3887
+ ],
3888
+ },
3889
+ bass: { behaviour: [["none", 1]] },
3890
+ texture: {
3891
+ roles: {
3892
+ drone: role("cloud", "grains:0.6"),
3893
+ pad: maybe("grains"),
3894
+ lead: role("whistle", "flute:0.5", "chimes:0.4"),
3895
+ },
3896
+ },
3897
+ expression: { dynamics: [0.1, 0.6] },
3898
+ mix: { space: 0.95, loudness: "ambient" },
3899
+ }),
3900
+ card({
3901
+ id: "sound-art",
3902
+ summary:
3903
+ "installation sound: loops of unequal length phasing against each other, no beginning or end, a room-filling texture heard by walking through it",
3904
+ tempo: { bpm: [48, 84], typical: 64 },
3905
+ pitch: {
3906
+ scales: [
3907
+ ["major-pentatonic", 0.5],
3908
+ ["lydian", 0.5],
3909
+ ],
3910
+ },
3911
+ melody: { density: [0.5, 1], repetition: 0.9, chordToneRate: 0.7 },
3912
+ rhythm: { onsets: { arp: grid("x....x....x..x..") } },
3913
+ texture: {
3914
+ kind: "interlocking",
3915
+ roles: {
3916
+ drone: role("cloud", "organ:0.5"),
3917
+ arp: role("musicbox", "bell:0.6", "kalimba:0.4"),
3918
+ lead: role("bell", "vibes:0.5"),
3919
+ },
3920
+ },
3921
+ mix: { fx: { arp: { chorus: "wide" } }, space: 0.85 },
3922
+ }),
3923
+ card({
3924
+ id: "sound-poetry",
3925
+ summary:
3926
+ "voice as material: phonemes and syllables without words, percussive consonants against held vowels, repetition and permutation",
3927
+ tempo: { bpm: [72, 132], typical: 100 },
3928
+ pitch: {
3929
+ scales: [
3930
+ ["minor-pentatonic", 0.5],
3931
+ ["phrygian", 0.5],
3932
+ ],
3933
+ },
3934
+ melody: {
3935
+ density: [2, 4],
3936
+ repetition: 0.8,
3937
+ intervals: intervals(3, 2, 0.6, 2),
3938
+ ambitus: [5, 12],
3939
+ range: [52, 72],
3940
+ },
3941
+ bass: { behaviour: [["none", 1]] },
3942
+ texture: {
3943
+ roles: {
3944
+ drone: maybe("ooh", "aah:0.5"),
3945
+ pad: null,
3946
+ lead: role("vocal", "sing:0.6"),
3947
+ counter: maybe("aah", "vocoder:0.5"),
3948
+ },
3949
+ },
3950
+ expression: {
3951
+ dynamics: [0.3, 1],
3952
+ articulation: {
3953
+ lead: [
3954
+ ["staccato", 0.5],
3955
+ ["accent", 0.3],
3956
+ ["tenuto", 0.2],
3957
+ ],
3958
+ },
3959
+ },
3960
+ mix: { space: 0.3 },
3961
+ }),
3962
+ card({
3963
+ id: "spoken-word",
3964
+ summary:
3965
+ "spoken word over a bed: speech-rhythm phrasing in a narrow low range, a walking bass and brushed kit under ii-V-I changes, space for the line to land",
3966
+ meter: { signatures: [["4/4", 1]] },
3967
+ tempo: { bpm: [72, 108], typical: 88 },
3968
+ groove: {
3969
+ swingRatio: [1.5, 2],
3970
+ humanize: { timingMs: 4, velocity: 0.08 },
3971
+ },
3972
+ pitch: {
3973
+ scales: [
3974
+ ["dorian", 0.5],
3975
+ ["major", 0.5],
3976
+ ],
3977
+ },
3978
+ harmony: {
3979
+ model: "functional",
3980
+ presets: [
3981
+ ["ii-v-i", 0.6],
3982
+ ["minor-ii-v", 0.4],
3983
+ ],
3984
+ sevenths: 0.9,
3985
+ },
3986
+ melody: {
3987
+ density: [1, 3],
3988
+ repetition: 0.4,
3989
+ ambitus: [3, 7],
3990
+ range: [48, 64],
3991
+ intervals: STEPWISE,
3992
+ },
3993
+ bass: {
3994
+ behaviour: [["walking", 1]],
3995
+ walk: { chordToneOnOne: 0.9, chromaticApproach: 0.3 },
3996
+ },
3997
+ rhythm: {
3998
+ onsets: {
3999
+ hat: grid("x...x.x.x...x.x."),
4000
+ snare: grid("....x.......x..."),
4001
+ },
4002
+ },
4003
+ texture: {
4004
+ kind: "homophonic",
4005
+ roles: {
4006
+ hat: role("drums"),
4007
+ snare: maybe("drums"),
4008
+ drone: null,
4009
+ pad: null,
4010
+ chords: role("piano", "rhodes:0.5"),
4011
+ bass: role("upright"),
4012
+ lead: role("vocal"),
4013
+ },
4014
+ },
4015
+ expression: { dynamics: [0.3, 0.75] },
4016
+ mix: { space: 0.35 },
4017
+ }),
4018
+ card({
4019
+ id: "glitch-art",
4020
+ summary:
4021
+ "glitch and microsound: clicks, skips and buffer stutters as rhythm, grains under 100 ms, digital errors made into a groove",
4022
+ tempo: { bpm: [90, 140], typical: 120 },
4023
+ groove: { subdivision: 4, humanize: { timingMs: 2, velocity: 0.1 } },
4024
+ rhythm: {
4025
+ onsets: {
4026
+ hat: grid("x.xx.x..xx.x.x.x"),
4027
+ kick: grid("x.....x...x....."),
4028
+ },
4029
+ },
4030
+ melody: { density: [2, 4], repetition: 0.8 },
4031
+ texture: {
4032
+ roles: {
4033
+ ...kitRoles("electro", ["kick", "hat"]),
4034
+ drone: role("microloop", "grains:0.6"),
4035
+ pad: maybe("granular"),
4036
+ lead: role("microloop", "sparkle:0.5", "bell:0.4"),
4037
+ },
4038
+ },
4039
+ mix: {
4040
+ fx: { lead: { crush: "8-bit" }, hat: { crush: "lofi" } },
4041
+ space: 0.4,
4042
+ },
4043
+ }),
4044
+ card({
4045
+ id: "algorithmic",
4046
+ summary:
4047
+ "generative process: a rule set run on a seed, Markov steps over a pentatonic field, rotating patterns of coprime lengths, no two passes alike",
4048
+ tempo: { bpm: [72, 132], typical: 100 },
4049
+ pitch: {
4050
+ scales: [
4051
+ ["major-pentatonic", 0.5],
4052
+ ["minor-pentatonic", 0.3],
4053
+ ["lydian", 0.2],
4054
+ ],
4055
+ },
4056
+ harmony: { model: "modal", rhythm: [[0.5, 1]] },
4057
+ melody: {
4058
+ density: [1, 3],
4059
+ repetition: 0.5,
4060
+ chordToneRate: 0.5,
4061
+ intervals: STEPWISE,
4062
+ },
4063
+ bass: { behaviour: [["ostinato", 1]], onsets: grid("x....x....x....x") },
4064
+ rhythm: { onsets: { arp: grid("x..x..x.x..x..x.") } },
4065
+ texture: {
4066
+ kind: "interlocking",
4067
+ roles: {
4068
+ drone: null,
4069
+ arp: role("marimba", "sparkle:0.5", "bell:0.4"),
4070
+ pad: maybe("cloud"),
4071
+ bass: role("triangle", "marimba:0.5"),
4072
+ lead: role("vibes", "bell:0.5", "kalimba:0.4"),
4073
+ },
4074
+ },
4075
+ mix: { fx: { arp: { phaser: "slow" } }, space: 0.6 },
4076
+ }),
4077
+ ]);
4078
+
4079
+ // ---------------------------------------------------------------------------
4080
+ // Screen and stage. References: Kathryn Kalinak, "Settling the Score"
4081
+ // (1992) for the classical Hollywood model (leitmotif, mickey-mousing,
4082
+ // the stinger); Karen Collins, "Game Sound" (2008) for loop-based and
4083
+ // adaptive scoring; Ethan Mordden, "Anything Goes: A History of American
4084
+ // Musical Theatre" (2013) for the 32-bar AABA show tune.
4085
+
4086
+ const SCREEN_LEAVES: readonly StyleCard[] = Object.freeze([
4087
+ card({
4088
+ id: "golden-age-score",
4089
+ summary:
4090
+ "the late-romantic studio orchestra: leitmotif themes over lush divided strings, chromatic-mediant shifts for scene changes, horn calls and V-I cadences that close each cue",
4091
+ meter: {
4092
+ signatures: [
4093
+ ["4/4", 0.7],
4094
+ ["3/4", 0.3],
4095
+ ],
4096
+ },
4097
+ tempo: { bpm: [60, 120], typical: 84 },
4098
+ pitch: {
4099
+ scales: [
4100
+ ["major", 0.5],
4101
+ ["minor", 0.3],
4102
+ ["lydian", 0.2],
4103
+ ],
4104
+ },
4105
+ harmony: {
4106
+ model: "functional",
4107
+ presets: [
4108
+ ["canon", 0.4],
4109
+ ["turnaround", 0.3],
4110
+ ["axis", 0.3],
4111
+ ],
4112
+ // The chromatic-mediant scene change: I to bVI and back through V.
4113
+ forms: [[["I", "bVI", "IV", "V"], 1]],
4114
+ sources: { presets: 2, forms: 1 },
4115
+ sevenths: 0.4,
4116
+ cadences: [
4117
+ ["V-I", 0.7],
4118
+ ["half", 0.3],
4119
+ ],
4120
+ },
4121
+ melody: {
4122
+ intervals: intervals(4, 2, 1.4, 0.4),
4123
+ chordToneRate: 0.65,
4124
+ contour: [["arch", 1]],
4125
+ },
4126
+ bass: {
4127
+ behaviour: [
4128
+ ["root", 0.6],
4129
+ ["root-fifth", 0.4],
4130
+ ],
4131
+ },
4132
+ rhythm: { onsets: { kick: grid("x...............") } },
4133
+ texture: {
4134
+ roles: {
4135
+ kick: maybe("timpani"),
4136
+ snare: null,
4137
+ chords: role("strings", "harp:0.4"),
4138
+ pad: maybe("strings", "horn:0.4"),
4139
+ bass: role("contrabass", "cello:0.5"),
4140
+ lead: role("violins", "frenchhorn:0.5", "trumpet:0.3"),
4141
+ },
4142
+ },
4143
+ expression: { dynamics: [0.3, 0.95] },
4144
+ mix: { space: 0.7 },
4145
+ }),
4146
+ card({
4147
+ id: "modern-orchestral-score",
4148
+ summary:
4149
+ "the thematic blockbuster score: a heroic theme with rising fourths and fifths, brass on lydian I-II color, a string ostinato driving the action under it",
4150
+ tempo: { bpm: [72, 120], typical: 96 },
4151
+ pitch: {
4152
+ scales: [
4153
+ ["lydian", 0.4],
4154
+ ["major", 0.3],
4155
+ ["minor", 0.3],
4156
+ ],
4157
+ },
4158
+ harmony: {
4159
+ presets: [
4160
+ ["axis", 0.4],
4161
+ ["aeolian", 0.3],
4162
+ ["mixolydian-rock", 0.3],
4163
+ ],
4164
+ },
4165
+ melody: {
4166
+ intervals: intervals(2, 1.5, 2.5, 0.3, 1.3),
4167
+ chordToneRate: 0.7,
4168
+ contour: [
4169
+ ["ascending", 0.5],
4170
+ ["arch", 0.5],
4171
+ ],
4172
+ },
4173
+ rhythm: {
4174
+ onsets: {
4175
+ kick: grid("x.....x.x......."),
4176
+ snare: grid("....x.......x..."),
4177
+ },
4178
+ },
4179
+ texture: {
4180
+ roles: {
4181
+ kick: role("timpani"),
4182
+ snare: maybe("drums"),
4183
+ chords: role("strings", "horn:0.4"),
4184
+ bass: role("contrabasses", "tuba:0.4"),
4185
+ lead: role("frenchhorn", "trumpet:0.5", "violins:0.4"),
4186
+ counter: maybe("trombone", "cellos:0.5"),
4187
+ },
4188
+ },
4189
+ expression: { dynamics: [0.4, 1] },
4190
+ mix: { space: 0.65 },
4191
+ }),
4192
+ card({
4193
+ id: "hybrid-trailer",
4194
+ summary:
4195
+ "the trailer build: a pulsing low-string ostinato on one pedal, synth rises and braams, i-VI-III-VII under a three-act crescendo to a final hit",
4196
+ tempo: { bpm: [90, 140], typical: 120 },
4197
+ pitch: {
4198
+ scales: [
4199
+ ["minor", 0.7],
4200
+ ["phrygian", 0.3],
4201
+ ],
4202
+ },
4203
+ harmony: {
4204
+ presets: [
4205
+ ["aeolian", 0.6],
4206
+ ["andalusian", 0.4],
4207
+ ],
4208
+ rhythm: [[1, 1]],
4209
+ },
4210
+ melody: {
4211
+ density: [0.5, 1.5],
4212
+ chordToneRate: 0.8,
4213
+ contour: [["ascending", 1]],
4214
+ },
4215
+ bass: {
4216
+ behaviour: [
4217
+ ["pedal", 0.6],
4218
+ ["ostinato", 0.4],
4219
+ ],
4220
+ range: [28, 43],
4221
+ },
4222
+ rhythm: {
4223
+ onsets: {
4224
+ kick: grid("x..x..x...x..x.."),
4225
+ snare: grid("....x.......x..."),
4226
+ },
4227
+ },
4228
+ texture: {
4229
+ roles: {
4230
+ ...kitRoles("syn909", ["kick"]),
4231
+ snare: role("timpani"),
4232
+ arp: role("strings", "saw:0.5"),
4233
+ chords: role("strings", "choir:0.4"),
4234
+ pad: role("swarm", "choir:0.5"),
4235
+ bass: role("saw", "contrabasses:0.5"),
4236
+ lead: role("trombone", "frenchhorn:0.5", "choir:0.4"),
4237
+ },
4238
+ },
4239
+ expression: { dynamics: [0.3, 1] },
4240
+ form: {
4241
+ plans: [[["intro", "build", "chorus", "build", "chorus", "outro"], 1]],
4242
+ archetype: "three-act build",
4243
+ energy: { intro: 0.3, build: 0.7, chorus: 1 },
4244
+ },
4245
+ mix: { fx: { kick: { distort: "crunch" } }, space: 0.6, loudness: "loud" },
4246
+ }),
4247
+ card({
4248
+ id: "synth-score",
4249
+ summary:
4250
+ "the analogue synth score: a sequenced eighth-note ostinato on a minor pedal, slow string-machine pads, a sparse square-wave theme, drum-machine pulse",
4251
+ tempo: { bpm: [80, 130], typical: 104 },
4252
+ pitch: {
4253
+ scales: [
4254
+ ["minor", 0.5],
4255
+ ["dorian", 0.3],
4256
+ ["phrygian", 0.2],
4257
+ ],
4258
+ },
4259
+ harmony: {
4260
+ model: "modal",
4261
+ rhythm: [
4262
+ [1, 0.5],
4263
+ [2, 0.5],
4264
+ ],
4265
+ },
4266
+ melody: { density: [0.5, 1.5], repetition: 0.6, chordToneRate: 0.7 },
4267
+ bass: { behaviour: [["ostinato", 1]], onsets: grid("x.x.x.x.x.x.x.x.") },
4268
+ rhythm: {
4269
+ onsets: {
4270
+ kick: grid("x.......x......."),
4271
+ snare: grid("....x.......x..."),
4272
+ arp: grid("x.x.x.x.x.x.x.x."),
4273
+ },
4274
+ },
4275
+ texture: {
4276
+ roles: {
4277
+ ...kitRoles("syn808", ["kick", "snare"]),
4278
+ arp: role("saw", "square:0.5"),
4279
+ chords: null,
4280
+ pad: role("strings", "saw:0.5"),
4281
+ bass: role("saw", "square:0.5"),
4282
+ lead: role("square", "triangle:0.5"),
4283
+ },
4284
+ },
4285
+ mix: { fx: { pad: { chorus: "wide" } }, space: 0.55 },
4286
+ }),
4287
+ card({
4288
+ id: "western-score",
4289
+ summary:
4290
+ "the spaghetti-western palette: a whistled or twangy electric theme in minor, open-fifth guitar strums, the andalusian descent, a galloping hoof rhythm",
4291
+ meter: {
4292
+ signatures: [
4293
+ ["4/4", 0.6],
4294
+ ["2/4", 0.4],
4295
+ ],
4296
+ },
4297
+ tempo: { bpm: [80, 140], typical: 112 },
4298
+ pitch: {
4299
+ scales: [
4300
+ ["minor", 0.6],
4301
+ ["dorian", 0.4],
4302
+ ],
4303
+ },
4304
+ harmony: {
4305
+ model: "functional",
4306
+ presets: [
4307
+ ["andalusian", 0.6],
4308
+ ["aeolian", 0.4],
4309
+ ],
4310
+ cadences: [["V-i", 1]],
4311
+ },
4312
+ melody: {
4313
+ intervals: intervals(2, 1.5, 2.5, 0.6),
4314
+ chordToneRate: 0.7,
4315
+ repetition: 0.5,
4316
+ },
4317
+ bass: { behaviour: [["root-fifth", 1]] },
4318
+ rhythm: {
4319
+ onsets: {
4320
+ kick: grid("x.....x.x.....x."),
4321
+ snare: grid("....x.......x..."),
4322
+ },
4323
+ },
4324
+ texture: {
4325
+ roles: {
4326
+ kick: role("drums"),
4327
+ snare: maybe("drums"),
4328
+ chords: role("nylon", "steel:0.5"),
4329
+ pad: maybe("choir"),
4330
+ bass: role("bassguitar", "contrabass:0.5"),
4331
+ lead: role("whistle", "electric:0.5", "trumpet:0.4"),
4332
+ },
4333
+ },
4334
+ mix: { fx: { lead: { tremolo: "gentle" } }, space: 0.75 },
4335
+ }),
4336
+ card({
4337
+ id: "horror-score",
4338
+ summary:
4339
+ "suspense scoring: a tritone pedal, chromatic cluster stabs, the stinger after silence, high tremolo strings and a semitone-neighbour motif that never resolves",
4340
+ tempo: { bpm: [50, 110], typical: 72 },
4341
+ pitch: {
4342
+ scales: [
4343
+ ["locrian", 0.4],
4344
+ ["phrygian", 0.3],
4345
+ ["messiaen-2", 0.3],
4346
+ ],
4347
+ },
4348
+ harmony: { model: "drone", rhythm: [[2, 1]] },
4349
+ melody: {
4350
+ intervals: intervals(4, 0.5, 1, 1),
4351
+ density: [0.5, 1.5],
4352
+ repetition: 0.7,
4353
+ chordToneRate: 0.3,
4354
+ ambitus: [3, 8],
4355
+ },
4356
+ bass: { behaviour: [["pedal", 1]], range: [28, 40] },
4357
+ rhythm: { onsets: { kick: grid("x...............") } },
4358
+ texture: {
4359
+ roles: {
4360
+ kick: maybe("timpani"),
4361
+ snare: null,
4362
+ chords: role("tremolo", "strings:0.5"),
4363
+ pad: role("cloud", "choir:0.4"),
4364
+ bass: role("contrabasses", "cellos:0.5"),
4365
+ lead: role("violins", "prepared:0.5", "musicbox:0.4"),
4366
+ },
4367
+ },
4368
+ expression: { dynamics: [0.05, 1] },
4369
+ mix: { space: 0.8 },
4370
+ }),
4371
+ card({
4372
+ id: "ambient-score",
4373
+ summary:
4374
+ "the minimal prestige score: a held pedal under slow modal chords, a two-note felt-piano cell repeated with space, cello sustains, swells instead of themes",
4375
+ tempo: { bpm: [50, 84], typical: 66 },
4376
+ pitch: {
4377
+ scales: [
4378
+ ["dorian", 0.4],
4379
+ ["minor", 0.3],
4380
+ ["lydian", 0.3],
4381
+ ],
4382
+ },
4383
+ harmony: {
4384
+ model: "modal",
4385
+ rhythm: [
4386
+ [2, 0.6],
4387
+ [4, 0.4],
4388
+ ],
4389
+ },
4390
+ melody: {
4391
+ density: [0.5, 1],
4392
+ repetition: 0.8,
4393
+ chordToneRate: 0.8,
4394
+ intervals: STEPWISE,
4395
+ },
4396
+ bass: { behaviour: [["pedal", 1]] },
4397
+ rhythm: { onsets: { kick: grid("x...............") } },
4398
+ texture: {
4399
+ roles: {
4400
+ kick: null,
4401
+ snare: null,
4402
+ chords: role("felt", "strings:0.4"),
4403
+ pad: role("cloud", "strings:0.5"),
4404
+ bass: role("cello", "contrabass:0.5"),
4405
+ lead: role("felt", "cello:0.5"),
4406
+ },
4407
+ },
4408
+ expression: { dynamics: [0.15, 0.6] },
4409
+ mix: { fx: { pad: { swell: "slow" } }, space: 0.85, loudness: "ambient" },
4410
+ }),
4411
+ card({
4412
+ id: "library-music",
4413
+ summary:
4414
+ "production music built to edit: steady tempo, four- and eight-bar blocks that can be cut anywhere, a clean I-V-vi-IV bed and a short ident hook",
4415
+ meter: { signatures: [["4/4", 1]] },
4416
+ tempo: { bpm: [104, 128], typical: 118 },
4417
+ groove: { humanize: { timingMs: 4, velocity: 0.06 } },
4418
+ pitch: {
4419
+ scales: [
4420
+ ["major", 0.8],
4421
+ ["mixolydian", 0.2],
4422
+ ],
4423
+ },
4424
+ harmony: {
4425
+ model: "functional",
4426
+ presets: [
4427
+ ["axis", 0.5],
4428
+ ["fifties", 0.3],
4429
+ ["mixolydian-rock", 0.2],
4430
+ ],
4431
+ rhythm: [[1, 1]],
4432
+ },
4433
+ melody: { repetition: 0.8, chordToneRate: 0.75, density: [1, 2] },
4434
+ bass: {
4435
+ behaviour: [
4436
+ ["root", 0.6],
4437
+ ["root-fifth", 0.4],
4438
+ ],
4439
+ },
4440
+ rhythm: {
4441
+ onsets: {
4442
+ kick: grid("x.......x......."),
4443
+ snare: grid("....x.......x..."),
4444
+ hat: grid("x.x.x.x.x.x.x.x."),
4445
+ shaker: grid("xxxxxxxxxxxxxxxx"),
4446
+ clap: grid("....x.......x..."),
4447
+ },
4448
+ },
4449
+ texture: {
4450
+ roles: {
4451
+ ...kitRoles("acoustic", ["kick", "snare", "hat", "shaker"], ["clap"]),
4452
+ chords: role("steel", "piano:0.3"),
4453
+ bass: role("bassguitar"),
4454
+ lead: role("glockenspiel", "whistle:0.4", "xylophone:0.3"),
4455
+ },
4456
+ },
4457
+ form: {
4458
+ plans: [[["intro", "verse", "chorus", "verse", "chorus", "outro"], 1]],
4459
+ archetype: "edit blocks",
4460
+ },
4461
+ mix: { space: 0.35 },
4462
+ }),
4463
+ card({
4464
+ id: "incidental",
4465
+ summary:
4466
+ "underscore and cue: short phrases that sit under dialogue, a sustained bed with a motif that enters and exits, half cadences that leave the scene open",
4467
+ tempo: { bpm: [60, 110], typical: 84 },
4468
+ pitch: {
4469
+ scales: [
4470
+ ["major", 0.4],
4471
+ ["minor", 0.4],
4472
+ ["dorian", 0.2],
4473
+ ],
4474
+ },
4475
+ harmony: {
4476
+ model: "functional",
4477
+ presets: [
4478
+ ["sad-pop", 0.4],
4479
+ ["axis", 0.3],
4480
+ ["aeolian", 0.3],
4481
+ ],
4482
+ cadences: [
4483
+ ["half", 0.7],
4484
+ ["IV-I", 0.3],
4485
+ ],
4486
+ },
4487
+ melody: { density: [0.5, 1.5], chordToneRate: 0.7, range: [55, 79] },
4488
+ rhythm: { onsets: { kick: grid("x...............") } },
4489
+ texture: {
4490
+ roles: {
4491
+ kick: null,
4492
+ snare: null,
4493
+ chords: role("strings", "piano:0.5"),
4494
+ bass: role("cello", "contrabass:0.5"),
4495
+ lead: role("clarinet", "oboe:0.5", "piano:0.4"),
4496
+ },
4497
+ },
4498
+ expression: { dynamics: [0.15, 0.6] },
4499
+ mix: { space: 0.6 },
4500
+ }),
4501
+ card({
4502
+ id: "sound-design",
4503
+ summary:
4504
+ "designed sound rather than music: risers, impacts and whooshes built from noise and granular clouds, a sub hit on the cut, no tune",
4505
+ tempo: { bpm: [60, 120], typical: 90 },
4506
+ pitch: {
4507
+ scales: [
4508
+ ["phrygian", 0.5],
4509
+ ["locrian", 0.5],
4510
+ ],
4511
+ },
4512
+ harmony: { model: "drone", rhythm: [[4, 1]] },
4513
+ melody: {
4514
+ density: [0.5, 1],
4515
+ contour: [
4516
+ ["ascending", 0.6],
4517
+ ["descending", 0.4],
4518
+ ],
4519
+ chordToneRate: 0.4,
4520
+ intervals: ANGULAR,
4521
+ },
4522
+ bass: { behaviour: [["pedal", 1]], range: [24, 36] },
4523
+ rhythm: { onsets: { kick: grid("x...........x...") } },
4524
+ texture: {
4525
+ roles: {
4526
+ ...kitRoles("syn808", ["kick"]),
4527
+ snare: null,
4528
+ chords: null,
4529
+ pad: role("swarm", "granular:0.6"),
4530
+ drone: role("cloud", "grains:0.5"),
4531
+ bass: role("saw", "triangle:0.5"),
4532
+ lead: role("granular", "swarm:0.5", "gong:0.4"),
4533
+ },
4534
+ },
4535
+ mix: { fx: { lead: { autofilter: "hpf-rise" } }, space: 0.7 },
4536
+ }),
4537
+ card({
4538
+ id: "musical-theatre-golden",
4539
+ summary:
4540
+ "the golden-age show tune: 32-bar AABA refrain with a verse, I-vi-ii-V turnarounds, a pit orchestra with brass punctuation, the bridge modulating up",
4541
+ meter: {
4542
+ signatures: [
4543
+ ["4/4", 0.7],
4544
+ ["3/4", 0.3],
4545
+ ],
4546
+ },
4547
+ tempo: { bpm: [90, 160], typical: 120 },
4548
+ groove: { swingRatio: [1, 1.5] },
4549
+ pitch: { scales: [["major", 1]] },
4550
+ harmony: {
4551
+ model: "functional",
4552
+ presets: [
4553
+ ["turnaround", 0.5],
4554
+ ["fifties", 0.3],
4555
+ ["ii-v-i", 0.2],
4556
+ ],
4557
+ sevenths: 0.6,
4558
+ cadences: [
4559
+ ["V-I", 0.6],
4560
+ ["ii-V-I", 0.4],
4561
+ ],
4562
+ },
4563
+ melody: {
4564
+ intervals: intervals(4, 2, 1, 0.6),
4565
+ chordToneRate: 0.7,
4566
+ repetition: 0.6,
4567
+ },
4568
+ bass: {
4569
+ behaviour: [
4570
+ ["root-fifth", 0.7],
4571
+ ["walking", 0.3],
4572
+ ],
4573
+ },
4574
+ rhythm: {
4575
+ onsets: {
4576
+ kick: grid("x.......x......."),
4577
+ snare: grid("....x.......x..."),
4578
+ },
4579
+ },
4580
+ texture: {
4581
+ roles: {
4582
+ kick: role("drums"),
4583
+ snare: role("drums"),
4584
+ chords: role("piano", "strings:0.5"),
4585
+ counter: maybe("trumpet", "trombone:0.5", "clarinet:0.4"),
4586
+ bass: role("upright", "tuba:0.3"),
4587
+ lead: role("vocal", "violins:0.4"),
4588
+ },
4589
+ },
4590
+ form: {
4591
+ plans: [
4592
+ [
4593
+ ["intro", "verse", "chorus", "chorus", "bridge", "chorus", "outro"],
4594
+ 1,
4595
+ ],
4596
+ ],
4597
+ archetype: "aaba",
4598
+ },
4599
+ mix: { space: 0.5 },
4600
+ }),
4601
+ card({
4602
+ id: "contemporary-musical",
4603
+ summary:
4604
+ "the pop and rock musical: verse-chorus songs with a key change for the eleven-o'clock number, rhythm section plus strings, belt range in the lead",
4605
+ meter: { signatures: [["4/4", 1]] },
4606
+ tempo: { bpm: [66, 132], typical: 92 },
4607
+ pitch: {
4608
+ scales: [
4609
+ ["major", 0.6],
4610
+ ["minor", 0.4],
4611
+ ],
4612
+ },
4613
+ harmony: {
4614
+ model: "functional",
4615
+ presets: [
4616
+ ["axis", 0.4],
4617
+ ["sad-pop", 0.3],
4618
+ ["canon", 0.3],
4619
+ ],
4620
+ },
4621
+ melody: {
4622
+ chordToneRate: 0.65,
4623
+ contour: [
4624
+ ["ascending", 0.5],
4625
+ ["arch", 0.5],
4626
+ ],
4627
+ range: [57, 81],
4628
+ },
4629
+ bass: {
4630
+ behaviour: [
4631
+ ["root", 0.6],
4632
+ ["root-fifth", 0.4],
4633
+ ],
4634
+ },
4635
+ rhythm: {
4636
+ onsets: {
4637
+ kick: grid("x.......x.x....."),
4638
+ snare: grid("....x.......x..."),
4639
+ hat: grid("x.x.x.x.x.x.x.x."),
4640
+ },
4641
+ },
4642
+ texture: {
4643
+ roles: {
4644
+ ...kitRoles("acoustic", ["kick", "snare", "hat"]),
4645
+ chords: role("piano", "strings:0.5"),
4646
+ pad: maybe("strings"),
4647
+ bass: role("bassguitar"),
4648
+ lead: role("vocal"),
4649
+ },
4650
+ },
4651
+ form: {
4652
+ plans: [
4653
+ [
4654
+ [
4655
+ "intro",
4656
+ "verse",
4657
+ "chorus",
4658
+ "verse",
4659
+ "chorus",
4660
+ "bridge",
4661
+ "chorus",
4662
+ "outro",
4663
+ ],
4664
+ 1,
4665
+ ],
4666
+ ],
4667
+ },
4668
+ mix: { space: 0.45 },
4669
+ }),
4670
+ card({
4671
+ id: "cabaret",
4672
+ summary:
4673
+ "Weimar cabaret: a sardonic minor-key song over an oom-pah piano, chromatic passing chords and added sixths, a muted trumpet and clarinet commentary",
4674
+ meter: {
4675
+ signatures: [
4676
+ ["4/4", 0.6],
4677
+ ["3/4", 0.4],
4678
+ ],
4679
+ },
4680
+ tempo: { bpm: [80, 140], typical: 108 },
4681
+ pitch: {
4682
+ scales: [
4683
+ ["minor", 0.5],
4684
+ ["harmonic-minor", 0.5],
4685
+ ],
4686
+ },
4687
+ harmony: {
4688
+ model: "functional",
4689
+ presets: [
4690
+ ["minor-ii-v", 0.5],
4691
+ ["andalusian", 0.5],
4692
+ ],
4693
+ sevenths: 0.6,
4694
+ cadences: [["V-i", 1]],
4695
+ },
4696
+ melody: { intervals: intervals(3, 2, 1.2, 0.8), chordToneRate: 0.6 },
4697
+ bass: { behaviour: [["root-fifth", 1]] },
4698
+ rhythm: { onsets: { chords: grid("....x.......x...") } },
4699
+ texture: {
4700
+ roles: {
4701
+ kick: null,
4702
+ snare: null,
4703
+ chords: role("honkytonk", "piano:0.6"),
4704
+ counter: maybe("clarinet", "trumpet:0.5"),
4705
+ bass: role("tuba", "upright:0.5"),
4706
+ lead: role("vocal", "violin:0.4"),
4707
+ },
4708
+ },
4709
+ expression: { dynamics: [0.3, 0.85] },
4710
+ mix: { space: 0.3 },
4711
+ }),
4712
+ card({
4713
+ id: "vaudeville",
4714
+ summary:
4715
+ "the variety stage: a bright two-beat in major, ragtime syncopation in the melody, oom-pah tuba and banjo, stop-time breaks for the act",
4716
+ meter: {
4717
+ signatures: [
4718
+ ["2/4", 0.5],
4719
+ ["4/4", 0.5],
4720
+ ],
4721
+ },
4722
+ tempo: { bpm: [100, 170], typical: 132 },
4723
+ groove: { humanize: { timingMs: 8, velocity: 0.1 } },
4724
+ pitch: { scales: [["major", 1]] },
4725
+ harmony: {
4726
+ model: "functional",
4727
+ presets: [
4728
+ ["turnaround", 0.6],
4729
+ ["fifties", 0.4],
4730
+ ],
4731
+ sevenths: 0.5,
4732
+ cadences: [["V-I", 1]],
4733
+ },
4734
+ melody: {
4735
+ intervals: intervals(3, 2.5, 1, 0.8),
4736
+ chordToneRate: 0.65,
4737
+ repetition: 0.6,
4738
+ },
4739
+ bass: { behaviour: [["root-fifth", 1]] },
4740
+ rhythm: {
4741
+ onsets: {
4742
+ kick: grid("x.......x......."),
4743
+ snare: grid("....x.......x..."),
4744
+ },
4745
+ },
4746
+ texture: {
4747
+ roles: {
4748
+ kick: role("drums"),
4749
+ snare: maybe("drums"),
4750
+ chords: role("banjo", "honkytonk:0.6"),
4751
+ counter: maybe("trombone", "clarinet:0.5"),
4752
+ bass: role("tuba"),
4753
+ lead: role("cornet", "clarinet:0.5", "vocal:0.4"),
4754
+ },
4755
+ },
4756
+ mix: { space: 0.25 },
4757
+ }),
4758
+ card({
4759
+ id: "ballet-score",
4760
+ summary:
4761
+ "music for dance: square eight-bar phrases a dancer can count, waltz and march numbers, a celesta or harp solo variation, the grand pas building to a coda",
4762
+ meter: {
4763
+ signatures: [
4764
+ ["3/4", 0.5],
4765
+ ["4/4", 0.3],
4766
+ ["2/4", 0.2],
4767
+ ],
4768
+ },
4769
+ tempo: { bpm: [72, 150], typical: 112 },
4770
+ pitch: {
4771
+ scales: [
4772
+ ["major", 0.6],
4773
+ ["minor", 0.4],
4774
+ ],
4775
+ },
4776
+ harmony: {
4777
+ model: "functional",
4778
+ presets: [
4779
+ ["canon", 0.4],
4780
+ ["turnaround", 0.3],
4781
+ ["axis", 0.3],
4782
+ ],
4783
+ cadences: [
4784
+ ["V-I", 0.7],
4785
+ ["half", 0.3],
4786
+ ],
4787
+ },
4788
+ melody: {
4789
+ intervals: intervals(4, 2, 1.2, 0.4),
4790
+ chordToneRate: 0.7,
4791
+ repetition: 0.55,
4792
+ },
4793
+ bass: {
4794
+ behaviour: [
4795
+ ["root", 0.5],
4796
+ ["root-fifth", 0.5],
4797
+ ],
4798
+ },
4799
+ rhythm: { onsets: { kick: grid("x...............") } },
4800
+ texture: {
4801
+ roles: {
4802
+ kick: maybe("timpani"),
4803
+ snare: null,
4804
+ chords: role("strings", "harp:0.5"),
4805
+ bass: role("contrabass", "cellos:0.5"),
4806
+ lead: role("violins", "celeste:0.4", "oboe:0.4", "flute:0.4"),
4807
+ },
4808
+ },
4809
+ expression: { dynamics: [0.3, 0.9] },
4810
+ mix: { space: 0.65 },
4811
+ }),
4812
+ card({
4813
+ id: "orchestral-game",
4814
+ summary:
4815
+ "the adaptive game score: loopable sections that layer up with the action (stems in, stems out), an ostinato bed under a heroic theme, seamless loop points",
4816
+ tempo: { bpm: [110, 160], typical: 132 },
4817
+ pitch: {
4818
+ scales: [
4819
+ ["minor", 0.4],
4820
+ ["dorian", 0.3],
4821
+ ["lydian", 0.3],
4822
+ ],
4823
+ },
4824
+ harmony: {
4825
+ presets: [
4826
+ ["aeolian", 0.4],
4827
+ ["axis", 0.3],
4828
+ ["dorian-vamp", 0.3],
4829
+ ],
4830
+ },
4831
+ melody: { chordToneRate: 0.7, repetition: 0.6 },
4832
+ rhythm: {
4833
+ onsets: {
4834
+ kick: grid("x.....x.x......."),
4835
+ snare: grid("....x.......x..."),
4836
+ },
4837
+ },
4838
+ texture: {
4839
+ roles: {
4840
+ kick: role("timpani"),
4841
+ snare: maybe("drums"),
4842
+ arp: role("strings", "harp:0.3"),
4843
+ chords: role("strings", "choir:0.4"),
4844
+ bass: role("contrabasses", "trombone:0.4"),
4845
+ lead: role("frenchhorn", "violins:0.5", "flute:0.4"),
4846
+ },
4847
+ },
4848
+ form: {
4849
+ plans: [[["intro", "verse", "chorus", "verse", "chorus"], 1]],
4850
+ archetype: "loop",
4851
+ },
4852
+ mix: { space: 0.6 },
4853
+ }),
4854
+ card({
4855
+ id: "jrpg",
4856
+ summary:
4857
+ "the console RPG: a fast battle theme on a driving eighth-note bass ostinato, the vi-IV-I-V loop and aeolian i-VI-III-VII, a soaring lead over sixteenth-note arpeggios",
4858
+ meter: { signatures: [["4/4", 1]] },
4859
+ tempo: { bpm: [110, 170], typical: 144 },
4860
+ groove: { humanize: { timingMs: 3, velocity: 0.06 } },
4861
+ pitch: {
4862
+ scales: [
4863
+ ["minor", 0.5],
4864
+ ["major", 0.3],
4865
+ ["harmonic-minor", 0.2],
4866
+ ],
4867
+ },
4868
+ harmony: {
4869
+ model: "functional",
4870
+ presets: [
4871
+ ["sad-pop", 0.4],
4872
+ ["aeolian", 0.3],
4873
+ ["canon", 0.3],
4874
+ ],
4875
+ sevenths: 0.4,
4876
+ rhythm: [[1, 1]],
4877
+ },
4878
+ melody: {
4879
+ density: [2, 4],
4880
+ chordToneRate: 0.65,
4881
+ contour: [
4882
+ ["arch", 0.5],
4883
+ ["ascending", 0.5],
4884
+ ],
4885
+ },
4886
+ bass: {
4887
+ behaviour: [
4888
+ ["ostinato", 0.6],
4889
+ ["octave", 0.4],
4890
+ ],
4891
+ onsets: grid("x.x.x.x.x.x.x.x."),
4892
+ },
4893
+ rhythm: {
4894
+ onsets: {
4895
+ kick: grid("x.....x.x......."),
4896
+ snare: grid("....x.......x..."),
4897
+ hat: grid("x.x.x.x.x.x.x.x."),
4898
+ arp: grid("xxxxxxxxxxxxxxxx"),
4899
+ },
4900
+ },
4901
+ texture: {
4902
+ roles: {
4903
+ ...kitRoles("acoustic", ["kick", "snare", "hat"]),
4904
+ arp: role("piano", "harp:0.5", "square:0.4"),
4905
+ chords: role("strings"),
4906
+ bass: role("bassguitar", "square:0.4"),
4907
+ lead: role("violins", "square:0.5", "electric@lead:0.4"),
4908
+ },
4909
+ },
4910
+ mix: { space: 0.45 },
4911
+ }),
4912
+ card({
4913
+ id: "anime-score",
4914
+ summary:
4915
+ "the anime opening and score: royal-road changes (IV-V-iii-vi), fast verses into a soaring chorus a fourth up, piano and strings over a busy kit",
4916
+ meter: { signatures: [["4/4", 1]] },
4917
+ tempo: { bpm: [120, 180], typical: 150 },
4918
+ pitch: { scales: [["major", 1]] },
4919
+ harmony: {
4920
+ model: "functional",
4921
+ presets: [
4922
+ ["sad-pop", 0.4],
4923
+ ["canon", 0.3],
4924
+ ["axis", 0.3],
4925
+ ],
4926
+ // The royal road (oudou shinkou): IV-V-iii-vi.
4927
+ forms: [[["IV", "V", "iii", "vi"], 1]],
4928
+ sources: { presets: 1, forms: 2 },
4929
+ sevenths: 0.5,
4930
+ rhythm: [[1, 1]],
4931
+ },
4932
+ melody: {
4933
+ density: [2, 4],
4934
+ chordToneRate: 0.6,
4935
+ range: [60, 84],
4936
+ contour: [["ascending", 1]],
4937
+ },
4938
+ bass: {
4939
+ behaviour: [
4940
+ ["octave", 0.6],
4941
+ ["root", 0.4],
4942
+ ],
4943
+ },
4944
+ rhythm: {
4945
+ onsets: {
4946
+ kick: grid("x.....x.x......."),
4947
+ snare: grid("....x.......x..."),
4948
+ hat: grid("x.x.x.x.x.x.x.x."),
4949
+ },
4950
+ },
4951
+ texture: {
4952
+ roles: {
4953
+ ...kitRoles("acoustic", ["kick", "snare", "hat"]),
4954
+ chords: role("piano", "electric@crunch:0.5"),
4955
+ pad: maybe("strings"),
4956
+ bass: role("bassguitar"),
4957
+ lead: role("vocal", "violins:0.4"),
4958
+ },
4959
+ },
4960
+ form: {
4961
+ plans: [
4962
+ [
4963
+ [
4964
+ "intro",
4965
+ "verse",
4966
+ "pre",
4967
+ "chorus",
4968
+ "verse",
4969
+ "pre",
4970
+ "chorus",
4971
+ "outro",
4972
+ ],
4973
+ 1,
4974
+ ],
4975
+ ],
4976
+ },
4977
+ mix: { space: 0.4 },
4978
+ }),
4979
+ ]);
4980
+
4981
+ // @@EXPORT
4982
+ export const ART_CARDS: readonly StyleCard[] = Object.freeze([
4983
+ ...BRANCH_CARDS,
4984
+ ...EARLY_LEAVES,
4985
+ ...BAROQUE_LEAVES,
4986
+ ...ROMANTIC_LEAVES,
4987
+ ...MODERN_LEAVES,
4988
+ ...CONTEMPORARY_LEAVES,
4989
+ ...EXPERIMENTAL_LEAVES,
4990
+ ...SCREEN_LEAVES,
4991
+ ...BAND_LEAVES,
4992
+ ...CHILDRENS_LEAVES,
4993
+ ]);