Posted February 8, 20232 yr I'd like to know why I can't seem to process this list of chords using the pitch-variation function. Thank you! (setf chords '((h a2a3c4 c4a3a3) (h d4f3g2 f4g3d4) (h e4c4a3 c3a3e4) (h d3a3f4 w f4d4a3) (h e2e3g3 g3e4e4) (h a3f4e4 f2e3a3) (h e4g3b3 b3e3g2) (h a2d3fs2 w fs2a2e2) (h a2e3c4 c4a3e4) (h e4g3b3 b3e3g2) (h f2e3a3 a3f4e4) (h e4e4g3 w g3e3e2) (h d3a3f4 f4d4a3) (h e4c4a3 c3a3e4) (h b2a3d4 d4b3a3) (h a3a3c4 w c4a3a2))) (pitch-variation 0 1 7 chords :type '? :seed 23)
February 8, 20232 yr (setf chords '((h a2a3c4 c4a3a3))) (pitch-variation 0 1 7 chords :type '? :seed 23) The first bar already returns an error. If you change the duplicate a3 in the second chord it will work. Why two a3 in a chord? On the other hand why not. Shouldn't throw an error.
February 8, 20232 yr with chord-pitch-unique no error. (pitch-variation 0 1 7 (chord-pitch-unique chords) :type '? :seed 23)
February 8, 20232 yr Just play around a little with pitch-variation a little, why does it makes no difference in the output what :type I choose? What am I missing? (setf chords '((h a2a3c4 c4a3a3) (h d4f3g2 f4g3d4))) (pitch-variation 0 1 4 (chord-pitch-unique chords) :type 'c :seed 23) ==>((h a3 c4 a2 a3) (h c4 a3 c4 a3) (h g2 f3 d4 f3) (h d4 f4 g3 f4)) (pitch-variation 0 1 4 (chord-pitch-unique chords) :type 'm :seed 23) ==>((h a3 c4 a2 a3) (h c4 a3 c4 a3) (h g2 f3 d4 f3) (h d4 f4 g3 f4)) (pitch-variation 0 1 4 (chord-pitch-unique chords) :type '? :seed 23) ==>((h a3 c4 a2 a3) (h c4 a3 c4 a3) (h d4 g2 f3 g2) (h d4 g3 d4 f4)) Thanks!
February 8, 20232 yr Of course not, step 0 will not return chords. (pitch-variation 6 1 4 (chord-pitch-unique chords) :type 'c)
February 8, 20232 yr Ok, thanks, I think I don't get what pitch-variation does and what the parameters do. If someone is willing to explain, I would be very greatful, I think I don't have a clue..:-) Thanks!
February 8, 20232 yr Wasn't the initial question why this throws an error: (setf chords '((h a2a3c4 c4a3a3) (h d4f3g2 f4g3d4) (h e4c4a3 c3a3e4) (h d3a3f4 w f4d4a3) (h e2e3g3 g3e4e4) (h a3f4e4 f2e3a3) (h e4g3b3 b3e3g2) (h a2d3fs2 w fs2a2e2) (h a2e3c4 c4a3e4) (h e4g3b3 b3e3g2) (h f2e3a3 a3f4e4) (h e4e4g3 w g3e3e2) (h d3a3f4 f4d4a3) (h e4c4a3 c3a3e4) (h b2a3d4 d4b3a3) (h a3a3c4 w c4a3a2))) (pitch-variation 0 1 7 chords :type '? :seed 23) So why does it throw an error? When there are no duplicate notes in a chord there is no error. Are duplicate notes in a chord not allowed? They make no sense, but could have been randomly generated.
February 8, 20232 yr I will remove the duplicate notes in a chord before the process. I will add the chord-pitch-unique function into the function. Will be fixed in the next release.
February 8, 20232 yr Author Thanks everyone, for looking into this and providing a solution. This is a very powerful and versatile function.
February 9, 20232 yr Author Would it be possible to revise the pitch-variation function so that one can use lists of parameter values also for the repeat and step values? I noticed the functions accepts lists only with the size parameter. Thanks again!
February 10, 20232 yr Hi Zvony, waiting the revision of pitch-variation function, you could use mapcar function to do that or also OM function gen-process: (setf chords (gen-repeat 4 '((c4e4g4 d4f4a4 g4b4d5)))) (assemble-seq (mapcar(lambda(x y z ch) (pitch-variation x y z ch)) '(0 2 1 2) '(0 1 1 0) '(2 3 4 3) chords ) ) (assemble-seq (gen-process '(pitch-variation a b c d) '((0 2 1 2)(0 1 1 0)(2 3 4 3) chords) ) ) Best ! S.
Create an account or sign in to comment