Maestro - Midi Player Tool Kit for Unity
Version 2.18.2
Easily and Quickly Add or Create MIDI Music To Your Unity App and have a fulll interaction with it.
Migration Helper to version 2.11 and above
-
Discord backup.
Loading...
Searching...
No Matches
Core Synth Concepts
Synth Engine (MidiSynth)
Core behavior, lifecycle, and shared architecture of MidiSynth.
Core behavior, lifecycle, and shared architecture of MidiSynth.
MPTK Synth Overview
Core Concept
MidiSynth is the shared sample-based SoundFont synthesizer (C# port/adaptation of FluidSynth) used by all playback prefabs.
Classes such as
MidiPlayerTK::MidiFilePlayer
,
MidiPlayerTK::MidiStreamPlayer
,
MidiPlayerTK::MidiInReader
,
MidiPlayerTK::MidiListPlayer
, and
MidiPlayerTK::MidiExternalPlayer
inherit MidiSynth, exposing its properties and methods.
The synth loads a SoundFont, processes MIDI events, allocates voices, applies SoundFont or Unity effects, and renders audio.
FluidSynth Heritage and Unity Adaptation
The DSP and SoundFont synthesis model originates from FluidSynth and is adapted in C# for Maestro MPTK.
Audio rendering is integrated with Unity playback flow, including AudioSource-compatible usage.
MIDI scheduling and audio processing are coordinated with Unity runtime constraints.
MPTK adds real-time control extensions for interactive and gameplay-driven music systems.
Accessing Synth Features
Common properties: MPTK_Volume , MPTK_Transpose , MPTK_SynthRate.
Reinitialize channels/modulators when swapping SoundFonts:
MidiPlayerTK::MidiSynth::MPTK_InitSynth
.
Performance tuning:
MidiPlayerTK::MidiSynth::MPTK_ThreadMidiPriority
,
MidiPlayerTK::MidiSynth::MPTK_ThreadMidiWait
,
MidiPlayerTK::MidiSynth::MPTK_AutoBuffer
.
Related runtime module
Runtime Control and Performance
Lifecycle
Prefab loads and creates a MidiSynth instance.
MidiPlayerTK::MidiSynth::MPTK_InitSynth
prepares channels, voices, and modulators.
MIDI sequencer feeds events (file, stream, or external input).
Voices are rendered in OnAudioFilterRead; statistics available via fields such as MidiPlayerTK.MidiSynth.StatAudioFilterReadMS .
Related Topics
Maestro Pro additions:
Maestro Pro Features
Pro runtime module:
Pro Runtime Extensions
Spatial audio module:
Spatial Audio and Attenuation
Spatial workflow:
Add 3D Orientation and Attenuation
SoundFont management:
SoundFont Management
Audio settings and latency:
MidiPlayerTK::MidiSynth
(Audio Settings section in class docs)
Generated by
1.16.1