pub struct Module {Show 18 fields
pub name: Name,
pub message: String,
pub highlight: (u8, u8),
pub made_with_version: u16,
pub compatible_with_version: u16,
pub flags: ModuleFlags,
pub global_volume: RangedU8<0, 128>,
pub sample_volume: RangedU8<0, 128>,
pub speed: RangedU8<1, 255>,
pub tempo: RangedU8<31, 255>,
pub pan_separation: RangedU8<0, 128>,
pub pitch_wheel_depth: u8,
pub init_channel_panning: [u8; 64],
pub init_channel_volume: [u8; 64],
pub orders: Vec<Order>,
pub instruments: Vec<Instrument>,
pub samples: Vec<Sample>,
pub patterns: Vec<Pattern>,
}Fields§
§name: NameSong Name, null-terminated (but may also contain nulls)
message: StringComment message
highlight: (u8, u8)Rows per Measure highlight, Rows per Beat highlight
made_with_version: u16“Made With” Tracker
compatible_with_version: u16“Compatible With” Tracker
flags: ModuleFlagscombined Header Flags and Special Flags, for embedding extra information
global_volume: RangedU8<0, 128>Global Volume (0…128)
sample_volume: RangedU8<0, 128>Sample Volume (0…128)
speed: RangedU8<1, 255>Initial Speed (1…255)
tempo: RangedU8<31, 255>Initial Tempo (31…255)
pan_separation: RangedU8<0, 128>Pan Separation (0…128)
pitch_wheel_depth: u8Pitch Wheel Depth
init_channel_panning: [u8; 64]Initial Channel Panning
init_channel_volume: [u8; 64]Initial Channel Volume
orders: Vec<Order>Orders
instruments: Vec<Instrument>Instrument headers (without samples)
samples: Vec<Sample>Samples
patterns: Vec<Pattern>Patterns
Implementations§
Source§impl Module
impl Module
Sourcepub fn ordered_patterns(&self) -> impl Iterator<Item = &Pattern> + '_
pub fn ordered_patterns(&self) -> impl Iterator<Item = &Pattern> + '_
Returns an iterator over patterns as listed in the orders list.
It can yield any pattern multiple times or not yield some patterns at all.
Sourcepub fn active_channels(&self) -> ActiveChannels
pub fn active_channels(&self) -> ActiveChannels
Returns active channels when playing the module.
Does not account for channels in patterns which are not present in the orders list.
Trait Implementations§
Source§impl Get<InstrumentId> for Module
impl Get<InstrumentId> for Module
type Output = Instrument
fn get(&self, index: InstrumentId) -> Option<&Self::Output>
Source§impl Index<&InstrumentId> for Module
impl Index<&InstrumentId> for Module
Source§impl Index<InstrumentId> for Module
impl Index<InstrumentId> for Module
Auto Trait Implementations§
impl Freeze for Module
impl RefUnwindSafe for Module
impl Send for Module
impl Sync for Module
impl Unpin for Module
impl UnwindSafe for Module
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