arduino-audio-tools
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
audio_tools::STKGenerator< StkCls, T > Class Template Reference

The Synthesis ToolKit in C++ (STK) is a set of open source audio signal processing and algorithmic synthesis classes written in the C++ programming language.
More...

#include <AudioSTK.h>

Inheritance diagram for audio_tools::STKGenerator< StkCls, T >:
audio_tools::SoundGenerator< T >

Public Member Functions

 STKGenerator (StkCls &instrument)
 
bool begin (AudioBaseInfo cfg)
 Starts the processing. More...
 
AudioBaseInfo defaultConfig ()
 provides the default configuration More...
 
readSample ()
 Provides a single sample. More...
 
void setInput (StkCls &instrument)
 
- Public Member Functions inherited from audio_tools::SoundGenerator< T >
virtual AudioBaseInfo audioInfo ()
 
virtual bool begin ()
 
virtual bool begin (AudioBaseInfo info)
 
virtual AudioBaseInfo defaultConfig ()
 
virtual void end ()
 ends the processing
 
virtual bool isActive ()
 Checks if the begin method has been called - after end() isActive returns false.
 
virtual size_t readBytes (uint8_t *buffer, size_t lengthBytes)
 Provides the data as byte array with the requested number of channels.
 
virtual T readSample ()=0
 Provides a single sample. More...
 
virtual size_t readSamples (T *data, size_t sampleCount=512)
 Provides the samples into simple array - which represents 1 channel.
 
virtual size_t readSamples (T src[][2], size_t frameCount)
 Provides the samples into a 2 channel array.
 
virtual void setAudioInfo (AudioBaseInfo info)
 
virtual void setFrequency (uint16_t frequency)
 

Protected Attributes

max_value
 
StkCls * p_instrument =nullptr
 
- Protected Attributes inherited from audio_tools::SoundGenerator< T >
bool active = false
 
bool activeWarningIssued = false
 
AudioBaseInfo info
 
int output_channels = 1
 

Detailed Description

template<class StkCls, class T>
class audio_tools::STKGenerator< StkCls, T >

The Synthesis ToolKit in C++ (STK) is a set of open source audio signal processing and algorithmic synthesis classes written in the C++ programming language.

You can find further informarmation in the original Readme of the STK Project

Like many other sound libraries it originates from an University (Princeton) and can look back at a very long history: it was created in 1995. In the 90s the computers had limited processor power and memory available. In todays world we can get some cheap Microcontrollers, which provide almost the same capabilities.

Template Parameters
T

Member Function Documentation

◆ begin()

template<class StkCls , class T >
bool audio_tools::STKGenerator< StkCls, T >::begin ( AudioBaseInfo  cfg)
inlinevirtual

Starts the processing.

Reimplemented from audio_tools::SoundGenerator< T >.

◆ defaultConfig()

template<class StkCls , class T >
AudioBaseInfo audio_tools::STKGenerator< StkCls, T >::defaultConfig ( )
inlinevirtual

provides the default configuration

Reimplemented from audio_tools::SoundGenerator< T >.

◆ readSample()

template<class StkCls , class T >
T audio_tools::STKGenerator< StkCls, T >::readSample ( )
inlinevirtual

Provides a single sample.

Implements audio_tools::SoundGenerator< T >.


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