View Issue Details

IDProjectCategoryView StatusLast Update
0001474OpenMPTPlayback Compatibilitypublic2021-06-23 17:24
ReporterJo Li KMC Assigned ToSaga Musix  
PrioritylowSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Platformx64OSWindowsOS Version10
Product VersionOpenMPT 1.29.10.00 / libopenmpt 0.5.9 (upgrade first) 
Target VersionOpenMPT 1.30.01.00 / libopenmpt 0.6.0 (upgrade first)Fixed in VersionOpenMPT 1.30.01.00 / libopenmpt 0.6.0 (upgrade first) 
Summary0001474: Flanger DMO plugin emulation results in silent Wet signal with surround channels
Description

I first noticed this bug when using the XMPlay plugin, so naturally, I checked to see if it happened in OpenMPT, as well. It did.

In this specific instance, whenever OpenMPT tries to play Instrument 11 (which uses Sample 11) on Channels 15 and 16 in the attached song, "Twins Chris & Liz", it does so very quietly. Playing the Instrument/Sample outside of the song works just fine, however.

Steps To Reproduce
  • Download the attached ZIP file and decompress "ChrisiLiz.it" anywhere.
  • Open OpenMPT (what an odd concept) v1.29.10.00 and drag "ChrisiLiz.it" into it.
  • Open the Pattern Editor and jump to Pattern 7, hit "Play".
  • Channels 15 and 16 should play extremely quiet when, in previous versions, they did not.
Additional Information

Basically, as far as I can tell, this Impulse Tracker module was made using OpenMPT v1.16.0215a because the song was made in 2005. That version had some rudimentary channel plugin support and, even back then, uses Flang effects with a "WetDryMix" of 80% for those channels. The difference? Modern versions of OpenMPT use per mille ("‰") as opposed "per cent" (%). Egro, what was "80%" in older versions of OpenMPT becomes "800%" in modern versions when it should be "8%"

As far as I can tell, all the other effects work perfectly fine across the board. It seems like someone just went the wrong direction with the WetDryMix settings and added when they should have subtracted.

TagsNo tags attached.
Attached Files
ChrisiLiz.zip (268,777 bytes)
Has the bug occurred in previous versions?Since 1.27
Tested code revision (in case you know it)

Activities

Jo Li KMC

Jo Li KMC

2021-06-20 07:24

reporter   ~0004806

Removed the HTML from the report. (HTML shows up in the preview, but not in the actual bug report. Who knew?)

Saga Musix

Saga Musix

2021-06-20 13:16

administrator   ~0004809

Last edited: 2021-06-20 21:25

How OpenMPT displays parameters to the user does not influence at all how the plugin will sound. 800 per mille is exactly the sem as 80 per cent, and you will see that OpenMPT in fact shows both values in the plugin editor (80% is the value as the plugin reports it, 800‰ is the unit OpenMPT internally uses for mapping a 0...1000 range to the internal 0...1 range used by plugins).

The real problem here isn't the dry/wet ratio, but rather that the channels to which the plugin is applied to are surround channels, and it seems like OpenMPT's implementation of the Flanger plugin is not 100% identical to the old DMO plugin that is being emulated here. The left and right channel cancel each other out so you only get silence in the "wet" signal. I'll have to see which part of the Flanger plugin emulation is broken but it's unlikely to be the Dry/Wet value itself.

HTML shows up in the preview, but not in the actual bug report. Who knew?

That's a bug in MantisBT that still hasn't fixed sadly, there are certain HTML elements that should be allowed but do not work when MarkDown is enabled. Use MarkDown for formatting instead.

Saga Musix

Saga Musix

2021-06-20 14:00

administrator   ~0004810

So yeah, when I implemented the Chorus and Flanger replacement plugins, I thought that they do exactly the same thing except for a few differences in their parameters. Turns out that the Chorus effect has a mono buffer for the delayed signal (which just adds left and right together => this results in silence for surround channels!), while the Flanger effect has a stereo buffer. However, I implemented both Chorus and Flanger with the mono buffer, not noticing the slight difference in the output (I didn't test the output with stereo samples, oops).

Jo Li KMC

Jo Li KMC

2021-06-20 17:27

reporter   ~0004811

Well, I'm glad I'm not losing my mind after all, heh heh. It's interesting that the problem wasn't what I thought it was, too! I didn't notice those channels in that module were Surround instead of Center/Mono. Switching them to anything other than Surround does, indeed, result in the audio sounding like it should. I'm glad I started using libopenmpt for Impulse Tracker files, now. This seems important (but not urgent nor high priority).

I kind of worry, though… I wonder how many people have made modules using these exact settings and, if the settings are fixed in a future version, will it have a backlash? In short: I wonder if would be better to just go "this is how it works, now" than it would be to make it work how it was intended to?

Thank you for looking into this! And, of course, thank you all for maintaining such a great project for so many years!

Saga Musix

Saga Musix

2021-06-20 17:30

administrator   ~0004812

I kind of worry, though… I wonder how many people have made modules using these exact settings and, if the settings are fixed in a future version, will it have a backlash? In short: I wonder if would be better to just go "this is how it works, now" than it would be to make it work how it was intended to?

If the difference between the old and new implementation turns out to be bigger than just "doesn't work as intended with surround channels", there will be some sort of migration path to make newly created files sound as they previously did. "Newly" in this case means any modules made with OpenMPT 1.27-1.29 and using the Flanger plugin. For those, the migration path will most likely be simple: Automatically replace the Flanger plugin with the Chorus plugin upon loading the file and adjust a few parameters.

Saga Musix

Saga Musix

2021-06-21 21:11

administrator   ~0004813

This is fixed as of r15377 (OpenMPT 1.30.00.46). Test builds can be obtained from https://builds.openmpt.org/builds/ (may take an hour or two to show up).

For modules made with OpenMPT 1.27-1.29, a compatible legacy plugin is provided that does not show up in the plugin manager by default (those songs will use it automatically). With the new implementation, Flanger behaves like the original DMO plugin.

This bugfix will not be backported to OpenMPT 1.29 / libopenmpt 0.5 most likely and only be available in OpenMPT 1.30 / libopenmpt 0.6 onwards.

Jo Li KMC

Jo Li KMC

2021-06-23 08:55

reporter   ~0004814

I can confirm that both OpenMPT 1.30.00.46 (r15378 and r15383) and xmp-openmpt 0.6.0 pre-13 (r15379 and r15383) correctly play the outdated module as intended. I did not, however, personally test the interim versions. (r15377 seems to be missing from the build downloads, in fact…) In my tests, however, I did find a rather strange problem.

Using the example module, I attempted to make a new FX… thing for Channels 15 and 16. In the newer builds of OpenMPT, there was a difference between the existing "Flang" effect and the new "Flanger" effect I made despite using the exact same settings. It's subtle, but it's easily heard if one channel is set to "Flang" while the other is set to "Flanger".<br>(I've attached the modified module to save you two minutes' time.) I'm not sure if this is intentional or not since the two plugins are supposed to be more-or-less identical aside from their Surround Channel compatibility, but I figured it was worth mentioning.

Saga Musix

Saga Musix

2021-06-23 16:43

administrator   ~0004815

I cannot spot any differences here. Note that if you added the plugin while the module was playing and didn't completely stop and restart playback afterwards, it is very well possible that the two plugin instances will be sounding slightly different because they will be out of phase. But after stopping playback, they should be in phase again. Is this maybe what you observed?

Jo Li KMC

Jo Li KMC

2021-06-23 17:02

reporter   ~0004816

Last edited: 2021-06-23 17:23

Note that if you added the plugin while the module was playing and didn't completely stop and restart playback afterwards, it is very well possible that the two plugin instances will be sounding slightly different because they will be out of phase.

Freakin' heck, I'm dumb. Yes, that was the exact problem. Oddly enough, though, after reloading the program and the module, it doesn't go out-of-phase even during play. Ugh.

I'm just gonna hush up and say "Problem solved, thank you for your hard work!" now. Heh heh.

Saga Musix

Saga Musix

2021-06-23 17:23

administrator   ~0004817

Freakin' heck, I'm dumb. Yes, that was the exact problem. Oddly enough, though, after reloading the program and the module, it doesn't go out-of-phase even during play. Ugh.

Yes, because then the two plugins will be running for exactly the same amount of time (it doesn't matter if a note is playing or not). I'll consider this issue to be resolved then. :)

Issue History

Date Modified Username Field Change
2021-06-20 07:21 Jo Li KMC New Issue
2021-06-20 07:21 Jo Li KMC File Added: ChrisiLiz.zip
2021-06-20 07:24 Jo Li KMC Description Updated
2021-06-20 07:24 Jo Li KMC Steps to Reproduce Updated
2021-06-20 07:24 Jo Li KMC Additional Information Updated
2021-06-20 07:24 Jo Li KMC Note Added: 0004806
2021-06-20 13:16 Saga Musix Note Added: 0004809
2021-06-20 13:18 Saga Musix Summary OpenMPT has trouble interpreting "WetDryMix" plugin/FX settings from much older versions of itself => Flanger DMO plugin emulation results in silent Wet signal with surround channels
2021-06-20 13:52 Saga Musix Assigned To => Saga Musix
2021-06-20 13:52 Saga Musix Status new => assigned
2021-06-20 14:00 Saga Musix Note Added: 0004810
2021-06-20 17:27 Jo Li KMC Note Added: 0004811
2021-06-20 17:30 Saga Musix Note Added: 0004812
2021-06-20 21:25 Saga Musix Note Edited: 0004809
2021-06-21 21:11 Saga Musix Status assigned => feedback
2021-06-21 21:11 Saga Musix Note Added: 0004813
2021-06-21 21:11 Saga Musix Fixed in Version => OpenMPT 1.30.01.00 / libopenmpt 0.6.0 (upgrade first)
2021-06-21 21:11 Saga Musix Target Version => OpenMPT 1.30.01.00 / libopenmpt 0.6.0 (upgrade first)
2021-06-23 08:55 Jo Li KMC Note Added: 0004814
2021-06-23 08:55 Jo Li KMC File Added: ChrisiLiz (OMPT v130-Test1).7z
2021-06-23 08:55 Jo Li KMC Status feedback => assigned
2021-06-23 16:43 Saga Musix Note Added: 0004815
2021-06-23 17:02 Jo Li KMC Note Added: 0004816
2021-06-23 17:23 Saga Musix Note Added: 0004817
2021-06-23 17:23 Saga Musix Note Edited: 0004816
2021-06-23 17:24 Saga Musix Severity tweak => minor
2021-06-23 17:24 Saga Musix Status assigned => resolved
2021-06-23 17:24 Saga Musix Resolution open => fixed
2021-06-23 17:24 Saga Musix Has the bug occurred in previous versions? Yes => Since 1.27