All MIDI mappings in Zrythm.
More...
#include <src/engine/session/midi_mapping.h>
|
void | init_loaded () |
|
void | bind_at (std::array< midi_byte_t, 3 > buf, std::optional< utils::Utf8String > device_id, Port &dest_port, int idx, bool fire_events) |
| Binds the CC represented by the given raw buffer (must be size 3) to the given Port.
|
|
void | unbind (int idx, bool fire_events) |
| Unbinds the given binding.
|
|
void | bind_device (std::array< midi_byte_t, 3 > buf, std::optional< utils::Utf8String > device_id, Port &dest_port, bool fire_events) |
|
void | bind_track (std::array< midi_byte_t, 3 > buf, Port &dest_port, bool fire_events) |
|
int | get_mapping_index (const MidiMapping &mapping) const |
|
void | apply_from_cc_events (dsp::MidiEventVector &events) |
| Applies the events to the appropriate mapping.
|
|
void | apply (const midi_byte_t *buf) |
| Applies the given buffer to the matching ports.
|
|
int | get_for_port (const Port &dest_port, std::vector< MidiMapping * > *arr) const |
| Get MIDI mappings for the given port.
|
|
All MIDI mappings in Zrythm.
Definition at line 87 of file midi_mapping.h.
◆ apply_from_cc_events()
Applies the events to the appropriate mapping.
This is used only for TrackProcessor.cc_mappings.
- Note
- Must only be called while transport is recording.
◆ bind_at()
void zrythm::engine::session::MidiMappings::bind_at |
( |
std::array< midi_byte_t, 3 > | buf, |
|
|
std::optional< utils::Utf8String > | device_id, |
|
|
Port & | dest_port, |
|
|
int | idx, |
|
|
bool | fire_events ) |
Binds the CC represented by the given raw buffer (must be size 3) to the given Port.
- Parameters
-
idx | Index to insert at. |
buf | The buffer used for matching at [0] and [1]. |
device_id | Device ID, if custom mapping. |
◆ bind_device()
void zrythm::engine::session::MidiMappings::bind_device |
( |
std::array< midi_byte_t, 3 > | buf, |
|
|
std::optional< utils::Utf8String > | device_id, |
|
|
Port & | dest_port, |
|
|
bool | fire_events ) |
|
inline |
◆ bind_track()
void zrythm::engine::session::MidiMappings::bind_track |
( |
std::array< midi_byte_t, 3 > | buf, |
|
|
Port & | dest_port, |
|
|
bool | fire_events ) |
|
inline |
◆ get_for_port()
int zrythm::engine::session::MidiMappings::get_for_port |
( |
const Port & | dest_port, |
|
|
std::vector< MidiMapping * > * | arr ) const |
Get MIDI mappings for the given port.
- Parameters
-
arr | Optional array to fill with the mappings. |
- Returns
- The number of results.
◆ unbind()
void zrythm::engine::session::MidiMappings::unbind |
( |
int | idx, |
|
|
bool | fire_events ) |
Unbinds the given binding.
- Note
- This must be called inside a port operation lock, such as inside an undoable action.
◆ init_from
◆ to_json
void to_json |
( |
nlohmann::json & | j, |
|
|
const MidiMappings & | mappings ) |
|
friend |
◆ mappings_
std::vector<std::unique_ptr<MidiMapping> > zrythm::engine::session::MidiMappings::mappings_ |
The documentation for this class was generated from the following file: