DaisySP
|
Naive bass drum model (modulated oscillator with FM + envelope). More...
#include <synthbassdrum.h>
Public Member Functions | |
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) |
Naive bass drum model (modulated oscillator with FM + envelope).
Generates a distorted sine wave
Init the module
sample_rate | Audio engine sample rate. |
Get the next sample.
trigger | True triggers the BD. This is optional. |
Sets the amount of accent.
accent | Works 0-1. |
Sets how long the drum's volume takes to decay.
Works | 0-1. |
Makes things grimy
dirtiness | Works 0-1. |
Sets how much of a pitch sweep the drum experiences when triggered.
fm_envelope_amount | Works 0-1. |
Sets how long the initial pitch sweep takes.
fm_envelope_decay | Works 0-1. |
Set the bass drum's root frequency.
Frequency | in Hz. |
Allows the drum to play continuously
sustain | True sets the drum on infinite sustain. |
Sets the overall bright / darkness of the drum.
tone | Works 0-1. |
Transistor VCA simulation.
s | Input sample. |
gain | VCA gain. |
void SyntheticBassDrum::Trig | ( | ) |
Trigger the drum