Posted March 28, 20186 yr Hi Everyone, I was just wondering what the easiest way would be to audition my score with a click track, something I've found to be helpful for slower scores with long note values/slurs. I'm guessing I should make a function for that using setf, any recommendations or best approaches? - Jor
March 28, 20186 yr I suggest you simply and an explicit track to your score with repeated note values, e.g., quarter notes (crotchets), perhaps like the following. (make-omn :length (gen-repeat 16 '(1/4))) In your MIDI setup you may assign this to a percussive instrument, if you prefer. Best, Torsten
March 29, 20186 yr This example illustrate how this could be done: (metronome :omn (metronome phrase-lh) :channel 16 :sound 'gm :program 'woodblock) Function: (defun metronome (sequence &key (pitch 'c4) (velocity 'ff)) (let* ((ts (get-time-signature sequence)) (len (loop for i in ts collect (gen-repeat (last1 i) (gen-repeat (car i) (list (/ 1 (second i))))))) (vel (loop for i in ts collect (append (list velocity) (gen-repeat (1- (car i)) (list 'mf)))))) (make-omn :length len :pitch (list pitch) :velocity vel))) (setf sequence '((-h.) (-e g3cs3 mp arp fs3b2 arp-down g3as2 arp-down gs3as2 arp) (-e - fs3c3 f fs3as2 g3cs3 a3as2 gs3c3 gs3cs3) (-q._q))) (metronome sequence) => ((q c4 ff mf c4) (e c4 ff mf c4 c4 c4) (q c4 ff mf c4 c4) (e c4 ff mf c4 c4 c4)) Score example: (setf phrase-rh '((h. cs3gs2as5cs5cs4as3gs3g3as4gs4g4 f arp) (-e g5d5g4 mp arp fs5ds5fs4 arp-down g5ds5g4 arp-down gs5e5gs4 arp) (-e - a5d5 f c6f5 d5b5 g5d5 gs5ds5 gs5e5) (-e h c6d5cs5g4cs4g3d3 p arp-down))) (setf phrase-lh '((-h.) (-e g3cs3 mp arp fs3b2 arp-down g3as2 arp-down gs3as2 arp) (-e - fs3c3 f fs3as2 g3cs3 a3as2 gs3c3 gs3cs3) (-q._q))) (setf ts (get-time-signature phrase-lh)) (def-score arpeggiation-chords-3 (:key-signature 'chromatic :time-signature ts :tempo 60 :layout (harp-grand-layout '(rh lh))) (metronome :omn (metronome phrase-lh) :channel 16 :sound 'gm :program 'woodblock) (rh :omn phrase-rh :channel 1 :sound 'gm :program 'orchestral-harp) (lh :omn phrase-lh) ) I will add the METRONOME function to the next release. JP
March 29, 20186 yr Wow, that is fancy :) Here is one that is even slightly more fancy, where the resulting softer velocity values also react to the velocity input, and also the pitch of easy beats is slightly different. (defun metronome (sequence &key (pitch 'c4) (velocity 90)) (let* ((ts (get-time-signature sequence)) (len (loop for i in ts collect (gen-repeat (car i) (list (/ 1 (second i)))))) (vel (loop for i in ts collect (append (get-velocity (list velocity) :type :symbol) (gen-repeat (1- (car i)) (get-velocity (list (- velocity 25)) :type :symbol))))) (pitch (loop for i in ts collect (cons pitch (pitch-transpose -2 (gen-repeat (1- (car i)) pitch)))))) (make-omn :length len :pitch pitch :velocity vel))) TA
March 29, 20186 yr I like the easy beats :-) This function works with omn-form sequence and time-signature-form sequence: (defun metronome (sequence &key (pitch 'c4) (velocity 0.8)) (do-verbose ("metronome") (let* ((get-ts (if (omn-formp sequence) (get-time-signature sequence) sequence)) (ts (loop for i in (lists! get-ts) collect (cons (if (listp (first i)) (apply #'+ (first i)) (first i)) (rest i)))) (len (assemble-seq (loop for i in ts collect (if (equal 1 (last1 i)) (gen-repeat (first i) (list (/ 1 (second i)))) (gen-repeat (last1 i) (list (gen-repeat (first i) (list (/ 1 (second i)))))))))) (vel (loop for i in len collect (cons velocity (gen-repeat (1- (length i)) (list (- velocity 0.15)))))) (pch (loop for i in len collect (cons pitch (pitch-transpose -2 (gen-repeat (1- (length i)) pitch)))))) (make-omn :length len :pitch pch :velocity vel))))
March 29, 20186 yr Author Yes! thanks so much, this is what I was looking for! I'm going to need a bit of time to figure out exactly what is happening in the function, but this seems like a very straightforward method. There are actually a couple of handy thing to learn from this example for me (didn't even know about get-time-signature yet, that's amazing!)
March 30, 20186 yr Example: (setf omn '((h. cs3gs2as5cs5cs4as3gs3g3as4gs4g4 f arp) (-e g5d5g4 mp arp fs5ds5fs4 arp-down g5ds5g4 arp-down gs5e5gs4 arp) (-e - a5d5 f c6f5 d5b5 g5d5 gs5ds5 gs5e5) (-e h c6d5cs5g4cs4g3d3 p arp-down))) With omn-form sequence: (metronome omn) => ((q c4 0.8 bb3 0.65 bb3) (e c4 0.8 bb3 0.65 bb3 bb3 bb3) (q c4 0.8 bb3 0.65 bb3 bb3) (e c4 0.8 bb3 0.65 bb3 bb3 bb3)) With time-signature-form sequence: (metronome '((3 4 1) (5 8 2) (4 4 1) (5 8 1))) => ((q c4 0.8 bb3 0.65 bb3) (e c4 0.8 bb3 0.65 bb3 bb3 bb3) (e c4 0.8 bb3 0.65 bb3 bb3 bb3) (q c4 0.8 bb3 0.65 bb3 bb3) (e c4 0.8 bb3 0.65 bb3 bb3 bb3))
July 26, 2024Jul 26 Hello, This post is old though i used ChatGPT to see metronome resources...without success. is it possible to generate a metronome track directly in an omn expression? Thanks for your help (setf 1-note (melodize (pitch-transpose-n '(7 7 7 7 12 10 7 7 12 10 8 8)(chordize (gen-divide 1 (gen-repeat 12 '(c4 ))))))) (setf solo (make-omn :pitch (rnd-unique '(1) 1-note :seed 4) :length (gen-loop 12 (euclidean-rhythm 16 3 14 's :type 2) :seed 4)))
Create an account or sign in to comment