Skip to content

Class daisysp::Pluck

ClassList > daisysp > Pluck

More...

  • #include <pluck.h>

Public Functions

Type Name
float GetAmp ()
float GetDamp ()
float GetDecay ()
float GetFreq ()
int32_t GetMode ()
void Init (float sample_rate, float * buf, int32_t npt, int32_t mode)
Pluck ()
float Process (float & trig)
void SetAmp (float amp)
void SetDamp (float damp)
void SetDecay (float decay)
void SetFreq (float freq)
void SetMode (int32_t mode)
~Pluck ()

Detailed Description

Produces a naturally decaying plucked string or drum sound based on the Karplus-Strong algorithms.

Public Functions Documentation

function GetAmp

inline float daisysp::Pluck::GetAmp () 

Returns the current value for amp.


function GetDamp

inline float daisysp::Pluck::GetDamp () 

Returns the current value for damp.


function GetDecay

inline float daisysp::Pluck::GetDecay () 

Returns the current value for decay.


function GetFreq

inline float daisysp::Pluck::GetFreq () 

Returns the current value for freq.


function GetMode

inline int32_t daisysp::Pluck::GetMode () 

Returns the current value for mode.


function Init

void daisysp::Pluck::Init (
    float sample_rate,
    float * buf,
    int32_t npt,
    int32_t mode
) 

Initializes the Pluck module.


function Pluck

inline daisysp::Pluck::Pluck () 

function Process

float daisysp::Pluck::Process (
    float & trig
) 

Processes the waveform to be generated, returning one sample. This should be called once per sample period.


function SetAmp

inline void daisysp::Pluck::SetAmp (
    float amp
) 

Sets the amplitude of the output signal. Input range: 0-1?


function SetDamp

inline void daisysp::Pluck::SetDamp (
    float damp
) 

Sets the dampening factor applied by the filter (based on PLUCK_MODE) Input range: 0-1


function SetDecay

inline void daisysp::Pluck::SetDecay (
    float decay
) 

Sets the time it takes for a triggered note to end in seconds. Input range: 0-1


function SetFreq

inline void daisysp::Pluck::SetFreq (
    float freq
) 

Sets the frequency of the output signal in Hz. Input range: Any positive value


function SetMode

inline void daisysp::Pluck::SetMode (
    int32_t mode
) 

Sets the mode of the algorithm.


function ~Pluck

inline daisysp::Pluck::~Pluck () 


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