jp.keijiro.bolt.minis

MIDI extension for Bolt visual scripting

Usage no npm install needed!

<script type="module">
  import jpKeijiroBoltMinis from 'https://cdn.skypack.dev/jp.keijiro.bolt.minis';
</script>

README

BoltMinis

gif gif

BoltMinis is an add-on for Unity's Bolt visual scripting system that adds custom units for handling MIDI input.

It uses Minis as a backend. If you're interested in using MIDI without visual scripting, check the Minis project.

Custom Units

MIDI Note unit

note unit

MIDI Note is a unit for handling MIDI note input. You can specify a MIDI channel and a MIDI note number to which the unit listens.

You can use the Note On/Off ports to hook up a flow to MIDI note events.

The Is-Pressed port outputs true while the specified note is on.

The Velocity port outputs the velocity value on the last note.

MIDI Control unit

control unit

MIDI Control is a unit for handling MIDI control input (CC). You can specify a MIDI channel and a MIDI control number to which the unit listens.

You can use the Changed port to hook up a flow to MIDI control-change events.

The Value port outputs the current value of the control element.

How to try the sample project

This repository doesn't contain the Bolt assets due to the license restriction. You have to import Bolt via Asset Store manually.

You can't use the "Install Bolt" tool due to compilation errors caused by missing file references. You have to manually double-click the Bolt_1_4_X_NET4.unitypackage file in the "Install Bolt" directory instead.

unitypackage

After importing the unitypackage file, it automatically opens the Bolt Setup Wizard.

wizard

On the Assembly Options page, add Bolt.Addons.Minis.Runtime to the assembly list.

assembly options

The sample project shows how to move a sphere using MIDI note input and MIDI control (CC) input. You may want to change the note/CC numbers for your MIDI device.

sample graph

How to install the add-on to an existing project

Installing the package via Package Manager

This package uses the scoped registry feature to resolve package dependencies. Please add the following sections to the manifest file (Packages/manifest.json).

To the scopedRegistries section:

{
  "name": "Keijiro",
  "url": "https://registry.npmjs.com",
  "scopes": [ "jp.keijiro" ]
}

To the dependencies section:

"jp.keijiro.bolt.minis": "1.0.1"

After changes, the manifest file should look like below:

{
  "scopedRegistries": [
    {
      "name": "Keijiro",
      "url": "https://registry.npmjs.com",
      "scopes": [ "jp.keijiro" ]
    }
  ],
  "dependencies": {
    "jp.keijiro.bolt.minis": "1.0.1",
    ...

Enabling the new input system

When importing the package, the system may ask you to enable the new input system.

new input system

Press Yes to enable it.

Adding the add-on assembly

Navigate to "Tools" > "Bolt" > "Unit Options Wizard".

assembly options

Add Bolt.Addons.Minis.Runtime to the assembly list. Then press "Next" and "Generate."