Turn MIDI files into rhythm game charts in Unity

By BennyKok, creator of Rhythm Game Starter · Updated 2026-10-22

If you make music, you already own a powerful chart editor: your DAW. A MIDI track that lines up with your song is a rhythm game chart: each note has a start time, a length and a pitch. This guide shows how to use that in Unity, with Rhythm Game Starter's MIDI workflow as the worked example.

Why chart with MIDI

  • You chart against the real waveform with the grid, quantise and zoom tools you already know.
  • Note length maps naturally to hold notes, and pitch maps to lanes.
  • Changing a chart means re-exporting one file, with no manual data entry in Unity.

Step 1: Lay out lanes as pitches

Choose one pitch per lane. Rhythm Game Starter's default mappings use white keys:

  • 4 lanes: C, D, E, F
  • 6 lanes: C, D, E, F, G, A

A Midi Track Mapping asset (Create → Rhythm Game → Mapping → Midi Track Mapping) lets you pick other notes or octaves. If your DAW numbers octaves differently, set the reference root octave on the mapping (the library default is 4) or turn on "ignore octave".

Step 2: Name the files so Unity can pair them

Export the MIDI and the audio side by side into your Unity project. When a .mid file is imported, the template creates a SongItem chart asset automatically and links the audio file with the same name. Put the tempo in the MIDI file name and it is picked up as the song's BPM:

Assets/Songs/
  Neon Run 128bpm.mid   ->  creates "Neon Run.asset" with BPM 128
  Neon Run.mp3          ->  linked as the song's audio (.mp3 or .wav)

Re-importing the MIDI updates the existing chart instead of creating a duplicate, so you can edit in the DAW, export, and see the result immediately.

Step 3: Choose note types per pitch

A Note Prefab Mapping asset decides which prefab each MIDI note becomes (tap, long press or swipe) by note name and octave. MIDI note length carries through to hold notes. Each SongItem can override both mappings, so one song can use a 6-lane layout with swipes while another stays on four plain lanes.

Step 4: Fine-tune in the Sequence Editor

Open Tools → Rhythm Game → Sequence Editor to view the imported chart on a grid, move notes, and add notes that are easier to place by eye than in the DAW. You can also skip MIDI entirely and chart from scratch here, or record a first pass by tapping along with the Note Recorder and tidy it afterwards.

Common problems

  • Notes land in the wrong lanes: your DAW's octave numbering differs. Adjust the reference root octave or ignore octave.
  • Notes drift late or early across the song: the BPM doesn't match the project tempo, or the audio was exported with leading silence that the MIDI doesn't have.
  • No audio linked: the audio name must match the MIDI name with the BPM part removed, as a .mp3 or .wav.

Get the MIDI workflow

The MIDI importer, Sequence Editor, Note Recorder and the full gameplay engine come with Rhythm Game Starter, with full C# source and Unity 6 support. New to the engine side? Start with how to make a rhythm game in Unity.

Skip the boilerplate

Rhythm Game Starter: the complete Unity rhythm game template, with full source, MIDI import and a sequence editor. Unity 6 ready.

Get it for $38