1 #ifndef __AbstractSynth_h__
2 #define __AbstractSynth_h__
64 this->pb_range = range/8192.0f;
108 return 12 * log2f(freq /
tuning) + 69;
virtual void noteOff(MidiMessage msg)
float noteToFrequency(float note)
virtual void setNote(uint8_t note)
Set note in whole semitones and update frequency.
void setModulationDepthRange(float range)
Set modulation depth range, from 0 to 1.0.
uint8_t getNote()
Set note in whole semitones.
virtual void channelPressure(MidiMessage msg)
void setPitchBendRange(float range)
Set pitch bend range in semitones.
virtual void pitchbend(MidiMessage msg)
virtual void allNotesOff()
void setTuning(float value)
Set frequency in Hertz for middle A (defaults to Stuttgart pitch, A440, 440 Hz)
virtual void setModulation(float modulation)
float frequencyToNote(float freq)
virtual void modulate(MidiMessage msg)
virtual void polyKeyPressure(MidiMessage msg)
virtual void controlChange(MidiMessage msg)
float getPitchBendRange()
Get pitch bend range in semitones.
virtual void noteOn(MidiMessage msg)
virtual void setPitchBend(float pb)
Set pitch bend amount in semitones and update frequency.
float getPitchBend()
Get pitch bend amount in semitones.
virtual void setPressure(float pressure)
int16_t getPitchBend()
Get pitch bend value as a signed integer between -8192 and 8191.
uint8_t getControllerValue()
uint8_t getControllerNumber()
uint8_t getPolyKeyPressure()
uint8_t getChannelPressure()
Base class for MIDI processors such as AbstractSynth.
virtual void setGain(float gain)=0
virtual void gate(bool state)=0
virtual void setFrequency(float freq)=0
General MIDI DLS Level 1 Specification: The MIDI Note Velocity value is converted to attenuation in d...
float velocityToGain(float v)