2021年8月14日土曜日

MIDI Plugin for Mobile and Desktop (Unity Asset) — 2026 update

Last updated: 2026-09-27 · Asset version: 2.0.3

MIDI Plugin for Mobile and Desktop — Asset Store cover

MIDI Plugin for Mobile and Desktop (Unity Asset Store)

Documentation (no purchase required): Full manuals are published on the supports repository — start at documents/index.md or the combined PDF/Markdown listed in that README (English / 日本語 / 中文).

After you buy the asset, the same content also ships under Assets/MIDI/documents/ in the package. Prefer whichever copy matches your installed version. This blog post is an introduction only.

Quick links

I publish MIDI Plugin for Mobile and Desktop on the Unity Asset Store. It adds MIDI input/output, SMF play/record, and related transports to Unity projects — on mobile, desktop, Editor, WebGL, and more.

This post introduces the plugin. For platform matrices and APIs, use the public documentation (or the same files inside the package after purchase).

What this plugin is (and is not)

Is Is not
MIDI I/O and message routing A built-in synthesizer / SoundFont player
SMF / sequencer helpers A replacement for DAW audio engines
Optional integration with Maestro MPTK for sound Required to buy MPTK (sound is optional)

If you need audible notes in the Editor or on device, pair this plugin with a sound source (for example Maestro MIDI Player Tool Kit), or drive your own audio from Note On events.

Platforms (summary)

Current support includes (details and caveats in platforms.md):

Area Examples
Mobile iOS, Android (including Meta Quest)
Desktop / Editor Windows, macOS, Linux — Unity Editor Play Mode supported
Web WebGL (USB / BLE via WebMIDI where the browser allows)
Transports USB MIDI, Bluetooth MIDI (BLE), Network / RTP-MIDI, Nearby, Inter-App MIDI (platform-dependent)
Protocols MIDI 1.0, MIDI 2.0 / UMP (platform-dependent; see docs)

Historical note: When this article was first written (2021), the product focused on mobile builds and did not run in the Unity Editor. From v1.3.0 onward, Standalone and Unity Editor (Windows / macOS / Linux) are supported. Please ignore any older statement that “the plugin doesn't work with Unity Editor.”

Install

  1. Install from the Unity Asset Store.
  2. Open a sample under Assets/MIDI/Samples/Scenes/ (start with MidiSampleScene.unity or the sample menu: Window → MIDI → Samples).
  3. For Editor testing: enter Play Mode, then open Window → MIDI → Monitor to watch messages.
  4. For device builds: switch platform (iOS / Android / Standalone / WebGL / UWP), build, and run on hardware when you need real USB/BLE devices.

Before purchasing, you can read the full Getting Started and platform matrix on GitHub.

Recommended Unity: follow the Asset Store listing (currently 2022.3+ lineage for the published package).

MidiSampleScene

The sample shows:

  • Left: device selection and send controls
  • Right: received MIDI messages

MidiSampleScene — device list, send controls, and received MIDI log

Initialization lives around MidiManager.InitializeMidi. Device attach/detach uses IMidiDeviceEventHandler. Device names come from MidiManager.GetDeviceName (may be empty until the name is known).

Connect MIDI devices

Android

  • USB / Bluetooth MIDI devices are discovered and listed (permissions and Companion Device options apply — see docs).

iOS / macOS

  • Network MIDI and USB/BLE follow Apple Core MIDI behavior; BLE selection UI appears when scanning.

Windows / Linux / WebGL

  • See platforms.md for what is ○ / △ / unsupported (e.g. Windows BLE MIDI is not supported yet).

Sending MIDI events

MidiManager.Instance.SendMidiNoteOn(
    "deviceId",
    0 /*group*/,
    0 /*channel*/,
    60 /*note*/,
    127 /*velocity*/
);

Fluent helper:

using jp.kshoji.unity.midi.util;

MidiSend.ToFirstOutput().Channel(0).NoteOn(60, 127);

Receiving MIDI events

Implement handler interfaces (for example IMidiNoteOnEventHandler) on a MonoBehaviour, register with MidiManager.Instance.RegisterEventHandleObject(gameObject), then call InitializeMidi. Full snippets: getting-started.md (same file ships in the package).

VR (Meta Quest)

Android-based headsets such as Meta Quest work with the Android backend. You can drive real MIDI hardware from VR objects and the reverse. For USB MIDI / BLE on Quest, follow Build PostProcessing notes (including GameActivity / Companion Device).

Open source dependencies

Parts of the package rely on open-source libraries (many by the same author). Issue reports and feature requests are welcome on GitHub — start at the supports repository.

Examples:

(Full list: contacts.md.)

0 件のコメント:

コメントを投稿