Jump to content

Recommended Posts

Here is the score of a short piano study using Harmony from a row, and user defined functions encapsulated in other functions for the score generation.

Provided here as an example of a possible usage of functions defined by the user specifically for a given score.

(defun arp1 (nb &key (rev nil) (rnge '(c1 c7))
                (nbitv 5) (len (gen-repeat 16 '(s))) 
                (vel '(mf))(art '(leg))
                (itvlist '(1 2 4 5 1 3 -1 -2)))
  (make-omn
   :pitch (ambitus rnge
                   (if rev
                     (gen-retrograde
                      (integer-to-pitch
                       (gen-integer-step 
                        -24 
                        nb
                        (rnd-sample nbitv itvlist))))
                     (integer-to-pitch
                      (gen-integer-step 
                       -24 
                       nb
                       (rnd-sample nbitv itvlist)))))
   :length (length-trim nb len)
   :velocity vel
   :articulation art))

(defun chrd1 (nb &key (ofst 3) (rnge '(c1 c7)) 
                 (chsize 4) (trspt 0)(rnd-oct nil)
                 (len (gen-repeat 4 '(q))) 
                 (vel '(mf))(art '(leg)))
  (make-omn
   :pitch (ambitus 
           rnge 
           (gen-chord2 
            nb
            chsize 
            (rnd-row :type :pitch)
            :offset ofst
            :transpose trspt
            :rnd-octaves rnd-oct))        
   :length (length-trim nb len)
   :velocity vel
   :articulation art))

(defparameter size 64)
(setf row (rnd-row :type :pitch))
(setf hchords (gen-chord2 size 5 row
                          :offset (rnd-sample size (gen-integer 4))
                          :transpose (rnd-sample size (gen-integer -12 12))))

(setf path (tonality-series hchords))
(setf study
      (tonality-map
       path
       (gen-loop size
                 (eval
                  (car
                   (rnd-sample
                    1
                    '((length-fix
                       (arp1 (car (rnd-number 1 6 12))
                             :rnge (rnd-pick '((c1 c7)(c5 c7)(c1 c3)(c3 c6)(g5 g6)(e2 g5)))
                             :nbitv (rnd-pick '(1 2 3 4 5 6 7 8))
                             :vel (rnd-pick '((pp)(p)(mp)(mf)(f)(ff)))
                             :art (rnd-pick '((stacc)(leg)(marc)(stacs)(mart)))
                             :len (rnd-pick `(,(rnd-sample 12 '(1/24 1/8 1/8 1/16 1/16 1/32 -1/8 -1/8))
                                              ,(gen-repeat 16 '(s))
                                              ,(gen-repeat 12 '(1/12))
                                              ,(rnd-sample 8 '(e e s s s -e))
                                              ,(rnd-sample 8 '(e e s s s -q s s s -e))))
                             :itvlist (rnd-pick '((8 6 14 -8 -6)
                                                  (1 2 -1 2)
                                                  (1 2 3 4 -1 -2 -3 -4)
                                                  (2 4 6 -1 -3 -7)))))
                      (length-fix
                       (chrd1 (car (rnd-number 1 1 8))
                              :ofst (rnd-pick '(1 2 3 4))
                              :rnge (rnd-pick '((c1 c7)(c5 c7)(c1 c3)(c3 c6)(g5 g6)(e2 g5)))
                              :chsize (rnd-pick '(2 3 4 5 6))
                              :rnd-oct t
                              :len (rnd-pick `(,(rnd-sample 4 '(h -q q))
                                               ,(gen-repeat 8 '(e))
                                               ,(gen-repeat 5 '(1/12))
                                               ,(gen-repeat 4 '(e. s))
                                               ,(rnd-sample 8 '(h q -q q q))
                                               ,(rnd-sample 8 '(e e e e q -e))))
                              :vel (rnd-pick '((pp)(p)(mp)(mf)(f)(ff)))
                              :art (rnd-pick '((stacc)(leg)(marc)(stacs)(mart))))))))))))

(def-score study
           (:composer "S.Boussuge"
                      :copyright "Copyright © 2015 S.Boussuge"
                      :key-signature atonal
                      :time-signature (get-time-signature study)
                      :tempo 118
                      :layout (piano-grand-layout 'piano))
  
  (piano
   :omn study
   :channel 1
   :sound 'gm
   :program 'acoustic-grand-piano
   :port 0))

 

 
S.B.
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

Terms of Use Privacy Policy