# jp.keijiro.bolt.minis

> MIDI extension for Bolt visual scripting

Latest version **1.0.1** (published 2020-11-16) · Unlicense license · 0 weekly downloads

## Install

```sh
npm install jp.keijiro.bolt.minis
pnpm add jp.keijiro.bolt.minis
yarn add jp.keijiro.bolt.minis
bun add jp.keijiro.bolt.minis
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2020-11-16 |
| First published | 2020-11-06 |
| Weekly downloads | 0 |
| License | Unlicense |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 14.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 69 |
| Author | Keijiro Takahashi |
| Maintainers | keijiro |
| Keywords | unity |

## Links

- npm: https://www.npmjs.com/package/jp.keijiro.bolt.minis
- Repository: https://github.com/keijiro/BoltMinis
- Homepage: https://github.com/keijiro/BoltMinis#readme
- Issues: https://github.com/keijiro/BoltMinis/issues
- npm.io page: https://npm.io/package/jp.keijiro.bolt.minis

## Dependencies (1)

- [jp.keijiro.minis](https://npm.io/package/jp.keijiro.minis.md) 1.0.8

## Recent versions

- 1.0.1 (latest) — 2020-11-16
- 1.0.0 — 2020-11-06

## README

BoltMinis
=========

![gif](https://i.imgur.com/p6xh9FO.gif)
![gif](https://i.imgur.com/xdNSsu8.gif)

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

[Bolt visual scripting system]:
  https://assetstore.unity.com/packages/tools/visual-scripting/bolt-163802

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

[Minis]: https://github.com/keijiro/Minis

Custom Units
------------

### MIDI Note unit

![note unit](https://i.imgur.com/kGOaAoY.png)

**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](https://i.imgur.com/QuqiPWG.png)

**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.

[Bolt via Asset Store]:
  https://assetstore.unity.com/packages/tools/visual-scripting/bolt-163802

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](https://i.imgur.com/cNxH458.png)

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

![wizard](https://i.imgur.com/wxlvRh7.png)

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

![assembly options](https://i.imgur.com/R87yar0.png)

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](https://i.imgur.com/4RVcaU4.png)

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).

[scoped registry]: https://docs.unity3d.com/Manual/upm-scoped.html

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](https://i.imgur.com/Oo0bkx7.png)

Press Yes to enable it.

### Adding the add-on assembly

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

![assembly options](https://i.imgur.com/R87yar0.png)

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

---
_Source: https://npm.io/package/jp.keijiro.bolt.minis · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
