8000 GitHub - keijiro/Minis: Minis: MIDI input extension for Unity Input System
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
/ Minis Public

Minis: MIDI input extension for Unity Input System

License

Notifications You must be signed in to change notification settings

keijiro/Minis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

90 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Minis: MIDI Input Extension for Unity Input System

gif gif

Minis is an extension for the Unity Input System that adds support for MIDI input devices.

System Requirements

  • Unity 2022.3 LTS or later

Currently, RtMidi for Unity supports the following platform and architecture combinations:

  • Windows: x86_64
  • macOS: arm64 (Apple Silicon)
  • iOS: arm64
  • Linux: x86_64
  • Android: arm64
  • Web (requires Web MIDI support)

In addition, there are some platform-specific considerations to keep in mind:

Android

Minis currently does not support the GameActivity entry point. You must select "Activity" as the Application Entry Point in the Player Settings.

There is a known issue with multi-port MIDI devices. keijiro/jp.keijiro.rtmidi#16

Linux

The RtMidi backend requires ALSA (libasound2) on Linux platforms. If Minis does not work, please check that ALSA is installed.

Installation

You can install the Minis package (jp.keijiro.minis) via the "Keijiro" scoped registry using the Unity Package Manager. To add the registry to your project, follow these instructions.

Usage

Input Controls

After installing Minis, MIDI control elements appear under "Other" > "MIDI Device" in the Input System. You can also use the "Listen" button to detect a specific control input.

gif

NOTE – The listener only reacts to notes with a velocity higher than 63. You may need to press the key firmly to trigger detection.

MIDI notes appear as button controls with names like "Note C4". These are pressure-sensitive and output values normalized between 0.0 and 1.0.

MIDI CC messages appear as axis controls with names like "Control 10", and also output normalized values between 0.0 and 1.0.

For more details on using the new Input System, refer to the Input System manual.

MIDI Channels

Minis treats each MIDI channel as a separate input device. Devices are dynamically registered when a MIDI message is received on a new channel.

TIP – The Input System cannot detect a device until it receives a message. Prompt the user to move a control to activate detection.

When multiple MIDI interfaces are connected, channels across all interfaces are handled independently. For example, with two interfaces, you can use up to 32 input devices (16 channels per interface).

MIDI Device Assigner

inspector

The MIDI Device Assigner is a utility for binding MIDI devices to PlayerInput. You can specify a MIDI channel and product name as matching criteria. It assigns the matched device to a PlayerInput component on the same GameObject.

Frequently Asked Questions

Does it support MIDI out?

No, but the underlying backend (RtMidi) does support MIDI output. You can access this functionality directly. See the RtMidi for Unity repository for sample scripts.

0