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

implement faster dB-based VUMeters and a tricolor main VUMeter #429

Merged
merged 1 commit into from
Jul 4, 2024

Conversation

FulopNandor
Copy link
Contributor

Dear Pascal,

Please apply my current pull request. It implements faster dB-based solid-color VU meters for FM-operators and a tricolor stripe for the VU meter of the main output.
In addition, further improvements have been introduced:

  • during initialization, 47 solid color and 47 tricolor but single LED stripe images are created and stored in persitent arrays.
    The 0th element of this array shows all LEDs in dark color, the 1st element shows the leftmost LED in bright color, the 2nd element shows the two leftmost LEDs in bright color, and so on, until the last element, which contains all LEDs in bright.
  • in the VuMeter::paint() method, there were previously two calls to the drawImage() method: the first one redrew the entire LED stripe in dark, and the second one redrew the leftmost LEDs in bright color. Now, there is a single call to the drawImageAt() method, which refers to the proper element of the array of images mentioned above, indexed by the dB-based scaling. (And, it is also hoped, the method drawImageAt() is faster on its own than the drawImage()).
  • a faster approximating dB-calculation method is implemented, if either Little Endian or Big Endian IEEE 754 4-byte sized float storage system is implemented in the given HW. (AFAIK, most CPUs belong to one of these categories); if not, the dB-calculation falls back to the traditional usage of the floating point log() function.
    (Note, that I have tested the Standalone and VST3 plugin versions in MS Windows 10 OS (Intel i5-4460 CPU; MS Visual Studio 2022 Community) and the Standalone version in Raspbian OS bookworm 64-bit Linux (Broadcom BCM2711 CPU, Rasberry Pi4B), i.e. in Little Endian systems only.)

@asb2m10
Copy link
Owner

asb2m10 commented Jul 4, 2024

Great addition, thanks.

@asb2m10 asb2m10 merged commit 1fe9c59 into asb2m10:master Jul 4, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants