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.)
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:
VuMeter::paint()
method, there were previously two calls to thedrawImage()
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 thedrawImageAt()
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 methoddrawImageAt()
is faster on its own than thedrawImage()
).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.)