Maestro - Midi Player Tool Kit for Unity Version 2.18.2
Loading...
Searching...
No Matches
MidiFilePlayer Overview

Understand the role of MidiFilePlayer in Maestro MPTK.

MidiFilePlayer is the high-level component used to play complete MIDI files with the MidiFilePlayer prefab. It is suitable for simple playback driven entirely from the inspector, but it also exposes a scripting API for interactive and gameplay-oriented scenarios.

Typical use cases include:

  • selecting a MIDI by name or index,
  • playing or looping a track,
  • changing speed,
  • seeking by time or by tick,
  • receiving callbacks at start, end, or on groups of MIDI events,
  • preloading a MIDI to inspect or modify its events before playback.

MidiFilePlayer inherits from MidiSynth, so playback-oriented features are documented here, while sound generation and channel processing are inherited from MidiSynth.

Quick Start

  • Add the MidiFilePlayer prefab to the scene.
  • Choose a MIDI from the MidiDB (name or index).
  • Call MPTK_Play().

When to Use MidiFilePlayer

Prefer MidiFilePlayer when:

  • you play complete songs from MIDI files,
  • transport controls (play/pause/seek/loop) are central,
  • timeline information is needed for UI or gameplay synchronization.
See also
MidiFilePlayer
Loading and Inspecting MIDI Content
Playback Control Workflow