[CM] Synchronisation Grace/CM3

Heinrich Taube taube at uiuc.edu
Sat Feb 21 07:31:18 PST 2009


i cant really tell what it should be doing with the randomness  
involved, but running this hacked example seems to sound correct in  
the case of simplesynth, but then the start time in thie file isnt  
correct. i think this is a bug in the file writing, it should be added  
the starttime of the process to the midis notes being sent. that is   
you shoulny need to use a time stamp for midi -- the only time you  
need to pass a time time stamp is if you use a clm instrument, which  
always want the true score time for the auido samples to start at


(define (algo01 dur row beat amp chan)
   (process while (< (elapsed #f) 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"
		 :time 0 ;(elapsed #t)
		 :dur d
		 :key k
		 :amp a
		 :chan chan)		
	   (wait w)))

(sprout (list (algo01 16 keyscale .25 1.0 0)
               (algo01 14 keyscale .25 1.0 1)
               (algo01 12 keyscale .25 1.0 2)
        	      (algo01 10 keyscale .25 1.0 3))
         '(0 2 4 6))

(sprout (list (algo01 16 keyscale .25 1.0 0)
               (algo01 14 keyscale .25 1.0 1)
               (algo01 12 keyscale .25 1.0 2)
        	      (algo01 10 keyscale .25 1.0 3))
        	"test.mid"
         '(0 2 4 6))



















> Hello,
> when running this little example, it seems that the different tracks
> are not properly synchronized when played directly with SimpleSynth
> (Mac Leopard). When I open the midifile with Quicktime everything
> sounds fine.
>
> Achim
>
>
>
> (mp:open 0)
>
> (define keyscale '(50 52 53 54 55 57 58 59 60 62 63 64 65 67 68 69 71
> 73 74 76 78 79))
>
> (define (algo01 dur row beat amp chan)
>   (process while (< (elapsed #f) dur)
> 	   with range = (length row)
> 	   for d = (* beat (random 4))
> 	   for k = (list-ref row (random range))
> 	   for a = (between 0.1 amp)
> 	   for w = d
> 	   do	
> 	   (send "mp:midi"
> 		 :time (elapsed #t)
> 		 :dur d
> 		 :key k
> 		 :amp a
> 		 :chan chan)		
> 	   (wait w)))
>
> (sprout (list (algo01 16 keyscale .25 1.0 0)
>               (algo01 14 keyscale .25 1.0 1)
>               (algo01 12 keyscale .25 1.0 2)
>        	      (algo01 10 keyscale .25 1.0 3))
>        	"test.mid"
>         '(0 2 4 6))
>
>
> Achim Bornhoeft
> Neckarhalde 38, D-72070 Tuebingen
> tel/fax +49 (0)7071 942745
> mobil +49 (0)179 6936930
> skype:achim.bornhoeft?call
> bornhoeft.org
>
> _______________________________________________
> Cmdist mailing list
> Cmdist at ccrma.stanford.edu
> http://ccrma-mail.stanford.edu/mailman/listinfo/cmdist



More information about the Cmdist mailing list