ofxPDSP
pdsp::midi::Keys Class Reference
Inheritance diagram for pdsp::midi::Keys:
pdsp::Controller

Public Member Functions

void setPolyMode (int maxNotes, int unisonVoices=1)
 set the mode to Poly, with the given max notes and the given unison voices More...
 
void setMonoMode (int unisonVoices, bool legato, MonoPriority priority=Last)
 set the mode to Mono, with the given unison voices value and priority More...
 
void setPitchBend (float down, float up)
 sets the pitch bend amount for up and down bending More...
 
void setPortamento (PortamentoMode portamentoMode, float timeMs, pdsp::SlewMode_t slewMode=pdsp::Time, float scaling=12.0f)
 sets the portamento parameters More...
 
void setNoteRange (int lowNote, int highNote)
 set the note rang for the message parsing, messages out of this range will be ignored More...
 
void setUnisonDetune (float pitchDetune)
 sets the detune amout for the unison More...
 
void setSlew (float slewTimeMs)
 sets the slew time of the value outputs More...
 
void setMidiChannel (int channel)
 sets the midi channel, default is 0 = all channels More...
 
int getVoicesNumber () const
 returns the actual voice number
 
void setTuning (int i, float value)
 sets the tuning in hertz for the given note More...
 
void setTuningByPitch (int i, float value)
 sets the tuning in semitones for the given note More...
 
float getTuning (int i) const
 gets the tuning in hertz for the given note More...
 
pdsp::PatchNodeout_trig (int voice)
 returns the trigger output of the given voice More...
 
pdsp::PatchNodeout_pitch (int voice)
 returns the pitch output of the given voice More...
 
pdsp::SequencerGateOutputout_single_trigger ()
 single trigger output for the Poly mode
 
pdsp::SequencerValueOutputout_pitch_bend ()
 pitchbend output. The pitchbend is also summed to the pitch outputs, so this is just for modulations
 
pdsp::SequencerValueOutputout_aftertouch ()
 channel pressure output
 
- Public Member Functions inherited from pdsp::Controller
virtual void processMidi (const pdsp::midi::Input &midiInProcessor, const int &bufferSize) noexcept=0
 

Member Function Documentation

◆ getTuning()

float pdsp::midi::Keys::getTuning ( int  i) const

gets the tuning in hertz for the given note

Parameters
[in]iindex of the note, must be 0-127

◆ out_pitch()

pdsp::PatchNode & pdsp::midi::Keys::out_pitch ( int  voice)

returns the pitch output of the given voice

Parameters
[in]voicevoice number. It won't be clamped, so use a valid voice number to avoid segfaults.

◆ out_trig()

pdsp::PatchNode & pdsp::midi::Keys::out_trig ( int  voice)

returns the trigger output of the given voice

Parameters
[in]voicevoice number. It won't be clamped, so use a valid voice number to avoid segfaults.

◆ setMidiChannel()

void pdsp::midi::Keys::setMidiChannel ( int  channel)

sets the midi channel, default is 0 = all channels

Parameters
[in]channelnew midi channel, if different than 1-16 all midi channels are selected

◆ setMonoMode()

void pdsp::midi::Keys::setMonoMode ( int  unisonVoices,
bool  legato,
MonoPriority  priority = Last 
)

set the mode to Mono, with the given unison voices value and priority

Parameters
[in]unisonVoicesnumber of unison voices
[in]legatotrue if you want to retrigger the envelopes only when all the key are released
[in]priorityyou can use Last, Low or High as parameter

◆ setNoteRange()

void pdsp::midi::Keys::setNoteRange ( int  lowNote,
int  highNote 
)

set the note rang for the message parsing, messages out of this range will be ignored

Parameters
[in]lowNotelow note, inclusive
[in]highNotehigh note, inclusive

◆ setPitchBend()

void pdsp::midi::Keys::setPitchBend ( float  down,
float  up 
)

sets the pitch bend amount for up and down bending

Parameters
[in]downhow many semitones for bending down
[in]uphow many semitones for bending up

◆ setPolyMode()

void pdsp::midi::Keys::setPolyMode ( int  maxNotes,
int  unisonVoices = 1 
)

set the mode to Poly, with the given max notes and the given unison voices

Parameters
[in]maxNotesmax note for the polyphony, 4 is the minimum
[in]unisonVoicesnumber of unison voices, 1 if not given

Note stealing will steal the oldest note that are not the highest or the lowest playing notes

◆ setPortamento()

void pdsp::midi::Keys::setPortamento ( PortamentoMode  portamentoMode,
float  timeMs,
pdsp::SlewMode_t  slewMode = pdsp::Time,
float  scaling = 12.0f 
)

sets the portamento parameters

Parameters
[in]portamentoModeOff, On or Legato
[in]timeMsslew time in milliseconds
[in]slewModeTime or Rate .
[in]scalinguseful only for slewMode=Rate, (about) how many semitones the pitch will change in the set slew time

◆ setSlew()

void pdsp::midi::Keys::setSlew ( float  slewTimeMs)

sets the slew time of the value outputs

Parameters
[in]slewTimeMsslew time in milliseconds

◆ setTuning()

void pdsp::midi::Keys::setTuning ( int  i,
float  value 
)

sets the tuning in hertz for the given note

Parameters
[in]iindex of the note, must be 0-127
[in]valuefrequency value in hertz

◆ setTuningByPitch()

void pdsp::midi::Keys::setTuningByPitch ( int  i,
float  value 
)

sets the tuning in semitones for the given note

Parameters
[in]iindex of the note, must be 0-127
[in]valuevalue in semitones for that note, floating point

◆ setUnisonDetune()

void pdsp::midi::Keys::setUnisonDetune ( float  pitchDetune)

sets the detune amout for the unison

Parameters
[in]detunedetune in semitones. Default detune is 0.3f (30 cents)

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