Zrythm v2.0.0-DEV
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
zrythm::dsp::Metronome Class Reference

Metronome processor. More...

#include <src/dsp/metronome.h>

Inheritance diagram for zrythm::dsp::Metronome:
Collaboration diagram for zrythm::dsp::Metronome:

Public Member Functions

 Metronome (ProcessorBaseDependencies dependencies, const dsp::TempoMap &tempo_map, juce::AudioSampleBuffer emphasis_sample, juce::AudioSampleBuffer normal_sample, bool initially_enabled=true, float initial_volume=1.f, QObject *parent=nullptr)
float volume () const
void setVolume (float volume)
Q_SIGNAL void volumeChanged (float volume)
bool enabled () const
void setEnabled (bool enabled)
Q_SIGNAL void enabledChanged (bool enabled)
void custom_process_block (EngineProcessTimeInfo time_nfo, const dsp::ITransport &transport) noexcept override
 Custom processor logic after processing all owned parameters.
void custom_prepare_for_processing (const graph::GraphNode *node, units::sample_rate_t sample_rate, nframes_t max_block_length) override
Public Member Functions inherited from zrythm::dsp::AudioSampleProcessor
 AudioSampleProcessor (dsp::ProcessorBase::ProcessorBaseDependencies dependencies)
void add_sample_to_process (PlayableSampleSingleChannel sample)
 Adds a sample to the queue.
void set_queue_sample_callback (QueueSingleChannelSampleCallback cb)
auto get_output_audio_port_non_rt () const
auto get_output_audio_port_rt () const
void custom_release_resources () override
Public Member Functions inherited from zrythm::dsp::ProcessorBase
 ProcessorBase (ProcessorBaseDependencies dependencies, utils::Utf8String name={ u8"ProcessorBase" })
void set_name (const utils::Utf8String &name)
 Set a custom name to be used in the DSP graph.
void add_input_port (const dsp::PortUuidReference &uuid)
void add_output_port (const dsp::PortUuidReference &uuid)
void add_parameter (const dsp::ProcessorParameterUuidReference &uuid)
auto & get_input_ports () const
auto & get_output_ports () const
auto & get_parameters () const
utils::Utf8String get_node_name () const final
 Returns a human friendly name of the node.
void process_block (EngineProcessTimeInfo time_nfo, const dsp::ITransport &transport) noexcept final
 Calls custom_process_block() internally after processing all the parameters.
void prepare_for_processing (const graph::GraphNode *node, units::sample_rate_t sample_rate, nframes_t max_block_length) final
 Called to allocate resources required for processing.
void release_resources () final
 Called to release resources allocated by prepare_for_processing().
Public Member Functions inherited from zrythm::dsp::graph::IProcessable
virtual nframes_t get_single_playback_latency () const
 Returns the latency of only the given processable, without adding the previous/next latencies.

Properties

float volume
bool enabled

Additional Inherited Members

Public Types inherited from zrythm::dsp::AudioSampleProcessor
using QueueSingleChannelSampleCallback
Protected Member Functions inherited from zrythm::dsp::ProcessorBase
auto dependencies () const

Detailed Description

Metronome processor.

Definition at line 19 of file metronome.h.

Member Function Documentation

◆ custom_prepare_for_processing()

void zrythm::dsp::Metronome::custom_prepare_for_processing ( const graph::GraphNode * node,
units::sample_rate_t sample_rate,
nframes_t max_block_length )
overridevirtual

Reimplemented from zrythm::dsp::AudioSampleProcessor.

◆ custom_process_block()

void zrythm::dsp::Metronome::custom_process_block ( EngineProcessTimeInfo time_nfo,
const dsp::ITransport & transport )
overridevirtualnoexcept

Custom processor logic after processing all owned parameters.

By default, this does passthrough to same-type ports.

Reimplemented from zrythm::dsp::AudioSampleProcessor.

◆ enabled()

bool zrythm::dsp::Metronome::enabled ( ) const
inline

Definition at line 52 of file metronome.h.

◆ setEnabled()

void zrythm::dsp::Metronome::setEnabled ( bool enabled)
inline

Definition at line 53 of file metronome.h.

◆ setVolume()

void zrythm::dsp::Metronome::setVolume ( float volume)
inline

Definition at line 42 of file metronome.h.

◆ volume()

float zrythm::dsp::Metronome::volume ( ) const
inline

Definition at line 41 of file metronome.h.

Property Documentation

◆ enabled

bool zrythm::dsp::Metronome::enabled
readwrite

Definition at line 23 of file metronome.h.

◆ volume

float zrythm::dsp::Metronome::volume
readwrite

Definition at line 22 of file metronome.h.


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