audacious-media-player / audacious

A lightweight and versatile audio player
https://audacious-media-player.org
Other
786 stars 105 forks source link

Incorrect range for stereo separation in OpenMPT plugin #1359

Closed Audacious-Bot closed 1 month ago

Audacious-Bot commented 1 month ago

Author Name: Chris Spiegel Original Redmine Issue: https://redmine.audacious-media-player.org/issues/1219 Original Date: 2023-08-19


When I wrote the OpenMPT plugin I incorrectly assumed the stereo separation range was from 0% to 100%, when in reality it's 0% to 200%, where 0% is no separation and 200% is complete separation.

Briefly, since some MOD formats have complete L-R separation (half the channels on one side, half on the other), libopenmpt provides a stereo separation setting, which allows you to choose how much mixing of channels to perform; this is especially useful with old modules (e.g. Protracker) and headphones. You can choose anywhere between complete separation and complete mixing (i.e. mono).

To the topic at hand, the Audacious libopenmpt plugin restricts the range to 100%. But 100% separation in libopenmpt is actually 50% in reality. It's impossible to select full stereo separation in the current Audacious plugin.

It's trivial to expand the range, but there are a few considerations:

A range of 0% to 200% would be confusing to most users; why should 200% be the top? So in my opinion displaying a range of 0-100 to the user is the right thing.

Displaying a range of 0-100 and then scaling to 0-200 for libopenmpt is also trivial, but there's one problem: if somebody has changed their stereo separation value, that new value will now sound different than their old value. For example, if they set the value to 100%, that used to be 50% in reality, but now would be scaled to 100% in reality.

Which leaves two options I can think of:

  1. Apply the scaling and change how separation sounds for those users who have actually updated the setting (which I suspect is an extremely low count).
  2. Create a new setting name for the scaled separation: if the user has the old setting name but not the new one, "migrate" it over by scaling it. If the user has a new one, use it directly and ignore the old one if it exists.

I'm fine fixing it either way.

Finally, the plugin sets a default stereo separation of 70%, which corresponds to a "real" setting of 35%. Changing this would change the setting for all users, so maybe we just have to stick with the current setting, but in an ideal world I'd want to use the default libopenmpt setting, which is 100% (corresponding to a "true" separation of 50%). However, given that it does affect everybody who uses the plugin, maybe that's a bridge too far.

Audacious-Bot commented 1 month ago

Original Redmine Comment Author Name: John Lindgren Original Date: 2023-08-19T18:21:38Z


My suggestion:

Audacious-Bot commented 1 month ago

Original Redmine Comment Author Name: Chris Spiegel Original Date: 2023-08-22T15:31:26Z


Sounds good. I'll create a pull request to implement this.

Audacious-Bot commented 1 month ago

Original Redmine Comment Author Name: John Lindgren Original Date: 2023-10-21T18:23:33Z


Fixed by https://github.com/audacious-media-player/audacious-plugins/pull/145. Thanks!