> ## Documentation Index
> Fetch the complete documentation index at: https://chart-spec.enchor.us/llms.txt
> Use this file to discover all available pages before exploring further.

# EVENTS track

> Practice sections, the coda, the song's end and other song-wide text events in a .mid file.

The `EVENTS` track holds the text events that apply to the whole song: practice sections, the coda and the song's end. Each is a text event, `FF 01`:

```text theme={null}
EVENTS
  0       Track name  EVENTS
  0       Text        section Intro
  7680    Text        section Verse 1
  61440   Text        coda
  76800   Text        end
  76800   End of track
```

It's the `.mid` form of a `.chart` file's [\[Events\]](/chart/events) section. One thing differs: a `.mid` file holds its lyrics in its vocal tracks.

* A file has at most one `EVENTS` track, after the tempo track. See [Tracks](/mid/structure#tracks).
* A scanner matches every event below in the letter case shown.
* Square brackets around the text are optional, as in a `.chart` file: `[section Intro]` means the same as `section Intro`. **Recommended:** no brackets.
* **Required:** the event is the whole text, with no spaces around it or just inside its brackets.

## Practice sections

A practice section marks where a part of the song starts, such as the intro or a verse. It runs until the next practice section:

```text theme={null}
<tick>  Text  section <name>
```

* **Required:** a space or `_` between `section` and the name. **Recommended:** a space.
* **Required:** one practice section at most at a tick.
* **Recommended:** at least one practice section in a chart.

**Edge case: the names Clone Hero shows.** Clone Hero has a table of Rock Band section names, and shows a name from it when it finds one there, such as `Verse 1` for `verse_1`. It shows any other name with each `_` replaced by a space. It does the same in a `.chart` file.

**Edge case: a chart with no practice sections.** When a song with no practice sections is played, Clone Hero makes ten, named `0% - 10%` to `90% - 100%`. They start at tenths of the chart's length, which ends a beat after the last note. It does the same in a `.chart` file. YARG makes none. scan-chart reports `noSections`.

## Lyrics

A `.mid` file holds its lyrics, and the phrases that group them, in its vocal tracks. See [Vocals and harmonies](/mid/vocals).

## The coda

```text theme={null}
<tick>  Text  coda
```

`coda` marks where the song's big ending starts. A drum fill at or after it is a Big Rock Ending. See [Drum fills](/mid/phrases#drum-fills). **Required:** one `coda` at most.

## The end of the song

```text theme={null}
<tick>  Text  end
```

`end` ends the song before its audio does, as in a `.chart` file. See [The end of the song](/chart/events#the-end-of-the-song).

* **Required:** `end` at least one beat after the end of the last note of every track, sustain included.
* **Required:** one `end` at most.

## Deprecated

* **`prc_<name>`,** an older word for `section`: `prc_verse_1` is a practice section named `verse_1`. Write `section <name>` instead.

## Ignored

* **Any other text.** YARG acts on a few more events, such as `crowd_clap`, and reads `midcoda` and `midcoda_end` as the start and end of a coda. Other scanners ignore them. An exporter should keep them when rewriting a file.
* **Notes and other events that aren't text,** such as Rock Band's practice notes 24, 25 and 26. scan-chart keeps them, and writes them back.

## Invalid forms

<Accordion title="Spaces around the text, or just inside the brackets">
  Clone Hero, YARG and scan-chart read `section Intro` and `[section Intro]`, with spaces around the text, as a practice section. Only YARG reads `[ section Intro]`. scan-chart keeps such text as it is.
</Accordion>

<Accordion title="A practice section name with spaces at its ends">
  Clone Hero and scan-chart keep the spaces: `[section  Intro ]` is a section named `Intro` there. YARG removes them.
</Accordion>

<Accordion title="No separator after section">
  Clone Hero skips the character after `section`, so `[sectionIntro]` is a section named `ntro`. YARG reads a section named `Intro`. scan-chart doesn't read it as a section.
</Accordion>

<Accordion title="A practice section with no name">
  Clone Hero and scan-chart read `[section ]` and `[prc_]` as a section named "", and YARG ignores them.

  Clone Hero also reads `[section]` and `[prc]` as a section named "". YARG and scan-chart ignore both. scan-chart keeps the text.
</Accordion>

<Accordion title="Two practice sections at one tick">
  Clone Hero, YARG and scan-chart use the later one.
</Accordion>

<Accordion title="Lyrics or phrase events in EVENTS">
  Clone Hero ignores them. YARG reads `lyric` events, `phrase_start` and `phrase_end` as lyrics, mixed with the lyrics of `PART VOCALS`. scan-chart reports `invalidLyric`, `invalidPhraseStart` and `invalidPhraseEnd`, and keeps them.
</Accordion>

<Accordion title="A coda with one bracket, after a byte order mark, or in another type of text event">
  A scanner reads a coda as Clone Hero does: only from a text event, `FF 01`, whose text is `coda` or `[coda]`, with nothing around it but white space. So `[coda` and `coda]` aren't a coda, nor is a `[coda]` that starts with a byte order mark, U+FEFF, or a `[coda]` written as a lyric, marker or cue point event. scan-chart reads them so, and keeps them as text. YARG reads neither `[coda` nor `coda]`, but reads a coda after a byte order mark, and in a lyric, marker or cue point event.
</Accordion>

<Accordion title="More than one coda or end">
  Clone Hero and scan-chart use the first `coda` and the first `end`, and YARG uses the first `coda`. YARG looks for `end` among the song's last 10 song-wide events, and uses the last one it finds there. scan-chart reports `badEndEvent` for each `end` after the first. Its export writes a coda at the start of each Big Rock Ending instead of where the file had it, so Clone Hero reads the same Big Rock Endings.
</Accordion>

<Accordion title="An end less than a beat after the last note ends">
  Clone Hero ignores it, and plays until the later of the end of the audio and the end of the last note. YARG uses it when it comes after the end of every note, phrase and lyric, with no one-beat margin. scan-chart reports `badEndEvent` when it comes before the last note starts.
</Accordion>

<Accordion title="A second EVENTS track">
  Every scanner reads the first `EVENTS` track and ignores the others. scan-chart's export leaves them out.
</Accordion>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.