Thanks Henrich, it is exactly what i need for solve my problem. thank you very much
stf Le 2 déc. 2011 à 22:21, Heinrich Taube a écrit : > 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 >> [email protected] >> www.stephaneboussuge.blogspot.com >> >> >> >> >> >> >> >> >> >> >> _______________________________________________ >> Cmdist mailing list >> [email protected] >> http://ccrma-mail.stanford.edu/mailman/listinfo/cmdist > > > _______________________________________________ > Cmdist mailing list > [email protected] > http://ccrma-mail.stanford.edu/mailman/listinfo/cmdist Stéphane Boussuge [email protected] www.stephaneboussuge.blogspot.com
_______________________________________________ Cmdist mailing list [email protected] http://ccrma-mail.stanford.edu/mailman/listinfo/cmdist
