AuxPort 0.2
Modules for Audio Software Development
Loading...
Searching...
No Matches
AuxPort::Audio::Square Class Reference

Square Oscillator. More...

#include <AuxOscillator.h>

Inheritance diagram for AuxPort::Audio::Square:
AuxPort::Audio::Oscillator

Public Member Functions

 Square (const Square &square)=default
 
void setPulseWidth (float pulseWidth)
 Sets the pulse width for the Square Oscillator.
 
float process () override
 This function generates the sample from the Oscillator.
 
- Public Member Functions inherited from AuxPort::Audio::Oscillator
 Oscillator (const Oscillator &osc)=default
 
virtual void setSampleRate (uint32_t sampleRate)
 Use this function to set the sample rate of the oscillator [Overridable].
 
virtual void setFrequency (float frequency)
 Use this function to set the frequency of the oscillator [Overridable].
 
virtual void stop ()
 Use this function to stop the Oscillator from generating samples [Overridable].
 
virtual bool isPlaying ()
 Checks whether the Oscillator is still generating samples [Overridable].
 

Additional Inherited Members

- Protected Attributes inherited from AuxPort::Audio::Oscillator
uint32_t sampleRate = 44100
 
float frequency = 100
 
float sample = 0
 
float mod = 0
 
float inc = 0
 

Detailed Description

Square Oscillator.

Definition at line 106 of file AuxOscillator.h.

Member Function Documentation

◆ process()

float AuxPort::Audio::Square::process ( )
overridevirtual

This function generates the sample from the Oscillator.

Reimplemented from AuxPort::Audio::Oscillator.

Definition at line 62 of file AuxOscillator.cpp.

◆ setPulseWidth()

void AuxPort::Audio::Square::setPulseWidth ( float pulseWidth)

Sets the pulse width for the Square Oscillator.

Definition at line 57 of file AuxOscillator.cpp.


The documentation for this class was generated from the following files: