daisysp::Pluck¶
#include <pluck.h>
Public Functions¶
Name | |
---|---|
Pluck() | |
~Pluck() | |
void | Init(float sample_rate, float * buf, int32_t npt, int32_t mode) |
float | Process(float & trig) |
void | SetAmp(float amp) |
void | SetFreq(float freq) |
void | SetDecay(float decay) |
void | SetDamp(float damp) |
void | SetMode(int32_t mode) |
float | GetAmp() |
float | GetFreq() |
float | GetDecay() |
float | GetDamp() |
int32_t | GetMode() |
Detailed Description¶
Produces a naturally decaying plucked string or drum sound based on the Karplus-Strong algorithms.
Ported from soundpipe to DaisySP
This code was originally extracted from the Csound opcode "pluck"
Original Author(s): Barry Vercoe, John ffitch Year: 1991
Location: OOps/ugens4.c
Public Functions Documentation¶
function Pluck¶
function ~Pluck¶
function Init¶
Initializes the Pluck module.
\param sample_rate: Sample rate of the audio engine being run.
\param buf: buffer used as an impulse when triggering the Pluck algorithm
\param npt: number of elementes in buf.
\param mode: Sets the mode of the algorithm.
function Process¶
Processes the waveform to be generated, returning one sample. This should be called once per sample period.
function SetAmp¶
Sets the amplitude of the output signal. Input range: 0-1?
function SetFreq¶
Sets the frequency of the output signal in Hz. Input range: Any positive value
function SetDecay¶
Sets the time it takes for a triggered note to end in seconds. Input range: 0-1
function SetDamp¶
Sets the dampening factor applied by the filter (based on PLUCK_MODE) Input range: 0-1
function SetMode¶
Sets the mode of the algorithm.
function GetAmp¶
Returns the current value for amp.
function GetFreq¶
Returns the current value for freq.
function GetDecay¶
Returns the current value for decay.
function GetDamp¶
Returns the current value for damp.
function GetMode¶
Returns the current value for mode.
---¶
Updated on 2024-01-03 at 19:38:46 +0000