Music - LeonardoTheMutant/SRB2-Murder-Mystery GitHub Wiki

Digital Soundtrack

The base add-on of the LeonardoTheMutant's Murder Mystery does not include digital music. If you want to get the digital soundtrack for the game, please visit the Digital Music repository

Music in SRB2

For more details visit SRB2 Wiki about Music

Music in SRB2 can be one of the following types: Digital & MIDI. Digital Music/SFX is a digitized form of the sound wave. Devices like Digital Microphones convert an analog sound wave into a Digital form so it can be stored and processed by a computer. On the other hand, Speakers (with the help of Digital-To-Analog converter) convert the digitized sound into analog sound wave that we, humans, can hear. Digital Music can perfectly carry any sound, including voices.

MIDI (Musical Instrument Digital Interface) is a standard that describes a communication protocol, digital interface, and electrical connectors that connect a wide variety of electronic musical instruments, computers, and related audio devices for playing, editing, and recording music. Basically, what you need to know, is that a MIDI file (.MID, .MIDI) is a sequence of notes and commands for the MIDI-compatible synthesizer that produces sound based on these commands. Because MIDI is a sequence of notes, it has its own limitations, such as it is not capable to store and playback voices. But on the other hand, it is much, much smaller than a digitized sound wave and can produce a decent music.

Music lumps in SRB2, just like any lumps, have to follow the 8-character filename, but in the case of music the actual name of the lump has to be 6-characters max in length, because the first 2 characters specify the type of the lump. So, if you want to place a Digital Music track into the game, you have to name is as O_######, where # is a alphanumerical character. For MIDI Music, you have to name the lump as D_######.

In PK3 file, all music lumps must be placed inside a /Music directory to be recognized by SRB2

MM Music slots

Murder Mystery (from version 1.2) is using a dynamic music slot system to make the music modification with other add-ons much easier. The music in MM can be categorized as follows:

  • Map music
  • Intermission/Ending theme
  • Showdown Duel theme
  • Suspense theme

Map music

This is perhaps the most straightforward type of music. It relies on the vanilla SRB2 functionality of loading music tracks for the specific map(s). You can have (practically) unlimited amount of map music lumps in your add-on. There are three ways to load a music track for the map:

Loading music by the Extended Map number

The simpliest way to load a music track for your map is to name the music lump by the map's extended number. For example, if your map has the extended number of MAP01, your music lump must be named as #_MAP01M, where # is the type of music (D for MIDI, O for Digital). M at the end of the music lump name is essential, so do not forget about it! This method is based on One-to-One relation (one map - one track)

Loading music by SOC

An alternative way of loading music is to specify a specific music lump for your map in SOC. This way, you can tell multiple maps to use the same music track. All you have to do is write the following line in your SOC:

Music = ######

###### is the 6-character wide name of the music lump (without the 2-character prefix). This method is based on Many-to-One relation (multiple maps - one track)

Loading music with triggers in the map

The 3rd way of loading music is to place a special trigger in the map that will tell SRB2 to load a specified track. It can also be used to change the track mid-level. All you have to do is to create a trigger in the map that will activate the linedef of type 413 - Change Music. Visit SRB2 Wiki for details on this linedef executor. You can use multiple music lumps for the map with the help of this linedef. This method is based on One-to-Many relation (one map - multiple tracks)

Intermission/Ending theme

Intermission themes in MM are used to underline the type of the round ending. The theme music lumps of this type require to have a specific lump name to work in MM. Here is the list of all 7 intermission music slots (without the lump type prefix):

Music Lump name Desciption
MM_TIE Tie
MMEND0 "The PONG ending". This track is played when 2 players were playing pong but the round time has ran out
MMEND1 Murderer ending. Murderers were able to kill every player
MMEND2 Civilian ending. Sheriffs, Heroes or Civilians were able to eliminate all Murderers
MMEND3 Murderous Sheriff ending. Sheriff has killed the last Innocent, thus making the Murderers victorious
MMEND4 Murderous Hero ending. Hero has killed the last Innocent, thus making the Murderers victorious
MMEND5 No defenders ending. Murderers have killed all Sheriff & Heroes, leaving Civilians unprotected, this making the Murderers victorious

All 7 of these slots have to be populated

Showdown Duel Theme

The music of this type plays during the Showdown Duels (confrontation of Murderers & Sheriffs+Heroes alone). It is supposed to be intense, because this is the last opportunity for each side of forces to win. There are 16 Showdown Duel track slots in total, each can be either populated or not. The music lump must be named as MMSHD# (where # is a hexadecimal number from 0 to F) to act as a Showdown Duel track.

If you want your map to use one specific Showdown Duel track, you have to write into your SOC the following line:

Lua.MM_ShowdownTrack = ######

###### is the 6-character wide name of the music lump (without the 2-character prefix)

See the Music Credits/Readme file in the base add-on (and music packs) to see which Showdown Duel track slots are occupied.

Suspense Theme

The music of this type plays during the Suspense events (the last Civilians is left alive and it has to fight back against the Murderers). It is supposed to be intense in a sinister way. This of the suspense track as a horror music. If you are a Civilian, imagine you are the only one left to fight back against the monsters (Murderers) and find the Sheriff's Emerald. Or if you are a Murderer, you have to do everything to not let that last Civilian to strike you down. There are 16 Suspense track slots in total, each can be either populated or not. The music lump must be named as MMSUS# (where # is a hexadecimal number from 0 to F) to act as a Suspense track.

If you want your map to use one specific Suspense track, you have to write into your SOC the following line:

Lua.MM_SuspenseTrack = ######

###### is the 6-character wide name of the music lump (without the 2-character prefix)

See the Music Credits/Readme file in the base add-on (and music packs) to see which Suspense track slots are occupied.