10#ifndef __AUDIO_MIDI_MAPPING_H__
11#define __AUDIO_MIDI_MAPPING_H__
25#define MIDI_MAPPINGS (PROJECT->midi_mappings)
78#define midi_mappings_bind_device(self, buf, dev_port, dest_port, fire_events) \
79 midi_mappings_bind_at ( \
80 self, buf, dev_port, dest_port, (self)->num_mappings, fire_events)
82#define midi_mappings_bind_track(self, buf, dest_port, fire_events) \
83 midi_mappings_bind_at ( \
84 self, buf, NULL, dest_port, (self)->num_mappings, fire_events)
114midi_mapping_new (
void);
117midi_mapping_set_enabled (
MidiMapping * self,
bool enabled);
Ports that transfer audio/midi/other signals to one another.
void midi_mappings_apply_from_cc_events(MidiMappings *self, MidiEvents *events, bool queued)
Applies the events to the appropriate mapping.
void midi_mappings_bind_at(MidiMappings *self, midi_byte_t *buf, ExtPort *device_port, 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 midi_mappings_init_loaded(MidiMappings *self)
Initializes the MidiMappings after a Project is loaded.
int midi_mappings_get_for_port(MidiMappings *self, Port *dest_port, GPtrArray *arr)
Get MIDI mappings for the given port.
void midi_mappings_apply(MidiMappings *self, midi_byte_t *buf)
Applies the given buffer to the matching ports.
MidiMappings * midi_mappings_new(void)
Returns a newly allocated MidiMappings.
void midi_mappings_unbind(MidiMappings *self, int idx, bool fire_events)
Unbinds the given binding.
uint8_t midi_byte_t
MIDI byte.
Container for passing midi events through ports.
A mapping from a MIDI value to a destination.
midi_byte_t key[3]
Raw MIDI signal.
ExtPort * device_port
The device that this connection will be mapped for.
WrappedObjectWithChangeSignal * gobj
Used in Gtk.
Port * dest
Destination pointer, for convenience.
int enabled
Whether this binding is enabled.
PortIdentifier dest_id
Destination.
All MIDI mappings in Zrythm.
Struct used to identify Ports in the project.
Must ONLY be created via port_new()
A GObject-ified normal C object with a signal that interested parties can listen to for changes.