Struct TimingPoint

Source
pub struct TimingPoint {
    pub offset: f32,
    pub ms_per_beat: f32,
    pub meter: i32,
    pub sample_set: i32,
    pub sample_index: i32,
    pub volume: i32,
    pub inherited: bool,
    pub kiai_mode: bool,
}
Expand description

Represents a single timing point

Fields§

§offset: f32

Is the number of milliseconds from the start of the song, and defines when the timing point starts. A timing point ends when the next one starts. The first timing point starts at 0, disregarding its offset.

§ms_per_beat: f32

Defines the duration of one beat. It affect the scrolling speed in osu!taiko or osu!mania, and the slider speed in osu!standard, among other things.

When positive, it is faithful to its name. When negative, it is a percentage of previous non-negative milliseconds per beat. For instance, 3 consecutive timing points with 500, -50, -100 will have a resulting beat duration of half a second, a quarter of a second, and half a second, respectively.

§meter: i32

Defines the number of beats in a measure.

§sample_set: i32

Defines the default sample that hit objects inherit if the sample_set field in HitObjectExtras is set to 0.

§sample_index: i32

The default custom index that hit objects inherit if the custom_index field in HitObjectExtras is set to 0.

§volume: i32

Is the default volume that hitobjects inherit. It ranges from 0 to 100.

§inherited: bool

Tells if the timing point can be inherited from. Inherited is redundant with the milliseconds per beat field. A positive milliseconds per beat implies inherited is true, and a negative one implies it is false.

§kiai_mode: bool

Defines whether or not Kiai Time effects are active.

Auto Trait Implementations§

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.