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

#include <fm2.h>

Public Member Functions

void Init (float samplerate)
 
float Process ()
 
void SetFrequency (float freq)
 
void SetRatio (float ratio)
 
void SetIndex (float index)
 
float GetIndex ()
 
void Reset ()
 

Detailed Description

Simple 2 operator FM synth voice.

Date: November, 2020

Author: Ben Sergentanis

Member Function Documentation

◆ GetIndex()

float Fm2::GetIndex ( )

Returns the current FM index.

◆ Init()

void Fm2::Init ( float samplerate)

Initializes the FM2 module.

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

◆ Process()

float Fm2::Process ( )

Returns the next sample

◆ Reset()

void Fm2::Reset ( )

Resets both oscillators

◆ SetFrequency()

void Fm2::SetFrequency ( float freq)

Carrier freq. setter

Parameters
freqCarrier frequency in Hz

◆ SetIndex()

void Fm2::SetIndex ( float index)

Index setter

Parameters
FMdepth, 5 = 2PI rads

◆ SetRatio()

void Fm2::SetRatio ( float ratio)

Set modulator freq. relative to carrier

Parameters
ratioNew modulator freq = carrier freq. * ratio

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