note (scale "major"
$ cat [ cat $ walk 8 [3,2, 3,3, 5,5, 2,2, 2,2, 2,1]
, cat $ walk 11 [3,2, 2,2, 5,5, 2,2, 2,2, 2,3]
] )
using a helper function that builds a zig zag path
walk (8 :: Integer) [2,3,4,5]
-- ==> [8, 7,6, 7,8,9, 8,7,6,5, 6,7,8,9,10]
with possible implementation
walk x ws = scanl (+) x
$ concat $ zipWith replicate ws (cycle [-1, 1])
using functions https://hackage.haskell.org/package/base-4.21.0.0/docs/Data-List.html#v:scanl etc.
full code (it's not much longer) and rendered audio: https://git.imn.htwk-leipzig.de/waldmann/computer-mu/-/tree/master/tidal/code/ox?ref_type=heads
Next: any Baroque composer (Telemann, Handel, Corelli, ..) e.g., Sonatas for two recorders, by G. P. Telemann (1681โ1767) this looks highly formulaic (= Kolmogorov-compressible in a pattern language) but is highly enjoyable, and the master of it all - is J S Bach, of course.