[CM] Tempo and import-events question

Eoin Brazil eoin.brazil@ul.ie
Mon, 12 Dec 2005 15:59:03 +0000


Hi all,

I'm not sure if I'm importing the events from an existing Midi file
incorrectly or if this is a bug but I've got a Midi file "austinbarrats.mid"
which I have imported using import-event and then I've created an output of
these events to another Midi file "meta1.mid" using the events function. It
seems that the tempo is being messed up or that something weird is going on
as the music now plays substantially faster. I've included the listing of
the first ten notes and headers from the two Midi files taken from the
midi-file-print function and added them at the bottom of this message. I
have tried using the various settings such tempo and timesig with the events
function but these don't seem to help. One of the parts that seems a little
weird and I think is the problem is 0 #<Tempo Change 1000 ms> message at the
start of the outputted midi file and that maybe this causes difficulties
with the next midi message which is 0 #<Tempo Change 375 ms>. Has anyone
encountered this issue or problem before as I'd really like some help in
trying to both figure out and fix what is going on.

Thanks,
\Eoin

CM Code [Environment: CM 2.6.0, Mac OS X 10.4.3 - standard all in one CM Mac
OS X installer (cm_2.6.0-app-osx.dmg.gz) ]
? (setf testmidi (import-events "austinbarrats.mid"))
? (events (subobjects testmidi) "meta1.mid")

INPUT Midi File

File: austinbarrats.mid
Format: 0
Tracks: 1
Division: 480
Track 0, length 2289
       0 #<Tempo Change 375 ms>
       0 #<Key Signature 1 sharp, major>
       0 #<Time Signature 6/8 (36 clocks, 8 32nds)>
       0 #<Sequence/Track Name "Dusty Windowsill, The">
       0 #<Sequence/Track Name "Austin Barratts">
       0 #<Text Event "C:Sean Harling">
       0 #<Text Event "Z:id:hn-jig-91">
       0 #<Program-Change 0 "Acoustic-Grand-Piano">
       0 #<Note-On 0 69 127>
     479 #<Note-Off 0 69 0>
       1 #<Note-On 0 71 90>
     239 #<Note-Off 0 71 0>
       1 #<Note-On 0 72 120>
     239 #<Note-Off 0 72 0>
       1 #<Note-On 0 71 90>
     239 #<Note-Off 0 71 0>
       1 #<Note-On 0 69 90>
     239 #<Note-Off 0 69 0>
       1 #<Note-On 0 76 127>
     239 #<Note-Off 0 76 0>

OUTPUT Midi file
File: meta1.mid 
Format: 0
Tracks: 1
Division: 480
Track 0, length 2078,
       0 #<Tempo Change 1000 ms>
       0 #<Tempo Change 375 ms>
       0 #<Key Signature 1 sharp, major>
       0 #<Time Signature 6/8 (36 clocks, 8 32nds)>
       0 #<Sequence/Track Name "Dusty Windowsill, The">
       0 #<Sequence/Track Name "Austin Barratts">
       0 #<Text Event "C:Sean Harling">
       0 #<Text Event "Z:id:hn-jig-91">
       0 #<Note-On 0 69 127>
     180 #<Note-Off 0 69 127>
       0 #<Note-On 0 71 90>
      90 #<Note-Off 0 71 127>
       0 #<Note-On 0 72 120>
      90 #<Note-Off 0 72 127>
       0 #<Note-On 0 71 90>
      90 #<Note-Off 0 71 127>
       0 #<Note-On 0 69 90>
      90 #<Note-Off 0 69 127>
       0 #<Note-On 0 76 127>
      90 #<Note-Off 0 76 127>