|
DaisySP
|
#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 () |
Simple 2 operator FM synth voice.
Date: November, 2020
Author: Ben Sergentanis
| float Fm2::GetIndex | ( | ) |
Returns the current FM index.
| void Fm2::Init | ( | float | samplerate | ) |
Initializes the FM2 module.
| samplerate | - The sample rate of the audio engine being run. |
| float Fm2::Process | ( | ) |
Returns the next sample
| void Fm2::Reset | ( | ) |
Resets both oscillators
| void Fm2::SetFrequency | ( | float | freq | ) |
Carrier freq. setter
| freq | Carrier frequency in Hz |
| void Fm2::SetIndex | ( | float | index | ) |
Index setter
| FM | depth, 5 = 2PI rads |
| void Fm2::SetRatio | ( | float | ratio | ) |
Set modulator freq. relative to carrier
| ratio | New modulator freq = carrier freq. * ratio |