DaisySP
Loading...
Searching...
No Matches
Public Member Functions | List of all members
daisysp::SyntheticSnareDrum Class Reference

Naive snare drum model (two modulated oscillators + filtered noise). More...

#include <synthsnaredrum.h>

Public Member Functions

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.

Member Function Documentation

◆ Init()

void SyntheticSnareDrum::Init ( float sample_rate)

Init the module

Parameters
sample_rateAudio engine sample rate

◆ Process()

float SyntheticSnareDrum::Process ( bool trigger = false)

Get the next sample.

Parameters
triggerTrue = hit the drum. This argument is optional.

◆ SetAccent()

void SyntheticSnareDrum::SetAccent ( float accent)

Set how much accent to use

Parameters
accentWorks 0-1.

◆ SetDecay()

void SyntheticSnareDrum::SetDecay ( float decay)

Set the length of the drum decay

Parameters
decayWorks with positive numbers

◆ SetFmAmount()

void SyntheticSnareDrum::SetFmAmount ( float fm_amount)

Set the amount of fm sweep.

Parameters
fm_amountWorks from 0 - 1.

◆ SetFreq()

void SyntheticSnareDrum::SetFreq ( float f0)

Set the drum's root frequency

Parameters
f0Freq in Hz

◆ SetSnappy()

void SyntheticSnareDrum::SetSnappy ( float snappy)

Sets the mix between snare and drum.

Parameters
snappy1 = just snare. 0 = just drum.

◆ SetSustain()

void SyntheticSnareDrum::SetSustain ( bool sustain)

Make the drum ring out infinitely.

Parameters
sustainTrue = infinite sustain.

◆ Trig()

void SyntheticSnareDrum::Trig ( )

Trigger the drum


The documentation for this class was generated from the following files: