Switchboard SDK
|
Generates triangle signal. More...
#include <TriangleGenerator.hpp>
Public Member Functions | |
TriangleGenerator (const float frequency=440.0f) | |
TriangleGenerator constructor. | |
![]() | |
Generator (const float frequency=440.0f) | |
Generator constructor. | |
Generator (const Generator &generator) | |
Generator copy constructor. | |
virtual | ~Generator ()=default |
Generator destructor. | |
float | getFrequency () const |
Gets the current frequency value of the generated signal. | |
void | setFrequency (const float frequency) |
Sets the frequency of the generated signal. | |
float | getAmplitude () const |
Gets the current amplitude value of the generated signal. | |
void | setAmplitude (const float amplitude) |
Sets the amplitude of the generated signal. | |
GeneratorType | getType () |
Gets the type of the Generator. | |
template<typename T> | |
void | generate (T *buffer, const uint numberOfSamples, const uint sampleRate) |
Generates the audio data into a data buffer. | |
template<typename T> | |
void | generate (AudioBuffer< T > &audioBuffer) |
Generates the audio data into an audio buffer. | |
Additional Inherited Members | |
![]() | |
void | stepPhase () |
![]() | |
float | phase |
GeneratorType | type |
Generates triangle signal.
Triangle generator
switchboard::TriangleGenerator::TriangleGenerator | ( | const float | frequency = 440.0f | ) |
TriangleGenerator constructor.
frequency | The initial frequency in Hz. Default value is 440 Hz. |