|
arduino-audio-tools
|
A simple Synthesizer which can generate sound having multiple keys pressed. The main purpose of this class is managing the synthezizer channels. More...
#include <Synthesizer.h>
Classes | |
| struct | KeyParameter |
Public Member Functions | |
| Synthesizer () | |
| Synthesizer (AbstractSynthesizerChannel *ch) | |
| Synthesizer (Synthesizer const &)=delete | |
| virtual | ~Synthesizer () |
| virtual AudioInfo | audioInfo () |
| Provides the AudioInfo. | |
| virtual bool | begin () |
| Starts the processing. | |
| bool | begin (AudioInfo config) |
| Starts the processing with the provided AudioInfo. | |
| virtual AudioInfo | defaultConfig () |
| Provides the default configuration. | |
| virtual void | end () |
| Ends the processing. | |
| virtual bool | isActive () |
| Checks if the begin method has been called - after end() isActive is false. | |
| void | keyOff (int note) |
| void | keyOn (int note, float tgt=0) |
| Synthesizer & | operator= (Synthesizer const &)=delete |
| virtual size_t | readBytes (uint8_t *data, size_t len) |
| Provides the data as byte array with the requested number of channels. | |
| int16_t | readSample () override |
| Provides mixed samples of all channels. | |
| virtual void | setAudioInfo (AudioInfo info) |
| Defines/updates the AudioInfo. | |
| virtual void | setFrequency (float frequency) |
| Abstract method: not implemented! Just provides an error message... | |
| void | setKeys (AudioActions &actions, SynthesizerKey *p_keys, AudioActions::ActiveLogic activeValue) |
| Assigns pins to notes - the last SynthesizerKey is marked with an entry containing the note <= 0. | |
| void | setMidiName (const char *name) |
| Defines the midi name. | |
| void | setPlayTime (uint32_t playMs, uint8_t upPercent=20, uint8_t downPercent=30) |
| Defines the play time in ms and the ramp up and ramp down time in percent. | |
Protected Member Functions | |
| int16_t | applyRamp (int16_t sample) |
| AbstractSynthesizerChannel * | getFreeChannel () |
| AbstractSynthesizerChannel * | getNoteChannel (int note) |
| size_t | readBytesFrames (uint8_t *buffer, size_t lengthBytes, int frames, int channels) |
| size_t | readBytesFromBuffer (uint8_t *buffer, size_t lengthBytes, int frame_size, int channels) |
| void | recalculatePlayTime () |
Static Protected Member Functions | |
| static void | callbackKeyOff (bool active, int pin, void *ref) |
| static void | callbackKeyOn (bool active, int pin, void *ref) |
A simple Synthesizer which can generate sound having multiple keys pressed. The main purpose of this class is managing the synthezizer channels.
|
inline |
|
inline |
|
delete |
|
inlinevirtual |
|
inlineprotectedinherited |
Starts the processing with the provided AudioInfo.
Reimplemented from SoundGenerator< int16_t >.
|
inlineprotected |
|
inlineprotected |
Checks if the begin method has been called - after end() isActive is false.
|
delete |
Provides the data as byte array with the requested number of channels.
|
inlineprotectedinherited |
|
inlineprotectedinherited |
|
inlineoverridevirtual |
Provides mixed samples of all channels.
Implements SoundGenerator< int16_t >.
|
inlineprotectedinherited |
Abstract method: not implemented! Just provides an error message...
|
inline |
Assigns pins to notes - the last SynthesizerKey is marked with an entry containing the note <= 0.
|
inlineinherited |
Defines the play time in ms and the ramp up and ramp down time in percent.
|
protectedinherited |
|
protectedinherited |
|
protected |
|
protected |
|
protectedinherited |
|
protected |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |