Commit Graph

15 Commits

Author SHA1 Message Date
99259dc98a swaps misordered label values 2024-04-18 23:49:31 +02:00
a57885dc3a Add WaveformAligner test 2024-02-06 07:58:32 -06:00
9762297909 Properly namespace all classes under "::libprojectM" 2023-12-30 14:56:35 +01:00
36fb09ce30 Implemented waveform alignment algorithm.
Also consolidated the waveform sample count constant to keep it aligned over all classes.
2023-11-24 21:00:40 +01:00
69d2134fa2 Rewrite of audio data processing/beat detection.
Consolidated audio processing code into the PCM class, removing the BeatDetect class in the process. Beat detection now uses the same algorithm as Milkdrop, passing the proper relative bass/mid/treb values to presets. Makes many presets look less jumpy/flickering, as the values are now (smoothly) alternating around 1.0.

Updating frame audio is now done in a function that must specifically be called. Any subsequent calls to GetFrameAudioData() will then return the exact same copy of the audio data. As of now with the exception that new waveform data may be passed in via a separate thread, which will then be returned and might not match the spectrum data. Will fix that in a later commit.
2023-11-24 21:00:39 +01:00
045b05fa95 Replaced FFT implementation.
Removed the previous FFT algorithm, now using a modernized version of the original Milkdrop FFT transform which also has both an equalizer and frequency envelope, making it slightly more sophisticated.

Modernization mainly included replacing raw pointer arrays with std::vector and using STL types/functions for the calculation, specifically std::complex as the FFT heavily uses these numbers. This makes the code more compact and readable.

Manually tested both original and modernized versions of the class to test if the algorithm still returns the exact same results, which is the case.
2023-11-24 21:00:35 +01:00
b88f96b780 Fix CMake scripts, so they can be used via add_subdirectory(). 2023-09-19 18:38:43 +02:00
5c5bb0a147 PresetFileParser: Fix line reader and a compiler warning, re-add tests.
Don't skip lines with no data after "=", as there are many presets with empty code lines. skipping it would create a gap in the line numbers, aborting the loop in GetCode() early.
2023-09-11 10:19:46 +02:00
29b3d4a463 Fix namespace issues in PCMTest.cpp 2023-09-11 10:19:46 +02:00
b9ef6a3974 Remove old expression parser and add the new projectm-eval lib.
Requires a general rewrite of the Milkdrop preset code. Previous implementation was tightly integrated into the code parser, so reusing this code wasn't possible. Additional refactoring was done, finished converting custom wave/shape implementations to use the new expression parser code.
2023-09-11 10:19:45 +02:00
6e795ec632 Only build either shared or static projectM and playlist libraries.
Target name is now just libprojectM::projectM for the main library instead of libprojectM::static or libprojectM::shared.

Now using CMake's default mechanism to select the resulting library type via the BUILD_SHARED_LIBS variable. Main use case will be working with the shared library, which is the default.

Playlist library now also builds as a shared library, including proper symbol exports.

Additionally, deleted the leftover TestRunner class and a few old and rather useless test cases.

Also added LLVM find_package call and as a link dependency if the build is configured for using (experimental) LLVM code.

Reorganized tests to link either one of the object libraries for unit testing.
2023-01-13 11:16:27 +01:00
62c4585cd7 Temporarily disable FFT low-frequency test.
Values don't match for some reason, need to investigate this later. Spectrum looks good, so it's probably the test implementation that's wrong here.
2022-12-30 14:44:06 +01:00
cddf1ec392 Temporarily disable FFT low-frequency test 2022-12-13 20:21:29 -06:00
710d228fcf Add libprojectM include path for tests, as it was removed in the library definition. 2022-12-06 15:02:40 +01:00
ebce27fbfb Move libprojectM tests into subdirectory. 2022-11-21 19:54:57 +01:00