I'm guessing this is a simple one but it has me stuck for almost an hour now.
I have two different velocity vectors:
(setf dynamic-rh (vector-to-velocity 0.55 0.62 (gen-white-noise 10 :seed 122) :type :midi)) (setf dynamic-lh (vector-to-velocity 0.33 0.41 (gen-white-noise 10 :seed 67) :type :midi)) Which I want to combine/merge and plot, I've tried all sorts of stuff like this:
(velocity-list-plot '(dynamic-lh dynamics-rh) :point-radius 2) (velocity-list-plot '((dynamic-lh) (dynamics-rh)) :point-radius 2) (velocity-list-plot (list(dynamic-lh dynamics-rh)) :point-radius 2) It's probably quite obvious, but I couldn't write Lisp to save my life..
Thank you in advance!
Hello, newbie question:
I'd like to take an omn list and simply repeat each measure 3 times. If I start with the following code:
(setf r-transitions1 '((e (e 1)(-e 3)) (-e (e 3)(-e 1)))) (setf marked (gen-markov-from-transitions r-transitions1 :size 120)) ;;conform to timesignature in omn format (setf r1 (length-span (gen-repeat 20 '8/8) marked :omn t)) ;;define the time signatures (setf timesigs (get-time-signature r1)) ;;stream of pitches (setf pitches '(c4 eb4 f4 g4 bb4 c5 eb5)) (setf pitches (chord-interval-add '(12) pitches)) ;;by spanning r1 onto pitches, pitches will repeat as needed (setf pitches (span r1 pitches)) (setf rh (make-omn :length r1 :pitch pitches)) and then try something like:
(setf rrh (gen-repeat 3 rh)) ;or (setf rrh (gen-repeat '(3) rh)) neither gives me what I'm looking for.
However, I notice that if I evaluate
(setf rrh (gen-repeat 3 (list (first rh)))) then I get the correct result for the first measure.
Therefore, doing something like this gets me what I was looking for:
(setf rrh (gen-divide 8 (flatten (mapcar #'(lambda (n) (gen-repeat 3 (list n))) rh))))
But surely there's a better/simpler way to repeat bars in omn format.
If anyone has insights, I'd be most appreciative.
Can anyone help me develop a function which superimposes a rhythm onto a constant list of pitches?
For example, how would I go about superimposing a rhythm like (1/2 1/16 7/16 1/8 3/8 3/16 5/16 1/4 1/4 5/16 3/16 3/8)
on to list of pitches like (infinity-series 100 '(g4 gs4))
=> (g4 gs4 fs4 a4 gs4 g4 f4 bb4 fs4 a4 g4 gs4 a4 fs4 e4 b4 gs4 g4 f4 bb4 g4 gs4 fs4 a4 f4 bb4 gs4 g4 bb4 f4 eb4 c5 fs4 a4 g4 gs4 a4 fs4 e4 b4 g4 gs4 fs4 a4 gs4 g4 f4 bb4 a4 fs4 e4 b4 fs4 a4 g4 gs4 e4 b4 a4 fs4 b4 e4 d4 cs5 gs4 g4 f4 bb4 g4 gs4 fs4 a4 f4 bb4 gs4 g4 bb4 f4 eb4 c5 g4 gs4 fs4 a4 gs4 g4 f4 bb4 fs4 a4 g4 gs4 a4 fs4 e4 b4 f4 bb4 gs4 g4)
So that the melody would be:
=> (g4 gs4 fs4 a4 gs4 g4 f4 bb4 fs4 a4 g4 gs4 a4 fs4 e4 b4 gs4 g4 f4 bb4 g4 gs4 fs4 a4 f4 bb4 gs4 g4 bb4 f4 eb4 c5 fs4 a4 g4 gs4 a4 fs4 e4 b4 g4 gs4 fs4 a4 gs4 g4 f4 bb4
1/2 1/16 7/16 1/8 3/8 3/16 5/16 1/4 1/4 5/16 3/16
=> (1/2 g4 1/16 fs4 7/16 a4 1/8 gs4 3/8 f4 3/16 f4 5/16 g4 1/4 fs4 1/4 a4 5/16 g4 3/16 g4)
I want to set each pitch to a constant value, for e.g 1/16 then superimpose the rhythm so that rather than span the rhythm to the pitches, the rhythm swallows the pitches leaving a resultant melody. I hope this makes sense.
Any help gratefully received.