[CM] glissandi

stephane boussuge s_boussuge at yahoo.fr
Fri Dec 2 04:57:14 PST 2011


Hi,
i'm trying to do some glissandi but with no success, here's my attempt, could you help me please ?

;;; -*- syntax: Lisp; font-size: 16; theme: "Emacs"; -*-


(define (gliss1 pc oct pbstrt pbend dur chan)
  (process repeat 1
           do
           (send "mp:midi" :key (+ pc oct) :dur dur :chan chan)
           (process for i from pbstrt to pbend
                    do
                    (send "mp:bend" :val i :chan chan)
                    (wait (/ dur (- pbstrt pbend)))
                    )
           ))

(sprout (gliss1 0 72 8000 0 12 0))


;;une autre maniere de le faire:

(define (glis pbstrt pbend dur chan)
  (process for i from pbstrt to pbend
                    do
                    (send "mp:bend" :val i :chan chan)
                    (wait (/ dur (- pbstrt pbend)))
                    ))


(define (gliss2 pc oct pbstrt pbend dur chan)
  (process repeat 1
           with p1 = pbstrt
           with p2 = pbend
           do
           (send "mp:midi" :key (+ pc oct) :dur dur :chan chan)
           (sprout (glis p1 p2 dur chan))
           ))

(sprout (gliss2 0 60 8000 0 12 0))  

(define (glistest pbstrt pbend dur chan)
  (process for i from pbstrt to pbend
                    do
                    (print i)
                    (wait (/ dur (- pbstrt pbend)))
                    ))

(sprout (glistest 1000 0 12 0))      
    
  

Stéphane Boussuge
s_boussuge at yahoo.fr
www.stephaneboussuge.blogspot.com












More information about the Cmdist mailing list