pub enum LowerError {
ZeroTpq,
PitchOutOfRange,
VelocityOutOfRange {
velocity: u8,
},
ChannelOutOfRange {
channel: u8,
},
InexactTime,
InvalidTempo,
InvalidTimeSignature,
UnsupportedPianoRollCell {
lane: String,
cell_kind: String,
},
Smf(SmfError),
}Expand description
Error raised while lowering music to a MIDI file.
Variants§
ZeroTpq
The target ticks-per-quarter resolution was zero.
PitchOutOfRange
A pitch fell outside the representable MIDI range.
VelocityOutOfRange
A note velocity fell outside the playable 1..=127 range.
ChannelOutOfRange
A note channel fell outside the 0..=15 range.
InexactTime
A duration could not be represented exactly at the target TPQ.
InvalidTempo
A tempo value was not positive and finite.
InvalidTimeSignature
A time-signature denominator was not a power of two.
UnsupportedPianoRollCell
A piano-roll cell had no SMF representation.
Fields
Smf(SmfError)
A serialization error surfaced from sim-lib-midi-smf.
Trait Implementations§
Source§impl Clone for LowerError
impl Clone for LowerError
Source§fn clone(&self) -> LowerError
fn clone(&self) -> LowerError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LowerError
impl Debug for LowerError
Source§impl Display for LowerError
impl Display for LowerError
impl Eq for LowerError
Source§impl Error for LowerError
impl Error for LowerError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<SmfError> for LowerError
impl From<SmfError> for LowerError
Source§impl PartialEq for LowerError
impl PartialEq for LowerError
impl StructuralPartialEq for LowerError
Auto Trait Implementations§
impl Freeze for LowerError
impl RefUnwindSafe for LowerError
impl Send for LowerError
impl Sync for LowerError
impl Unpin for LowerError
impl UnsafeUnpin for LowerError
impl UnwindSafe for LowerError
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
Mutably borrows from an owned value. Read more