Skip to content

daisysp::Tone

More...

#include <tone.h>

Public Functions

Name
Tone()
~Tone()
void Init(float sample_rate)
float Process(float in)
void SetFreq(float freq)
float GetFreq()

Detailed Description

class daisysp::Tone;

A first-order recursive low-pass filter with variable frequency response.

Public Functions Documentation

function Tone

inline Tone()

function ~Tone

inline ~Tone()

function Init

void Init(
    float sample_rate
)

Initializes the Tone module. sample_rate - The sample rate of the audio engine being run.


function Process

float Process(
    float in
)

Processes one sample through the filter and returns one sample. in - input signal


function SetFreq

inline void SetFreq(
    float freq
)

Parameters:

  • freq - frequency value in Hz. Range: Any positive value.

Sets the cutoff frequency or half-way point of the filter.


function GetFreq

inline float GetFreq()

Return: the current value for the cutoff frequency or half-way point of the filter.

---

Updated on 2024-01-03 at 19:38:46 +0000