pub struct Notes { /* private fields */ }
Expand description
The objects set for querying by lane or time.
Implementations§
Source§impl Notes
impl Notes
Sourcepub fn into_all_notes(self) -> Vec<Obj>
pub fn into_all_notes(self) -> Vec<Obj>
Converts into the notes sorted by time.
Sourcepub fn all_notes(&self) -> impl Iterator<Item = &Obj>
pub fn all_notes(&self) -> impl Iterator<Item = &Obj>
Returns the iterator having all of the notes sorted by time.
Sourcepub fn bpm_changes(&self) -> &BTreeMap<ObjTime, BpmChangeObj>
pub fn bpm_changes(&self) -> &BTreeMap<ObjTime, BpmChangeObj>
Returns the bpm change objects.
Sourcepub fn section_len_changes(&self) -> &BTreeMap<Track, SectionLenChangeObj>
pub fn section_len_changes(&self) -> &BTreeMap<Track, SectionLenChangeObj>
Returns the section len change objects.
Sourcepub fn bga_changes(&self) -> &BTreeMap<ObjTime, BgaObj>
pub fn bga_changes(&self) -> &BTreeMap<ObjTime, BgaObj>
Returns the bga change objects.
Sourcepub fn next_obj_by_key(&self, key: Key, time: ObjTime) -> Option<&Obj>
pub fn next_obj_by_key(&self, key: Key, time: ObjTime) -> Option<&Obj>
Finds next object on the key Key
from the time ObjTime
.
Sourcepub fn remove_latest_note(&mut self, id: ObjId) -> Option<Obj>
pub fn remove_latest_note(&mut self, id: ObjId) -> Option<Obj>
Removes the latest note from the notes.
Sourcepub fn remove_note(&mut self, id: ObjId) -> Vec<Obj>
pub fn remove_note(&mut self, id: ObjId) -> Vec<Obj>
Removes the note from the notes.
Sourcepub fn push_bpm_change(&mut self, bpm_change: BpmChangeObj)
pub fn push_bpm_change(&mut self, bpm_change: BpmChangeObj)
Adds a new BPM change object to the notes.
Sourcepub fn push_scrolling_factor_change(&mut self, bpm_change: ScrollingFactorObj)
pub fn push_scrolling_factor_change(&mut self, bpm_change: ScrollingFactorObj)
Adds a new scrolling factor change object to the notes.
Sourcepub fn push_spacing_factor_change(&mut self, bpm_change: SpacingFactorObj)
pub fn push_spacing_factor_change(&mut self, bpm_change: SpacingFactorObj)
Adds a new spacing factor change object to the notes.
Sourcepub fn push_section_len_change(
&mut self,
section_len_change: SectionLenChangeObj,
)
pub fn push_section_len_change( &mut self, section_len_change: SectionLenChangeObj, )
Adds a new section length change object to the notes.
Sourcepub fn push_bga_change(&mut self, bga: BgaObj)
pub fn push_bga_change(&mut self, bga: BgaObj)
Adds a new bga change object to the notes.
Sourcepub fn push_extended_message(&mut self, message: ExtendedMessageObj)
pub fn push_extended_message(&mut self, message: ExtendedMessageObj)
Adds the new extended message object to the notes.
Sourcepub fn last_visible_time(&self) -> Option<ObjTime>
pub fn last_visible_time(&self) -> Option<ObjTime>
Gets the time of last visible object.
Sourcepub fn last_bgm_time(&self) -> Option<ObjTime>
pub fn last_bgm_time(&self) -> Option<ObjTime>
Gets the time of last BGM object.
You can’t use this to find the length of music. Because this doesn’t consider that the length of sound. And visible notes may ring after all BGMs.
Sourcepub fn last_obj_time(&self) -> Option<ObjTime>
pub fn last_obj_time(&self) -> Option<ObjTime>
Gets the time of last any object including visible, BGM, BPM change, section length change and so on.
You can’t use this to find the length of music. Because this doesn’t consider that the length of sound.
Sourcepub fn resolution_for_pulses(&self) -> u32
pub fn resolution_for_pulses(&self) -> u32
Calculates a required resolution to convert the notes time into pulses, which split one quarter note evenly.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Notes
impl<'de> Deserialize<'de> for Notes
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for Notes
impl RefUnwindSafe for Notes
impl Send for Notes
impl Sync for Notes
impl Unpin for Notes
impl UnwindSafe for Notes
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more