[Media_api] Writing midi files

Roger Dannenberg rbd at cs.cmu.edu
Wed Oct 31 10:25:39 PST 2007


Steven,
    In addition to PortMidi, there is a PortSMF -- port standard midi 
file -- in a parallel directory on sourceforge (under SVN, see the 
PortMedia wiki on sourceforge for more info).
    There's not much documentation yet, but you can use it to write midi 
files in two steps. First, you need to build an in-memory sequence (an 
instance of Alg_seq). It is possible to put in a tempo track, track 
names and info, key signatures, etc., but you can also just put in 
pitch, time, duration, and loudness. Then you can call a function to 
write your sequence to a midi file (or an ascii representation is also 
available).
    If you go this route and need more details, let me know.

    -Roger



More information about the media_api mailing list