-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
add libopenmpt support with backward-compatible DSP effects #15519
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
add libopenmpt support with backward-compatible DSP effects #15519
Conversation
| if(QT_VERSION VERSION_GREATER_EQUAL 6.10) | ||
| # from Qt 6.10 GuiPrivate required for QShader/rendergraph (rhi/qshader.h) | ||
| list(APPEND QT_EXTRA_COMPONENTS "GuiPrivate") | ||
| endif() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is already merged. Can you rebase your PR on current main?
git fetch upstream
git rebase upstream/main
git push -f
This way we get rid of these criss cross merges.
CMakeLists.txt
Outdated
| find_package(Modplug) | ||
| default_option(MODPLUG "Modplug module decoder support" "Modplug_FOUND") | ||
| default_option(OPENMPT "OpenMPT module decoder support" "OpenMPT_FOUND") | ||
| default_option(MODPLUG "Modplug module decoder support (legacy)" "Modplug_FOUND") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should default to the new OpenMPT. Legacy should only be used if explicit requested. I suggest to remove to use OFF for MODPLUG.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To clean up the configure log, you should only call find_package(Modplug) when OpenMPT is not found.
This should be come with a warning like "checking for fall back library ... ". Goal is a consistent output of the configure stage.
| message(STATUS "libmodplug available as fallback (libopenmpt preferred)") | ||
| else() | ||
| message(STATUS "using libmodplug for tracker module support") | ||
| endif() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting. For my understanding libopenmpt fully covers the libmodplug features. Do we know a single file that is not opened by libopenmpt and where libmodplug succeeds?
I suggest to use only one soundsource but keep this option for experimental purpose.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
afaicr, they didn't carry over the DSP because they a) were not good, b) not what the artist intended, and c) a responsibility for the player
| } else if (fileType == "mptm") { | ||
| return "OpenMPT"; | ||
| } else { | ||
| return "Module"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This tree needs to be extended for the new file types.
src/sources/soundsourceopenmpt.cpp
Outdated
|
|
||
| } // anonymous namespace | ||
|
|
||
| // MARK: STATIC MEMBERS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is this comment for?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm. its a VS Code minimap marker. I thought I set my rules to not use those for projects that have an official repo that isn't mine, but I guess that phraseology is not clear enough
there are 5 files with "// vim "* formatting strings, I guess they were accidentally included
it's not like they have no worth, especially given how may folk use VS Code derived editors these days, but there was a request to get rid of them
| if (m_nXBassDepth > 8) | ||
| m_nXBassDepth = 8; | ||
| if (m_nXBassDepth < 2) | ||
| m_nXBassDepth = 2; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| if (m_nXBassDepth > 8) | |
| m_nXBassDepth = 8; | |
| if (m_nXBassDepth < 2) | |
| m_nXBassDepth = 2; | |
| if (m_nXBassDepth > 8) { | |
| m_nXBassDepth = 8; | |
| } | |
| if (m_nXBassDepth < 2) { | |
| m_nXBassDepth = 2; | |
| } |
| if (++m_nReverbBufferPos >= m_nReverbSize) | ||
| m_nReverbBufferPos = 0; | ||
| if (++m_nReverbBufferPos2 >= m_nReverbSize2) | ||
| m_nReverbBufferPos2 = 0; | ||
| if (++m_nReverbBufferPos3 >= m_nReverbSize3) | ||
| m_nReverbBufferPos3 = 0; | ||
| if (++m_nReverbBufferPos4 >= m_nReverbSize4) | ||
| m_nReverbBufferPos4 = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| if (++m_nReverbBufferPos >= m_nReverbSize) | |
| m_nReverbBufferPos = 0; | |
| if (++m_nReverbBufferPos2 >= m_nReverbSize2) | |
| m_nReverbBufferPos2 = 0; | |
| if (++m_nReverbBufferPos3 >= m_nReverbSize3) | |
| m_nReverbBufferPos3 = 0; | |
| if (++m_nReverbBufferPos4 >= m_nReverbSize4) | |
| m_nReverbBufferPos4 = 0; | |
| if (++m_nReverbBufferPos >= m_nReverbSize) { | |
| m_nReverbBufferPos = 0; | |
| } | |
| if (++m_nReverbBufferPos2 >= m_nReverbSize2) { | |
| m_nReverbBufferPos2 = 0; | |
| } | |
| if (++m_nReverbBufferPos3 >= m_nReverbSize3) { | |
| m_nReverbBufferPos3 = 0; | |
| } | |
| if (++m_nReverbBufferPos4 >= m_nReverbSize4) { | |
| m_nReverbBufferPos4 = 0; | |
| } |
| static constexpr int XBASSBUFFERSIZE = 128; | ||
| static constexpr int FILTERBUFFERSIZE = 256; | ||
| static constexpr int SURROUNDBUFFERSIZE = 8192; | ||
| static constexpr int REVERBBUFFERSIZE = 8192; | ||
| static constexpr int REVERBBUFFERSIZE2 = 6128; | ||
| static constexpr int REVERBBUFFERSIZE3 = 4432; | ||
| static constexpr int REVERBBUFFERSIZE4 = 2964; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these constants shoule be renamed to names like kXBassBufferSize
daschuer
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am afraid having a optional DSP in the SoundSource is foreign to Mixxx.
I would prefer to decode the files bit perfect to be 1:1 comparable with libmodplug.
The DSP part can be added to the effect rack and is then accessable during mixing.
as in, add a "Module DSP" effect that has all the same options in it? |
implements issue mixxxdj#9862 by replacing libmodplug with libopenmpt as the preferred tracker module decoder, while maintaining full backward compatibility with existing DSP effects and user preferences. changes: - add SoundSourceOpenMPT class for libopenmpt decoding - create TrackerDSP class with ported libmodplug DSP algorithms (reverb, megabass, surround, noise reduction) - add FindOpenMPT.cmake for build system integration - update CMakeLists.txt to support both libraries (openmpt preferred) - modify preferences dialog to configure both decoders - register openmpt provider with modplug as fallback features: - superior playback accuracy and format support from libopenmpt - all existing DSP effects work identically to libmodplug - seamless migration: existing user preferences apply automatically - active development and security updates from openmpt project - libmodplug remains available as fallback option technical notes: - DSP code ported from libmodplug's public domain implementation - both decoders pre-render entire module to RAM for seeking - DSP effects applied post-decode for consistency - same preferences UI works for both implementations
8380a19 to
da80f04
Compare
|
test fail on Windows only, hmm https://gist.github.com/mxmilkiib/78e10285885c5bff3289e4042d1de5bc long story short, the AI isn't certain but proposes a small change
my bet would be on a one-off test fail, or something else, even though this should be deterministic, but I am ignorant edit: gonna see if it reproduces, then try that "fix" |
implements issue #9862 by replacing libmodplug with libopenmpt as the preferred tracker module decoder, while maintaining full backward compatibility with existing DSP effects and user preferences.
changes:
features:
technical notes: