[CM] Does cm and portmidi support polyphony?

Emre Sevinç emres@bilgi.edu.tr
Mon, 27 Mar 2006 20:14:35 +0300


Rick Taube wrote:

> THis works perfectly fine for me (OSX).  Note that im using the  
> latest cvs sources and  RTS is now a module so you should download  
> from the files page. (ill have more to say about this in a day or so) 


Out of curiosity, I'm still following your Notes from the Metalevel and 
using an old version of CM (I think I
have installed it from CVS 5-6 months ago).

If I install the latest version of the CM (from CVS) do I have to modify 
the codes presented in the book?
If so, major changes?

(e.g. the example you have provided below: (use-system :rts) )

>
>     http://sourceforge.net/project/showfiles.php?group_id=9766
>
>
> ;;;-----------------------------------
> (in-package cm)
>
> (use-system :portmidi)    ; load portmidi
> (use-system :rts)         ; load rts
>
> (defparameter mp (portmidi-open :input 0 :output 1))   ; my in/out ports
> (defparameter mytune (new seq))  ; seq for recording
>
> (portmidi-record! mytune mp)  ; start recording
> ;; play your tune...then
> (portmidi-record! nil mp) ; stop recording
>
> ;; now separate into left and right hands seqs
>
> (defparameter split 60)         ; split point for hands
> (defparameter left-hand
>   (new seq :subobjects
>        (subobjects mytune :slot 'keynum :test (lambda (k) (< k  
> split)))))
> (defparameter right-hand
>   (new seq :subobjects
>        (subobjects mytune :slot 'keynum :test (lambda (k) (>= k  
> split)))))
>
> ;;; check 'em out
>
> (list-objects left-hand)
> (list-objects right-hand)
>
> ;; put 'em in a midifile
>
> (events (list left-hand right-hand) "test.mid")
>
>
<http://getfirefox.com/>