npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@oliego/wavr-midi-controller

v1.0.1

Published

A MIDI controller plugin for WAVR PRO. Connects any Web MIDI device, routes notes, CC, and transport commands. Zero dependencies.

Downloads

222

Readme

@oliego/Wavr-midi-controller

BuyMeACoffee License: AGPL 3.0 Zero Dependencies Web MIDI API Works Standalone

A MIDI controller plugin for WAVR PRO. Connect any hardware MIDI device and route notes, CC, and transport messages to the DAW. Works standalone in any browser or as a registered plugin.

Browser support: Web MIDI API requires Chrome or Edge. Firefox and Safari do not support it natively. A user HTTPS context is required.


SPONSOR: → Oliego.Space - Create without limits!


Install

npm install @oliego/wavr-midi-controller

Zero dependencies. Web MIDI API only.


Quickstart

Standalone

import MidiController from '@oliego/wavr-midi-controller';

const mc = new MidiController({
  onNote: ({ note, velocity, channel, type }) => {
    console.log(`${type}: note ${note}, vel ${velocity}, ch ${channel}`);
  },
  onCC: ({ cc, value, channel }) => {
    console.log(`CC ${cc} = ${value} on ch ${channel}`);
  },
  onTransport: ({ command }) => {
    // command: "start" | "stop" | "continue"
    console.log(`Transport: ${command}`);
  },
});

mc.mount(document.getElementById('midi-panel'));

As a WAVR PRO plugin

import MidiController from '@oliego/wavr-midi-controller';

// Inside WavrPro — register once
pluginManager.register(MidiController);

// Opens as a drawer from the topbar.
// CC 1 (mod wheel) → BPM by default.
// CC 7 → master volume.
// CC 64 (sustain) → transport toggle.

React

import { useEffect, useRef } from 'react';
import MidiController from '@oliego/wavr-midi-controller';

export default function MidiPanel() {
  const ref = useRef(null);

  useEffect(() => {
    const mc = new MidiController({
      onNote: (e) => console.log(e),
    });
    mc.mount(ref.current);
    return () => mc.destroy();
  }, []);

  return <div ref={ref} />;
}

What it does

| Feature | Detail | | --------------- | ------------------------------------------------------------ | | Device picker | Dropdown lists all connected Web MIDI inputs | | Auto-connect | First device connects automatically; reconnects on plug-in | | Channel filter | Listen to all channels or a specific one | | Note display | Piano keyboard (2 octaves) lights up on incoming notes | | CC bars | Live bar graph for 6 common CC numbers | | CC mappings | Map any CC to BPM, master volume, or transport toggle | | Custom mappings | Add/remove CC→target pairs in the UI or via setState() | | Transport | MIDI clock Start/Stop/Continue fires onTransport | | MIDI log | Scrolling live log of every incoming message with timestamps |


API

Constructor

new MidiController({
  onNote,       // ({ note, velocity, channel, type }) => void
  onCC,         // ({ cc, value, channel }) => void
  onTransport,  // ({ command }) => void  — "start" | "stop" | "continue"
  onConnect,    // (MIDIPort) => void
  onDisconnect, // (MIDIPort) => void
})

All options are optional. In plugin-framework mode, pass the hostAPI object instead.

Methods

mc.mount(el)        // Render UI into el, request MIDI access
mc.destroy()        // Detach MIDI listeners, remove UI
mc.getState()       // Returns serialisable state (selected device, CC map, channel)
mc.setState(state)  // Restore from getState() snapshot
mc.onBpmChange(bpm) // Called by host when BPM changes

State format

{
  selectedInputId: "port-id-string",  // Web MIDI input port id
  channel: 0,                          // 0 = all channels, 1–16 = specific
  ccMap: {
    1:  "bpm",              // mod wheel → BPM
    7:  "master_volume",    // channel volume → master vol
    64: "transport_toggle", // sustain → play/pause
  },
  noteThrough: true,    // forward note events to onNote callback
  logSize: 60,          // max log entries kept
}

Default CC mappings

| CC | Default target | Notes | | --- | ------------------ | -------------------------------------------------- | | 1 | bpm | Mod wheel. Maps 0–127 → BPM 60–180. | | 7 | master_volume | Channel volume. Maps 0–127 → 0–100%. | | 64 | transport_toggle | Sustain pedal (127 = pressed). Toggles play/pause. |

Custom targets can be any string. Handle them in your onCC callback.


Browser support

| Browser | Web MIDI API | | ---------- | ------------------------------------------- | | Chrome 43+ | ✅ Supported | | Edge 79+ | ✅ Supported | | Firefox | ❌ Not supported (no native implementation) | | Safari | ❌ Not supported |

In unsupported browsers the plugin renders with a warning message and all callbacks receive no events.

HTTPS is required — navigator.requestMIDIAccess is blocked on http://.


Licence

MIT