pub struct Instrument {
pub synthwave: Option<Synthwave>,
pub chip: Option<ChipInstrument>,
pub drum: Option<Drum>,
pub waveform: Waveform,
pub envelope: Envelope,
pub volume: u8,
pub slide: i32,
pub vibrato: Option<Vibrato>,
pub arpeggio: Option<Arpeggio>,
pub duty_sweep: Option<DutySweep>,
}Expand description
The sound of a channel: a waveform, an envelope, a volume and pitch effects.
Fields§
§synthwave: Option<Synthwave>Optional polyphonic unison/filter/LFO path. None retains legacy samples.
chip: Option<ChipInstrument>Opt-in tracker sources, macros and quantization; None keeps legacy samples.
drum: Option<Drum>A finite synthesized one-shot instead of a melodic oscillator/ADSR.
waveform: Waveform§envelope: Envelope§volume: u80 through 15. The default is 15.
slide: i32Constant pitch slide from the start of each note, in cents per second.
vibrato: Option<Vibrato>§arpeggio: Option<Arpeggio>§duty_sweep: Option<DutySweep>Only for Waveform::Pulse.
Implementations§
Trait Implementations§
Source§impl Clone for Instrument
impl Clone for Instrument
Source§fn clone(&self) -> Instrument
fn clone(&self) -> Instrument
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 Instrument
impl Debug for Instrument
Source§impl Default for Instrument
impl Default for Instrument
impl Eq for Instrument
Source§impl Hash for Instrument
impl Hash for Instrument
Source§impl PartialEq for Instrument
impl PartialEq for Instrument
impl StructuralPartialEq for Instrument
Auto Trait Implementations§
impl Freeze for Instrument
impl RefUnwindSafe for Instrument
impl Send for Instrument
impl Sync for Instrument
impl Unpin for Instrument
impl UnsafeUnpin for Instrument
impl UnwindSafe for Instrument
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