Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/jazz-soft/jazz-midi-vscode

MIDI for VSCode
https://github.com/jazz-soft/jazz-midi-vscode

midi midi2 vscode web-midi

Last synced: about 1 month ago
JSON representation

MIDI for VSCode

Awesome Lists containing this project

README

        

# jazz-midi-vscode

[![npm](https://img.shields.io/npm/v/jazz-midi-vscode.svg)](https://www.npmjs.com/package/jazz-midi-vscode)
[![npm](https://img.shields.io/npm/dt/jazz-midi-vscode.svg)](https://www.npmjs.com/package/jazz-midi-vscode)
[![jsDelivr](https://data.jsdelivr.com/v1/package/npm/jzz-synth-osc/badge)](https://www.jsdelivr.com/package/npm/jazz-midi-vscode)
[![build](https://github.com/jazz-soft/jazz-midi-vscode/actions/workflows/build.yml/badge.svg)](https://github.com/jazz-soft/jazz-midi-vscode/actions)
[![Coverage Status](https://coveralls.io/repos/github/jazz-soft/jazz-midi-vscode/badge.svg?branch=main)](https://coveralls.io/github/jazz-soft/jazz-midi-vscode?branch=main)

## MIDI for VSCode

Enable MIDI in your [VSCode](https://code.visualstudio.com) extensions.

( see also: [jazz-midi-electron](https://github.com/jazz-soft/jazz-midi-electron) ... )

[![](https://raw.githubusercontent.com/jazz-soft/jazz-midi-vscode/main/demo/demo.png)](https://github.com/jazz-soft/jazz-midi-vscode/tree/main/demo)

## Install
`npm install jazz-midi-vscode --save`

## Usage
( see the [Demo Project](https://github.com/jazz-soft/jazz-midi-vscode/tree/main/demo) above... )

### Backend

```js
const JZZ = require('jzz');
// jazz-midi-vscode is not required for the Backend
// ...
JZZ().openMidiOut() // ...
```
Backend sees all MIDI ports that would be available in normal node application.
It can also create virtual MIDI ports.

### WebView

```html

// ...
JZZ().openMidiOut() // ...
```
```js
// when creating the WebView:
const JMVSC = require('jazz-midi-vscode');
// ...
panel = vscode.window.createWebviewPanel( ..., { enableScripts: true });
JMVSC.init(panel);
panel.webview.html = `...`;
// ...
```
WebView will see all MIDI ports (including virtual) available to the backend.
It can create additional Web Audio and HTML-based MIDI ports
(see [jzz-synth-tiny](https://github.com/jazz-soft/JZZ-synth-Tiny) and [jzz-input-kbd](https://github.com/jazz-soft/JZZ-input-Kbd)).