Switchboard SDK
Loading...
Searching...
No Matches
switchboard::SawtoothGenerator Class Reference

Generates sawtooth signal. More...

#include <SawtoothGenerator.hpp>

Inheritance diagram for switchboard::SawtoothGenerator:
switchboard::Generator

Public Member Functions

 SawtoothGenerator (const float frequency=440.0f)
 SawtoothGenerator constructor.
 
- Public Member Functions inherited from switchboard::Generator
 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

- Protected Member Functions inherited from switchboard::Generator
void stepPhase ()
 
- Protected Attributes inherited from switchboard::Generator
float phase
 
GeneratorType type
 

Detailed Description

Generates sawtooth signal.

Sawtooth generator

Constructor & Destructor Documentation

◆ SawtoothGenerator()

switchboard::SawtoothGenerator::SawtoothGenerator ( const float frequency = 440.0f)

SawtoothGenerator constructor.

Parameters
frequencyThe initial frequency in Hz. Default value is 440 Hz.