[CM] glissandi

Heinrich Taube taube at illinois.edu
Fri Dec 2 13:21:49 PST 2011


not sure what you are trying to do but this plays a note and then  
bends it.  bend values are just midi  magic numbers: 8192 is no bend,  
16383 is max bend 0 is min bend. what a device does to respond to bend  
values depends on each device -- max might be a whole step or an  
octave, for example.

(define (play-and-bend num dur)
   (process repeat num
            do
            (mp:midi :key (between 60 90) :dur 4 :amp .8 :chan 0)
            (loop for i from 1 to 5
                  do
                  (mp:bend :time (* .1 i)
                           :val (discrete i 1 5 8192 16383)
                           :chan 0))
            (mp:bend :time dur :val  8192) ; reset to no bend at end  
of note
            (wait dur)))

(sprout (play-and-bend 1 2) )


On Dec 2, 2011, at 6:57 AM, stephane boussuge wrote:

> 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
>
>
>
>
>
>
>
>
>
>
> _______________________________________________
> Cmdist mailing list
> Cmdist at ccrma.stanford.edu
> http://ccrma-mail.stanford.edu/mailman/listinfo/cmdist




More information about the Cmdist mailing list