December 29, 201411 yr 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
December 29, 201411 yr 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))
December 29, 201411 yr Author 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
December 29, 201411 yr 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)
December 29, 201411 yr Author 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
December 29, 201411 yr 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))))
Create an account or sign in to comment