ffAudio / ff_meters

Plug and play component to display LED meters for JUCE audio buffers
BSD 3-Clause "New" or "Revised" License
113 stars 31 forks source link

SingleChannel & Minimal #6

Closed Frydac closed 4 years ago

Frydac commented 4 years ago

Hi,

Thanks for sharing your work!

It seems it is not possible to have both FFAU::LevelMeter::SingleChannel and FFAU::LevelMeter::Minimal flags enabled?

I like the interface, however it seems not trivial in the current implementation to enable both. And actually I don't need the ticks as well :). I was just looking for some (very small) indication of sound coming in/out (for 10+ channels) and possibly the clipping indicator.

Frydac commented 4 years ago

I hacked a bit at it to get it the way I needed. I'm ok for now, thanks.

ffAudio commented 4 years ago

That is an interesting use case. How it was meant to work is by inheriting the LookAndFeel but overriding the getMeterMaxNumberBounds() and getMeterTickmarksBounds() to return empty rectangles. In hindsight I find the approach a bit bloated, but it should allow layouting the elements in a flexible way. The hope is, that the drawMeterBars() will react appropriate. If not, you will have to override those as well: getMeterClipIndicatorBounds() and getMeterBarBounds(). They get as input a strip of the bounds as calculated by getMeterBounds().

Allowing Minimal to return that version would be a good option, although it would create an ambiguity for stereo.

Frydac commented 4 years ago

Thanks, I did something similar to your proposal, which turned out to be quite easy and flexible enough. I now just use the SingleChannel mask and with my derived LNF class, which only covers the one usecase :)

If you're interested in the context of use: I work at an audio software company. We mainly create audio processing libraries to be integrated in AVRs, cars, mobile, .. To test/tune/experiment/demo these algorithms we integrate them into vst fx plugins, which also makes it relatively easy to use for non technical ppl, on their preferred platform/host. The animated meters enhance the impression that at least it's doing something :D