Posted October 2, 2024Oct 2 Hello, I'm working with the code below, which works fine through the creation of Melody1 variable. However, when I create the "test" variable with make-omn with the pitches, lengths and dynamics, the pitches are no longer present. I also notice that the lengths are appearing in OMN form and fractional/ratio form when the test variable is evaluated. Any ideas what's happening? Thanks ;; Use a scale that blends consonance and dissonance (hexatonic blues scale for example) (setf scale '(c4 d4 eb4 e4 f4 g4 a4 ab4 b4 bb4)) ;; Create quirky, fragmented melodic patterns (setf premelody1 (gen-repeat 3 (gen-rnd-omn 3 16 1 3 scale 's nil))) (setf premelody2 (gen-repeat 2 (gen-rnd-omn 3 14 1 3 scale 's nil))) (setf premelody3 (gen-repeat 4 (gen-rnd-omn 3 8 1 3 scale 's nil))) (setf melody1algo (gen-eval 4 '(rnd-sample 16 premelody1))) (setf melody2algo (gen-eval 4 '(rnd-sample 16 premelody2))) (setf melody3algo (pitch-transpose -36 (gen-eval 4 '(rnd-sample 8 premelody3)))) (setf melody1 (length-rest-remove melody1algo)) (setf melody2 (length-rest-remove melody2algo)) (setf melody3 (length-rest-remove melody3algo)) ;; Define rhythmic patterns that have an offbeat and glitchy feel (setf rhythm1 (span melody1 '(s s e s s e q))) (setf rhythm2 (span melody2 '(e s s e s s q))) (setf rhythm3 (span melody3 '(s t s t e e q))) ;; Define dynamics for added variation (setf dynamics (span melody1 '(mf f pp mp))) (setf test (make-omn :pitch melody1 :length rhythm1 :velocity dynamics))
October 2, 2024Oct 2 melody1 is not a list of pitches but an omn form list. (make-omn :pitch (flatten (omn :pitch melody1)) :length (flatten rhythm1) :velocity (flatten dynamics))
Create an account or sign in to comment