Skip to main content

Channeled

Trait Channeled 

Source
pub trait Channeled<B: Buffer> {
    // Required methods
    fn channel(&self) -> u4;
    fn set_channel(&mut self, channel: u4)
       where B: BufferMut;
}
Expand description

Read and write the channel field of a wrapped MIDI message.

use midi2::{ux::u4, Channeled, Data, channel_voice2::NoteOn};

let mut message = NoteOn::<[u32; 4]>::new();

message.set_channel(u4::new(0x5));

assert_eq!(message.channel(), u4::new(0x5));
assert_eq!(message.data(), &[0x4095_0000, 0x0000_0000]);

Required Methods§

Source

fn channel(&self) -> u4

Source

fn set_channel(&mut self, channel: u4)
where B: BufferMut,

Implementors§

Source§

impl Channeled<[u32; 1]> for midi2::channel_voice1::Packet

Available on crate feature channel-voice1 only.
Source§

impl Channeled<[u32; 2]> for midi2::channel_voice2::Packet

Available on crate feature channel-voice2 only.
Source§

impl<B: Buffer> Channeled<B> for ChannelVoice1<B>

Available on crate feature channel-voice1 only.
Source§

impl<B: Buffer> Channeled<B> for midi2::channel_voice1::ChannelPressure<B>

Available on crate feature channel-voice1 only.
Source§

impl<B: Buffer> Channeled<B> for midi2::channel_voice1::ControlChange<B>

Available on crate feature channel-voice1 only.
Source§

impl<B: Buffer> Channeled<B> for midi2::channel_voice1::KeyPressure<B>

Available on crate feature channel-voice1 only.
Source§

impl<B: Buffer> Channeled<B> for midi2::channel_voice1::NoteOff<B>

Available on crate feature channel-voice1 only.
Source§

impl<B: Buffer> Channeled<B> for midi2::channel_voice1::NoteOn<B>

Available on crate feature channel-voice1 only.
Source§

impl<B: Buffer> Channeled<B> for PitchBend<B>

Available on crate feature channel-voice1 only.
Source§

impl<B: Buffer> Channeled<B> for midi2::channel_voice1::ProgramChange<B>

Available on crate feature channel-voice1 only.
Source§

impl<B: Ump> Channeled<B> for ChannelVoice2<B>

Available on crate feature channel-voice2 only.
Source§

impl<B: Ump> Channeled<B> for AssignableController<B>

Available on crate feature channel-voice2 only.
Source§

impl<B: Ump> Channeled<B> for AssignablePerNoteController<B>

Available on crate feature channel-voice2 only.
Source§

impl<B: Ump> Channeled<B> for ChannelPitchBend<B>

Available on crate feature channel-voice2 only.
Source§

impl<B: Ump> Channeled<B> for midi2::channel_voice2::ChannelPressure<B>

Available on crate feature channel-voice2 only.
Source§

impl<B: Ump> Channeled<B> for midi2::channel_voice2::ControlChange<B>

Available on crate feature channel-voice2 only.
Source§

impl<B: Ump> Channeled<B> for midi2::channel_voice2::KeyPressure<B>

Available on crate feature channel-voice2 only.
Source§

impl<B: Ump> Channeled<B> for midi2::channel_voice2::NoteOff<B>

Available on crate feature channel-voice2 only.
Source§

impl<B: Ump> Channeled<B> for midi2::channel_voice2::NoteOn<B>

Available on crate feature channel-voice2 only.
Source§

impl<B: Ump> Channeled<B> for PerNoteManagement<B>

Available on crate feature channel-voice2 only.
Source§

impl<B: Ump> Channeled<B> for PerNotePitchBend<B>

Available on crate feature channel-voice2 only.
Source§

impl<B: Ump> Channeled<B> for midi2::channel_voice2::ProgramChange<B>

Available on crate feature channel-voice2 only.
Source§

impl<B: Ump> Channeled<B> for RegisteredController<B>

Available on crate feature channel-voice2 only.
Source§

impl<B: Ump> Channeled<B> for RegisteredPerNoteController<B>

Available on crate feature channel-voice2 only.
Source§

impl<B: Ump> Channeled<B> for RelativeAssignableController<B>

Available on crate feature channel-voice2 only.
Source§

impl<B: Ump> Channeled<B> for RelativeRegisteredController<B>

Available on crate feature channel-voice2 only.