Skip to content

Class daisysp::StringVoice

ClassList > daisysp > StringVoice

Extended Karplus-Strong, with all the niceties from Rings. More...

  • #include <stringvoice.h>

Public Functions

Type Name
float GetAux ()
void Init (float sample_rate)
float Process (bool trigger=false)
void Reset ()
void SetAccent (float accent)
void SetBrightness (float brightness)
void SetDamping (float damping)
void SetFreq (float freq)
void SetStructure (float structure)
void SetSustain (bool sustain)
StringVoice ()
void Trig ()
~StringVoice ()

Detailed Description

Author:

Ben Sergentanis

Date:

Jan 2021 Ported from pichenettes/eurorack/plaits/dsp/physical_modelling/string_voice.h and pichenettes/eurorack/plaits/dsp/physical_modelling/string_voice.cc to an independent module. Original code written by Emilie Gillet in 2016.

Public Functions Documentation

function GetAux

float daisysp::StringVoice::GetAux () 

Get the raw excitation signal. Must call Process() first.


function Init

void daisysp::StringVoice::Init (
    float sample_rate
) 

Initialize the module

Parameters:

  • sample_rate Audio engine sample rate

function Process

float daisysp::StringVoice::Process (
    bool trigger=false
) 

Get the next sample

Parameters:

  • trigger Strike the string. Defaults to false.

function Reset

void daisysp::StringVoice::Reset () 

Reset the string oscillator


function SetAccent

void daisysp::StringVoice::SetAccent (
    float accent
) 

Hit the string a bit harder. Influences brightness and decay.

Parameters:

  • accent Works 0-1.

function SetBrightness

void daisysp::StringVoice::SetBrightness (
    float brightness
) 

Set the brighness of the string, and the noise density.

Parameters:

  • brightness Works best 0-1

function SetDamping

void daisysp::StringVoice::SetDamping (
    float damping
) 

How long the resonant body takes to decay relative to the accent level.

Parameters:

  • damping Works best 0-1. Full damp is only achieved with full accent.

function SetFreq

void daisysp::StringVoice::SetFreq (
    float freq
) 

Set the string root frequency.

Parameters:

  • freq Frequency in Hz.

function SetStructure

void daisysp::StringVoice::SetStructure (
    float structure
) 

Changes the string's nonlinearity (string type).

Parameters:

  • structure Works 0-1. 0-.26 is curved bridge, .26-1 is dispersion.

function SetSustain

void daisysp::StringVoice::SetSustain (
    bool sustain
) 

Continually excite the string with noise.

Parameters:

  • sustain True turns on the noise.

function StringVoice

inline daisysp::StringVoice::StringVoice () 

function Trig

void daisysp::StringVoice::Trig () 

Strike the string.


function ~StringVoice

inline daisysp::StringVoice::~StringVoice () 


The documentation for this class was generated from the following file external-docs/DaisySP/Source/PhysicalModeling/stringvoice.h