BB.MidiDevice

A class for recieving input from Midi controllers in the browser using the experimental Web MIDI API. This constructor returns true if browser supports Midi and false if not.

NOTE: This implementation of BB.MidiDevice currently only supports using one MIDI device connected to the browser at a time. More than one may work but you may run into note clashing and other oddities.

Index

Properties

Methods

Constructor

BB.MidiDevice
(
  • midiMap
  • success
  • failure
)

Parameters:

  • midiMap Object

    An object with array properties for knobs, sliders, buttons, keys, and pads.

  • success Function

    Function to return once MIDIAccess has been received successfully.

  • failure Function

    Function to return if MIDIAccess is not received successfully.

Properties

inputs Object

Dictionary of Midi input object arrays. Includes sliders, knobs, buttons, pads, and keys (only if they are added in the midiMap passed into the constructor).

midiAccess MIDIAccess default:null

The Web MIDI API midiAccess object returned from navigator.requestMIDIAccess(...)

There are no properties that match your current filter settings. You can change your filter settings in the index section on this page. index

Methods

on
(
  • name
  • callback
)

Assigns event handler functions. Valid events include: connect, disconnect, message.

Parameters:

  • name String

    Event name. Supports "connect", "disconnect", and "message".

  • callback Function

    Function to run when event occurs.

There are no methods that match your current filter settings. You can change your filter settings in the index section on this page. index