|
9 | 9 | :tags [:music :harmony :functional-programming :midi]}}} |
10 | 10 |
|
11 | 11 | (ns music.noon-introduction |
12 | | - (:require [noon.viz.piano-roll :as pr] |
13 | | - [noon.eval :refer [score]])) |
| 12 | + (:require [noon.viz.clay :as nclay])) |
14 | 13 |
|
15 | 14 | ;; ## What is Noon? |
16 | 15 | ;; |
|
168 | 167 |
|
169 | 168 | ;; *The four step types — chromatic, diatonic, structural, and tonic — each walking up from C4. |
170 | 169 | ;; Note how the same ascending pattern selects different notes depending on the layer. |
171 | | -;; Colors indicate each note's role: tonic (dark blue), structural (medium blue), diatonic (light blue), chromatic (grey).* |
172 | | - |
173 | | -^:kindly/hide-code |
174 | | -(pr/piano-roll-group |
175 | | - [{:label "chromatic — (tup c0 c1 c2 c3 c4 c5 c6)" |
176 | | - :score (score (tup c0 c1 c2 c3 c4 c5 c6))} |
177 | | - {:label "diatonic — (tup d0 d1 d2 d3 d4 d5 d6)" |
178 | | - :score (score (tup d0 d1 d2 d3 d4 d5 d6))} |
179 | | - {:label "structural — (tup s0 s1 s2 s3)" |
180 | | - :score (score (tup s0 s1 s2 s3))} |
181 | | - {:label "tonic — (tup t0 t1 t2)" |
182 | | - :score (score (tup t0 t1 t2))}]) |
| 170 | +;; Try editing the code and pressing Eval & Play!* |
| 171 | + |
| 172 | +;; chromatic — semitone by semitone: |
| 173 | +(nclay/editor "(score (tup c0 c1 c2 c3 c4 c5 c6))") |
| 174 | + |
| 175 | +;; diatonic — scale degree by degree: |
| 176 | +(nclay/editor "(score (tup d0 d1 d2 d3 d4 d5 d6))") |
| 177 | + |
| 178 | +;; structural — chord tone by chord tone: |
| 179 | +(nclay/editor "(score (tup s0 s1 s2 s3))") |
| 180 | + |
| 181 | +;; tonic — octave by octave: |
| 182 | +(nclay/editor "(score (tup t0 t1 t2))") |
183 | 183 |
|
184 | 184 | ;; The chromatic run gives you all 7 semitones. |
185 | 185 | ;; The diatonic run gives you the major scale. |
|
204 | 204 | ;; *Same diatonic steps, three different scales. The code is identical — only the scale context changes. |
205 | 205 | ;; Notice how the intervals between notes shift while the structure remains.* |
206 | 206 |
|
207 | | -^:kindly/hide-code |
208 | | -(pr/piano-roll-group |
209 | | - [{:label "major (default)" |
210 | | - :score (score dur:4 (lin d0 d1 d2 d3 d4 d5 d6 d7))} |
211 | | - {:label "dorian" |
212 | | - :score (score dur:4 (scale :dorian) (lin d0 d1 d2 d3 d4 d5 d6 d7))} |
213 | | - {:label "hungarian" |
214 | | - :score (score dur:4 (scale :hungarian) (lin d0 d1 d2 d3 d4 d5 d6 d7))}] |
215 | | - {:shared-pitch-range true}) |
| 207 | +;; major (default): |
| 208 | +(nclay/editor "(score dur:4 (lin d0 d1 d2 d3 d4 d5 d6 d7))") |
| 209 | + |
| 210 | +;; dorian: |
| 211 | +(nclay/editor "(score dur:4 (scale :dorian) (lin d0 d1 d2 d3 d4 d5 d6 d7))") |
| 212 | + |
| 213 | +;; hungarian: |
| 214 | +(nclay/editor "(score dur:4 (scale :hungarian) (lin d0 d1 d2 d3 d4 d5 d6 d7))") |
216 | 215 |
|
217 | 216 | ;; The same goes for structural steps: |
218 | 217 | ;; |
|
227 | 226 | ;; *Triad vs tetrad: the same structural steps produce C-E-G-C with a triad structure, |
228 | 227 | ;; but C-E-G-B when the structure is set to tetrad — the seventh appears automatically.* |
229 | 228 |
|
230 | | -^:kindly/hide-code |
231 | | -(pr/piano-roll-group |
232 | | - [{:label "triad (default) — (tup s0 s1 s2 s3)" |
233 | | - :score (score (tup s0 s1 s2 s3))} |
234 | | - {:label "tetrad — (structure :tetrad) (tup s0 s1 s2 s3)" |
235 | | - :score (score (structure :tetrad) (tup s0 s1 s2 s3))}] |
236 | | - {:shared-pitch-range true}) |
| 229 | +;; triad (default): |
| 230 | +(nclay/editor "(score (tup s0 s1 s2 s3))") |
| 231 | + |
| 232 | +;; tetrad: |
| 233 | +(nclay/editor "(score (structure :tetrad) (tup s0 s1 s2 s3))") |
237 | 234 |
|
238 | 235 | ;; ## Changing the Context |
239 | 236 | ;; |
|
264 | 261 | ;;``` |
265 | 262 |
|
266 | 263 | ;; *A I-IV-V-I chord progression, each chord arpeggiated. |
267 | | -;; Dashed lines mark where the harmonic context changes — the same arpeggio pattern adapts to each degree.* |
| 264 | +;; The same arpeggio pattern adapts to each degree. |
| 265 | +;; Try changing `(tup s0 s1 s2)` to `(tup s0 s1 s2 s3)` after switching to `(structure :tetrad)`!* |
268 | 266 |
|
269 | | -^:kindly/hide-code |
270 | | -(pr/piano-roll (score (lin I IV V I) (each (tup s0 s1 s2)))) |
| 267 | +(nclay/editor "(score (lin I IV V I) (each (tup s0 s1 s2)))") |
271 | 268 |
|
272 | 269 | ;; Here `I`, `IV`, `V` are degree changes — they shift the harmonic context |
273 | 270 | ;; so that structural steps target the chord tones of each degree. |
|
285 | 282 | ;; (each (tup d1 d1- d0))) |
286 | 283 | ;;``` |
287 | 284 |
|
288 | | -;; *Mixing layers: structural chord tones (medium blue) decorated with diatonic neighbor notes (light blue). |
| 285 | +;; *Mixing layers: structural chord tones decorated with diatonic neighbor notes. |
289 | 286 | ;; The structural steps define the skeleton; the diatonic steps fill in the passing tones.* |
290 | 287 |
|
291 | | -^:kindly/hide-code |
292 | | -(pr/piano-roll (score dur:2 (tup s0 s1 s2 s3) (each (tup d1 d1- d0)))) |
| 288 | +(nclay/editor "(score dur:2 (tup s0 s1 s2 s3) (each (tup d1 d1- d0)))") |
293 | 289 |
|
294 | 290 | ;; This creates a chord arpeggio (`s0 s1 s2 s3`) then decorates each chord tone |
295 | 291 | ;; with upper and lower neighbor scale notes (`d1 d1- d0`). |
|
308 | 304 | ;; *Harmonic minor progression: I-IV-VII-I with arpeggiated chords. |
309 | 305 | ;; Notice the characteristic G♯ (raised 7th degree) appearing in the VII chord.* |
310 | 306 |
|
311 | | -^:kindly/hide-code |
312 | | -(pr/piano-roll (score (scale :harmonic-minor) (lin I IV VII I) (each (tup s0 s1 s2)))) |
| 307 | +(nclay/editor "(score (scale :harmonic-minor) (lin I IV VII I) (each (tup s0 s1 s2)))") |
313 | 308 |
|
314 | 309 | ;; ## Why This Matters |
315 | 310 | ;; |
|
0 commit comments