[Enh] MIDI to WAV

John.Maloney at disney.com John.Maloney at disney.com
Mon Dec 17 21:22:20 UTC 2001


Mark,

The problem was that MIDI files can contain tempo changes. The default
tempo is 120 quarter notes/minute, but both this tempo and the the ticks/quarter
note can be set. Some MIDI files contain many changes of tempo throughout
the file.

Attached is a changeset that takes these tempo changes into account. It worked
on several MIDI files I tried, including one with dozens of tempo changes. Let
me know if you have are any problems. I've submitted it to the changes stream,
so it will come out with the next batch of updates.

By the way, I also added menu commands ot the ScorePlayerMorph so you can
save a MIDI performance to a WAV, AIFF, or Sun audio file from a menu command.
All your instrument, track volume and pan, and tempo settings are followed. (Reverb
is NOT, I realized this morning. There's always something more to be done...)

Those changes are also in the update stream. Plus, saving as and audio file is quite
a bit faster than before.

Next time you teach your Squeak audio class, it will be even easier to save performances
as audio files...

	-- John


At 4:09 PM -0500 12/14/01, Mark Guzdial wrote:
>If you create a composition in Squeak with MIDI and you want to 
>output the whole thing to MP3, the attached code lets you output the 
>Score to WAV for conversion elsewhere.  The current version DOES 
>generate the MIDI as WAV, but it also pads the end with LOTS (!!) of 
>blank space.  I think that durationInTicks is over-estimating in 
>ScorePlayer, but this at least works.
>
>Mark
-------------- next part --------------
Skipped content of type multipart/appledouble


More information about the Squeak-dev mailing list