Is there any example of ff_meters?

hello
I have been using the ff_meters for my new project.
I wrote code refer to ff_meters’s api documentation, but component was not visible.

is there any example of ff_meters?

thanks

Can you show an example of what you are doing? I haven’t used ff_meters but you might be doing a common juice error somewhere.

1 Like

Thanks for using ff_meters. There is no specific example at the moment.

Apart from the usual juce mistakes (addAndMakeVisible/resize), if you didn’t reset the LevelMeterSource to the number of channels, it won’t display anything.

Let me know if that helps.

3 Likes

I just loaded module and copy-paste main page of api documentation(https://foleysfinest.com/ff_meters/index.html)

plz let me know how to reset LevelMeterSource, I thought linking LevelMeterSource to LevelMeter is automatically updates channel numbers, but is there any method which is not introduced in main page of api documentation?(https://foleysfinest.com/ff_meters/index.html). is it setFixedChannels?

oh, I solved this problem. I missed resized callback function to draw meter component,

code is here (https://github.com/so-soon/JUCE_meter_example)

thanks daniel, ff_meters is perfect plugin!

Perfect, glad it works now. Yes not setting the bounds of the Component is a common mistake, I forget it sometimes myself.

The resize in prepareToPlay is necessary, because it will allocate, so it cannot happen from measureBlock. I had it that way at the beginning (hence the warning), but that is unsafe.

2 Likes

Hi @Daniel I’m trying using foleys meter and wow good job, but just 2 things:
It goes very crazy depending on the buffer size passed, so I write this line of code (even if buffer size is smaller):

void MeterExampleAudioProcessor::prepareToPlay (double sampleRate, int samplesPerBlock)
{
    meterSource.resize (getTotalNumInputChannels(), 0.01 * sampleRate / 4096);
}

I notice that meter in this example done by myself meter pass from a value to another without smoothing, is that something that I can fix with some options or this meter is not thought to be smoothed? maybe it could be improved with this feature? According to what I expect, when a bigger value is passed meter should not be smoothed, while if a smaller one is passed meter should be smoothed. (I was trying to do something by myself here:

And I was trying to use LinearSmoothedValue)