Struct ittech::Module[][src]

pub struct Module {
    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<InstrumentHeader>,
    pub samples: Vec<Sample>,
    pub patterns: Vec<Pattern>,
}

Fields

name: Name

Song Name, null-terminated (but may also contain nulls)

message: String

Comment 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: ModuleFlags

combined 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: u8

Pitch Wheel Depth

init_channel_panning: [u8; 64]

Initial Channel Panning

init_channel_volume: [u8; 64]

Initial Channel Volume

orders: Vec<Order>

Orders

instruments: Vec<InstrumentHeader>

Instrument headers (without samples)

samples: Vec<Sample>

Samples

patterns: Vec<Pattern>

Patterns

Implementations

impl Module[src]

pub fn ordered_patterns(&self) -> impl Iterator<Item = &Pattern> + '_[src]

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.

pub fn active_channels(&self) -> ActiveChannels[src]

Returns active channels when playing the module.

Does not account for channels in patterns which are not present in the orders list.

Trait Implementations

impl Clone for Module[src]

impl Debug for Module[src]

impl Get<InstrumentId> for Module[src]

type Output = InstrumentHeader

impl Get<PatternId> for Module[src]

type Output = Pattern

impl Get<SampleId> for Module[src]

type Output = Sample

impl Index<&'_ InstrumentId> for Module[src]

type Output = <Module as Get<InstrumentId>>::Output

The returned type after indexing.

impl Index<&'_ PatternId> for Module[src]

type Output = <Module as Get<PatternId>>::Output

The returned type after indexing.

impl Index<&'_ SampleId> for Module[src]

type Output = <Module as Get<SampleId>>::Output

The returned type after indexing.

impl Index<InstrumentId> for Module[src]

type Output = <Module as Get<InstrumentId>>::Output

The returned type after indexing.

impl Index<PatternId> for Module[src]

type Output = <Module as Get<PatternId>>::Output

The returned type after indexing.

impl Index<SampleId> for Module[src]

type Output = <Module as Get<SampleId>>::Output

The returned type after indexing.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.