[CM] cm and quicktime: instrumentation

George Smith smithg@rz.uni-potsdam.de
Fri, 16 Jan 2004 16:53:16 +0100 (CET)


> 
> > 1.  When I try to play directly to the midi port, I get rhythmic
> >     inaccuracy, sometimes more, sometimes less. I assume there
> >     must be some sort of real time mode that I haven't figured
> >     out yet.
> 
> do you get the same inaccuracy when you write a midi file and play 
> that?? Its been some time since I looked at this old code, but i think 
> when you output to the midi port its actually  the Apple MIDI Manager 
> that sends the timed events to the synth.

The rhythmic inaccuracy is not there when I write a midi file and play it
back back (such as via quicktime). I don't really need to play anything
straight from the listener though.

> 
> > 2.  When I use instruments other than the default acoustic piano,
> >     I do hear them when I play them to the midi port, but when I
> >     try to write this to a midi file and play the file using
> >     quicktime, which involves converting the file to a quicktime
> >     movie, the instrumentation gets lost and I only hear acoustic
> >     piano. Here is some code to show what I've been trying to do.
> [...]
> >
> > What do I need to do to hear the instrumentation when playing the
> > midi file with quicktime?
> 
> first verify that your channel values are being written to the midi 
> file that CM writes as you expect, ie before you convert it. there is a 
> function called 'midi-file-print' or 'midifile-print' or' 
> print-midi-file' (sorry I cant remember the exact name)  that will 
> print the contents of the file to the  terminal. If your files have the 
> channel values you expect then its got to be some issue with 
> quicktime+midi files. what happens when you play the CM output file to 
> an external synth rather than Quicktime ?? If an external synth (or 
> some other sequencer app) can  manage your channel settings then its 
> got to be something to do with Quicktime.

After 

(let ((output (io "Macintosh 
HD:Applications:cm-2.3.4:programs:test.midi")))
  (events (progn (loop for ch from 0 to 8
      for pr in (list 0
                      +Acoustic-Guitar-Nylon+ +Acoustic-Guitar-Steel+
                      +Electric-Guitar-Jazz+ +Electric-Guitar-Clean+
                      +Electric-Guitar-Muted+ +Acoustic-Bass+
                                            +Electric-Bass-Finger+ 
+Fretless-Bass+)
      for pan in '(0 0 0 0 0 0 127 127 127) do
      (midi-write-message (make-program-change ch pr))
      do
      (midi-write-message (make-control-change ch 10 pan)))
   (test-play-scale 6)) output :tempo 60))

midi-file-print gives me the following:

File: Macintosh HD:Applications:cm-2.3.4:programs:test.midi 
Format: 0
Tracks: 1
Division: 480

Track 0, length 83
         0 #<Tempo Change 1000.0 ms>
         0 #<Note-On 6 48 88>
       240 #<Note-Off 6 48 127>
         0 #<Note-On 6 50 88>
       240 #<Note-Off 6 50 127>
         0 #<Note-On 6 52 88>
       240 #<Note-Off 6 52 127>
         0 #<Note-On 6 53 88>
       240 #<Note-Off 6 53 127>
         0 #<Note-On 6 55 88>
       240 #<Note-Off 6 55 127>
         0 #<Note-On 6 57 88>
       240 #<Note-Off 6 57 127>
         0 #<Note-On 6 59 88>
       240 #<Note-Off 6 59 127>
         0 #<Note-On 6 60 88>
       240 #<Note-Off 6 60 127>
         0 #<End of Track #(0)>

I'm very much of a beginner with midi. Up to now music for me has been
something I do with acoustic instruments. I assume that something is being
played on channel 6. I'm not sure what the midi code is supposed to look
like that makes channel 6 be +Acoustic-Bass+. I think I'm going to read up
on midi ;-)

Thanks,

George