Opened 14 years ago

Closed 14 years ago

Last modified 5 months ago

#1947 closed defect (fixed)

DOTT/SAM: GM Instrument Chorus Level Improperly Set

Reported by: SF/tbcarey Owned by: eriktorbjorn
Priority: normal Component: Engine: SCUMM
Keywords: Cc:
Game: Day of the Tentacle

Description

While investigating bug #1159518
[https://sourceforge.net/tracker/index.php?func=detail&aid=1159518&group_id=37116&atid=418820],
I discovered that the instrument chorus levels for the
two SCUMM games that use General MIDI natively [Day Of
The Tentacle + Sam'n'Max Hit The Road] are improperly
set to 64 for every single instrument, while the
original interpreters for both games set every
instrument to chorus level 0 consistently throughout
the game. Global chorus level remains at 64 in the
originals as well, so that doesn't need to be changed.
I was able to easily track these differences via the
display on my SC-88.

Ticket imported from: #1159734. Ticket imported from: bugs/1947.

Change History (14)

comment:1 Changed 14 years ago by eriktorbjorn

Since that old bug is in danger of being closed as invalid
(since it was primarily about the tweeting bird in the DOTT
intro), I'd better add this comment here as well:

The Part::sendAll() function in scumm/imuse.cpp calls
_mc->chorusLevel(_effect_level). I wonder if it's supposed
to be _mc->chorusLevel(_chorus) instead.

I guess the MIDI device I'm listening to at the moment
doesn't implement chorus, because I can't tell the
difference between chorus 0 and chorus 64.

comment:2 Changed 14 years ago by SF/tbcarey

That sounds about right, especially given the following in
Part::setup(Player *player):

_effect_level = 64;
_chorus = 0;

The difference is really noticeable on a device capable of
chorus. I'm using an SC-88 in SC-55 mode [i.e. the original
device the music was written on for the game] and I could
always hear the difference between playing the games under
DOSBox and ScummVM, but had never bothered to investigate
what it actually was. If you can make this change, I'll be
more than happy to test it and let you know if it sounds
correct.

comment:3 Changed 14 years ago by eriktorbjorn

Ok, I've made the change. The more I look at it the more
sense it makes to me, even if I'm still not 100% sure.

I don't know how long it takes for the change to propagate
from developer CVS to anonymous CVS, and I don't remember
which of them the daily snapshots are based on.

If it goes spectacularly wrong, at least it's an easy change
to revert. :-)

comment:4 Changed 14 years ago by eriktorbjorn

I just wanted to point out that if this indeed turns out to
be a bug, like I suspect it is, it goes all the way back to
revision 1.1 of the imuse.cpp that was committed on November
14 the year 2001. See
http://cvs.sourceforge.net/viewcvs.py/scummvm/scummvm-old/Attic/imuse.cpp?rev=1.1&view=markup

That has to be some sort of record...

comment:5 Changed 14 years ago by SF/tbcarey

It appears to be fixed. Chorus level is set to 0 on all
instruments and the music finally sounds identical to the
original interpreter's output. Thanks for your help.

comment:6 Changed 14 years ago by SF/tbcarey

Status: newclosed

comment:7 Changed 14 years ago by eriktorbjorn

Owner: set to eriktorbjorn
Resolution: fixed

comment:8 Changed 14 years ago by eriktorbjorn

Ok, good. It would, of course, have been interesting to know
if there's any music that's supposed to change the chorus
setting, and compare that to the original.

But either way I guess it's going to be right more often
than wrong now, and most users probably don't have fancy
enough MIDI hardware to tell the difference. :-)

comment:9 Changed 14 years ago by SF/tbcarey

SAM + DOTT are the only SCUMM games that support General
MIDI natively, and thus the only ones that should be
affected by chorus levels (the MT-32 has no chorus
capability, only reverb). I've checked both and they both
set all instruments' chorus levels to 0.

However, I'll do a check on the non-SCUMM games I have as
well that use MIDI [BASS, FOTAQ, Simon the Sorcerer 1]. BS1
+ BS2 both use sampled music, as you know; I'm not sure
about the HE games since I don't own any, but the two Freddi
Fish demos I have both use digital music. Are there are
other games you can think of that use MIDI? Let me know and
I'll see if I can find any candidates to test them for me.

comment:10 Changed 14 years ago by SF/tbcarey

Actually, forget that.. the non-SCUMM games should be
outside of the iMuse framework, correct? Not that I won't
check on them anyway.. I've just noticed some
inconsistencies and unset parameters in BASS right now anyway :)

comment:11 Changed 14 years ago by sev-

Speaking of HE games. MIDI music have these demos (all
available from our demos page):

Fatty Bear's Birthday Surprise (DOS demo)
Putt-Putt Goes to the Moon (DOS demo)
Putt-Putt Joins the Parade (DOS demo)

Also full versions of these games and their Win32 versions
use MIDI too, and both funpacks use it as well. Later games
switch to digitized music.

comment:12 Changed 14 years ago by sev-

Ah, forgot that Win32 version of Inherit the Earth also uses
MIDI. There was demo which used MIDI but it's not
downloadable now, ask me or eriktorbjorn on IRC to send it
to you.

comment:13 Changed 14 years ago by SF/tbcarey

Okay, I've basically analyzed every single non-SCUMM game
that uses MIDI and come up with the following
discrepencies/info:

1. All games originally designed for MT-32 but remapped as
General MIDI [SIMON1, BASS, FOTAQ] must receive a 'GM System
On' message upon start-up of the game (SysEx: F0 7E 7F 09 01
F7) to reset reverb, chorus, panning, and volume levels
among others. As it is now, they can inherit settings from
previous games/MIDI files which could drastically alter the
way they sound. Additionally, BASS and FOTAQ should send a
MIDI Controller 123 message (All Notes Off) when exiting to
turn off all hanging notes, which they seem to have problems
with. None of the other games' music hangs upon exit, so if
you're using a different method for them, it should be
mirrored in BASS and FOTAQ.

2. SIMON1DEMO's tempo is incorrect; it's about 25% too fast.
Didn't notice the same behaviour in SIMON1TALKIE, and I
don't have SIMON1DOS to test.

3. ITE-DEMO's original interpreter sends the 'GM System On'
message at start-up, but ScummVM doesn't, so this should be
fixed also. Music also hangs on exit, so Controller 123 or
appropriate fix is needed.

4. Simon the Sorcerer II Demo's original interpreter does
not send a 'GM System On' message, even though it supports
GM devices natively via Miles Drivers. I suspect the music
was originally written for an MT-32 since selecting either
device in setup yields the same instrument mapping, so this
was probably an oversight. It's my opinion the message
should be sent on start-up in ScummVM. I did not have any
other version (SIMON2TALKIE or SIMON2DOS full) to test.

5. I did not manage to get MIDI working with the original
interpreters for any of the HE games (if someone can help me
do it, that'd be great - there were no setup programs, and
modifying the .ini file manually to include the .drv file
did nothing). They all sounded fine under ScummVM and
channel parameters were all cleared as instruments were
assigned to channels.

6. As for DOTT + SAM, I noticed a few small differences, but
nothing that would affect playback. For example, SAM does
not set channel volumes to 0 upon pauses but instead issues
a Controller 120 message (All Sound Off). They both also
initialize every channel to certain parameters upon loading,
but since ScummVM properly sets parameters when instruments
are actually assigned, I can't think of an instance when
this would matter.

I'll look into implementing some of the above changes, but
if anyone else gets the urge, feel free :)

comment:14 Changed 5 months ago by digitall

Component: Engine: SCUMM
Game: Day of the Tentacle
Note: See TracTickets for help on using tickets.