Data containing information about a song. It should contain all the data needed to display a song in the Freeplay menu, or to load the assets required to play its chart. Data which is only necessary in-game should be stored in the SongChartData.

Constructor

new(songName:String, artist:String, ?charter:String, ?variation:String)

Variables

@:default("Unknown")artist:String

@:value(null)@:optionaloptionalcharter:Null<String> = null

@:optional@:default(96)optionaldivisions:Null<Int>

@:default(funkin.data.song.SongRegistry.DEFAULT_GENERATEDBY)generatedBy:String

@:optional@:default(false)optionallooped:Bool

@:optionaloptionaloffsets:Null<SongOffsets>

Instrumental and vocal offsets. Defaults to an empty SongOffsets object.

playData:SongPlayData

Data relating to the song's gameplay.

@:default("Unknown")songName:String

@:optional@:default(funkin.data.song.SongData.SongTimeFormat.MILLISECONDS)optionaltimeFormat:SongTimeFormat

@:jignoredvariation:String

Defaults to Constants.DEFAULT_VARIATION. Populated later.

@:jcustomparse(funkin.data.DataParse.semverVersion)@:jcustomwrite(funkin.data.DataWrite.semverVersion)version:Version

A semantic versioning string for the song data format.

Methods

clone():SongMetadata

Create a copy of this SongMetadata with the same information.

Parameters:

newVariation

Set to a new variation ID to change the new metadata.

Returns:

The cloned SongMetadata

@:value({ pretty : true })serialize(pretty:Bool = true):String

Serialize this SongMetadata into a JSON string.

Parameters:

pretty

Whether the JSON should be big ol string (false), or formatted with tabs (true)

Returns:

The JSON string.

toString():String

Produces a string representation suitable for debugging.