Skip to content

Class daisysp::OscillatorBank

ClassList > daisysp > OscillatorBank

Oscillator Bank module.More...

  • #include <oscillatorbank.h>

Public Functions

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

Detailed Description

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 Init

void daisysp::OscillatorBank::Init (
    float sample_rate
) 

Init string synth module

Parameters:

  • sample_rate Audio engine sample rate

function OscillatorBank

inline daisysp::OscillatorBank::OscillatorBank () 

function Process

float daisysp::OscillatorBank::Process () 

Get next floating point sample


function SetAmplitudes

void daisysp::OscillatorBank::SetAmplitudes (
    const  float * amplitudes
) 

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

Parameters:

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

function SetFreq

void daisysp::OscillatorBank::SetFreq (
    float freq
) 

Set oscillator frequency (8' oscillator)

Parameters:

  • freq Frequency in Hz

function SetGain

void daisysp::OscillatorBank::SetGain (
    float gain
) 

Set overall gain.

Parameters:

  • gain Gain to set. 0-1.

function SetSingleAmp

void daisysp::OscillatorBank::SetSingleAmp (
    float amp,
    int idx
) 

Set a single amplitude

Parameters:

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

function ~OscillatorBank

inline daisysp::OscillatorBank::~OscillatorBank () 


The documentation for this class was generated from the following file external-docs/DaisySP/Source/Synthesis/oscillatorbank.h