Jump to content
  • Lesson 9. The Bass Part



    Two new functions enable the left-hand bass part to play sustained pitches for the length of each bar. This is a very common requirement in a multi-part texture where metres may be constantly changing.


    The first new function is GET-SPAN. This adds up each list of lengths.

    (setf rhythm (span line-rnd '(e)))
    => ((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))
    (setf bass-rhythm (get-span rhythm))
    => (1/2 1/2 5/8 1/2 3/8)


    The second function is FILTER-FIRST. This function selects the first pitch of each list in bass-line and groups them together as a separate list bass-select.

    (setf bass-line (span line-rnd bass))
    => ((c2 cs2 fs2 g2) (c3 c2 cs2 fs2)
        (g2 c3 c2 cs2 fs2) (g2 c3 c2 cs2) (fs2 g2 c3))
    (setf bass-select (filter-first 1 bass-line))
    => ((c2) (c3) (g2) (g2) (fs2))


    (setf line '(c4 cs4 fs4 g4 c5))
    (setf bass (pitch-transpose -24 line))
    (setf chords '(c4cs4fs4 g4c5))
    (setf line-rnd (gen-eval 5 '(rnd-sample (rnd-range 3 5) line) :seed 41))
    (setf rhythm (span line-rnd '(e)))
    (setf bass-line (span line-rnd bass))
    (setf dynamics (mclist '(f p f p ff)))
    (setf dyn-spanned (span line-rnd dynamics))
    (setf bass-rhythm (get-span rhythm))
    (setf bass-select (filter-first 1 bass-line))
    (setf line-1 (make-omn 
                  :length rhythm
                  :pitch line-rnd
                  :velocity dyn-spanned))
    (setf bass-1 (make-omn 
                  :length bass-rhythm
                  :pitch bass-select
                  :velocity dyn-spanned))
    (setf ts-list (get-time-signature line-1))
    (def-score lesson-9
               (:key-signature 'chromatic
                :time-signature ts-list
                :tempo 100
                :layout (piano-layout 'piano-rh 'piano-lh))
       :omn line-1
       :channel 1
       :sound 'gm
       :program 'acoustic-grand-piano)  
       :omn bass-1)


    Screen Shot 2017-12-05 at 11.26.43.png


    Next page Lesson 10. Gesture

    Go back to Reference page.

    Edited by opmo

  • Create New...

Important Information

Terms of Use Privacy Policy