Skip to content

daisysp::OscillatorBank

Oscillator Bank module. More...

#include <oscillatorbank.h>

Public Functions

Name
OscillatorBank()
~OscillatorBank()
void Init(float sample_rate)
float Process()
void SetFreq(float freq)
void SetAmplitudes(const float * amplitudes)
void SetSingleAmp(float amp, int idx)
void SetGain(float gain)

Detailed Description

class daisysp::OscillatorBank;

Oscillator Bank module.

Author: Ben Sergentanis

Date: Dec 2020 A mixture of 7 sawtooth and square waveforms in the style of divide-down organs

Ported from pichenettes/eurorack/plaits/dsp/oscillator/string_synth_oscillator.h

to an independent module.

Original code written by Emilie Gillet in 2016.

Public Functions Documentation

function OscillatorBank

inline OscillatorBank()

function ~OscillatorBank

inline ~OscillatorBank()

function Init

void Init(
    float sample_rate
)

Parameters:

  • sample_rate Audio engine sample rate

Init string synth module


function Process

float Process()

Get next floating point sample


function SetFreq

void SetFreq(
    float freq
)

Parameters:

  • freq Frequency in Hz

Set oscillator frequency (8' oscillator)


function SetAmplitudes

void SetAmplitudes(
    const float * amplitudes
)

Parameters:

  • amplitudes array of 7 floating point amplitudes. Must sum to 1.

Set amplitudes of 7 oscillators. 0-6 are Saw 8', Square 8', Saw 4', Square 4', Saw 2', Square 2', Saw 1'


function SetSingleAmp

void SetSingleAmp(
    float amp,
    int idx
)

Parameters:

  • amp Amplitude to set.
  • idx Which wave's amp to set

Set a single amplitude


function SetGain

void SetGain(
    float gain
)

Parameters:

  • gain Gain to set. 0-1.

Set overall gain.

---

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