[CM] implementing MIDI-file options

Rick Taube taube@uiuc.edu
Wed, 25 Jun 2003 06:10:02 -0500


Hi bret -- you should be able to set :tempo, :timesig, :keysig and 
:divisions:

? (io "foo.midi" :tempo 90 :divisions 500 :timesig '(3 4) :keysig '(c 
:minor))
#<midi-file-stream "foo.midi">
? (events (new midi time 0 keynum 60 duration 1) "foo.midi")
"foo.midi"
? (midi-file-print "foo.midi")
File: foo.midi
Format: 0
Tracks: 1
Division: 500
Track 0, length 34
        0 #<Tempo Change 333333/500 ms>
        0 #<Time Signature 3/4 (24 clocks, 8 32nds)>
        0 #<Key Signature 3 flats, minor>
        0 #<Note-On 0 60 64>
      500 #<Note-Off 0 60 127>
"foo.midi"
?