DaisySP
|
Harmonic Oscillator Module based on Chebyshev polynomials. More...
#include <harmonic_osc.h>
Public Member Functions | |
void | Init (float sample_rate) |
float | Process () |
void | SetFreq (float freq) |
void | SetFirstHarmIdx (int idx) |
void | SetAmplitudes (const float *amplitudes) |
void | SetSingleAmp (const float amp, int idx) |
Harmonic Oscillator Module based on Chebyshev polynomials.
|
inline |
Initialize harmonic oscillator
sample_rate | Audio engine samplerate |
|
inline |
Get the next floating point sample
|
inline |
Set the amplitudes of each harmonic of the root.
amplitudes | Amplitudes to set. Sum of all amplitudes must be < 1. The array referenced must be at least as large as num_harmonics. |
|
inline |
Offset the set of harmonics. Passing in 3 means "harmonic 0" is the 3rd harm., 1 is the 4th, etc.
idx | Default behavior is 1. Values < 0 default to 1. |
|
inline |
Set the main frequency
freq | Freq to be set in Hz. |
|
inline |
Sets one amplitude. Does nothing if idx out of range.
amp | Amplitude to set |
idx | Which harmonic to set. |