Skip to content

Class daisysp::BlOsc

ClassList > daisysp > BlOsc

More...

  • #include <blosc.h>

Public Types

Type Name
enum Waveforms

Public Functions

Type Name
BlOsc ()
void Init (float sample_rate)
float Process ()
void Reset ()
void SetAmp (float amp)
void SetFreq (float freq)
void SetPw (float pw)
void SetWaveform (uint8_t waveform)
~BlOsc ()

Detailed Description

Band Limited Oscillator

Based on bltriangle, blsaw, blsquare from soundpipe

Original Author(s): Paul Batchelor, saw2 Faust by Julius Smith

Ported by Ben Sergentanis, May 2020

Public Types Documentation

enum Waveforms

enum daisysp::BlOsc::Waveforms {
    WAVE_TRIANGLE,
    WAVE_SAW,
    WAVE_SQUARE,
    WAVE_OFF
};

Bl Waveforms


Public Functions Documentation

function BlOsc

inline daisysp::BlOsc::BlOsc () 

function Init

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

-Initialize oscillator. -Defaults to: 440Hz, .5 amplitude, .5 pw, Triangle.


function Process

float daisysp::BlOsc::Process () 
  • Get next floating point oscillator sample.

function Reset

void daisysp::BlOsc::Reset () 
  • reset the phase of the oscillator.

function SetAmp

inline void daisysp::BlOsc::SetAmp (
    float amp
) 
  • Float amp: Set oscillator amplitude, 0 to 1.

function SetFreq

inline void daisysp::BlOsc::SetFreq (
    float freq
) 
  • Float freq: Set oscillator frequency in Hz.

function SetPw

inline void daisysp::BlOsc::SetPw (
    float pw
) 
  • Float pw: Set square osc pulsewidth, 0 to 1. (no thru 0 at the moment)

function SetWaveform

inline void daisysp::BlOsc::SetWaveform (
    uint8_t waveform
) 

function ~BlOsc

inline daisysp::BlOsc::~BlOsc () 


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