Song

Struct Song 

Source
pub struct Song {
    pub name: String,
    pub format: FormatDescription,
    pub samples: Vec<Sample>,
    pub patterns: Vec<Pattern>,
    pub pattern_table: Vec<u8>,
    pub num_used_patterns: u32,
    pub end_position: u32,
    pub has_standard_notes: bool,
}
Expand description

Contains the entire mod song

Fields§

§name: String

The name of the song as specified in the mod file

§format: FormatDescription

Features of the song

§samples: Vec<Sample>

The audio samples used by the song

§patterns: Vec<Pattern>

Patterns contain all the note data

§pattern_table: Vec<u8>

Specifies the order in whcih the patterns should be played in. The same pattern may played several times in the same song

§num_used_patterns: u32

How many patterns in the pattern table should be used. The pattern table is a fixed length can usually longer than the song

§end_position: u32

Which pattern should be played after the last pattern in the pattern_table. Used for infinitely looping repeating songs

§has_standard_notes: bool

Set to true if all the notes are standard notes (i.e. conforming to the standard period table)

Auto Trait Implementations§

§

impl Freeze for Song

§

impl RefUnwindSafe for Song

§

impl Send for Song

§

impl Sync for Song

§

impl Unpin for Song

§

impl UnwindSafe for Song

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.