quantumVERB  1.0.0
A FOSS convolution reverb plugin
reverb::UIGraphBlock Class Reference
Inheritance diagram for reverb::UIGraphBlock:
Collaboration diagram for reverb::UIGraphBlock:

Public Types

using Ptr = std::unique_ptr< UIGraphBlock >
 

Public Member Functions

 UIGraphBlock (AudioProcessor &processor)
 Constructs a UIGraphBlock object. More...
 
 ~UIGraphBlock ()
 Destroys a UIGraphBlock object. More...
 
void paint (juce::Graphics &) override
 
void resized () override
 Manages the layout of UIGraphBlock when the block is resized. More...
 
virtual void buttonClicked (juce::Button *) override
 
virtual void comboBoxChanged (juce::ComboBox *) override
 
virtual void sliderValueChanged (juce::Slider *) override
 
AudioProcessorgetProcessorInstance ()
 

Public Attributes

std::mutex updatingGraph
 
std::condition_variable updateComplete
 

Protected Member Functions

void updateGraph (int updatePeriodMs)
 Updates IR graph. More...
 
void notifyToUpdate ()
 Signals thread to update graph. More...
 

Protected Attributes

AudioProcessorprocessor
 
std::unique_ptr< std::thread > graphThread
 
std::atomic< bool > stopGraphThread = false
 
std::condition_variable mustUpdate
 
std::vector< juce::Path > irChannelPlots
 

Static Protected Attributes

static constexpr float GRAPH_TOTAL_TIME_S = 6.0f
 
static constexpr float GRAPH_TIME_STEP_S = 1.0f / 500.0f
 
static constexpr float GRAPH_AVG_SAMPLING_STEP = 10
 
static constexpr float GRAPH_MAX_IR_VALUE = 10.0f
 

Detailed Description

Definition at line 20 of file UIGraphBlock.h.

Constructor & Destructor Documentation

◆ UIGraphBlock()

reverb::UIGraphBlock::UIGraphBlock ( AudioProcessor processor)

Constructs a UIGraphBlock object.

Creates a UIGraphBlock and each of its components. Contains the IR graph which is updated periodically and on notify in a separate thread.

Definition at line 22 of file UIGraphBlock.cpp.

◆ ~UIGraphBlock()

reverb::UIGraphBlock::~UIGraphBlock ( )

Destroys a UIGraphBlock object.

Sends the stop signal to the graph thread

Definition at line 34 of file UIGraphBlock.cpp.

Member Function Documentation

◆ notifyToUpdate()

void reverb::UIGraphBlock::notifyToUpdate ( )
protected

Signals thread to update graph.

Sends a notification to the worker thread through the mustUpdate condition variable.

Definition at line 199 of file UIGraphBlock.cpp.

◆ resized()

void reverb::UIGraphBlock::resized ( )
override

Manages the layout of UIGraphBlock when the block is resized.

This function defines all the relative positioning of the various UIGraphBlock elements.

Definition at line 69 of file UIGraphBlock.cpp.

◆ updateGraph()

void reverb::UIGraphBlock::updateGraph ( int  updatePeriodMs)
protected

Updates IR graph.

Worker thread to update IR when condition variable is notified. Ends once stopGraphThread is set to true and once notified through mustUpdate.

Parameters
[in]updatePeriodMsLazy update period to catch any missed parameter changes

Definition at line 146 of file UIGraphBlock.cpp.


The documentation for this class was generated from the following files: