[CM] Grace MIDI import / multiple message types

Heinrich Taube taube at uiuc.edu
Thu Aug 26 05:06:30 PDT 2010


yes telling message apart can be a problem and there is no object  
system to make it easy.
what you suggest is an interesting approach.
-- another possiblility : i could allow you to import the "opcode" of  
the message as a tag:
   (op time cltl1 ctl2) (op time key)
-- another possibility: call the current function 'parse-midifile' and  
then implment a 'import-midifile' that bring everything in, including  
time and opcode






On Aug 26, 2010, at 6:34 AM, Bret Battey wrote:

> >> i think maybe what ill should do is allow specs like
> >>      ((time key) (time clt1 ctl2) ...)
>
> Yes -- I think that would work. The trick seems to be returning a  
> list that allows one to tell the different message types apart. So,  
> in this example, we might get something like (?):
>
> (
>  ((0.0 60) ())   ;; a note at time 0
>  ((1.2 62) ())   ;; a note at time 1.2
>  (() (1.5 1 64))  ;; controller 1, value 64, at time 1.5
>  ((1.8 64) (1.8 1 68))   ;; note at time 1.8, controller at time 1.8
>                          ;; (or one could have two distinct entries  
> for each event)
> )
>
> This format could also be helpful because one could order the spec  
> based on the time-priority logic one needs. That is, if I have  
> events simultaneous in time but logic-wise need to process (say)  
> controller values 1st, I would just place the controller first in  
> the spec.
>
> It is interesting that the Grace MIDI file import can import the  
> meta messages. Does that mean there is an undocumented keyword  
> already that allows one to import meta messages via midifile-import?  
> ('meta' doesn't do it ;)
>
> Thanks,
> -=Bret
>



More information about the Cmdist mailing list