HephAudio v3.0.6
A cross-platform C++ library for recording, playing, and processing audio on Windows, Android, Linux, iOS, and macOS.
|
generates sawtooth wave signals. More...
#include <SawToothWaveOscillator.h>
Public Member Functions | |
SawToothWaveOscillator () | |
SawToothWaveOscillator (uint32_t sampleRate) | |
SawToothWaveOscillator (double peakAmplitude, double frequency, uint32_t sampleRate, double phase_rad) | |
double | operator[] (size_t n) const override |
Public Member Functions inherited from HephAudio::Oscillator | |
virtual | ~Oscillator ()=default |
Heph::DoubleBuffer | GenerateBuffer () const |
Heph::DoubleBuffer | GenerateBuffer (size_t size) const |
Heph::DoubleBuffer | GenerateBuffer (size_t index, size_t size) const |
Additional Inherited Members | |
Public Attributes inherited from HephAudio::Oscillator | |
double | peakAmplitude |
double | frequency |
double | phase_rad |
uint32_t | sampleRate |
Protected Member Functions inherited from HephAudio::Oscillator | |
Oscillator () | |
Oscillator (double peakAmplitude, double frequency, uint32_t sampleRate, double phase_rad) | |
generates sawtooth wave signals.
HephAudio::SawToothWaveOscillator::SawToothWaveOscillator | ( | ) |
creates a new instance and initializes it with default values.
HephAudio::SawToothWaveOscillator::SawToothWaveOscillator | ( | uint32_t | sampleRate | ) |
creates a new instance and initializes it with the provided values.
sampleRate | sampling rate of the periodic signal. |
HephAudio::SawToothWaveOscillator::SawToothWaveOscillator | ( | double | peakAmplitude, |
double | frequency, | ||
uint32_t | sampleRate, | ||
double | phase_rad ) |
creates a new instance and initializes it with the provided values.
peakAmplitude | maximum amplitude of the periodic signal. |
frequency | frequency of the periodic signal. |
sampleRate | sampling rate of the periodic signal. |
phase_rad | phase angle, in radians, of the periodic signal. |
|
overridevirtual |
calculates the sample at index n.
Implements HephAudio::Oscillator.