Skip to content

daisysp::VariableShapeOscillator

Variable Waveshape Oscillator. More...

#include <variableshapeosc.h>

Public Functions

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

Detailed Description

class daisysp::VariableShapeOscillator;

Variable Waveshape Oscillator.

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 VariableShapeOscillator

inline VariableShapeOscillator()

function ~VariableShapeOscillator

inline ~VariableShapeOscillator()

function Init

void Init(
    float sample_rate
)

Parameters:

  • sample_rate Audio engine sample rate

Initialize the oscillator


function Process

float Process()

Get next sample


function SetFreq

void SetFreq(
    float frequency
)

Parameters:

  • frequency Freq in Hz.

Set master freq.


function SetPW

void SetPW(
    float pw
)

Parameters:

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

Set pulse width / saw, ramp, tri.


function SetWaveshape

void SetWaveshape(
    float waveshape
)

Parameters:

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

Switch from saw/ramp/tri to square.


function SetSync

void SetSync(
    bool enable_sync
)

Parameters:

  • enable_sync True to turn sync on.

Whether or not to sync to the sync oscillator


function SetSyncFreq

void SetSyncFreq(
    float frequency
)

Parameters:

  • frequency Freq in Hz.

Set sync oscillator freq.

---

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