Naive bass drum model (modulated oscillator with FM + envelope).
More...
#include <synthbassdrum.h>
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.
◆ DistortedSine()
float SyntheticBassDrum::DistortedSine |
( |
float | phase, |
|
|
float | phase_noise, |
|
|
float | dirtiness ) |
|
inline |
Generates a distorted sine wave
◆ Init()
void SyntheticBassDrum::Init |
( |
float | sample_rate | ) |
|
Init the module
- Parameters
-
sample_rate | Audio engine sample rate. |
◆ Process()
float SyntheticBassDrum::Process |
( |
bool | trigger = false | ) |
|
Get the next sample.
- Parameters
-
trigger | True triggers the BD. This is optional. |
◆ SetAccent()
void SyntheticBassDrum::SetAccent |
( |
float | accent | ) |
|
Sets the amount of accent.
- Parameters
-
◆ SetDecay()
void SyntheticBassDrum::SetDecay |
( |
float | decay | ) |
|
Sets how long the drum's volume takes to decay.
- Parameters
-
◆ SetDirtiness()
void SyntheticBassDrum::SetDirtiness |
( |
float | dirtiness | ) |
|
Makes things grimy
- Parameters
-
◆ SetFmEnvelopeAmount()
void SyntheticBassDrum::SetFmEnvelopeAmount |
( |
float | fm_envelope_amount | ) |
|
Sets how much of a pitch sweep the drum experiences when triggered.
- Parameters
-
fm_envelope_amount | Works 0-1. |
◆ SetFmEnvelopeDecay()
void SyntheticBassDrum::SetFmEnvelopeDecay |
( |
float | fm_envelope_decay | ) |
|
Sets how long the initial pitch sweep takes.
- Parameters
-
fm_envelope_decay | Works 0-1. |
◆ SetFreq()
void SyntheticBassDrum::SetFreq |
( |
float | freq | ) |
|
Set the bass drum's root frequency.
- Parameters
-
◆ SetSustain()
void SyntheticBassDrum::SetSustain |
( |
bool | sustain | ) |
|
Allows the drum to play continuously
- Parameters
-
sustain | True sets the drum on infinite sustain. |
◆ SetTone()
void SyntheticBassDrum::SetTone |
( |
float | tone | ) |
|
Sets the overall bright / darkness of the drum.
- Parameters
-
◆ TransistorVCA()
float SyntheticBassDrum::TransistorVCA |
( |
float | s, |
|
|
float | gain ) |
|
inline |
Transistor VCA simulation.
- Parameters
-
s | Input sample. |
gain | VCA gain. |
◆ Trig()
void SyntheticBassDrum::Trig |
( |
| ) |
|
The documentation for this class was generated from the following files: