webmidi -- for connecting with external midi devices
Uses either the webmidi API or the Jazz plugin
See music21.webmidi
- Source:
Example
smallest usage of the webmidi toolkit. see testHTML/midiInRequire.html <html> <head> <title>MIDI In/Jazz Test for Music21j</title> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> </head> <body> <div> MIDI Input: <div id="putMidiSelectHere" /> </div> <div id="svgDiv"> </div> <script src='music21j.js'></script> <script> s = new music21.stream.Stream(); music21.webmidi.createSelector($("#putMidiSelectHere")); function displayStream(midiEvent) { midiEvent.sendToMIDIjs(); if (midiEvent.noteOn) { var m21n = midiEvent.music21Note(); if (s.length > 7) { s.elements = s.elements.slice(1) } s.append(m21n); var $svgDiv = $("#svgDiv"); $svgDiv.empty(); var svgDiv = s.appendNewDOM($svgDiv); } } music21.miditools.callBacks.general = displayStream; </script> </body> </html>
Requires
- module:music21/miditools
- module:jQuery
Members
-
<static, constant> webmidi :Object
-
Type:
- Object
- Source:
Methods
-
<static> selectionChanged()
-
Function to be called if the webmidi-api selection changes. (not jazz)
- Source:
Type Definitions
-
Jazz
-
Type:
- Object
- Source:
Properties:
Name Type Description isJazz
boolean MidiInOpen
function MidiInClose
function MidiInList
function