[CM] Does cm and portmidi support polyphony?

Rick Taube taube@uiuc.edu
Mon, 27 Mar 2006 10:27:14 -0600

Thanassis  im sorry, i have had almost no time the last few days. ill  
try to send a working example in a day or so.


On Mar 26, 2006, at 11:02 AM, Thanassis Zervopoulos wrote:

> Hi,
>   I'm sorry if I ensist but I am quite a newbie, so besides the  
> tutorial and common music dictionary this forum its the only
> help I've got....
> I can't figure out how can I make this example work and I've tried  
> also the example below without the if-condition
> and the result was a seq of midi-note-on and midi-note-off  
> events....how can I genarate a seq with midi events,
> because I've tried to hear the seq with midi-note-on ,midi-note-off  
> events and produced only one note (I think the first one)
> Actually I don't know how to hear what did I play with set- 
> receiver......with (portmidi-record! seq) its much esayier
> I'm really sorry for ensisting so much
> On 3/21/06, Rick Taube <taube@uiuc.edu> wrote:
> thanassis -- both portmidi and midishare support playing many events
> simultaneously , or more technically, um ta ta   um ta ta  with  
> lots of
> other notes at the same time. it does not matter if you use one  
> "track"
> or many. so the problems you are experiencing must be of a different
> sort.
> > left and right hand and make two seq_track,one for the left hand and
> > one for the right hand, but in the same time we call
> > (portmidi-record)...
> > for example
> > (if keynum < 64) which is the middle C make a left hand seq and name
> > it <seq_track0> and for keynum > 64 make a right hand seq,
> > <seq_track1> while (portmidi-record) recieve midi messages from the
> > midi keyboard.
> yes this is ceratinly possible, do something like
> (defparameter righthand (new seq))
> (defparameter lefthand (new seq))
> (defun record-hands (mm ms)
>     (let ((ev (midi-message->midi-event mm :time ms)))
>       (if (< (sv ev :keynum) 64)
>           (append-object ev lefthand)
>           (append-object ev righthand))))
> (defparameter mp (portmidi-open :input ?))
> (set-receiver! #'record-hands mp)
> ;; play um-ta-ta um-ta-ta with melody
> (remove-receiver! mp)