DaisySP
Loading...
Searching...
No Matches
Public Member Functions | List of all members
daisysp::StringVoice Class Reference

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

#include <stringvoice.h>

Public Member Functions

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

Detailed Description

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

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.

Member Function Documentation

◆ GetAux()

float StringVoice::GetAux ( )

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

◆ Init()

void StringVoice::Init ( float sample_rate)

Initialize the module

Parameters
sample_rateAudio engine sample rate

◆ Process()

float StringVoice::Process ( bool trigger = false)

Get the next sample

Parameters
triggerStrike the string. Defaults to false.

◆ Reset()

void StringVoice::Reset ( )

Reset the string oscillator

◆ SetAccent()

void StringVoice::SetAccent ( float accent)

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

Parameters
accentWorks 0-1.

◆ SetBrightness()

void StringVoice::SetBrightness ( float brightness)

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

Parameters
brightnessWorks best 0-1

◆ SetDamping()

void StringVoice::SetDamping ( float damping)

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

Parameters
dampingWorks best 0-1. Full damp is only achieved with full accent.

◆ SetFreq()

void StringVoice::SetFreq ( float freq)

Set the string root frequency.

Parameters
freqFrequency in Hz.

◆ SetStructure()

void StringVoice::SetStructure ( float structure)

Changes the string's nonlinearity (string type).

Parameters
structureWorks 0-1. 0-.26 is curved bridge, .26-1 is dispersion.

◆ SetSustain()

void StringVoice::SetSustain ( bool sustain)

Continually excite the string with noise.

Parameters
sustainTrue turns on the noise.

◆ Trig()

void StringVoice::Trig ( )

Strike the string.


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