Opened 4 years ago

Closed 4 years ago

#11587 closed defect (fixed)

SCI1.0 games don't respect "Prefer digital sound effects" checkbox

Reported by: MusicallyInspired Owned by: bluegr
Priority: normal Component: Engine: SCI
Version: Keywords: digital, sound, effect, midi
Cc: Game:

Description (last modified by MusicallyInspired)

Here is a video I uploaded to showcase this issue: https://youtu.be/iytnREXLrYc

For as long as I've been using ScummVM since it integrated FreeSCI and when the appropriate "Engine" menu tab was first introduced, it doesn't seem to matter whether "Prefer digital sound effects" is checked or not in Engine Settings for SCI1.0 games, it always used digital sound effects regardless and will not use the alternate MIDI sound effects when MIDI sound effects do in fact exist. I've been using DOSBox for Sierra games generally and decided to put Sierra games on my phone recently with the latest version of ScummVM available for Android and it seems this issue was never noticed or rectified. Also persists in the latest desktop version. Like SCI0 and SCI0.1 games, SCI1.0 games have digital sample data amended at the end of MIDI sound resources instead of being in a separate audio map file like SCI1.1 games.

It doesn't play nothing when unchecked, it uses digital sound effects either way. It seems as though every SCI1.0 game is affected. SCI0, SCI0.1, and SCI1.1 games do respect the checkbox and will play MIDI sound effect alternates when unchecked (test examples: SQ3, KQ1SCI, KQ6 (floppy) respectively), but SCI1.0 games persist in playing digital sounds seemingly across the board. One would have to use DOSBox to hear MIDI sound effects for these games as it currently stands.

Here is a short list of SCI1.0 games I've tested and where digital/MIDI sound effects exist and how to tell quickly what the issue is:

-SQ1SCI EGA/VGA: Skip intro, the Deltaur ship grapples onto the Arcada and causes a digital sound effect "clamp" sound (should have MIDI alternative when checkbox unchecked). Shortly after the ship doors open with a digital sound and the computer warns of the self destruct with digital speech as a sound effect. The door sound has a MIDI alternate sound but the self destruct computer speech does not (as you'd expect).

-SQ4 Floppy EGA/VGA: Skip intro, the flying shuttle hovers over Xenon and then takes off into the distance producing digital sound for both (should have MIDI alternatives when checkbox unchecked).

-PQ3 EGA/VGA: Skip intro, Sonny Bonds gets off the elevator, elevator has a digital sound when the doors open and close (should have MIDI alternatives when checkbox unchecked).

-LSL1SCI EGA/VGA: Skip intro, go inside the bar on the first screen, the door will be a digital sample (should be MIDI alternative when checkbox unchecked).

-LSL5 EGA/VGA: Skip intro, Larry will walk into a room and the door will close behind him playing a digital sample (should be MIDI alternative when checkbox unchecked).

For SQ4 particularly it's very beneficial to be able to deactivate digital sound effects while playing with the MT-32 for music as the sounds are all just lo-fi digital samples of MT-32 sound effects, which you'd get in full quality with MUNT or an MT-32. The video I linked at the beginning of the post showcases all 3 games with MIDI and Digital sound effects and where you can test for them at the beginning of each game quite easily.

EDIT: I previously stated that this function would be beneficial for SQ4 floppy particularly because its sound effects are just lo-fi recordings of the MT-32 and having MIDI sound effects with MT-32 sound would be better. However, it seems that SQ4 floppy already plays MIDI sound effects when playing with an MT-32 and unchecking "Prefer digital sound effects". And rechecking it actually activates the digital sounds. So in some cases the checkbox is actually observed. However, when playing with Adlib sound it persists in playing digital sound effects whether it's checked or not so this is still an ongoing issue. For SQ1SCI (EGA/VGA) and PQ3 (EGA/VGA) I noticed that it doesn't make a difference. So far it's only SQ4 floppy that allows MIDI sound effects and ONLY when playing with the MT-32. I'm going to do more testing with other games later.

EDIT 2: LSL1SCI EGA/VGA and LSL5 EGA/VGA also do not respect the checkbox and uses digital sounds regardless. Added testing steps to the above list. LSL1SCI and LSL5 also use lo-fi recordings of MT-32 sound effects for digital sounds. However, they do not automatically resort to MIDI sound effects when MT-32/MUNT is enabled like SQ4 floppy does.

Change History (9)

comment:1 by MusicallyInspired, 4 years ago

Description: modified (diff)

comment:2 by sluicebox, 4 years ago

Thank you for this thorough and well written report. I had made some notes long ago where it didn't seem to me (as a user) that this was doing what I thought it would, but they weren't coherent, it just didn't seem right. It's great to have a list to look at and figure out what's going on. I wanted to write a report like this but I didn't know what I was talking about.

It could be that the inherently complicated SCI audio situation makes it so that these settings produce outcomes that are technically correct but end up being at odds with what they seem to advertise, in which case we'd want to improve that. I've seen bug reports where people using default settings are confused by SCI audio results, and I've come away from those vaguely thinking it's not what I'd expect either.

This is good timing because there's great momentum on the SCI audio front right now. I think we should go through this list and come up with the explanation for each (most will probably be the same) and go from there. If nothing else, that would be a big help to me, as I keep breaking my promise to stay away from the audio stuff. The only outcome I want to avoid is this being closed as "works as intended" without a thorough explanation as to why, because then we're back where we started, and reports like these will keep coming, only they probably won't be this high quality. (And I'd still be confused)

I'll start taking a look. SCI audio folk, please chime in.

comment:3 by MusicallyInspired, 4 years ago

I'm glad this is helpful! :) If there is an explanation as to why this would be considered technically correct behaviour I'd be very interested to understand the details. I know things more often than not function in a much more complicated way under the hood than on the surface. Especially where reverse engineering is concerned. It would be surprising to learn that is so as, as I noted, SCI0 games that use digital sound work identically to SCI1.0 games when it comes to sound resources (even though they're slightly different formats) and the expected behaviour is present for those games. If unchecking "Prefer digital sound effects" to get MIDI sfx for SCI1.0 games is not the intended behaviour (even though it is for SCI0 games and functions as expected) there should be another similar function to allow these MIDI sfx and ignore digital ones for SCI1.0 as it was a native function of the original DOS interpreter depending on what driver you used.

I should also refer to another ticket that first integrated this feature seemingly for SCI0 games back in 2017. This is basically what one would expect to happen for SCI1.0 games. https://bugs.scummvm.org/changeset/cedd9d3c40503ec74575ea133a60c569a57238c4

Looking forward to seeing how this develops!

Last edited 4 years ago by MusicallyInspired (previous) (diff)

comment:4 by MusicallyInspired, 4 years ago

Sorry for the double post, I can't seem to edit comments. I should also refer to another ticket that first integrated this feature seemingly for SCI0 games back in 2017. This is basically what one would expect to happen for SCI1.0 games. https://bugs.scummvm.org/changeset/cedd9d3c40503ec74575ea133a60c569a57238c4

Version 0, edited 4 years ago by MusicallyInspired (next)

comment:5 by MusicallyInspired, 4 years ago

Description: modified (diff)

comment:6 by MusicallyInspired, 4 years ago

Description: modified (diff)

comment:7 by MusicallyInspired, 4 years ago

Description: modified (diff)

comment:8 by sluicebox, 4 years ago

I've taken a quick look and the reported behavior is indeed what's happening: for these game versions, "Prefer digital sound effects" (effectively) does nothing. The code where this option suppresses digital sound effects also includes SCI version checks that either require the game to be <= SCI_VERSION_0_LATE or >= SCI_VERSION_1_1, which excludes these games. This can be easily verified by tracing the references to the "prefer_digitalsfx" config value.

I don't think this issue overlaps with the other SCI audio things I've seen, so this is a relatively simple situation: we don't have any code that handles non-digital audio over digital for these versions. It's a missing feature.

Last edited 4 years ago by sluicebox (previous) (diff)

comment:9 by bluegr, 4 years ago

Owner: set to bluegr
Resolution: fixed
Status: newclosed

Thanks for your report! Fixed in 648d669c2dd3ddeaeb3d2ab4d3480ae08be85dd4

Note: See TracTickets for help on using tickets.