Data about a specific song in the freeplay menu.

Constructor

new(songId:String, levelData:Level, instance:FreeplayState)

Variables

read onlydata:Song

We used to have a billion fields, but this SongMetadata variable should be all we need to be able to get most information about an available song. For example, you can get the artist via data.songArtist

You can usually get various other particulars of a specific difficulty/variation by using data.getDifficulty(), and inputting specifics on your difficulty, variations, etc. See the getters here for songCharacter, fullSongName, and songStartingBpm for examples.

See also:

  • Song

read onlydifficultyRating:Int

read onlyfullSongName:String

The full song name, dynamically generated depending on your current (or rather, rememberd) variation and difficulty.

read onlyidAndVariation:String

The song's id and variation, combined with a colon. Dynamically generated depending on your current (or rather, rememberd) variation and difficulty.

read onlyisFav:Bool

Whether or not the song has been favorited.

read onlyisNew:Bool

Whether the player has seen/played this song before within freeplay

read onlylevelId:Null<String>

The level id of the song, useful for sorting from week1 -> week 7 + weekend1 and for properly loading PlayStatePlaylist for preloading on web

read onlyscoringRank:Null<ScoringRank>

read onlysongCharacter:String

The default opponent for the song. Does the getter stuff for you depending on your current (or rather, rememberd) variation and difficulty.

read onlysongStartingBpm:Float

The starting BPM of the song, dynamically generated depending on your current (or rather, rememberd) variation and difficulty.

Methods

isDifficultyNew(difficulty:String):Bool

toggleFavorite():Bool

Toggle whether or not the song is favorited, then flush to save data.

Returns:

Whether or not the song is now favorited.