Age | Commit message (Collapse) | Author |
|
After listening to the original music in a Mac emulator (which
unfortunately doesn't handle the music very well), I can only
conclude that note value 1 means the note should continue playing.
At first I thought maybe it was supposed to fade the current note,
or perhaps change its volume, but I can't hear any traces of
either. So I'm going to assume it just means "hold the current
note", though for the life of me I cannot think of any valid
reason for such a command. So it may be wrong, but it sounds
closer to the emulator than it did before.
|
|
At least for me, hfsutils turns spaces into underscores so try both
"Monkey Island" and "Monkey_Island".
|
|
|
|
Properly treat rests as rests, not notes. Otherwise, it would try
to play a really low note which just came out as a "pop".
|
|
In looped music, prevent the music channels from drifting out of
sync over time. This was noticeable after a few minutes in the
SCUMM Bar. We do this by extending the last note (which is just
zeroes, so we didn't even use to play it) so that it has the
exact number of samples needed to make all channels the exact
same length. (This is calculated when the music is loaded, so it
does not need any extra data in the save games, thankfully.)
As a result, the getNextNote() is now responsible for converting
the duration to number of samples (out of necessity) and for
converting the note to a pitch modifier (out of symmetry). I made
several false starts before I realized how much easier it would
be this way.
|
|
The Monkey Island and Loom mac music is really quite similar. The
data layout is a bit different, but most of the code was easy to
separate into its own class. The Loom player doesn't do looped music
but I don't remember off-hand if it ever should.
|
|
Otherwise it may crash if you quit before any instruments have been
loaded. Oops.
|
|
This is based on the old Mac0-to-General MIDI conversion that we used
to do (and which this patch removes), as well as the code for playing
the Monkey Island 2 and Fate of Atlantis Macintosh music. I'm not sure
how accurate it is, particularly in tempo and volume, but at this
point it seems to work pretty well. Looping music is perhaps a bit
off, but it was before as well.
There is an annoying drawn out note in the music when you're following
the shopkeeper, but that appears to have been there in the original as
well.
|