daisysp::SyntheticBassDrum¶
Naive bass drum model (modulated oscillator with FM + envelope). More...
#include <synthbassdrum.h>
Public Functions¶
Name | |
---|---|
SyntheticBassDrum() | |
~SyntheticBassDrum() | |
void | Init(float sample_rate) |
float | DistortedSine(float phase, float phase_noise, float dirtiness) |
float | TransistorVCA(float s, float gain) |
float | Process(bool trigger =false) |
void | Trig() |
void | SetSustain(bool sustain) |
void | SetAccent(float accent) |
void | SetFreq(float freq) |
void | SetTone(float tone) |
void | SetDecay(float decay) |
void | SetDirtiness(float dirtiness) |
void | SetFmEnvelopeAmount(float fm_envelope_amount) |
void | SetFmEnvelopeDecay(float fm_envelope_decay) |
Detailed Description¶
Naive bass drum model (modulated oscillator with FM + envelope).
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 SyntheticBassDrum¶
function ~SyntheticBassDrum¶
function Init¶
Parameters:
- sample_rate Audio engine sample rate.
Init the module
function DistortedSine¶
Generates a distorted sine wave
function TransistorVCA¶
Parameters:
- s Input sample.
- gain VCA gain.
Transistor VCA simulation.
function Process¶
Parameters:
- trigger True triggers the BD. This is optional.
Get the next sample.
function Trig¶
Trigger the drum
function SetSustain¶
Parameters:
- sustain True sets the drum on infinite sustain.
Allows the drum to play continuously
function SetAccent¶
Parameters:
- accent Works 0-1.
Sets the amount of accent.
function SetFreq¶
Parameters:
- Frequency in Hz.
Set the bass drum's root frequency.
function SetTone¶
Parameters:
- tone Works 0-1.
Sets the overall bright / darkness of the drum.
function SetDecay¶
Parameters:
- Works 0-1.
Sets how long the drum's volume takes to decay.
function SetDirtiness¶
Parameters:
- dirtiness Works 0-1.
Makes things grimy
function SetFmEnvelopeAmount¶
Parameters:
- fm_envelope_amount Works 0-1.
Sets how much of a pitch sweep the drum experiences when triggered.
function SetFmEnvelopeDecay¶
Parameters:
- fm_envelope_decay Works 0-1.
Sets how long the initial pitch sweep takes.
---¶
Updated on 2024-01-03 at 19:38:46 +0000