Posted June 4Jun 4 Hi, I have experimented with tonality-map and harmonic-path, and I have a simpler problem I think, but let me know if I should still be using the previous to solve this problem?Thinking like a guitar player, I want to play a pattern from a series of chords based on the note order within the chord. 1st note, 2nd note, 3rd note.For example say I have chord c4e4g4, and I have a picking pattern that goes (e c4 e4 c4 q e4g4 e c4 e4 c4) this is choosing notes in an order of ( e 1 2 1 q 23 e 1 2 1)Now the next chord has notes (a3e4a4) which would result in (e a3 e4 a3 q e4a4 e a3 e4 a3) following note order within the chord of ( e 1 2 1 q 23 e 1 2 1)I would like to apply this over a sequence of chords.
June 4Jun 4 Try this little (not very well thought out) function.Jesper(defun fn (chords pattern) (let ((mel (mapcar 'melodize chords))) (loop for m in mel collect (loop for x in pattern collect (if (integerp x) (if (> x 9) (car (chordize (loop for y in (explode x) collect (nth (1- y) m)))) (nth (1- x) m)) x)))))(fn '(c4e4g4 a3e4a4 d3f3a3 g3b3d4) '(e 1 2 1 q 23 e 1 2 1))=>((e c4 e4 c4 q e4g4 e c4 e4 c4) (e a3 e4 a3 q e4a4 e a3 e4 a3) (e d3 f3 d3 q f3a3 e d3 f3 d3) (e g3 b3 g3 q b3d4 e g3 b3 g3))(fn '(c4e4g4a4 a3e4a4g4 d3f3a3c4 g3b3d4f4) '(s 1 2 3 4 q 23 14 e 1 2 3 4))=>((s c4 e4 g4 a4 q e4g4 c4a4 e c4 e4 g4 a4) (s a3 e4 a4 g4 q e4a4 a3g4 e a3 e4 a4 g4) (s d3 f3 a3 c4 q f3a3 d3c4 e d3 f3 a3 c4) (s g3 b3 d4 f4 q b3d4 g3f4 e g3 b3 d4 f4))
June 4Jun 4 Author wow! thanks! perfectit also works with velocities and articulations, nice!(fn '(c4e4g4a4 a3e4a4g4 d3f3a3c4 g3b3d4f4) '(s 1 p 2 3 4 q 23 mf 14 e 1 p stacc 2 3 4))
June 4Jun 4 I think it would be good for you to study some basic Lisp and OM because combining the pattern (integers)and OMN (lengths etc) in the same list are unusual.Jesper
June 4Jun 4 Author Thanks, I'm working on it, but I admit it's a struggle. I do know how to separate it out, and add the other omn properties of length, velocity, and articulation after the fact.
Create an account or sign in to comment