daisysp::SyntheticSnareDrum¶
Naive snare drum model (two modulated oscillators + filtered noise). More...
#include <synthsnaredrum.h>
Public Functions¶
Name | |
---|---|
SyntheticSnareDrum() | |
~SyntheticSnareDrum() | |
void | Init(float sample_rate) |
float | Process(bool trigger =false) |
void | Trig() |
void | SetSustain(bool sustain) |
void | SetAccent(float accent) |
void | SetFreq(float f0) |
void | SetFmAmount(float fm_amount) |
void | SetDecay(float decay) |
void | SetSnappy(float snappy) |
Detailed Description¶
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.
Public Functions Documentation¶
function SyntheticSnareDrum¶
function ~SyntheticSnareDrum¶
function Init¶
Parameters:
- sample_rate Audio engine sample rate
Init the module
function Process¶
Parameters:
- trigger True = hit the drum. This argument is optional.
Get the next sample.
function Trig¶
Trigger the drum
function SetSustain¶
Parameters:
- sustain True = infinite sustain.
Make the drum ring out infinitely.
function SetAccent¶
Parameters:
- accent Works 0-1.
Set how much accent to use
function SetFreq¶
Parameters:
- f0 Freq in Hz
Set the drum's root frequency
function SetFmAmount¶
Parameters:
- fm_amount Works from 0 - 1.
Set the amount of fm sweep.
function SetDecay¶
Parameters:
- decay Works with positive numbers
Set the length of the drum decay
function SetSnappy¶
Parameters:
- snappy 1 = just snare. 0 = just drum.
Sets the mix between snare and drum.
---¶
Updated on 2024-01-03 at 19:38:46 +0000