Utility class for extra handling of song notes

Static methods

@:value({ threshold : 0 })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 lhs

overwrittenNotes

An optional array that is modified in-place with the notes in lhs that were overwritten.

threshold

The note stack threshold. Refer to doNotesStack for more details.

Returns:

The unsorted resulting array.

@:value({ threshold : 0 })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.

@:value({ includeOverlapped : true })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 doNotesStack for more details.

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.