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

Naive bass drum model (modulated oscillator with FM + envelope). More...

#include <synthbassdrum.h>

Public Member Functions

void Init (float sample_rate)
 
float DistortedSine (float phase, float phase_noise, float dirtiness)
 
float TransistorVCA (float s, float gain)
 
float Process (bool trigger=false)
 
void Trig ()
 
void SetSustain (bool sustain)
 
void SetAccent (float accent)
 
void SetFreq (float freq)
 
void SetTone (float tone)
 
void SetDecay (float decay)
 
void SetDirtiness (float dirtiness)
 
void SetFmEnvelopeAmount (float fm_envelope_amount)
 
void SetFmEnvelopeDecay (float fm_envelope_decay)
 

Detailed Description

Naive bass drum model (modulated oscillator with FM + envelope).

Author
Ben Sergentanis
Date
Jan 2021 Inadvertently 909-ish.

Ported from pichenettes/eurorack/plaits/dsp/drums/synthetic_bass_drum.h
to an independent module.
Original code written by Emilie Gillet in 2016.

Member Function Documentation

◆ DistortedSine()

float SyntheticBassDrum::DistortedSine ( float phase,
float phase_noise,
float dirtiness )
inline

Generates a distorted sine wave

◆ Init()

void SyntheticBassDrum::Init ( float sample_rate)

Init the module

Parameters
sample_rateAudio engine sample rate.

◆ Process()

float SyntheticBassDrum::Process ( bool trigger = false)

Get the next sample.

Parameters
triggerTrue triggers the BD. This is optional.

◆ SetAccent()

void SyntheticBassDrum::SetAccent ( float accent)

Sets the amount of accent.

Parameters
accentWorks 0-1.

◆ SetDecay()

void SyntheticBassDrum::SetDecay ( float decay)

Sets how long the drum's volume takes to decay.

Parameters
Works0-1.

◆ SetDirtiness()

void SyntheticBassDrum::SetDirtiness ( float dirtiness)

Makes things grimy

Parameters
dirtinessWorks 0-1.

◆ SetFmEnvelopeAmount()

void SyntheticBassDrum::SetFmEnvelopeAmount ( float fm_envelope_amount)

Sets how much of a pitch sweep the drum experiences when triggered.

Parameters
fm_envelope_amountWorks 0-1.

◆ SetFmEnvelopeDecay()

void SyntheticBassDrum::SetFmEnvelopeDecay ( float fm_envelope_decay)

Sets how long the initial pitch sweep takes.

Parameters
fm_envelope_decayWorks 0-1.

◆ SetFreq()

void SyntheticBassDrum::SetFreq ( float freq)

Set the bass drum's root frequency.

Parameters
Frequencyin Hz.

◆ SetSustain()

void SyntheticBassDrum::SetSustain ( bool sustain)

Allows the drum to play continuously

Parameters
sustainTrue sets the drum on infinite sustain.

◆ SetTone()

void SyntheticBassDrum::SetTone ( float tone)

Sets the overall bright / darkness of the drum.

Parameters
toneWorks 0-1.

◆ TransistorVCA()

float SyntheticBassDrum::TransistorVCA ( float s,
float gain )
inline

Transistor VCA simulation.

Parameters
sInput sample.
gainVCA gain.

◆ Trig()

void SyntheticBassDrum::Trig ( )

Trigger the drum


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