Skip to content

daisysp::PolyPluck

More...

#include <PolyPluck.h>

Public Functions

Name
void Init(float sample_rate)
float Process(float & trig, float note)
void SetDecay(float p)

Detailed Description

template <size_t num_voices>
class daisysp::PolyPluck;

Simplified Pseudo-Polyphonic Pluck Voice

Template Based Pluck Voice, with configurable number of voices and simple pseudo-polyphony.

DC Blocking included to prevent biases from causing unwanted saturation distortion.

Author**: shensley

Date Added**: March 2020

Public Functions Documentation

function Init

inline void Init(
    float sample_rate
)

Parameters:

  • sample_rate rate in Hz that the Process() function will be called.

Initializes the PolyPluck instance.


function Process

inline float Process(
    float & trig,
    float note
)

Parameters:

  • trig value by reference of trig. When trig > 0 a the next voice will be triggered, and trig will be set to 0.
  • note MIDI note number for the active_voice.

Process function, synthesizes and sums the output of all voices, triggering a new voice with frequency of MIDI note number when trig > 0.


function SetDecay

inline void SetDecay(
    float p
)

Parameters:

  • p expects 0.0-1.0 input.

Sets the decay coefficients of the pluck voices.

---

Updated on 2024-01-03 at 19:38:46 +0000