Skip to content

daisysp::Resonator

Resonant Body Simulation. More...

#include <resonator.h>

Public Functions

Name
Resonator()
~Resonator()
void Init(float position, int resolution, float sample_rate)
float Process(const float in)
void SetFreq(float freq)
void SetStructure(float structure)
void SetBrightness(float brightness)
void SetDamping(float damping)

Detailed Description

class daisysp::Resonator;

Resonant Body Simulation.

Author: Ported by Ben Sergentanis

Date: Jan 2021 Ported from pichenettes/eurorack/plaits/dsp/physical_modelling/resonator.h

to an independent module.

Original code written by Emilie Gillet in 2016.

Public Functions Documentation

function Resonator

inline Resonator()

function ~Resonator

inline ~Resonator()

function Init

void Init(
    float position,
    int resolution,
    float sample_rate
)

Parameters:

  • position Offset the phase of the amplitudes. 0-1
  • resolution Quality vs speed scalar
  • sample_rate Samplerate of the audio engine being run.

Initialize the module


function Process

float Process(
    const float in
)

Parameters:

  • in The signal to excited the resonant body

Get the next sample_rate


function SetFreq

void SetFreq(
    float freq
)

Parameters:

  • freq Frequency in Hz.

Resonator frequency.


function SetStructure

void SetStructure(
    float structure
)

Parameters:

  • structure Works best from 0-1

Changes the general charater of the resonator (stiffness, brightness)


function SetBrightness

void SetBrightness(
    float brightness
)

Parameters:

  • brightness Works best 0-1

Set the brighness of the resonator


function SetDamping

void SetDamping(
    float damping
)

Parameters:

  • damping Works best 0-1

How long the resonant body takes to decay.

---

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