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

Simple algorithmic example Strings + Flute

Sign in to follow this  
Stephane Boussuge

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

AudioOutput.mp3

Sign in to follow this  


0 Comments


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×