{"id":13729914,"url":"https://github.com/ffAudio/ff_meters","last_synced_at":"2025-05-08T02:30:52.769Z","repository":{"id":40267710,"uuid":"83704558","full_name":"ffAudio/ff_meters","owner":"ffAudio","description":"Plug and play component to display LED meters for JUCE audio buffers","archived":false,"fork":false,"pushed_at":"2023-09-03T22:37:36.000Z","size":660,"stargazers_count":115,"open_issues_count":8,"forks_count":31,"subscribers_count":8,"default_branch":"master","last_synced_at":"2024-11-14T20:38:43.126Z","etag":null,"topics":["audio","juce","meters","rms","visualisation"],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ffAudio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2017-03-02T17:15:12.000Z","updated_at":"2024-10-19T07:30:10.000Z","dependencies_parsed_at":"2024-01-11T01:18:51.323Z","dependency_job_id":"238dcb4b-12ca-4e2d-aa1f-923cc89c93f5","html_url":"https://github.com/ffAudio/ff_meters","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ffAudio%2Fff_meters","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ffAudio%2Fff_meters/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ffAudio%2Fff_meters/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ffAudio%2Fff_meters/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ffAudio","download_url":"https://codeload.github.com/ffAudio/ff_meters/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252986628,"owners_count":21836197,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["audio","juce","meters","rms","visualisation"],"created_at":"2024-08-03T02:01:07.400Z","updated_at":"2025-05-08T02:30:52.524Z","avatar_url":"https://github.com/ffAudio.png","language":"C++","readme":"\nff_meters\n=========\n\nby Daniel Walz / Foleys Finest Audio Ltd.\nPublished under the BSD License (3 clause)\n\nThe ff_meters provide an easy to use Component to display a level reading for an\nAudioBuffer. It is to be used in the audio framework JUCE (www.juce.com).\n\nFind the API documentation here: https://ffaudio.github.io/ff_meters/\n\n\nUsage\n=====\n\nLevelMeter\n----------\n\nTo use it create a LevelMeterSource instance next to the AudioBuffer you want to\ndisplay. To update the meter, call LevelMeterSource::measureBlock (buffer) in your\nprocessBlock or getNextAudioBuffer method.\n\nOn the Component use LevelMeter::setMeterSource to link to the LevelMeterSource \ninstance. The number of channels will be updated automatically.\n\nYou can pull the drawing into your LookAndFeel by inheriting LevelMeter::LookAndFeelMethods\nand inlining the default implementation from LevelMeterLookAndFeel in \nff_meters_LookAndFeelMethods.h into a public section of your class declaration. To\nsetup the default colour scheme, call setupDefaultMeterColours() in your constructor.\n\nOr you can use the LevelMeterLookAndFeel directly because it inherits from juce::LookAndFeel_V3 \nfor your convenience. You can set it as default LookAndFeel, if you used the default, \nor set it only to the meters, if you don't want it to interfere.\n\nAll classes are in the namespace `foleys` to avoid collisions. You can either prefix each symbol, \nor import the namespace.\nN.B. for backward compatibility, `FFAU` is an alias for `foleys`.\n\n    // In your Editor\n    public:\n        PluginEditor()\n        {\n            // adjust the colours to how you like them, e.g.\n            lnf.setColour (foleys::LevelMeter::lmMeterGradientLowColour, juce::Colours::green);\n    \n            meter.setLookAndFeel (\u0026lnf);\n            meter.setMeterSource (\u0026processor.getMeterSource());\n            addAndMakeVisible (meter);\n            // ...\n        }\n        ~PluginEditor()\n        {\n            meter.setLookAndFeel (nullptr);\n        }\n\n    private:\n        foleys::LevelMeterLookAndFeel lnf;\n        foleys::LevelMeter meter { foleys::LevelMeter::Minimal }; // See foleys::LevelMeter::MeterFlags for options\n\n    // and in the processor:\n    public:\n        foleys::LevelMeterSource\u0026 getMeterSource()\n        {\n            return meterSource;\n        }\n\n        void prepareToPlay (double sampleRate, int samplesPerBlockExpected) override\n        {\n            // this prepares the meterSource to measure all output blocks and average over 100ms to allow smooth movements\n            meterSource.resize (getTotalNumOutputChannels(), sampleRate * 0.1 / samplesPerBlockExpected);\n            // ...\n        }\n        void processBlock (AudioSampleBuffer\u0026 buffer, MidiBuffer\u0026) override\n        {\n            meterSource.measureBlock (buffer);\n            // ...\n        }\n\n    private:\n        foleys::LevelMeterSource meterSource;\n\n\nOutlineBuffer\n-------------\n\nAnother class is capable of reducing the samples going through into min and max blocks. This\nway you can see the outline of a signal running through. It can be used very similar:\n\n    // in your processor\n    private:\n    foleys::OutlineBuffer outline;\n\n    // in prepareToPlay\n    outline.setSize (getTotalNumInputChannels(), 1024);\n\n    // in processBlock\n    outline.pushBlock (buffer, buffer.getNumSamples());\n\n    // and in the editor's component:\n    const Rectangle\u003cfloat\u003e plotFrame (10.0f, 320.0f, 580f, 80f);\n    g.setColour (Colours::lightgreen);\n    g.fillRect (plotFrame);\n\n    Path plot;\n    processor.getChannelOutline (plot, plotFrame, 1000);\n    g.setColour (Colours::grey);\n    g.fillPath (plot);\n    g.setColour (Colours::black);\n    g.strokePath (plot, PathStrokeType (1.0f));\n\n\n********************************************************************************\n\nWe hope it is of any use, let us know of any problems or improvements you may \ncome up with...\n\nBrighton, 2nd March 2017\n\n********************************************************************************\n","funding_links":[],"categories":["Metering"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FffAudio%2Fff_meters","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FffAudio%2Fff_meters","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FffAudio%2Fff_meters/lists"}