Class Song

Represents data about a TJA chart file.

Hierarchy

  • Song

Constructors

Properties

backgroundImagePath?: string

A limited song skin that combines donbg and songbg into a single image.

backgroundMoviePath?: string

Video file that is played in the background during the gameplay.

bpm: number = 120

Song's beats per minute. Defaults to 120.

The following formula is used: BPM = MEASURE / SIGN * 4, where MEASURE is amount of measures per minute and SIGN is the time signature, eg. 4 / 4 if the current time signature is common.

Default

120

courses: Course[] = []

Array of courses contained in this TJA chart file.

demoStart: number = 0.0

Offset of song preview during song selection in seconds.

Default

0.0

game: Game = Game.Taiko

Value can be either "Taiko" or "Jube". Game will be forced to autoplay mode with "Jube" value. Default is "Taiko".

Default

Game.Taiko

genre?: string

Song's genre that controls where the song appears in the song selection.

headScroll?: number

Initial game scrolling speed. #SCROLL command in a song notation will be a multiple of this value.

life: number = 0

Amount of misses that are allowed to be made before interrupting the game and immediately showing the results screen. Removes the gauge, replacing it with lit up souls that fade one by one after missing a note. The amount is not limited, but only 16 souls fit on screen. Default is 0, which does not limit the misses and will play until the end.

Default

0

localizedSubtitle: {
    cn?: string;
    en?: string;
    ja?: string;
    ko?: string;
    tw?: string;
} = {}

Localized versions of the subtitle. If a localized subtitle exists, it will be used instead of the subtitle property if a user has their game language set to the corresponding language. Supported languages are: Japanese (ja), English (en), Chinese Simplified (cn), Chinese Traditional (tw), Korean (ko).

Type declaration

  • Optional cn?: string
  • Optional en?: string
  • Optional ja?: string
  • Optional ko?: string
  • Optional tw?: string
localizedTitle: {
    cn?: string;
    en?: string;
    ja?: string;
    ko?: string;
    tw?: string;
} = {}

Localized versions of the title. If a localized title exists, it will be used instead of the title property if a user has their game language set to the corresponding language. Supported languages are: Japanese (ja), English (en), Chinese Simplified (cn), Chinese Traditional (tw), and Korean (ko).

Type declaration

  • Optional cn?: string
  • Optional en?: string
  • Optional ja?: string
  • Optional ko?: string
  • Optional tw?: string
lyricsFilePath?: string

Path to a timed WEBVTT lyrics file, usually with a .vtt extension. This will disable the #LYRIC commands in courses.

maker?: {
    name: string;
    url?: string;
}

Information about the chart's creator. When provided, the name property must always be defined. Additionally, the creator field can contain a URL between angle brackets.

Example:

MAKER:名無し <https://example.com>

Type declaration

  • name: string

    The name of the chart's creator.

  • Optional url?: string

    An optional URL address to a web page related to the chart's creator.

movieOffset?: number

Floating point offset of video file's starting position in seconds. Cannot be a negative number.

offset: number = 0.0

Floating point value for chart offset in seconds. Negative values will delay notes, positive will cause them to appear sooner.

Default

0.0

scoreMode: ScoreMode = ScoreMode.AC_1_TO_AC_7

Scoring method that affects the final score. All scores are divided by 10, rounded towards negative infinity, then multiplied by 10.

Default

ScoreMode.AC_1_TO_AC_7

side: Side = Side.Both

Value can be either:

  • "Normal" or "1"
  • "Ex" or "2"
  • "Both" or "3"

Value of "Normal" and "1" makes the song appear when song selection is in the default mode. "Ex" and "2" hides the song from default song selection.

  • The song appears after the user presses the buttons for next song and previous song 20 times alternatingly (10 for each button).

Default is "Both", making the song appear during song selection in both modes.

Default

Side.Both

songVolume: number = 100

Music volume percentage.

Default

100

soundEffectVolume: number = 100

Sound effect volume percentage.

Default

100

subtitle?: string

The sub-title that appears on the selected song in song selection that may explain the origin of the song, such as the originating media or the lead singer.

Adding -- or ++ at the beginning changes the appearance of the subtitle on the results screen by either hiding (--) or showing it (++) next to the title.

title: string = 'untitled'

Song's title that appears on song selection, in the game, and on the results screen.

wave?: string

The audio file that plays in the background, should be in the same directory as the TJA file. If omitted, no music plays in the background.

Methods

  • Converts the song data into TJA format.

    Returns

    • A string that will correspond to a TJA file.

    Returns string

Generated using TypeDoc