The underlying data for a single note.

Constructor

@:value({ kind : "", length : 0 })new(time:Float, data:Int, length:Float = 0, kind:String = "", ?params:Array<NoteParamData>)

Variables

@:alias("d")data:Int

Data for the note. Represents the index on the strumline. 0 = left, 1 = down, 2 = up, 3 = right floor(direction / strumlineSize) specifies which strumline the note is on. 0 = player, 1 = opponent, etc.

@:value(null)@:alias("k")@:optional@:isVaroptionalkind:Null<String> = null

The kind of the note. This can allow the note to include information used for custom behavior. Defaults to null for no kind.

@:alias("l")@:default(0)@:optionaloptionallength:Float

Length of the note, if applicable. Defaults to 0 for single notes.

@:alias("p")@:default([])@:optionaloptionalparams:Array<NoteParamData>

The parameters for the note. Used for custom behavior on custom note kinds. Defaults to an empty array.

@:alias("t")time:Float

The timestamp of the note. The timestamp is in the format of the song's time format.

Methods

buildTooltip():String

Build a tooltip string for this note, as seen when hovering in the Chart Editor.

Returns:

The tooltip string to display.

clone():SongNoteDataRaw

Clone this song note data, creating a new independent instance with identical data.

Returns:

The newly created song note data.

cloneParams():Array<NoteParamData>

Clone the params data for this node, creating a new independent instance.

Returns:

A new array of cloned NoteParamData instances.

@:value({ strumlineSize : 4 })inlinegetDirection(strumlineSize:Int = 4):Int

The direction of the note, if applicable. Strips the strumline index from the data.

0 = left, 1 = down, 2 = up, 3 = right

Parameters:

strumlineSize

The size of the strumline for the current song. Defaults to 4.

Returns:

The direction of the note as an index.

@:value({ strumlineSize : 4 })getDirectionName(strumlineSize:Int = 4):String

The name of the direction of the note, if applicable. Strips the strumline index from the data.

Parameters:

strumlineSize

The size of the strumline for the current song. Defaults to 4.

Returns:

The direction of the note as a name.

@:value({ strumlineSize : 4 })getMustHitNote(strumlineSize:Int = 4):Bool

Returns true if the note is one that Boyfriend should try to hit (i.e. it's on his side). TODO: The name of this function is a little misleading; what about mines?

Parameters:

strumlineSize

Defaults to 4.

Returns:

True if it's Boyfriend's note.

@:value({ force : false })getStepLength(force:Bool = false):Float

Parameters:

force

Set to true to force recalculation (good after BPM changes)

Returns:

The length of the hold note in steps, or 0 if this is not a hold note.

@:value({ force : false })getStepTime(force:Bool = false):Float

Parameters:

force

Set to true to force recalculation (good after BPM changes)

Returns:

The position of the note in the song, in steps.

@:value({ strumlineSize : 4 })getStrumlineIndex(strumlineSize:Int = 4):Int

The strumline index of the note, if applicable. Strips the direction from the data.

0 = player, 1 = opponent, etc.

Parameters:

strumlineSize

The size of the strumline for the current song. Defaults to 4.

Returns:

The strumline index of the note.

setStepLength(value:Float):Void

Set the length of the hold note, in steps.

Parameters:

value

The desired length of the hold note, in steps. Use 0 to make this a tap note.

toString():String