Class daisysp::SyntheticSnareDrum¶
ClassList > daisysp > SyntheticSnareDrum
Naive snare drum model (two modulated oscillators + filtered noise). More...
#include <synthsnaredrum.h>
Public Functions¶
Type | Name |
---|---|
void | Init (float sample_rate) |
float | Process (bool trigger=false) |
void | SetAccent (float accent) |
void | SetDecay (float decay) |
void | SetFmAmount (float fm_amount) |
void | SetFreq (float f0) |
void | SetSnappy (float snappy) |
void | SetSustain (bool sustain) |
SyntheticSnareDrum () |
|
void | Trig () |
~SyntheticSnareDrum () |
Detailed Description¶
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.
Public Functions Documentation¶
function Init¶
Init the module
Parameters:
sample_rate
Audio engine sample rate
function Process¶
Get the next sample.
Parameters:
trigger
True = hit the drum. This argument is optional.
function SetAccent¶
Set how much accent to use
Parameters:
accent
Works 0-1.
function SetDecay¶
Set the length of the drum decay
Parameters:
decay
Works with positive numbers
function SetFmAmount¶
Set the amount of fm sweep.
Parameters:
fm_amount
Works from 0 - 1.
function SetFreq¶
Set the drum's root frequency
Parameters:
f0
Freq in Hz
function SetSnappy¶
Sets the mix between snare and drum.
Parameters:
snappy
1 = just snare. 0 = just drum.
function SetSustain¶
Make the drum ring out infinitely.
Parameters:
sustain
True = infinite sustain.
function SyntheticSnareDrum¶
function Trig¶
Trigger the drum
function ~SyntheticSnareDrum¶
The documentation for this class was generated from the following file external-docs/DaisySP/Source/Drums/synthsnaredrum.h