Fully resizing juce peak meter module with optional fader overlay.

Overview

Sound Meter

Juce peak meter module with optional fader overlay.
by Marcel Huibers | Sound Development 2021 | Published under the MIT License

Features:

  • Fully resize-able.
  • Efficient. Only redraws when needed.
  • Configurable meter ballistics (meter decay).
  • Normal, warning and peak segments, with configurable colours.
  • Tick-marks (dividing lines on the meter) at user specified levels.
  • Peak indicator and optional peak value readout.
  • Optional label strip next to the meters (which can double as master fader).
  • Optional header identifying the meter's name (set by user) or channel type.
  • Adaptive. Will show header, value, tick-marks only when there is space available.
  • Optional fader and mute button (in the header).

You can find the API documentation here...
An example project, demonstrating sound_meter can be found here...

Usage

All classes are in the namespace sd::SoundMeter to avoid collisions. You can either prefix each symbol, or import the namespace.

MetersComponent

The MetersComponent class creates and controls the meters. This would live in your editor.h.

private:
   sd::SoundMeter::MetersComponent  m_meters;

In the constructor you can specify a channel format with setChannelFormat or set the nummer of channels with setNumChannels:

m_meters.setChannelFormat (juce::AudioChannelSet::stereo());

and configure it's options. For example (for all meter options, see documentation):

sd::SoundMeter::Options meterOptions;
meterOptions.faderEnabled     = true;
meterOptions.headerEnabled    = true;
meterOptions.peakRegion_db    = -3.0f;  
meterOptions.warningRegion_db = -12.0f;
m_meters.setOptions (meterOptions);

Finally (still in the constructor) we add the component and make it visible:

addAndMakeVisible (m_meters);

In the resized() method, you set the bounds (left, right, width, height) of the meters:

m_meters.setBounds (getLocalBounds());

Getting the levels

Basically everything is set up now.
All left to do now is to supply the meter with the level with the method: setInputLevel (int channel, float value);

The recommended way to get the levels from the audio processor is to let the editor poll the audio processor (with a timer for instance). Preferably it would poll atomic values in the audio processor for thread safety.

A fully working example demonstrating this can be found here...




Sound Development 2021

Issues
  • Is the dB range easily changeable?

    Is the dB range easily changeable?

    Hi!

    First: very interesting stuff, much appreciated!

    I have been going through the sources to find the option/constant/hard value that defines that the meter runs from -36 or so upwards. Not yet found...

    I am puzzled: so many configurable options, but no option to set the total meter range. I find -36 dB very high for a general purpose level meter. I would prefer something between -64 to -96 dB.

    I hope you have some time to reply.

    Vriendelijke groet, ;-)

    Peter

    PS: if you replace Juce's getMagnitude with an Intel IPP function (or Apple vDSP), that call gets around 4x faster. Always worthwhile within an audio callback.

    opened by PeterEmanuel 3
Owner
Sound Development
Independent audio software development. We design solutions to help your creativity and explore new possibilities.
Sound Development
S6-overlay-helpers - Small binary utilities, specific to s6-overlay

s6-overlay-helpers Small utilities specifically written for s6-overlay. s6-overlay-helpers centralizes all the additional C programs and libraries tha

null 8 May 3, 2022
This is a simple reverb plugin made with the JUCE DSP module.

Simple Reverb This is a simple reverb plugin made with the JUCE DSP module. Building $ git clone https://github.com/szkkng/SimpleReverb.git --recursiv

suzuki kengo 34 Aug 8, 2022
Allows for multiple SwitchBot buttons and curtains to be controlled via MQTT sent to ESP32. ESP32 will send BLE commands to switchbots and return MQTT responses to the broker. Also supports Meter/Temp Sensor

SwitchBot-MQTT-BLE-ESP32 Switchbot local control using ESP32. no switchbot hub used/required. works with any smarthub that supports MQTT https://githu

null 278 Aug 10, 2022
A simple on-screen pixel meter

QRuler A simple on-screen pixel meter. Dependencies Under Debian based systems: cmake qtbase5-dev qttools5-dev Build cmake -B build -DCMAKE_BUILD_TYPE

redtide 1 Nov 5, 2021
An easy to build CO2 Monitor/Meter with Android and iOS App for real time visualization and charting of air data, data logger, a variety of communication options (BLE, WIFI, MQTT, ESP-Now) and many supported sensors.

CO2-Gadget An easy to build CO2 Monitor/Meter with cell phone App for real time visualization and charting of air data, datalogger, a variety of commu

Mariete 22 Aug 5, 2022
External warzone cheat with manual mapped driver (function hook), overlay (nvidia hijack), simple esp, no recoil

external_warzone_cheat External warzone cheat with manual mapped driver (function hook), overlay (nvidia hijack), simple esp, no recoil Offsests are N

NMan 83 Jul 27, 2022
EdiZon Overlay originally by WerWolv. Updated for libnx 4.2.0

EdiZon-Overlay Written by WerWolv Edited by proferabg Changelog v1.0.1 Updated to libnx 4.2.0 v1.0.2 Submenu Feature Added How To Use Submenus In yo

null 30 Aug 5, 2022
Simplest Apex Legends hack with overlay (DX9)

nullptr apex external [old version] | Автор Реализован на утечке - mhyprot ( кто не знает , это драйвер АС GENSHIN IMPACT ). Aimbot - mouse_event если

Basic 5 May 20, 2022
A template for experimenting with JUCE's hosting code

juce-wrapper This is a JUCE based plug-in that loads and wraps a single VST, VST3, or AU plug-in (in this case an instrument plug-in, which requires M

Shane Dunne 5 Dec 11, 2021
JUCE Signal Generator

JUCE Signal Generator Application This project serves as a re-introduction to JUCE programming (I haven't used it since under-grad, circa 2012). Build

Tom Wilson 1 Dec 22, 2021
Resources for JUCE-based audio development on the Raspberry Pi

JUCE4Pi Resources for JUCE-based audio development on the Raspberry Pi Raspberry Pi / Linux git clone https://github.com/juce-framework/JUCE.git sudo

null 9 Jul 9, 2022
A set of tools allowing JUCE 6.1 + Cmake to build a CLAP

JUCE6/CMake Clap Support This is a set of code which, combined with a JUCE6/CMake project, allows you to build a (buggy, feature incomplete, work in p

Paul 0 Feb 15, 2022
Juce tutorial for beginners, with DSP introduction.

JUCE Tutorial Juce tutorial for beginners, with DSP basics. My teaching materials :D Warning: working in progress lesson 0: Setup lesson 1: Basic Basi

Wen-Yi Hsiao 4 Apr 14, 2022
CRC32 slice-by-16 implementation in JS with an optional native binding to speed it up even futher

CRC32 slice-by-16 implementation in JS with an optional native binding to speed it up even futher. When used with Webpack/Browserify etc, it bundles the JS version.

Mathias Buus 8 Aug 4, 2021
New version of the well known ESP32 Radio. Now optional I2S output!

ESP32Radio-V2 New version of the well known ESP32 Radio. Now optional I2S output! Compile time configuration in config.h. Do not forget to upload the

Ed Smallenburg 42 Jul 19, 2022
DLL Exports Extraction BOF with optional NTFS transactions.

DLL Exports Extraction BOF What is this? This is a Cobalt Strike BOF file, meant to use two or three arguments (path to DLL, and/or a third argument [

null 32 Jul 23, 2022
Zep - An embeddable editor, with optional support for using vim keystrokes.

Zep - A Mini Editor Zep is a simple embeddable editor, with a rendering agnostic design and optional Vim mode. It is built as a shared modern-cmake li

Rezonality - 648 Aug 8, 2022
STFT based multi pitch shifting with optional formant preservation in C++ and Python

stftPitchShift This is a reimplementation of the Stephan M. Bernsee smbPitchShift.cpp, a pitch shifting algorithm using the Short-Time Fourier Transfo

Jürgen Hock 5 Jul 9, 2022
a playground for working with fully static tensors and automatic differentiation

This is a playground for learning about how to apply template-meta-programming to get more efficient evaluation for tensor-based automatic differentiation.

Edward Kmett 16 Mar 18, 2021