pub struct MpeState { /* private fields */ }Expand description
MPE state for one MIDI input stream (typically one track).
Implementations§
Source§impl MpeState
impl MpeState
Sourcepub fn zone_for_channel(&self, channel: u8) -> Option<&MpeZone>
pub fn zone_for_channel(&self, channel: u8) -> Option<&MpeZone>
Returns the zone (lower or upper) that channel belongs to, if any.
Sourcepub fn is_manager_channel(&self, channel: u8) -> bool
pub fn is_manager_channel(&self, channel: u8) -> bool
Returns true if channel is a Manager Channel in any configured zone.
Sourcepub fn is_member_channel(&self, channel: u8) -> bool
pub fn is_member_channel(&self, channel: u8) -> bool
Returns true if channel is a Member Channel in any configured zone.
Sourcepub fn active_zone(&self) -> Option<&MpeZone>
pub fn active_zone(&self) -> Option<&MpeZone>
Returns the active zone to use for voice allocation. When both zones
are configured the Lower Zone is preferred because it is the most
common setup; callers that need both zones can inspect [lower] and
[upper] directly.
Sourcepub fn configure_zone(&mut self, manager_channel: u8, member_count: u8)
pub fn configure_zone(&mut self, manager_channel: u8, member_count: u8)
Configure a zone from an MPE Configuration Message.
manager_channel is the 0-based channel on which the MCM was received
(must be 0 for Lower Zone or 15 for Upper Zone). member_count is the
value sent with CC#6 (0..=15). A count of zero deactivates the zone.
If the new zone overlaps an existing zone, the new zone steals the channels and the old zone is deactivated if it is left with no members, per MPE v1.1 Appendix B.
Sourcepub fn set_pitch_bend_sensitivity(&mut self, channel: u8, semitones: u8)
pub fn set_pitch_bend_sensitivity(&mut self, channel: u8, semitones: u8)
Set Pitch Bend Sensitivity from an RPN #0 message.
channel is the 0-based channel on which the RPN was received.
semitones is the MSB value (CC#6). The cent value (CC#38) is ignored
for now; MPE recommends integer semitones.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for MpeState
impl<'de> Deserialize<'de> for MpeState
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for MpeState
impl StructuralPartialEq for MpeState
Auto Trait Implementations§
impl Freeze for MpeState
impl RefUnwindSafe for MpeState
impl Send for MpeState
impl Sync for MpeState
impl Unpin for MpeState
impl UnsafeUnpin for MpeState
impl UnwindSafe for MpeState
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
impl<S, T> Duplex<S> for Twhere
T: FromSample<S> + ToSample<S>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<State, Message> IntoBoot<State, Message> for State
impl<State, Message> IntoBoot<State, Message> for State
Source§fn into_boot(self) -> (State, Task<Message>)
fn into_boot(self) -> (State, Task<Message>)
Application.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
fn into_sample(self) -> T
Source§impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
fn into_sample(self) -> T
impl<T> MaybeClone for T
impl<T> MaybeDebug for T
impl<T> MaybeSend for Twhere
T: Send,
impl<T> MaybeSync for Twhere
T: Sync,
Source§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian().