Class daisysp::SyntheticBassDrum¶
ClassList > daisysp > SyntheticBassDrum
Naive bass drum model (modulated oscillator with FM + envelope). More...
#include <synthbassdrum.h>
Public Functions¶
| Type | Name |
|---|---|
| float | DistortedSine (float phase, float phase_noise, float dirtiness) |
| void | Init (float sample_rate) |
| float | Process (bool trigger=false) |
| void | SetAccent (float accent) |
| void | SetDecay (float decay) |
| void | SetDirtiness (float dirtiness) |
| void | SetFmEnvelopeAmount (float fm_envelope_amount) |
| void | SetFmEnvelopeDecay (float fm_envelope_decay) |
| void | SetFreq (float freq) |
| void | SetSustain (bool sustain) |
| void | SetTone (float tone) |
| SyntheticBassDrum () |
|
| float | TransistorVCA (float s, float gain) |
| void | Trig () |
| ~SyntheticBassDrum () |
Detailed Description¶
Author:
Ben Sergentanis
Date:
Jan 2021 Inadvertently 909-ish.
Ported from pichenettes/eurorack/plaits/dsp/drums/synthetic_bass_drum.h to an independent module. Original code written by Emilie Gillet in 2016.
Public Functions Documentation¶
function DistortedSine¶
inline float daisysp::SyntheticBassDrum::DistortedSine (
float phase,
float phase_noise,
float dirtiness
)
Generates a distorted sine wave
function Init¶
Init the module
Parameters:
sample_rateAudio engine sample rate.
function Process¶
Get the next sample.
Parameters:
triggerTrue triggers the BD. This is optional.
function SetAccent¶
Sets the amount of accent.
Parameters:
accentWorks 0-1.
function SetDecay¶
Sets how long the drum's volume takes to decay.
Parameters:
Works0-1.
function SetDirtiness¶
Makes things grimy
Parameters:
dirtinessWorks 0-1.
function SetFmEnvelopeAmount¶
Sets how much of a pitch sweep the drum experiences when triggered.
Parameters:
fm_envelope_amountWorks 0-1.
function SetFmEnvelopeDecay¶
Sets how long the initial pitch sweep takes.
Parameters:
fm_envelope_decayWorks 0-1.
function SetFreq¶
Set the bass drum's root frequency.
Parameters:
Frequencyin Hz.
function SetSustain¶
Allows the drum to play continuously
Parameters:
sustainTrue sets the drum on infinite sustain.
function SetTone¶
Sets the overall bright / darkness of the drum.
Parameters:
toneWorks 0-1.
function SyntheticBassDrum¶
function TransistorVCA¶
Transistor VCA simulation.
Parameters:
sInput sample.gainVCA gain.
function Trig¶
Trigger the drum
function ~SyntheticBassDrum¶
The documentation for this class was generated from the following file external-docs/DaisySP/Source/Drums/synthbassdrum.h