Track

Trait Track 

Source
pub trait Track {
    // Required method
    fn play_step(&mut self, step: u32) -> Vec<Instruction>;

    // Provided method
    fn get_name(&self) -> String { ... }
}
Expand description

Abstraction for a sequencer track.

Users can create their own custom track implementations by implementing this trait, defining how steps are played and optionally providing a track name.

Required Methods§

Source

fn play_step(&mut self, step: u32) -> Vec<Instruction>

Plays the given step in the track.

§Returns

A vector of Instruction produced by the track at this step.

Provided Methods§

Source

fn get_name(&self) -> String

Returns the name of the track.

Implementors§