[CM] problems with cm3

Heinrich Taube taube at uiuc.edu
Fri Apr 3 13:55:25 PDT 2009


the code you sent me incorrect for realtime scheduling and when i  
correct it things work. the issue is your time stamps -- in realtime a  
time stamp is interpreted as an AHEAD factor, so when you pass it the  
value of (elapsed) you are telling it to play that many seconds in the  
future. when i remove that time stamp things work in either case  
everything plays in lock-step for me.

(define (algo02 dur row beat amp chan)
(process while (< (elapsed ) dur)
     with range = (length row)
     for d = beat
     for k = (list-ref row chan)
     for a = (between 0.1 amp)
     for w = d
     do (send "mp:midi" :dur d  :key k :amp .8 :chan chan)
          (wait w)))

(sprout (list (algo02 16 keyscale .25 1.0 0)
              (algo02 14 keyscale .25 1.0 1)
              (algo02 12 keyscale .25 1.0 2)
              (algo02 10 keyscale .25 1.0 3))

even at 10 times the lenth (160 seconds) I dont notice any drift.


> >Another problem I have is when i'm sprouting to a midi file. When I  
> write a file which according to the scheduler is 120 seconds long

when I write a midifile it plays exactly the same in quicktime and i  
can import it into sibelius and notator logic

(sprout (list (algo02 16 keyscale .25 1.0 0)
              (algo02 14 keyscale .25 1.0 1)
              (algo02 12 keyscale .25 1.0 2)
              (algo02 10 keyscale .25 1.0 3))
        4 "hkt.mid")


In general dont use time stamps, the only time you need a time stamp  
is if you call an fm instrument -- the instrument wants to know the  
true time to write the audio indo the file (fm-violin (elapsed #t )

> I also have problems when I use Grace to save (scheme) files. When I  
> try
> to commit my changes using git, git suddenly complains about lots of
> trailing whitespaces.

i dont know what 'git' is.  when i open a grace file in emacs it looks  
exactly like it does it grace.


bottom line: im using cm 3.2.4 (svn trunk) and things seem to be work  
well .



More information about the Cmdist mailing list