PDResonant is a simple midi instrument using Phase distortion used to simulate resonant filter, based on https://en.wikipedia.org/wiki/Phase_distortion_synthesis. More...
#include <PDResonant.h>
PDResonant is a simple midi instrument using Phase distortion used to simulate resonant filter, based on https://en.wikipedia.org/wiki/Phase_distortion_synthesis.
The class shows how the Mozzi Phasor class can be used to generate an index into a wavetable, and an ADSR is used to modulate the effect by modifying the Phasor frequency and sync. More complex phase distortion effects could be developed by using precalculated tables, or calcuating tables on the fly using a double buffer, or a line-breakpoint model, a sort of hybridPhasor-Line object.
Definition at line 31 of file PDResonant.h.
Public Member Functions | |
PDResonant () | |
Constructor. | |
void | noteOn (byte channel, byte pitch, byte velocity) |
Play a note in response to midi input. More... | |
void | noteOff (byte channel, byte pitch, byte velocity) |
Stop a note in response to midi input. More... | |
void | setPDEnv (int attack, int decay) |
Set the resonant filter sweep parameters. More... | |
void | update () |
Update the filter sweep. More... | |
int | next () |
Produce the audio output. More... | |
|
inline |
|
inline |
Stop a note in response to midi input.
Params copied from MIDI library HandleNoteOff()
channel | is the midi channel |
pitch | is the midi note |
velocity | you know what it is |
Definition at line 67 of file PDResonant.h.
|
inline |
Play a note in response to midi input.
Params copied from MIDI library HandleNoteOn().
channel | is the midi channel |
pitch | is the midi note |
velocity | you know what it is |
Definition at line 52 of file PDResonant.h.
|
inline |
Set the resonant filter sweep parameters.
Definition at line 78 of file PDResonant.h.
|
inline |