Utility class for extra handling of song notes
Static methods
staticconcatOverwrite(lhs:Array<SongNoteData>, rhs:Array<SongNoteData>, ?overwrittenNotes:Array<SongNoteData>, threshold:Float = 0):Array<SongNoteData>
Concatenates two arrays of notes but overwrites notes in lhs that are overlapped by notes in rhs.
Hold notes are only overwritten by longer hold notes.
This operation only modifies the second array and overwrittenNotes.
Parameters:
lhs | An array of notes |
|---|---|
rhs | An array of notes to concatenate into |
overwrittenNotes | An optional array that is modified in-place with the notes in |
threshold | The note stack threshold. Refer to |
Returns:
The unsorted resulting array.
staticdoNotesStack(noteA:SongNoteData, noteB:SongNoteData, threshold:Float = 0):Bool
Parameters:
noteA | First note. |
|---|---|
noteB | Second note. |
threshold | The note stack threshold, in steps. |
Returns:
Returns true if both notes are on the same strumline, have the same direction
and their time difference in steps is less than the step-based threshold.
A threshold of 0 will return true if notes are nearly perfectly aligned.
staticlistStackedNotes(notes:Array<SongNoteData>, threshold:Float, includeOverlapped:Bool = true, ?overlapped:Array<SongNoteData>):Array<SongNoteData>
Retrieves all stacked notes. It does this by cycling through "chunks" of notes within a certain interval.
Parameters:
notes | Sorted notes by time. |
|---|---|
threshold | The note stack threshold. Refer to |
includeOverlapped | (Optional) If overlapped notes should be included. |
overlapped | (Optional) An array that gets populated with overlapped notes. Note that it's only guaranteed to work properly if the provided notes are sorted. |
Returns:
Stacked notes.