Jump to content
Sign in to follow this  
  • entries
    5
  • comments
    10
  • views
    5,204

Simple algorithmic example Strings + Flute

Sign in to follow this  
Stephane Boussuge

472 views

A simple example based on an All Interval Row for pitch material and euclidean rhythm for Flute rhythmic generation.

;; All interval row generation
(setf row (air 16 :prime :type :pitch))
;;; Strings chords
;; Chords gen from Air
(setf chords1 (harmonic-progression
               '(0 0 0 0 2 2 2 2)
               row
               :size 4
               :step '(1 2 2 1) ;; step throught row
               :relative t      ;; chords relative path voice leading
               :seed 8392
               ))

;; Strings chords assembly with pitches from chords1 
;; and length generation (whole notes '(w) repeated 32 times)
;; dynamic = pp
(setf chords1.omn (filter-tie   ;; tie repeated notes
                   (make-omn
                    :length (gen-repeat 32 '((w)))
                    :pitch chords1
                    :velocity '((pp))
                    )))

;;; Melody generation for Flute
;; Get the length (size) of chords1.omn
(setf size (length chords1.omn))

;; Pitch material
(setf melo1.pmat (rnd-order
                  (melodize
                   (gen-trim
                    size
                    (mclist
                     (harmonic-progression
                      '(0 0 0 0 2 2 2 2)
                      row
                      :size 5
                      :step '(1 2 2 1)
                      ))))))

;; Melodic generation with euclidean rhythm
(setf melo1.omn (pitch-transpose
                 12
                 (make-omn
                  :pitch melo1.pmat
                  :length (euclidean-rhythm 
                           (gen-repeat size '(16)) 
                           1
                           12
                           's
                           :type 2
                           )
                  :velocity '((mf))
                  )))

(def-score temp 
           (
            :key-signature 'chromatic 
            :time-signature '(4 4) 
            :composer "Stéphane Boussuge"
            :copyright "Copyright © 2017 s.boussuge"
            :tempo 64
            )

(strings1
 :omn chords1.omn
 :channel 1
 :port 0
 :sound 'gm
 :program 'acoustic-grand-piano
 :controllers (1 (gen-dynamic-controller chords1.omn))
 )

(flute1
 :omn melo1.omn
 :channel 2
 :port 0
 :sound 'gm
 :program 'acoustic-grand-piano
 :controllers (1 (gen-dynamic-controller melo1.omn))
 )
)

 

SB.


Sign in to follow this  


0 Comments


Recommended Comments

There are no comments to display.

Join the conversation

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

Guest
Add a comment...

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