Naive snare drum model (two modulated oscillators + filtered noise).
More...
#include <synthsnaredrum.h>
Naive snare drum model (two modulated oscillators + filtered noise).
- Author
- Ben Sergentanis
- Date
- Jan 2021 Uses a few magic numbers taken from the 909 schematics:
- Ratio between the two modes of the drum set to 1.47.
- Funky coupling between the two modes.
- Noise coloration filters and envelope shapes for the snare.
Ported from pichenettes/eurorack/plaits/dsp/drums/synthetic_snare_drum.h
to an independent module.
Original code written by Emilie Gillet in 2016.
◆ Init()
void SyntheticSnareDrum::Init |
( |
float | sample_rate | ) |
|
Init the module
- Parameters
-
sample_rate | Audio engine sample rate |
◆ Process()
float SyntheticSnareDrum::Process |
( |
bool | trigger = false | ) |
|
Get the next sample.
- Parameters
-
trigger | True = hit the drum. This argument is optional. |
◆ SetAccent()
void SyntheticSnareDrum::SetAccent |
( |
float | accent | ) |
|
Set how much accent to use
- Parameters
-
◆ SetDecay()
void SyntheticSnareDrum::SetDecay |
( |
float | decay | ) |
|
Set the length of the drum decay
- Parameters
-
decay | Works with positive numbers |
◆ SetFmAmount()
void SyntheticSnareDrum::SetFmAmount |
( |
float | fm_amount | ) |
|
Set the amount of fm sweep.
- Parameters
-
fm_amount | Works from 0 - 1. |
◆ SetFreq()
void SyntheticSnareDrum::SetFreq |
( |
float | f0 | ) |
|
Set the drum's root frequency
- Parameters
-
◆ SetSnappy()
void SyntheticSnareDrum::SetSnappy |
( |
float | snappy | ) |
|
Sets the mix between snare and drum.
- Parameters
-
snappy | 1 = just snare. 0 = just drum. |
◆ SetSustain()
void SyntheticSnareDrum::SetSustain |
( |
bool | sustain | ) |
|
Make the drum ring out infinitely.
- Parameters
-
sustain | True = infinite sustain. |
◆ Trig()
void SyntheticSnareDrum::Trig |
( |
| ) |
|
The documentation for this class was generated from the following files: