I want to now how i make vu meters for vst

how can i make output input vu meter in visual studio
i use juce 5
can somebody help me with it thank you all

i also just made a little gain meter. as you can see in my other post it still has an issue, but it’s pretty cool already. i basically just made my GUI inherit from Timer, startTimer(1000 / 24) to let it have 24fps and called repaint() in timerCallback(), while in draw i’m drawing the thing that visualizes the gain values. the gain values ofc come from the pluginProcessor’s processBlock-method. i personally found that using buffer.getMagnitude(ch, 0, buffer.getNumSamples()); gets good results because gain meters often attenuate the maximum peak a bit