Jump to content

Featured Replies

Posted

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)

 

(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.

with chord-pitch-unique no error.

 

(pitch-variation 0 1 7 (chord-pitch-unique chords)
                 :type '? :seed 23)

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!

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!

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. 

 

  • Author

Thanks everyone, for looking into this and providing a solution. This is a very powerful and versatile function.

  • 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!

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.

 

  • Author

Thanks so much, Stephane! This is very helpful.

Create an account or sign in to comment


Copyright © 2014-2025 Opusmodus™ Ltd. All rights reserved.
Product features, specifications, system requirements and availability are subject to change without notice.
Opusmodus, the Opusmodus logo, and other Opusmodus trademarks are either registered trademarks or trademarks of Opusmodus Ltd.
All other trademarks contained herein are the property of their respective owners.

Powered by Invision Community

Important Information

Terms of Use Privacy Policy