Ardour
9.0-pre0-582-g084a23a80d
|
#include <midi_channel_filter.h>
Public Member Functions | |
MidiChannelFilter () | |
void | filter (BufferSet &bufs) |
bool | filter (uint8_t *buf, uint32_t len) |
bool | set_channel_mode (ChannelMode mode, uint16_t mask) |
bool | set_channel_mask (uint16_t mask) |
void | get_mode_and_mask (ChannelMode *mode, uint16_t *mask) const |
ChannelMode | get_channel_mode () const |
uint16_t | get_channel_mask () const |
Public Attributes | |
PBD::Signal< void()> | ChannelMaskChanged |
PBD::Signal< void()> | ChannelModeChanged |
Private Attributes | |
std::atomic< uint32_t > | _mode_mask |
16 bits mode, 16 bits mask More... | |
Filter/mapper for MIDI channels.
Channel mapping is configured by setting a mode and "mask", where the meaning of the mask depends on the mode.
If mode is FilterChannels, each mask bit represents a midi channel (bit 0 = channel 0, bit 1 = channel 1, ...). Only events whose channel corresponds to a 1 bit will be passed.
If mode is ForceChannel, mask is simply a channel number which all events will be forced to.
Definition at line 47 of file midi_channel_filter.h.
ARDOUR::MidiChannelFilter::MidiChannelFilter | ( | ) |
bool ARDOUR::MidiChannelFilter::filter | ( | uint8_t * | buf, |
uint32_t | len | ||
) |
Filter/map a MIDI message by channel.
May modify the channel in buf
if necessary.
|
inline |
Definition at line 84 of file midi_channel_filter.h.
|
inline |
Definition at line 80 of file midi_channel_filter.h.
|
inline |
Atomically get both the channel mode and mask.
Definition at line 74 of file midi_channel_filter.h.
bool ARDOUR::MidiChannelFilter::set_channel_mask | ( | uint16_t | mask | ) |
Atomically set the channel mask for the current mode.
bool ARDOUR::MidiChannelFilter::set_channel_mode | ( | ChannelMode | mode, |
uint16_t | mask | ||
) |
Atomically set the channel mode and corresponding mask.
|
private |
16 bits mode, 16 bits mask
Definition at line 92 of file midi_channel_filter.h.
PBD::Signal<void()> ARDOUR::MidiChannelFilter::ChannelMaskChanged |
Definition at line 88 of file midi_channel_filter.h.
PBD::Signal<void()> ARDOUR::MidiChannelFilter::ChannelModeChanged |
Definition at line 89 of file midi_channel_filter.h.