View Issue Details

IDProjectCategoryView StatusLast Update
0001774OpenMPTPlayback Compatibilitypublic2024-05-08 19:24
ReporterAndyRND Assigned ToSaga Musix  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Platformx86 / x64OSWineOS Version(version plz)
Product VersionOpenMPT 1.31.05.00 / libopenmpt 0.7.4 (upgrade first) 
Target VersionOpenMPT 1.31.07.00 / libopenmpt 0.7.7 (upgrade first)Fixed in VersionOpenMPT 1.31.07.00 / libopenmpt 0.7.7 (upgrade first) 
Summary0001774: S3M Modules: relative volume of OPL vs PCM instruments is off for mono modules
Description

People have measured the relative volume of OPL channels compared to PCM channels on SoundBlaster and compatible cards and concluded that OPL is about 8.5 dB more quiet. This is for a single OPL channel in additive mode running both operators at 0 attenuation. I found these results here: https://www.vogons.org/viewtopic.php?f=62&t=49683&start=20
The expectation would be that ScreamTracker matches this pattern when both master volume and global volume are set to their max values of $7F and $40, respectively. I have confirmed this with ScreamTracker 3.21 in DOSBox. This means that for a master volume at the default level of $30, which scales PCM samples by 3/8 or -8.5 dB, the volume of PCM and OPL instruments should be nearly identical.
When measuring the output of OpenMPT, I found that the volume of OPL instuments is 6 dB higher than expected, i.e. at the default master volume, OpenMPT has nearly the same volume for PCM samples and OPL channels with only one rather than 2 additive operators active, or equivalently channels running in FM mode. I have only measured the output of OpenMPT by using the "stream output" feature, exporting to a WAV file.
I am assuming that OpenMPT intends to match the characteristics of ScreamTracker in this regard (as IT and others don't support OPL instruments) and that the objective is to replicate the characteristics of SoundBlaster cards to a certain extent (otherwise it would make sense to disregard the master volume in S3M files, which only affected playback on SoundBlaster).

Additional Information

I'm attaching the module "440.S3M". It plays four 440 Hz sine-wave instruments in this order:
(1) a PCM sample; (2) an OPL instrument in additive mode, with one operator at 0 attenuation and one operator at maximum attenuation ; (3) an OPL instrument in additive mode with both operators at 0 attenuation (max volume) (4) an OPL instrument in FM mode, with the carrier at 0 attenuation.
I saved the file in ScreamTracker 3, having set global volume and master volume to their respective max values and turned off stereo.
Instruments (1) and (3) closely correspond to the experiments conducted here: https://www.vogons.org/viewtopic.php?f=62&t=49683&start=20
The expected behaviour would be that compared to (1), instrument (3) is about 8.5 dB more quiet. Instruments (2) and (4) should be identical to each other in volume, and 6dB lower volume than (3).
Observed behaviour in OpenMPT is that the gap between (1) and (3) is only about 2.2 dB. (I say "about", because oddly for a mono module, the left and right PCM channels have slightly different volume levels).

TagsNo tags attached.
Attached Files
440.S3M.zip (2,359 bytes)
Has the bug occurred in previous versions?
Tested code revision (in case you know it)

Activities

Saga Musix

Saga Musix

2024-04-25 07:15

administrator   ~0005939

Last edited: 2024-04-25 07:16

That does not match my observations on a real SoundBlaster (I believe it was a SBPro I tested at the time).
Please note that ScreamTracker does not interact with the SoundBlaster mixer; any changes done to the mixer before running ScreamTracker will affect the sample / OPL balance. I specifically did my tests after a fresh installation (the SBPro was never inserted into that PC before), so there were no settings that were off from the defaults.

However, looking at your module, I think the difference can be explained by the module being a mono module; I only tested stereo output back then.

(I say "about", because oddly for a mono module, the left and right PCM channels have slightly different volume levels).

OpenMPT does not have a "mono" mode; with S3M's 16 stereo panning positions there is no clear center to place the sameple at. OPL is not affected naturally because it has no free panning.

Saga Musix

Saga Musix

2024-04-26 20:08

administrator   ~0005940

Fixed in r20660. As suspected, this only affects mono mode. Instead of multiplying sample volume with 11/8 in stereo mode, OpenMPT does the inverse in mono mode, in which case it also needs to be applied to OPL voices.

Oh and one more thing:

otherwise it would make sense to disregard the master volume in S3M files, which only affected playback on SoundBlaster

OpenMPT does that if it detects that the S3M file was made with a GUS (which is relevant for Manwe's GUS+OPL tunes for example).

Issue History

Date Modified Username Field Change
2024-04-25 04:11 AndyRND New Issue
2024-04-25 04:11 AndyRND File Added: 440.S3M.zip
2024-04-25 07:15 Saga Musix Note Added: 0005939
2024-04-25 07:16 Saga Musix Note Edited: 0005939
2024-04-26 20:04 Saga Musix Assigned To => Saga Musix
2024-04-26 20:04 Saga Musix Status new => assigned
2024-04-26 20:08 Saga Musix Fixed in Version => OpenMPT 1.31.07.00 / libopenmpt 0.7.7 (upgrade first)
2024-04-26 20:08 Saga Musix Target Version => OpenMPT 1.31.07.00 / libopenmpt 0.7.7 (upgrade first)
2024-04-26 20:08 Saga Musix Note Added: 0005940
2024-04-26 20:29 Saga Musix Status assigned => resolved
2024-04-26 20:29 Saga Musix Resolution open => fixed
2024-05-08 19:24 Saga Musix Summary S3M Modules: relative volume of OPL vs PCM instruments is off compared to ScreamTracker 3 w/ SoundBlaster => S3M Modules: relative volume of OPL vs PCM instruments is off for mono modules