VCV Rack API v2
Loading...
Searching...
No Matches
rack::dsp::MidiGenerator< CHANNELS > Struct Template Reference

Converts gates and CV to MIDI messages. More...

#include <midi.hpp>

Public Member Functions

 MidiGenerator ()
 
void reset ()
 
void panic ()
 
void setVelocity (int8_t vel, int c)
 Must be called before setNoteGate().
 
void setNoteGate (int8_t note, bool gate, int c)
 
void setKeyPressure (int8_t val, int c)
 
void setChannelPressure (int8_t val)
 
void setCc (int8_t cc, int id)
 
void setModWheel (int8_t cc)
 
void setVolume (int8_t cc)
 
void setBalance (int8_t cc)
 
void setPan (int8_t cc)
 
void setSustainPedal (int8_t cc)
 
void setPitchWheel (int16_t pw)
 
void setClock (bool clk)
 
void setStart (bool start)
 
void setContinue (bool cont)
 
void setStop (bool stop)
 
void setFrame (int64_t frame)
 
virtual void onMessage (const midi::Message &message)
 

Public Attributes

int8_t vels [CHANNELS]
 
int8_t notes [CHANNELS]
 
bool gates [CHANNELS]
 
int8_t keyPressures [CHANNELS]
 
int8_t channelPressure
 
int8_t ccs [128]
 
int16_t pw
 
bool clk
 
bool start
 
bool stop
 
bool cont
 
int64_t frame = -1
 

Detailed Description

template<int CHANNELS>
struct rack::dsp::MidiGenerator< CHANNELS >

Converts gates and CV to MIDI messages.

CHANNELS is the number of polyphony channels. Use 1 for monophonic.

Constructor & Destructor Documentation

◆ MidiGenerator()

template<int CHANNELS>
rack::dsp::MidiGenerator< CHANNELS >::MidiGenerator ( )
inline

Member Function Documentation

◆ reset()

template<int CHANNELS>
void rack::dsp::MidiGenerator< CHANNELS >::reset ( )
inline

◆ panic()

template<int CHANNELS>
void rack::dsp::MidiGenerator< CHANNELS >::panic ( )
inline

◆ setVelocity()

template<int CHANNELS>
void rack::dsp::MidiGenerator< CHANNELS >::setVelocity ( int8_t vel,
int c )
inline

Must be called before setNoteGate().

◆ setNoteGate()

template<int CHANNELS>
void rack::dsp::MidiGenerator< CHANNELS >::setNoteGate ( int8_t note,
bool gate,
int c )
inline

◆ setKeyPressure()

template<int CHANNELS>
void rack::dsp::MidiGenerator< CHANNELS >::setKeyPressure ( int8_t val,
int c )
inline

◆ setChannelPressure()

template<int CHANNELS>
void rack::dsp::MidiGenerator< CHANNELS >::setChannelPressure ( int8_t val)
inline

◆ setCc()

template<int CHANNELS>
void rack::dsp::MidiGenerator< CHANNELS >::setCc ( int8_t cc,
int id )
inline

◆ setModWheel()

template<int CHANNELS>
void rack::dsp::MidiGenerator< CHANNELS >::setModWheel ( int8_t cc)
inline

◆ setVolume()

template<int CHANNELS>
void rack::dsp::MidiGenerator< CHANNELS >::setVolume ( int8_t cc)
inline

◆ setBalance()

template<int CHANNELS>
void rack::dsp::MidiGenerator< CHANNELS >::setBalance ( int8_t cc)
inline

◆ setPan()

template<int CHANNELS>
void rack::dsp::MidiGenerator< CHANNELS >::setPan ( int8_t cc)
inline

◆ setSustainPedal()

template<int CHANNELS>
void rack::dsp::MidiGenerator< CHANNELS >::setSustainPedal ( int8_t cc)
inline

◆ setPitchWheel()

template<int CHANNELS>
void rack::dsp::MidiGenerator< CHANNELS >::setPitchWheel ( int16_t pw)
inline

◆ setClock()

template<int CHANNELS>
void rack::dsp::MidiGenerator< CHANNELS >::setClock ( bool clk)
inline

◆ setStart()

template<int CHANNELS>
void rack::dsp::MidiGenerator< CHANNELS >::setStart ( bool start)
inline

◆ setContinue()

template<int CHANNELS>
void rack::dsp::MidiGenerator< CHANNELS >::setContinue ( bool cont)
inline

◆ setStop()

template<int CHANNELS>
void rack::dsp::MidiGenerator< CHANNELS >::setStop ( bool stop)
inline

◆ setFrame()

template<int CHANNELS>
void rack::dsp::MidiGenerator< CHANNELS >::setFrame ( int64_t frame)
inline

◆ onMessage()

template<int CHANNELS>
virtual void rack::dsp::MidiGenerator< CHANNELS >::onMessage ( const midi::Message & message)
inlinevirtual

Member Data Documentation

◆ vels

template<int CHANNELS>
int8_t rack::dsp::MidiGenerator< CHANNELS >::vels[CHANNELS]

◆ notes

template<int CHANNELS>
int8_t rack::dsp::MidiGenerator< CHANNELS >::notes[CHANNELS]

◆ gates

template<int CHANNELS>
bool rack::dsp::MidiGenerator< CHANNELS >::gates[CHANNELS]

◆ keyPressures

template<int CHANNELS>
int8_t rack::dsp::MidiGenerator< CHANNELS >::keyPressures[CHANNELS]

◆ channelPressure

template<int CHANNELS>
int8_t rack::dsp::MidiGenerator< CHANNELS >::channelPressure

◆ ccs

template<int CHANNELS>
int8_t rack::dsp::MidiGenerator< CHANNELS >::ccs[128]

◆ pw

template<int CHANNELS>
int16_t rack::dsp::MidiGenerator< CHANNELS >::pw

◆ clk

template<int CHANNELS>
bool rack::dsp::MidiGenerator< CHANNELS >::clk

◆ start

template<int CHANNELS>
bool rack::dsp::MidiGenerator< CHANNELS >::start

◆ stop

template<int CHANNELS>
bool rack::dsp::MidiGenerator< CHANNELS >::stop

◆ cont

template<int CHANNELS>
bool rack::dsp::MidiGenerator< CHANNELS >::cont

◆ frame

template<int CHANNELS>
int64_t rack::dsp::MidiGenerator< CHANNELS >::frame = -1

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