Jump to content
  • Sign in to follow this  

    Lesson 15. Simplifying Melodic Texture


    opmo



    Annotation

    The output of line-rnd has many repeated pitches, very common in algorithmically-generated scores. 

     

    => ((c5 c5 b4 b4 b4) (g4 fs4 g4 g4 fs4) (fs4 fs4 f4 f4 f4)
        (fs4 f4 fs4 f4 fs4) (f4 f4 f4 f4 f4) (fs4 fs4 fs4 fs4 f4)
        (cs4 cs4 cs4 cs4 cs4) (c4 cs4 f4 cs4 f4) (f4 f4 fs4 fs4 fs4)
        (f4 fs4 g4 fs4 fs4))

     

    Sometimes it’s good to remove these repeated pitches. We can use a binary function to show these repetitions where they occur and thereby remove repeated pitches. The functions are GEN-BINARY-CHANGE and/or GEN-BINARY-ANACRUSIS.

     

    Examine the differences:

     

    (gen-binary-change line-rnd)
    => ((1 0 1 0 0) (1 1 1 0 1) (1 0 1 0 0) (1 1 1 1 1) (1 0 0 0 0)
        (1 0 0 0 1) (1 0 0 0 0) (1 1 1 1 1) (1 0 1 0 0) (1 1 1 1 0))
    
    (gen-binary-anacrusis line-rnd)
    => ((0 1 0 0 1) (1 1 0 1 1) (0 1 0 0 1) (1 1 1 1 1) (0 0 0 0 1)
        (0 0 0 1 1) (0 0 0 0 1) (1 1 1 1 1) (0 1 0 0 1) (1 1 1 0 1))

     

    BINARY-MAP makes both pitch and length modifications. Here are the binary patterns from GEN-BINARY-CHANGE.

     

    => ((c5 b4) (g4 fs4 g4 fs4) (fs4 f4)
        (fs4 f4 fs4 f4 fs4) (f4) (fs4 f4)
        (cs4) (c4 cs4 f4 cs4 f4) (f4 fs4)
        (f4 fs4 g4 fs4))
    
    => ((1/8 -1/8 1/8 -1/8 -1/8) (1/8 1/8 1/8 -1/8 1/8) (1/8 -1/8 1/8 -1/8 -1/8)
        (1/8 1/8 1/8 1/8 1/8) (1/8 -1/8 -1/8 -1/8 -1/8) (1/8 -1/8 -1/8 -1/8 1/8)
        (1/8 -1/8 -1/8 -1/8 -1/8) (1/8 1/8 1/8 1/8 1/8) (1/8 -1/8 1/8 -1/8 -1/8)
        (1/8 1/8 1/8 1/8 -1/8)

     

    Here are the patterns from GEN-BINARY-ANACRUSIS.

     

    => ((c5 b4) (g4 fs4 g4 fs4) (fs4 f4)
        (fs4 f4 fs4 f4 fs4) (f4) (fs4 f4)
        (cs4) (c4 cs4 f4 cs4 f4) (f4 fs4)
        (f4 fs4 g4 fs4))
    
    => ((-1/8 1/8 -1/8 -1/8 1/8) (1/8 1/8 -1/8 1/8 1/8) (-1/8 1/8 -1/8 -1/8 1/8)
        (1/8 1/8 1/8 1/8 1/8) (-1/8 -1/8 -1/8 -1/8 1/8) (-1/8 -1/8 -1/8 1/8 1/8)
        (-1/8 -1/8 -1/8 -1/8 1/8) (1/8 1/8 1/8 1/8 1/8) (-1/8 1/8 -1/8 -1/8 1/8)
        (1/8 1/8 1/8 -1/8 1/8))

     

    There’s an alternative way of outlining the rhythm using LENGTH-MERGE with GEN-BINARY-CHANGE. Adjacent pitches or lengths are ‘added up’. This can be useful when working with sustaining instruments.

     

    (length-merge rhy-mapped)
    => ((1/8 -1/8 1/8 -1/4) (3/8 -1/8 1/8) (1/8 -1/8 1/8 -1/4) (5/8)
        (1/8 -1/2) (1/8 -3/8 1/8) (1/8 -1/2) (5/8) (1/8 -1/8 1/8 -1/4)
        (1/2 -1/8))

     

    Finally, notice how looping is being used within bass-1.

     

    => ((1/8 1/8 1/8 1/8 1/8) (1/8 1/8 1/8 1/8 1/8) (1/8 1/8 1/8 1/8 1/8)
        (1/8 1/8 1/8 1/8 1/8) (1/8 1/8 1/8 1/8 1/8) (1/8 1/8 1/8 1/8 1/8)
        (1/8 1/8 1/8 1/8 1/8) (1/8 1/8 1/8 1/8 1/8) (1/8 1/8 1/8 1/8 1/8)
        (1/8 1/8 1/8 1/8 1/8))
    
    => ((fs2) (c2) (fs2) (fs2) (c2) (fs2) (cs2) (cs2) (g2) (g2))

     

    Now brought together in OMN with MAKE-OMN.

     

    (setf bass-1
          (make-omn 
           :length bass-rhythm
           :pitch bass-line
           :velocity dyn-spanned))
    => ((e fs2 f fs2 fs2 fs2 fs2) (e c2 mp c2 c2 c2 c2) (e fs2 f fs2 fs2 fs2 fs2)
        (e fs2 mf fs2 fs2 fs2 fs2) (e c2 ff c2 c2 c2 c2) (e fs2 f fs2 fs2 fs2 fs2)
        (e cs2 mp cs2 cs2 cs2 cs2) (e cs2 f cs2 cs2 cs2 cs2) (e g2 mf g2 g2 g2 g2)
        (e g2 ff g2 g2 g2 g2))


    Score

    (setf line '(c4 cs4 f4 fs4 g4 b4 c5))
    (setf bass (pitch-transpose -24 line))
    
    #| Graph
    (list-plot (gen-white-noise 50 :seed 2613))
    (list-plot (vector-smooth 0.1 (gen-white-noise 50 :seed 2613)))
    |#
    
    (setf line-gesture (vector-smooth 0.1 (gen-white-noise 50 :seed 2613)))
    (setf line-rnd (gen-divide 5 (vector-map line line-gesture)))
    
    (setf binary-rhythm (gen-binary-change line-rnd))
    ;(setf binary-rhythm (gen-binary-anacrusis line-rnd))
    
    (setf line-rnd-c (binary-map binary-rhythm line-rnd))
    (setf rhy-mapped (binary-map binary-rhythm 'e))
    
    ;(length-merge rhy-mapped)
    
    (setf rhythm  (span line-rnd '(e)))
    (setf bass-line (gen-eval 10 '(rnd-pick (mclist bass))))
    (setf bass-rhythm (gen-repeat 10 '((e e e e e))))
    (setf dynamics (mclist '(f mp f mf ff)))
    (setf dyn-spanned (span line-rnd dynamics))
    
    (setf line-1 (make-omn 
                  :length rhy-mapped
                  :pitch line-rnd-c
                  :velocity dyn-spanned))
    
    (setf bass-1 (make-omn 
                  :length bass-rhythm
                  :pitch bass-line
                  :velocity dyn-spanned))
    
    (setf ts-list (get-time-signature line-1 :group '((5))))
    
    (def-score lesson-15
               (:key-signature 'chromatic
                :time-signature ts-list
                :tempo 100
                :layout (piano-layout 'piano-rh 'piano-lh))
      
      (piano-rh    
       :omn line-1
       :channel 1
       :sound 'gm
       :program 'acoustic-grand-piano)  
      
      (piano-lh    
       :omn bass-1)
      )


    Notation

    Screen Shot 2017-12-05 at 13.35.40.png

     

    Next page Lesson 16. Ambitus

    Go back to Reference page.


    Sign in to follow this  



×