pub struct Timbre {
pub flags: [u8; 2],
pub level: [u8; 2],
pub attack_decay: [u8; 2],
pub sustain_release: [u8; 2],
pub wave: [u8; 2],
pub feedback: u8,
pub transpose: i8,
pub velocity: i8,
}Expand description
One instrument from a 13-byte timbre record: the register values an AdLib driver writes to registers 0x20, 0x40, 0x60, 0x80 and 0xE0 for the modulator and carrier, register 0xC0 (feedback and connection), a transpose and a velocity sensitivity.
Fields§
§flags: [u8; 2][modulator, carrier]: AM, vibrato, sustaining envelope, KSR, frequency multiplier.
level: [u8; 2][modulator, carrier]: key-scale level (bits 6-7) and total level (bits 0-5).
attack_decay: [u8; 2][modulator, carrier]: attack rate (high nibble) and decay rate (low nibble).
sustain_release: [u8; 2][modulator, carrier]: sustain level (high nibble) and release rate (low nibble).
wave: [u8; 2][modulator, carrier]: waveform 0-7.
feedback: u8Feedback (bits 1-3) and connection (bit 0: 0 = FM, 1 = additive).
transpose: i8Semitones added to melodic notes; the note played for a percussion timbre.
velocity: i8Implementations§
Trait Implementations§
impl Copy for Timbre
impl StructuralPartialEq for Timbre
Auto Trait Implementations§
impl Freeze for Timbre
impl RefUnwindSafe for Timbre
impl Send for Timbre
impl Sync for Timbre
impl Unpin for Timbre
impl UnsafeUnpin for Timbre
impl UnwindSafe for Timbre
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
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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
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.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
impl<S, T> Duplex<S> for Twhere
T: FromSample<S> + ToSample<S>,
§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
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> ⓘ
Converts
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> ⓘ
Converts
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 more