Skip to content
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

Beat detection values (bass, mid, treb + _att variants) are too high. #708

Closed
kblaschke opened this issue Mar 8, 2023 · 1 comment · Fixed by #745
Closed

Beat detection values (bass, mid, treb + _att variants) are too high. #708

kblaschke opened this issue Mar 8, 2023 · 1 comment · Fixed by #745

Comments

@kblaschke
Copy link
Member

kblaschke commented Mar 8, 2023

While working on integrating the new preset parser and rewriting the preset rendering process, I noticed some presets were behaving highly erratic or were completely broken (e.g. "shifter - robotopia"). I've tracked down these issues to the beat values being way too high.

The Milkdrop preset authoring guide isn't very specific about the actual value range (>0), but says that the values are expected to be in the range from 0.7 to 1.3 in general and around 1.0 if the levels don't change much.

Looking at Milkdrop's audio analyzing code, these values aren't absolute sums/averages of the current frequency spectrum intensity, but rather slighly or more smoothed relative values to the intensities of previous frames.

@ErikPrantare - you've refactored the beat detection code a while ago. Would you mind looking into this again and implement it in a more Milkdrop'esque way to keep the value ranges in the expected range?

@kblaschke kblaschke added this to the 4.1 milestone Mar 8, 2023
@kblaschke
Copy link
Member Author

A few other issues showed up during testing:

  • Spectrum analyzer data is generally very different from what Milkdrop provides. Most presets using custom waves in spectrum mode will render garbage, as the values/peaks are way too high. See many presets in "Waveform/Spectrum" in the Cream of the Crop collection as examples.
  • Oscilloscope data also has issues when drawing custom waveforms with more than 480 data points (512 is max, 576 samples should be provided for smoothing), there's a small spike at the front which shouldn't be there. Example:
    image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging a pull request may close this issue.

1 participant