diff options
| author | Jake Zerrer <him@jakezerrer.com> | 2025-11-26 15:10:20 -0500 |
|---|---|---|
| committer | Jake Zerrer <him@jakezerrer.com> | 2025-12-09 18:10:02 -0500 |
| commit | 02dce7d08f92b1d255e3afca33034f481d1371a7 (patch) | |
| tree | 18cebc9ab1ee73642ae1294b1c50173b977e29dc /src/unheard/dsl.clj | |
| parent | 34bdba657919a38d26f698024f37d649931ac368 (diff) | |
Diffstat (limited to 'src/unheard/dsl.clj')
| -rw-r--r-- | src/unheard/dsl.clj | 52 |
1 files changed, 13 insertions, 39 deletions
diff --git a/src/unheard/dsl.clj b/src/unheard/dsl.clj index e111725..d2bb286 100644 --- a/src/unheard/dsl.clj +++ b/src/unheard/dsl.clj @@ -3,59 +3,33 @@ [clojure.set :refer [union]])) (comment - ;; Parallel groups - ;; Notes 1, 2, and 3 simultaneously - ;; = should remind you of amb= - ;; implicit duration of 1 + ;; Parallel groups. Notes 1, 2, and 3 simultaneously = should remind you + ;; of amb= implicit duration of 1 [= 1 2 3] - ;; Compiles to? - - ;; Same as above, but with duration 3 + ;; Compiles to? Same as above, but with duration 3 ([= 1 2 3] 3) - ;; Notes 1, 2, and 3 all with different durations - [= - (1 2) - (2 3) - (3 4)] - - ;; Inner values override outer values - ;; In this chord, 1 would have a duration of 3 while 2 and 3 would have a duration of 2 + [= (1 2) (2 3) (3 4)] + ;; Inner values override outer values. In this chord, 1 would have a + ;; duration of 3 while 2 and 3 would have a duration of 2 ([= (1 3) 2 3] 2) - ;; Notes 1, 2, and 3 all with different durations and velocities - [= - (1 2 100) - (2 3 110) - (3 4 123)] - - ;; Sequential groups - ;; Note 1, then note 2, then note 3 + [= (1 2 100) (2 3 110) (3 4 123)] + ;; Sequential groups. Note 1, then note 2, then note 3 [1 2 3] - ;; Note 1 duration 1, then note 2 duration 2, then note 3 duration 1 - [(1 1) - (2 2) - (3 1)] - + [(1 1) (2 2) (3 1)] ;; Three chords played sequentially - [[= 1 2 3] - [= 1 2 3] - [= 1 2 3]] - -;; Note 1, followed by a rest, followed by note 3 + [[= 1 2 3] [= 1 2 3] [= 1 2 3]] + ;; Note 1, followed by a rest, followed by note 3 [1 (r) 3] - ;; Unlike notes, rests are at most 2-tuples ;; (Think about it: Rests never have a note value) - - ;; Assign the note sequence 1 2 3 to the name loop1 - ;; The first argument is always the name; the last argument is always either + ;; Assign the note sequence 1 2 3 to the name loop1. The first argument + ;; is always the name; the last argument is always either ;; a sequential or parallel group (=loop1 [1 2 3]) - ;; Use loop1 [1 (loop1) 2 3] - ;; Middle arguments are variable names (=loop2 dur ([1 2 3] dur))) |
