NagyMusic Posted February 8 Share Posted February 8 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) Quote Link to comment Share on other sites More sharing options...
erka Posted February 8 Share Posted February 8 (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. Quote Link to comment Share on other sites More sharing options...
erka Posted February 8 Share Posted February 8 with chord-pitch-unique no error. (pitch-variation 0 1 7 (chord-pitch-unique chords) :type '? :seed 23) NagyMusic 1 Quote Link to comment Share on other sites More sharing options...
o_e Posted February 8 Share Posted February 8 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! Quote Link to comment Share on other sites More sharing options...
opmo Posted February 8 Share Posted February 8 Of course not, step 0 will not return chords. (pitch-variation 6 1 4 (chord-pitch-unique chords) :type 'c) Quote Link to comment Share on other sites More sharing options...
o_e Posted February 8 Share Posted February 8 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! Quote Link to comment Share on other sites More sharing options...
erka Posted February 8 Share Posted February 8 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. Quote Link to comment Share on other sites More sharing options...
opmo Posted February 8 Share Posted February 8 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. NagyMusic 1 Quote Link to comment Share on other sites More sharing options...
NagyMusic Posted February 8 Author Share Posted February 8 Thanks everyone, for looking into this and providing a solution. This is a very powerful and versatile function. opmo 1 Quote Link to comment Share on other sites More sharing options...
NagyMusic Posted February 9 Author Share Posted February 9 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! Quote Link to comment Share on other sites More sharing options...
Stephane Boussuge Posted February 10 Share Posted February 10 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. NagyMusic 1 Quote Link to comment Share on other sites More sharing options...
NagyMusic Posted February 10 Author Share Posted February 10 Thanks so much, Stephane! This is very helpful. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.