MUSICDEF

From SRB2 Wiki
Jump to navigation Jump to search

MUSICDEF is a type of lump used by SRB2 and SRB2Kart that defines extra information for music tracks.

Formatting

A MUSICDEF block must begin with a Lump x statement, where x refers to the name given to your music lump (after the O_ or D_) to assign the information to.

Examples: Lump GFZ1

For all spaces that need to be used in text fields, underscores are used in their place instead.

Examples: Title = Greenflower_1

Note that these lumps do not support commenting of any kind, and attempting to use them will result in errors.

SRB2

SRB2 uses MUSICDEF for displaying song information in the Sound Test page.

Entries

  • Title sets the name of the song. This can be no longer than 31 characters – any characters beyond that will not be shown. Can only display letters, numbers, exclamation points and question marks.
  • Alttitle sets an alternate title to be displayed alongside Title in the scrolling text.
  • Authors sets the artists who wrote, composed and/or played the song.
  • Soundtestpage assigns a page for the song. All of the default songs in the game use page 1.
  • Soundtestcond is the condition for unlocking the song entry. Negative numbers refer to condition sets, while positive numbers require completing the map with the specified extended map number. Setting this to 0 will make the song immediately available.
  • Stoppingtime stops the music from playing after a specified amount of time, in milliseconds. This is used for songs or jingles that are not intended to loop, such as the title screen theme or the Extra Life jingle.
  • BPM sets the beats per minute of the song. This is used for the radio to bounce with the beat.
  • loopms sets the loop point of the song.
  • Usage and Source are both unused fields, but are still recognized by the game.

Example

This MUSICDEF sets the music info for Greenflower Zone Act 1:

Lump GFZ1
Title = Greenflower_1
Authors = clairebun,_Shane_Strife,_DrTapeworm,_DemonTomatoDave
Soundtestpage = 1
Soundtestcond = 1
BPM = 132

SRB2Kart

SRB2Kart uses MUSICDEF to display the current map's song credits after the initial countdown.

Entries

  • Usage describes the track name or other context the song plays on. This is currently unused by the game.
  • Source displays the name of the song, as well as the artist or game it originates from.
Note
Both entries need to be used and filled out, otherwise the MUSICDEF will not function properly.

Example

This MUSICDEF sets the music info for Green Hills Zone:

Lump KMAP01
Usage = Green_Hills_Zone
Source = Toot_Toot_Sonic_Warrior_(Instrumental)_-_Sonic_CD