[CM] midi ports/clm/cm3 in s7 scheme

Heinrich Taube taube at uiuc.edu
Mon Nov 10 17:47:26 PST 2008


the latest tarball has the midi ports/thread working in s7. i ran a  
few processes, including the double process reich example  in real  
time and s7 seems to keep up fine.

since there is no gui ive added some stuff to cm3 to manage ports, and  
ill extend it to files in the next tarball so cm3 will seem much more  
like cm2. at that point i dont think there is any reason to use the  
cm2 branch unless common lisp itself if important. here are the two  
main additions to cm3:

(ports)                                     returns info about ports  
and devices (only the midi port right now)
(open "name.port" ...)          opens port

i dont have the send macro yet, but you can use all the underlying  
functions. here is an example,  see  cm3/scm/example.scm for more info

zippy:cm3 hkt$ bin/cm
S7 Scheme 1.2, (c) 2008 William Schottstaedt
SNDLIB 20.10, (c) 2008 William Schottstaedt
/\\\
---\\\---------
----\\\--------
----/\\\------- Common Music 3.2.0
---/--\\\------
--/----\\\-----
/      \\\/
Type 'q' to quit.

cm> (ports)
(("midiout.port" ("IAC Driver Bus 1" 0 #f)) ("midiin.port" ("IAC  
Driver Bus 1" 0 #f) ("Musical Typing Keyboard" 1 #f)))

cm> (open "midiout.port" 0)
CoreMidi - opening out: Bus 1

cm> (mp:midi 0 1 60 .8)

cm> (define (simp n r lb ub)
  (process repeat n
	   do
	   (mp:midi :key (between lb ub))
	   (wait r)))
simp
cm> (sprout (simp 10 .25 60 72))

cm>









More information about the Cmdist mailing list