28 : _mode_mask(0x0000FFFF)
50 if (0 == ((1 << ev.
channel()) & mask)) {
78 const uint8_t type = buf[0] & 0xF0;
79 const bool is_channel_event = (0x80 <= type) && (type <= 0xE0);
80 if (!is_channel_event) {
84 const uint8_t channel = buf[0] & 0x0F;
89 return !((1 << channel) & mask);
91 buf[0] = (0xF0 & buf[0]) | (0x0F & (
PBD::ffs(mask) - 1));
101 static inline uint16_t
105 ? (mask ? (1 << (
PBD::ffs(mask) - 1)) : 1)
116 if (old_mode != mode || old_mask != mask) {
118 g_atomic_int_set(&
_mode_mask, (uint32_t(mode) << 16) | uint32_t(mask));
133 if (old_mask != mask) {
135 g_atomic_int_set(&
_mode_mask, (uint32_t(mode) << 16) | uint32_t(mask));
Force all events to a certain channel.
MidiBuffer & get_midi(size_t i)
PBD::Signal0< void > ChannelModeChanged
void get_mode_and_mask(ChannelMode *mode, uint16_t *mask) const
bool is_channel_event() const
static uint16_t force_mask(const ChannelMode mode, const uint16_t mask)
uint32_t _mode_mask
16 bits mode, 16 bits mask
void set_channel(uint8_t channel)
PBD::Signal0< void > ChannelMaskChanged
iterator erase(const iterator &i)
void filter(BufferSet &bufs)
bool set_channel_mask(uint16_t mask)
Pass through all channel information unmodified.
bool set_channel_mode(ChannelMode mode, uint16_t mask)
Ignore events on certain channels.