Skip to content

daisysp::AnalogSnareDrum

808 snare drum model, revisited. More...

#include <analogsnaredrum.h>

Public Functions

Name
AnalogSnareDrum()
~AnalogSnareDrum()
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 SetTone(float tone)
void SetDecay(float decay)
void SetSnappy(float snappy)

Public Attributes

Name
const int kNumModes

Detailed Description

class daisysp::AnalogSnareDrum;

808 snare drum model, revisited.

Author: Ben Sergentanis

Date: Jan 2021 Ported from pichenettes/eurorack/plaits/dsp/drums/analog_snare_drum.h

to an independent module.

Original code written by Emilie Gillet in 2016.

Public Functions Documentation

function AnalogSnareDrum

inline AnalogSnareDrum()

function ~AnalogSnareDrum

inline ~AnalogSnareDrum()

function Init

void Init(
    float sample_rate
)

Parameters:

  • sample_rate Audio engine sample rate

Init the module


function Process

float Process(
    bool trigger =false
)

Parameters:

  • trigger Hit the drum with true. Defaults to false.

Get the next sample


function Trig

void Trig()

Trigger the drum


function SetSustain

void SetSustain(
    bool sustain
)

Parameters:

  • sample_rate Audio engine sample rate

Init the module


function SetAccent

void SetAccent(
    float accent
)

Parameters:

  • accent Works 0-1.

Set how much accent to use


function SetFreq

void SetFreq(
    float f0
)

Parameters:

  • f0 Freq in Hz

Set the drum's root frequency


function SetTone

void SetTone(
    float tone
)

Parameters:

  • tone Works 0-1. 1 = bright, 0 = dark.

Set the brightness of the drum tone.


function SetDecay

void SetDecay(
    float decay
)

Parameters:

  • decay Works with positive numbers

Set the length of the drum decay


function SetSnappy

void SetSnappy(
    float snappy
)

Parameters:

  • snappy 1 = just snare. 0 = just drum.

Sets the mix between snare and drum.


Public Attributes Documentation

variable kNumModes

static const int kNumModes = 5;

Updated on 2024-01-03 at 19:38:46 +0000