DaisySP
Loading...
Searching...
No Matches
daisysp::VariableShapeOscillator Class Reference

Variable Waveshape Oscillator. More...

#include <variableshapeosc.h>

Public Member Functions

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

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.

Member Function Documentation

◆ Init()

void VariableShapeOscillator::Init ( float sample_rate)

Initialize the oscillator

Parameters
sample_rateAudio engine sample rate

◆ Process()

float VariableShapeOscillator::Process ( )

Get next sample

◆ SetFreq()

void VariableShapeOscillator::SetFreq ( float frequency)

Set master freq.

Parameters
frequencyFreq in Hz.

◆ SetPW()

void VariableShapeOscillator::SetPW ( float pw)

Set pulse width / saw, ramp, tri.

Parameters
pwPW when shape is square. Saw, ramp, tri otherwise.

◆ SetSync()

void VariableShapeOscillator::SetSync ( bool enable_sync)

Whether or not to sync to the sync oscillator

Parameters
enable_syncTrue to turn sync on.

◆ SetSyncFreq()

void VariableShapeOscillator::SetSyncFreq ( float frequency)

Set sync oscillator freq.

Parameters
frequencyFreq in Hz.

◆ SetWaveshape()

void VariableShapeOscillator::SetWaveshape ( float waveshape)

Switch from saw/ramp/tri to square.

Parameters
waveshape0 is saw/ramp/tri, 1 is square.

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