Skip to main content

MusicTimerState

Trait MusicTimerState 

Source
pub trait MusicTimerState {
    // Required methods
    fn on_beat_interval(&mut self, current_time: &MusicTime);
    fn on_beat(&mut self, current_time: &MusicTime);
    fn on_bar(&mut self, current_time: &MusicTime);
}
Expand description

This trait is used by MusicTimerEngine for callbacks in changes of music time. Invoke it to make the most of the performance engine.

Required Methods§

Source

fn on_beat_interval(&mut self, current_time: &MusicTime)

Called when the beat interval changes.

§Arguments
  • current_time - The current time at which this callback has been triggered.
Source

fn on_beat(&mut self, current_time: &MusicTime)

Called when the beat changes.

§Arguments
  • current_time - The current time at which this callback has been triggered.
Source

fn on_bar(&mut self, current_time: &MusicTime)

Called when the bar changes

§Arguments
  • current_time - The current time at which this callback has been triggered.

Implementors§