[CM] cm3/sndlib with audio and midi file generation

Heinrich Taube taube at uiuc.edu
Tue Nov 18 04:13:47 PST 2008


the new cm3 tarball has sndlib audio file and midi file output working  
for processes. you need the lastest sndlib for this.

http://camil.music.uiuc.edu/Software/grace/downloads/cm3.tar.gz

to generate a file just pass the file name to (sprout ...) See cm3/scm/ 
examples.scm for some examples of realtime and the new file based,  
faster-than-real time generation.  ive also added a simple SNDLIB  
instrument  called 'wave'  to the runtime sources (sine with amp and  
gliss control)  so no need to  load anything,  you can generate audio  
immediately:

$ bin/cm3
cm> (with-sound() (wave 0 1 440 .1))
"test.aiff"

cm> (define (simpwav n r d lb ub)
   (process repeat n
	   for k = (between lb ub)
	   for t = (elapsed #t)
	   do
	   (wave t d (hz k) .1)
	   (wait r)))
simpwav

cm> (sprout (simpwav 10 .2 .1 60 80) "test.aiff")
Output: "test.aiff"
Channels: 1
Srate: 44100.0

cm>

note that, since sprout returns immediatly, you will know that the  
sound file computation is done when the file info is printed to the  
screen. also you can use (elapsed #t) to get the true score time of  
the process to pass to a clm insrument (calling just (elapsed)  
continues to return the relative run time since the process started)

right now the :play option to with-sound or sprout doesnt work. still  
alot to do, but its basically working. way cool! 



More information about the Cmdist mailing list