Generates a sine wave signal.
More...
#include <SineGenerator.hpp>
|
| SineGenerator (const float frequency=440.0f) |
| SineGenerator constructor.
|
|
| SineGenerator (const SineGenerator &sineGenerator) |
| SineGenerator copy constructor.
|
|
float | getFrequency () const |
| Gets the current frequency value of the generated sine wave.
|
|
void | setFrequency (const float frequency) |
| Sets the frequency of the generated sine wave.
|
|
float | getAmplitude () const |
| Gets the current amplitude value of the generated sine wave.
|
|
void | setAmplitude (const float amplitude) |
| Sets the amplitude of the generated sine wave.
|
|
template<typename T > |
void | generate (T *buffer, const uint numberOfSamples, const uint sampleRate) |
| Generates sine wave audio data into a data buffer.
|
|
template<typename T > |
void | generate (AudioBuffer< T > &audioBuffer) |
| Generates sine wave audio data into an audio buffer.
|
|
Generates a sine wave signal.
Sine wave generator.
◆ SineGenerator()
switchboard::SineGenerator::SineGenerator |
( |
const float |
frequency = 440.0f | ) |
|
SineGenerator constructor.
- Parameters
-
frequency | The initial frequency in Hz. Default value is 440 Hz. |
◆ generate() [1/2]
template<typename T >
void switchboard::SineGenerator::generate |
( |
AudioBuffer< T > & |
audioBuffer | ) |
|
Generates sine wave audio data into an audio buffer.
- Parameters
-
audioBuffer | The audio buffer. |
◆ generate() [2/2]
template<typename T >
void switchboard::SineGenerator::generate |
( |
T * |
buffer, |
|
|
const uint |
numberOfSamples, |
|
|
const uint |
sampleRate |
|
) |
| |
Generates sine wave audio data into a data buffer.
- Parameters
-
numberOfSamples | The number of samples to generate. |
sampleRate | The sample rate. |
◆ getAmplitude()
float switchboard::SineGenerator::getAmplitude |
( |
| ) |
const |
Gets the current amplitude value of the generated sine wave.
- Returns
- The amplitude value.
◆ getFrequency()
float switchboard::SineGenerator::getFrequency |
( |
| ) |
const |
Gets the current frequency value of the generated sine wave.
- Returns
- The frequency value in Hz.
◆ setAmplitude()
void switchboard::SineGenerator::setAmplitude |
( |
const float |
amplitude | ) |
|
Sets the amplitude of the generated sine wave.
- Parameters
-
amplitude | The new amplitude value. Should be between 0 and 1. |
◆ setFrequency()
void switchboard::SineGenerator::setFrequency |
( |
const float |
frequency | ) |
|
Sets the frequency of the generated sine wave.
- Parameters
-
frequency | The new frequency value in Hz. |
The documentation for this class was generated from the following files:
- /Users/jenkins/.jenkins/workspace/Switchboard Developer Site - Production/SwitchboardSDK/src/all/AudioGraphNodes/SineGenerator/SineGenerator.hpp
- /Users/jenkins/.jenkins/workspace/Switchboard Developer Site - Production/SwitchboardSDK/src/all/AudioGraphNodes/SineGenerator/SineGenerator.cpp