Skip to content

daisysp::String

Comb filter / KS string. More...

#include <KarplusString.h>

Public Functions

Name
String()
~String()
void Init(float sample_rate)
void Reset()
float Process(const float in)
void SetFreq(float freq)
void SetNonLinearity(float non_linearity_amount)
void SetBrightness(float brightness)
void SetDamping(float damping)

Detailed Description

class daisysp::String;

Comb filter / KS string.

Author: Ben Sergentanis

Date: Jan 2021 "Lite" version of the implementation used in Rings

Ported from pichenettes/eurorack/plaits/dsp/oscillator/formant_oscillator.h

to an independent module.

Original code written by Emilie Gillet in 2016.

Public Functions Documentation

function String

inline String()

function ~String

inline ~String()

function Init

void Init(
    float sample_rate
)

Parameters:

  • sample_rate Audio engine sample rate

Initialize the module.


function Reset

void Reset()

Clear the delay line


function Process

float Process(
    const float in
)

Parameters:

  • in Signal to excite the string.

Get the next floating point sample


function SetFreq

void SetFreq(
    float freq
)

Parameters:

  • freq Frequency in Hz

Set the string frequency.


function SetNonLinearity

void SetNonLinearity(
    float non_linearity_amount
)

Parameters:

  • -1 to 0 is curved bridge, 0 to 1 is dispersion.

Set the string's behavior.


function SetBrightness

void SetBrightness(
    float brightness
)

Parameters:

  • Works 0-1.

Set the string's overall brightness


function SetDamping

void SetDamping(
    float damping
)

Parameters:

  • damping Works 0-1.

Set the string's decay time.

---

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