Zrythm v2.0.0-alpha.1
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
zrythm::gui::qquick::MeterProcessor Class Reference

A meter processor for a single GUI element. More...

#include <src/gui/qquick/meter_processor.h>

Inheritance diagram for zrythm::gui::qquick::MeterProcessor:
Collaboration diagram for zrythm::gui::qquick::MeterProcessor:

Public Types

enum class  MeterAlgorithm {
  Auto , DigitalPeak , TruePeak , RMS ,
  K
}
enum class  AudioValueFormat : std::uint8_t { Amplitude , DBFS , Fader }

Public Member Functions

 MeterProcessor (QObject *parent=nullptr)
dsp::Portport () const
void setPort (dsp::Port *port)
int channel () const
void setChannel (int channel)
int sampleRate () const
void setSampleRate (int rate)
Q_SIGNAL void sampleRateChanged ()
dsp::PortObservationManagerportObservationManager () const
void setPortObservationManager (dsp::PortObservationManager *manager)
MeterAlgorithm algorithm () const
void setAlgorithm (MeterAlgorithm algo)
Q_SIGNAL void algorithmChanged ()
float currentAmplitude () const
Q_SIGNAL void currentAmplitudeChanged (float value)
float peakAmplitude () const
Q_SIGNAL void peakAmplitudeChanged (float value)
Q_INVOKABLE float toDBFS (float amp) const
Q_INVOKABLE float toFader (float amp) const

Properties

QML_ELEMENT zrythm::dsp::Portport
int channel
int sampleRate
zrythm::dsp::PortObservationManagerportObservationManager
float currentAmplitude
float peakAmplitude
MeterAlgorithm algorithm

Detailed Description

A meter processor for a single GUI element.

This class is responsible for processing the meter values for a single GUI element, such as a volume meter. It supports various meter algorithms, including digital peak, true peak, RMS, and K-meter.

The meter processor is associated with a port, which can be either an AudioPort or a MidiPort. The meter values are updated based on the data from the associated port.

The meter processor emits the valuesChanged signal whenever the meter values are updated, allowing the GUI to update the display accordingly.

Definition at line 31 of file meter_processor.h.

Member Enumeration Documentation

◆ AudioValueFormat

Enumerator
Amplitude 

0 to 2, amplitude.

DBFS 

dbFS.

Fader 

0 to 1, suitable for drawing.

Definition at line 57 of file meter_processor.h.

◆ MeterAlgorithm

Enumerator
Auto 

Use default algorithm for the port.

TruePeak 
Note
True peak is intensive, only use it where needed (mixer).

Definition at line 45 of file meter_processor.h.

Property Documentation

◆ algorithm

MeterAlgorithm zrythm::gui::qquick::MeterProcessor::algorithm
readwrite

Definition at line 42 of file meter_processor.h.

◆ channel

int zrythm::gui::qquick::MeterProcessor::channel
readwrite

Definition at line 36 of file meter_processor.h.

◆ currentAmplitude

float zrythm::gui::qquick::MeterProcessor::currentAmplitude
read

Definition at line 40 of file meter_processor.h.

◆ peakAmplitude

float zrythm::gui::qquick::MeterProcessor::peakAmplitude
read

Definition at line 41 of file meter_processor.h.

◆ port

QML_ELEMENT zrythm::dsp::Port * zrythm::gui::qquick::MeterProcessor::port
readwrite

Definition at line 35 of file meter_processor.h.

◆ portObservationManager

zrythm::dsp::PortObservationManager * zrythm::gui::qquick::MeterProcessor::portObservationManager
readwrite

Definition at line 39 of file meter_processor.h.

◆ sampleRate

int zrythm::gui::qquick::MeterProcessor::sampleRate
readwrite

Definition at line 37 of file meter_processor.h.


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