arduino-audio-tools
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
audio_tools::DefaultGuitarChannel Class Reference

Audio Processing Channel based on a Input Stream and an Audio Effects Chain. This can be used todo implement a Guitar Amplifier. More...

#include <Synthesizer.h>

Inheritance diagram for audio_tools::DefaultGuitarChannel:
audio_tools::DefaultSynthesizerChannel< AudioEffects< GeneratorFromStream< int16_t > > > audio_tools::AbstractSynthesizerChannel

Public Member Functions

 DefaultGuitarChannel ()=default
 Default constructor.
 
 DefaultGuitarChannel (DefaultGuitarChannel &ch)=default
 Copy constructor.
 
 DefaultGuitarChannel (Stream &input)
 Constructor which defines the input stream.
 
void addEffect (AudioEffect *ptr)
 
virtual void begin (AudioBaseInfo config) override
 Starts the audio generator / audio processing. More...
 
DefaultGuitarChannelclone () override
 Creates a copy of the channel. More...
 
virtual bool isActive () override
 Checks if the ADSR is still active - and generating sound. More...
 
virtual void keyOff () override
 Provides the key off event to ADSR to stop the sound. More...
 
virtual void keyOn (int note, float tgt) override
 start to play a note - note expects the frequency of the note! More...
 
virtual int note () override
 Provides the actual midi note that is played. More...
 
virtual int16_t readSample () override
 Provides the next sample. More...
 
void setStream (Stream &input)
 Defines the inputStream.
 
- Public Member Functions inherited from audio_tools::DefaultSynthesizerChannel< AudioEffects< GeneratorFromStream< int16_t > > >
 DefaultSynthesizerChannel ()=default
 Default constructor.
 
 DefaultSynthesizerChannel (DefaultSynthesizerChannel< AudioEffects< GeneratorFromStream< int16_t > > > &ch)=default
 Copy constructor.
 
void addEffect (AudioEffect *ptr)
 
virtual void begin (AudioBaseInfo config) override
 Start the sound generation. More...
 
DefaultSynthesizerChannel< AudioEffects< GeneratorFromStream< int16_t > > > * clone () override
 
virtual bool isActive () override
 Checks if the ADSR is still active - and generating sound. More...
 
virtual void keyOff () override
 Provides the key off event to ADSR to stop the sound. More...
 
virtual void keyOn (int note, float tgt) override
 start to play a note - note expects the frequency of the note! More...
 
virtual int note () override
 Provides the actual midi note that is played. More...
 
virtual int16_t readSample () override
 Provides the next sample. More...
 
virtual void begin (AudioBaseInfo config)
 Start the sound generation. More...
 
virtual AbstractSynthesizerChannelclone ()=0
 
virtual bool isActive ()=0
 Checks if the ADSR is still active - and generating sound. More...
 
virtual void keyOff ()=0
 Provides the key off event to ADSR to stop the sound. More...
 
virtual void keyOn (int nte, float tgt)=0
 Provides the key on event to ADSR to start the sound. More...
 
virtual int note ()=0
 Provides the actual midi note that is played. More...
 
virtual int16_t readSample ()=0
 Provides the next sample. More...
 

Protected Attributes

AudioEffects< GeneratorFromStream< int16_t > > audio_effects
 
AudioBaseInfo config
 
- Protected Attributes inherited from audio_tools::DefaultSynthesizerChannel< AudioEffects< GeneratorFromStream< int16_t > > >
int actual_note
 
AudioEffects< GeneratorFromStream< int16_t > > audio_effects
 
AudioBaseInfo config
 
ADSRGainp_adsr
 

Detailed Description

Audio Processing Channel based on a Input Stream and an Audio Effects Chain. This can be used todo implement a Guitar Amplifier.

Member Function Documentation

◆ begin()

virtual void audio_tools::DefaultGuitarChannel::begin ( AudioBaseInfo  config)
inlineoverridevirtual

Starts the audio generator / audio processing.

Reimplemented from audio_tools::DefaultSynthesizerChannel< AudioEffects< GeneratorFromStream< int16_t > > >.

◆ clone()

DefaultGuitarChannel * audio_tools::DefaultGuitarChannel::clone ( )
inlineoverridevirtual

Creates a copy of the channel.

Implements audio_tools::AbstractSynthesizerChannel.

◆ isActive()

virtual bool audio_tools::DefaultGuitarChannel::isActive ( )
inlineoverridevirtual

Checks if the ADSR is still active - and generating sound.

Reimplemented from audio_tools::DefaultSynthesizerChannel< AudioEffects< GeneratorFromStream< int16_t > > >.

◆ keyOff()

virtual void audio_tools::DefaultGuitarChannel::keyOff ( )
inlineoverridevirtual

Provides the key off event to ADSR to stop the sound.

Reimplemented from audio_tools::DefaultSynthesizerChannel< AudioEffects< GeneratorFromStream< int16_t > > >.

◆ keyOn()

virtual void audio_tools::DefaultGuitarChannel::keyOn ( int  note,
float  tgt 
)
inlineoverridevirtual

start to play a note - note expects the frequency of the note!

Reimplemented from audio_tools::DefaultSynthesizerChannel< AudioEffects< GeneratorFromStream< int16_t > > >.

◆ note()

virtual int audio_tools::DefaultGuitarChannel::note ( )
inlineoverridevirtual

Provides the actual midi note that is played.

Reimplemented from audio_tools::DefaultSynthesizerChannel< AudioEffects< GeneratorFromStream< int16_t > > >.

◆ readSample()

virtual int16_t audio_tools::DefaultGuitarChannel::readSample ( )
inlineoverridevirtual

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