Jump to content

Recommended Posts


here are the two functions i use daily in my workflow.


The first gen-pitch-line can be used as this but is also required for the second function svoice1.


svoice1 is a generic omn generator i find useful for my work.


;;; ------------------------------------------------------------------------------
;;; Fonction de génération de hauteurs basées sur une conversion de vecteur de bruit
;;; avec un grand choix de type de bruit, taux de compression du vecteur, filtrage des répétitions et ambitus.
(defun gen-pitch-line (nb-pitch &key (compress 1) (ambitus '(c4 c6)) seed filter-repeat (type :white))
  (setf seed (rnd-seed seed))
  (let (pitches)
      ("gen-pitch-line :seed ~s" seed)
    (labels ((white-or-pink (nb-pitch seed type)
               (if (eq type ':pink)
                 (gen-pink-noise nb-pitch :seed seed)
                 (gen-white-noise nb-pitch :seed seed :type (if (eq type ':white) :normal type))))

             (process  (nb-pitch &key (compress 1) (ambitus '(c4 c6)) seed filter-repeat type)
               (setf pitches (vector-to-pitch ambitus (vector-smooth compress (white-or-pink nb-pitch seed type)))) 
               (when filter-repeat
                 (setf pitches (gen-trim nb-pitch (filter-repeat filter-repeat pitches))))
      (process nb-pitch :compress compress :ambitus ambitus :filter-repeat filter-repeat :seed (seed) :type type)))))

(gen-pitch-line 24 :compress 0.42 :type :white :filter-repeat 1)
(gen-pitch-line 24 :compress 0.42 :type :pink :filter-repeat 1)
(gen-pitch-line 24 :compress 0.42 :type :extreme :filter-repeat 1)
   :pitch (gen-pitch-line 24 :compress 0.42 :type :white :filter-repeat 1)
   :length (euclidean-rhythm 16 1 16 's :type 2)
 :seed 33)
;;; ------------------------------------------------------------------------------   

;;; VERSION 0.1
(defun svoice1 (nb-pitch &key
                            (level 16) (low 1) (high 16) (ratio 1/16)
                            (e-type 2)(e-rotate nil)(e-variant nil)
                            (compress 1)(filter-repeat nil)(pline-type :white)
                            (p-divide nil)(articulation nil)
                            (length nil)(pitch nil)(velocity nil)
                            (seed nil)(articulation-map nil)
                            (add-interval-if-length nil)
                            (i-length '1/16)
                            (i-list '(-4 -5 -3 -7))
(setf seed (rnd-seed seed))
(do-verbose ("svoice1 :seed ~s" seed)
(let* (( pitch  (if pitch pitch
                  (if p-divide 
                    (gen-divide p-divide (gen-pitch-line nb-pitch :compress compress :seed (seed) :filter-repeat filter-repeat :type pline-type))
                    (gen-pitch-line nb-pitch :compress compress :seed (seed) :filter-repeat filter-repeat :type pline-type))))
       (len (if length length (euclidean-rhythm level low high ratio :type e-type :rotate e-rotate :variant e-variant :seed (seed))))
       (art (if articulation articulation 
              (if articulation-map
                (length-map articulation-map len :otherwise '(default))
       (velo (if velocity velocity '(mf)))
   :pitch pitch
   :length len
   :velocity velo
   :articulation art
   :length-val i-length 
   :interval-list i-list
   :pitch pitch
   :length len
   :velocity velo
   :articulation art

(svoice1 32)
(svoice1 32 :seed 1234)
(svoice1 32 :pitch '(c4 d4 e4) :articulation '(marc))
(svoice1 32 :length '((h h)(q q e e e e)))
(svoice1 32 :pitch '(c4 g4) :length '((h h)(q q e e e e)) :velocity '((f)(pp)))
(svoice1 32 :i-list '(-7 -4 -5 -3) :low 1 :high 4)
(svoice1 128 :p-divide 8 :level (gen-repeat 12 '(16)) :compress 0.16)
(svoice1 128 :p-divide 8 :level (gen-repeat 12 '(16)) :compress 0.16 :articulation-map '((1/8 stacc)(1/16 leg)))

(svoice1 128 :p-divide 8 :level (gen-repeat 12 '(16))  :low 8 :high 8 
         :compress 0.16 :articulation-map '((1/8 stacc)(1/16 leg)))

(svoice1 128 :p-divide 8 :level (gen-repeat 12 '(16))  :low 8 :high 8 
         :compress 0.16 :articulation-map '((1/8 stacc)(1/16 leg)) :add-interval-if-length t)

(svoice1 128 :p-divide 8 :level (gen-repeat 12 '(16))  :low 2 :high 16 
         :compress 0.16 :articulation-map '((1/8 stacc)(1/16 leg)))

 '(((0 2 4 6 8 10) :root d4))
 (svoice1 128 :p-divide 8 :level (gen-repeat 12 '(16))  :low 2 :high 16 
         :compress 0.16 :articulation-map '((1/8 stacc)(1/16 leg)))



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.

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