pub struct Instrument {Show 24 fields
pub name: Name,
pub filename: DosFilename,
pub flags: InstrumentFlags,
pub new_note_action: u8,
pub duplicate_check_type: u8,
pub duplicate_check_action: u8,
pub instrument_fadeout: u8,
pub pitch_pan_separation: i8,
pub pitch_pan_centre: u8,
pub global_volume: u8,
pub default_panning: RangedU8<0, 128>,
pub random_volume_variation: RangedU8<0, 100>,
pub random_panning_variation: RangedU8<0, 64>,
pub trkver: u16,
pub number_of_samples: u8,
pub initial_filter_cutoff: RangedU8<0, 128>,
pub initial_filter_resonance: RangedU8<0, 128>,
pub mch: u8,
pub mpr: u8,
pub mbank: [u8; 2],
pub sample_map: SampleMap,
pub volume_envelope: Envelope,
pub panning_envelope: Envelope,
pub pitch_filter_envelope: Envelope,
}Fields§
§name: NameInstrument Name, null-terminated (but may also contain nulls)
filename: DosFilenameDOS Filename, null-terminated
flags: InstrumentFlags§new_note_action: u8New Note Action
duplicate_check_type: u8Duplicate Note Check Type
duplicate_check_action: u8Duplicate Note Check Action
instrument_fadeout: u8Instrument Fadeout
0..=256, although values up to 1024 would be sensible. Up to IT2.07, the limit was 0..=128.
OpenMPT uses u16 but we replaced it with u8 to limit the range.
pitch_pan_separation: i8Pitch/Pan Separatation
pitch_pan_centre: u8Pitch/Pan Centre
global_volume: u8Global Volume
default_panning: RangedU8<0, 128>Panning
random_volume_variation: RangedU8<0, 100>Random volume variation (percentage)
random_panning_variation: RangedU8<0, 64>Pan Swing
trkver: u16Tracker ID
number_of_samples: u8Number of embedded samples
initial_filter_cutoff: RangedU8<0, 128>Filter Cutoff
initial_filter_resonance: RangedU8<0, 128>Filter Resonance
mch: u8MIDI Channel
mpr: u8MIDI Program
mbank: [u8; 2]MIDI Bank
sample_map: SampleMapSample / Transpose map
volume_envelope: EnvelopeVolume Envelope
panning_envelope: EnvelopePan Envelope
pitch_filter_envelope: EnvelopePitch / Filter Envelope
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 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for Instrument
impl RefUnwindSafe for Instrument
impl Send for Instrument
impl Sync for Instrument
impl Unpin 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