Extended Karplus-Strong, with all the niceties from Rings.
More...
#include <stringvoice.h>
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.
◆ 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_rate | Audio engine sample rate |
◆ Process()
float StringVoice::Process |
( |
bool | trigger = false | ) |
|
Get the next sample
- Parameters
-
trigger | Strike 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
-
◆ SetBrightness()
void StringVoice::SetBrightness |
( |
float | brightness | ) |
|
Set the brighness of the string, and the noise density.
- Parameters
-
◆ SetDamping()
void 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. |
◆ SetFreq()
void StringVoice::SetFreq |
( |
float | freq | ) |
|
Set the string root frequency.
- Parameters
-
◆ SetStructure()
void 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. |
◆ SetSustain()
void StringVoice::SetSustain |
( |
bool | sustain | ) |
|
Continually excite the string with noise.
- Parameters
-
sustain | True turns on the noise. |
◆ Trig()
void StringVoice::Trig |
( |
| ) |
|
The documentation for this class was generated from the following files:
- Source/PhysicalModeling/stringvoice.h
- Source/PhysicalModeling/stringvoice.cpp