Skip to content

Class daisysp::Fm2

ClassList > daisysp > Fm2

More...

  • #include <fm2.h>

Public Functions

Type Name
Fm2 ()
float GetIndex ()
void Init (float samplerate)
float Process ()
void Reset ()
void SetFrequency (float freq)
void SetIndex (float index)
void SetRatio (float ratio)
~Fm2 ()

Detailed Description

Simple 2 operator FM synth voice.

Date: November, 2020

Author: Ben Sergentanis

Public Functions Documentation

function Fm2

inline daisysp::Fm2::Fm2 () 

function GetIndex

float daisysp::Fm2::GetIndex () 

Returns the current FM index.


function Init

void daisysp::Fm2::Init (
    float samplerate
) 

Initializes the FM2 module.

Parameters:

  • samplerate - The sample rate of the audio engine being run.

function Process

float daisysp::Fm2::Process () 

Returns the next sample


function Reset

void daisysp::Fm2::Reset () 

Resets both oscillators


function SetFrequency

void daisysp::Fm2::SetFrequency (
    float freq
) 

Carrier freq. setter

Parameters:

  • freq Carrier frequency in Hz

function SetIndex

void daisysp::Fm2::SetIndex (
    float index
) 

Index setter

Parameters:

  • FM depth, 5 = 2PI rads

function SetRatio

void daisysp::Fm2::SetRatio (
    float ratio
) 

Set modulator freq. relative to carrier

Parameters:

  • ratio New modulator freq = carrier freq. * ratio

function ~Fm2

inline daisysp::Fm2::~Fm2 () 


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