Skip to content

Class daisysp::VariableShapeOscillator

ClassList > daisysp > VariableShapeOscillator

Variable Waveshape Oscillator .More...

  • #include <variableshapeosc.h>

Public Functions

Type Name
void Init (float sample_rate)
float Process ()
void SetFreq (float frequency)
void SetPW (float pw)
void SetSync (bool enable_sync)
void SetSyncFreq (float frequency)
void SetWaveshape (float waveshape)
VariableShapeOscillator ()
~VariableShapeOscillator ()

Detailed Description

Author:

Ben Sergentanis

Date:

Dec 2020 Continuously variable waveform.

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

to an independent module. Original code written by Emilie Gillet in 2016.

Public Functions Documentation

function Init

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

Initialize the oscillator

Parameters:

  • sample_rate Audio engine sample rate

function Process

float daisysp::VariableShapeOscillator::Process () 

Get next sample


function SetFreq

void daisysp::VariableShapeOscillator::SetFreq (
    float frequency
) 

Set master freq.

Parameters:

  • frequency Freq in Hz.

function SetPW

void daisysp::VariableShapeOscillator::SetPW (
    float pw
) 

Set pulse width / saw, ramp, tri.

Parameters:

  • pw PW when shape is square. Saw, ramp, tri otherwise.

function SetSync

void daisysp::VariableShapeOscillator::SetSync (
    bool enable_sync
) 

Whether or not to sync to the sync oscillator

Parameters:

  • enable_sync True to turn sync on.

function SetSyncFreq

void daisysp::VariableShapeOscillator::SetSyncFreq (
    float frequency
) 

Set sync oscillator freq.

Parameters:

  • frequency Freq in Hz.

function SetWaveshape

void daisysp::VariableShapeOscillator::SetWaveshape (
    float waveshape
) 

Switch from saw/ramp/tri to square.

Parameters:

  • waveshape 0 is saw/ramp/tri, 1 is square.

function VariableShapeOscillator

inline daisysp::VariableShapeOscillator::VariableShapeOscillator () 

function ~VariableShapeOscillator

inline daisysp::VariableShapeOscillator::~VariableShapeOscillator () 


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