PatrickMimran Posted December 29, 2014 Share Posted December 29, 2014 Helloi would like to have this function to repeat 12 times different random repeats of 3 pitches at each draw and not as it does right now 12 times the same choice .I know it is easy but i can't recall how i can achieve this (setf chords (gen-chord2 12 3 (gen-repeat 12 (rnd-repeat '(3) '(c4 cs4 e4 f4 g4 gs4 a4 b4))) :offset '(2) :transpose '(3 8 -3)))Thanks Patrick Quote Link to comment Share on other sites More sharing options...
opmo Posted December 29, 2014 Share Posted December 29, 2014 (edited) Solution:(gen-chord2 12 3 (gen-loop 12 (rnd-sample 3 '(c4 cs4 e4 f4 g4 gs4 a4 b4))) :offset '(2) :transpose '(3 8 -3)) Edited July 25, 2015 by opmo Quote Link to comment Share on other sites More sharing options...
PatrickMimran Posted December 29, 2014 Author Share Posted December 29, 2014 Sorry but i think it does the same thing (setf chords (gen-chord2 12 3 (gen-repeat 12 (rnd-sample 3 '(c4 cs4 e4 f4 g4 gs4 a4 b4))) :offset '(2) :transpose '(3 8 -3))) => (bb4d5d5 g5eb5g5 gs4gs4e4 bb4d5d5 g5eb5g5 gs4gs4e4 bb4d5d5 g5eb5g5 gs4gs4e4 bb4d5d5 g5eb5g5 gs4gs4e4) It repeats several times the same set of three chords . What i am looking for is to have 12 different chords Quote Link to comment Share on other sites More sharing options...
opmo Posted December 29, 2014 Share Posted December 29, 2014 (edited) Please check the GEN-CHORD2 documentation. Edited July 25, 2015 by opmo Quote Link to comment Share on other sites More sharing options...
opmo Posted December 29, 2014 Share Posted December 29, 2014 (edited) Is this what you are looking for?(gen-chord2 12 3 (flatten (gen-loop 12 (rnd-sample 3 '(c4 cs4 e4 f4 g4 gs4 a4 b4)))) :offset '(2) :transpose '(3 8 -3)) => (bb4d5b4 e5c5a4 bb3d4f4 b4d5gs4 cs5gs4cs5 d4a3d4 gs4c5eb4 gs4c5cs5 d4e4cs4 g4g4b4 e5e5a4 bb3cs4f4) Edited July 25, 2015 by opmo Quote Link to comment Share on other sites More sharing options...
PatrickMimran Posted December 29, 2014 Author Share Posted December 29, 2014 I am just looking to have 12 different repeats or draws from (rnd-sample 3 (c4 cs4 e4 f4 g4 gs4 a4 b4))with at each repeat sample 3 new pitches from the list .Or if you prefer 12 different evaluations of rnd-sample 3 . It is in SCOM (g-eval nil 9 '(gen-random nil 3 '(a b c d e)))This is what i am trying to do.ThanksPatrick Quote Link to comment Share on other sites More sharing options...
opmo Posted December 29, 2014 Share Posted December 29, 2014 (edited) As you can see there is no many possibilities to create chords with the pitch list '(b4 cs4 f4)Maybe you need to think of a different approach:(gen-loop 12 (gen-chord2 12 3 (rnd-sample 3 '(c4 cs4 e4 f4 g4 gs4 a4 b4)) :offset (rnd-sample 12 '(0 1 2)) :transpose (rnd-sample 12 '(3 8 -3)))) Edited July 25, 2015 by opmo Quote Link to comment Share on other sites More sharing options...
PatrickMimran Posted December 29, 2014 Author Share Posted December 29, 2014 Now I get it. It is GEN-LOOP I was looking for.ThanksPatrick 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.