# Be-Music Source

BMS is a file format for rhythm games developed by Urao Yane in 1998. The format was originally developed for BM98 (a simulator of the game Beatmania by Konami), though the term BMS is now widely used to describe the Beatmania-esque music data system in general.
The acronym has been confirmed by Yane to be Be-Music Source in the official BMS format specification.

## Gameplay

Similar to the Beatmania and Beatmania IIDX series, the purpose of the game is to hit notes as they descend from the top of the screen.
* When the player hits notes with the proper timing, a gauge will fill up. When the player misses a note, the gauge will drain.
* In addition to normal notes, there are also long notes that must be held, and mine notes that will explode and drain the gauge if hit.
* To clear the game, the player's gauge must be filled to a specified level at the end of the song.

### BMS events

Currently, most BMS files are distributed in BMS events, where several artists publish songs and compete for scores. Held since 2004, the largest BMS event is the BMS of Fighters (BOF) held by AOiRO_MANBOW, where more than 250 songs are presented each year.

## BMS songs

As the BMS format requires music to be separated into various tracks, most BMS songs are original songs composed specifically for the BMS file type, thus making it hard to use pre-existing songs for BMS (unless isolated stems are available).

### Basic format

The BMS file describes how notes are arranged and how the game responds when the player takes a specific action. It is a plain text file with "directive" lines starting with the # character. Each directive line is formatted in the form below:
The space between the definition setter and the definer is required.
A BMS file is generally composed of a header field and the main data field. Below is a simple example of what a BMS file will look like when it is opened by a text editor.

#### Common header field components

Commands existing from the original BM98 and used in original BMS data are as follows:
| Command name | Description |
| #ARTIST | Defines the artist. |
| #BMPxx | Defines the picture or video file that will be displayed when the number xx appears in the graphic channels of the main data field. |
| #BPM | Defines the speed of the song in beats per minute. |
| #GENRE | Defines the genre. |
| #PLAYER | Defines the play style (1 for Single Play, 2 for Couple Play, and 3 for Double Play). Modern BMS simulators do not depend on PLAYER anymore, but define play style by the extension of the file itself and the directive lines used in the main data field. |
| #PLAYLEVEL | Defines the difficulty level displayed for the song. |
| #RANK | Defines how strict the note timing threshold is (0 for very hard, 1 for hard, 2 for normal, and 3 for easy), unless otherwise set by the simulator. |
| #TITLE | Defines the title. |
| #TOTAL | Defines how much the gauge will increase when the notes are hit appropriately. |
| #WAVxx #OGGxx | Defines the music file that is played when the number xx appears in the played channels and the sound channels of the main data field. The most commonly used music file types for BMS are WAV and OGG. #WAV00 sets the sound played when a mine note is hit. |
Commands later developed that have become popular include:
| Command name | Description |
| #BANNER | Defines the banner displayed when the song is chosen to play. |
| #BPMxx | Defines what the BPM will change to when the number xx appears in the BPM channel of the main data field. |
| #DIFFICULTY | Defines the difficulty of a song by color (1 for green, 2 for blue, 3 for yellow, 4 for red, and 5 for purple). As songs get harder, higher numbers are assigned. |
| #LNOBJ | Notes defined with this parameter will act as endings for long notes when they appear in the played channels of the main data field. |
| #STAGEFILE | Defines the image displayed when the song is chosen to be played. |
| #STOPxx | Defines how long the sequence should stop when the number xx appears in the stop channel of the main data field. |
| #SUBARTIST | Defines a secondary artist. |
| #SUBTITLE | Defines a subtitle. |

#### Main data field components

Main field data is written in the form of #XXXYY:ZZZZZZ. XXX defines the number of the measure, YY defines the channel, and ZZ defines the components of the measure using a base 36 2-digit number. The colon separating the definer and components is required.

### Expansion of BMS format

As the original BMS format became outdated with Beatmania being superseded by Beatmania IIDX, other formats that adopted changes in the Beatmania series were developed. Famous expansions include the Be-Music Extend format (.bme) that allowed 7 lines and 1 turntable to be played, and the Be-Music Long note format (.bml) that allowed usage of long notes that required players to hold the key until the end of the note. A .pms extension also exists based on .bms, meant for simulating the game Pop'n Music and utilizing 9 lines. In addition, there is .mdm, used in the fan created Muse dash Melon Loader for custom charts. It utilizes 4 lines for both of the game's lanes, as well as a couple other lines to control special effects and boss movement.
Simulators themselves have also been developed by fans:
* Yane's original BM98 simulator supported only 256 sound and image files to be played, and only supported 5 lanes plus one scratch per playside.
* Delight Delight Reduplication supports the .bme format, allowing a 7-line format similar to in Beatmania IIDX to be played.
* nazoBMplay allows the number of sound and picture/movie files to increase by making the format 36 base instead of 16 base, and a patch allowed .ogg sound files.
* Currently, the most widely used BMS player is Lunatic Rave 2 by lavalse, that has its own online ranking website. Other simulators after Lunatic Rave 2 with higher performances and wider capabilities exist, but no other simulator was able to replace the position of Lunatic Rave 2 as the most used simulator, mostly due to compatibility with older formats and the lack of an online ranking system.

### bmson

bmson is a JSON-based format initially developed by wosderge. The original purpose of the format was to make an alternative to BMS that was easy to implement and use by developers, artists and chart creators alike. bmson has no limit on the amount of key sounds one can have in a chart, unlike BMS, which has a hard limit of 1296 key sounds. After the format was proposed, the version 0.26 format was implemented to a couple of BMS players, such as Bemuse and raindrop. After bmson's initial implementation, the developers of these games, as well as a few others, worked together to create the bmson version 1.0 technical specification.