Tame the Web MIDI API. Send and receive MIDI messages with ease. Control instruments with user-friendly functions (playNote, sendPitchBend, etc.). React to MIDI input with simple event listeners (noteon, pitchbend, controlchange, etc.).
WebMidi.supported
not necessarily returning boolean
(#417)This is a maintenance release with a few fixes and clarifications.
Output.channelAfterTouch()
(#401) (19faf782b)Output.clear()
method (43b6285e1)sendAllNotesOff()
(dd91df456)This version is a minor release that fixes an issue that appeared in Node.js v21+
Fixes minor bug when calling WebMidi.disable()
(issue #361)
playNote()
method nows correctly sends noteoff messages when the notes are specified as an array. Thanks to @tobyhede for the fix!OutputChannel.playNote()
now properly sends a note off when the duration is specified via the Note
object (issue #337).
This is a minor release that fixes a type issue with the new Utilities.getCcNumberByName()
method. Thanks to @tobyhede for submitting PR #335.
This version updates the control change message infrastructure. It is now possible to listen to specific control change messages by using the form controlchange-volumecoarse
.
There is now a Enumerations.CONTROL_CHANGE_MESSAGES
array that contains more information than before about control change messages. Here's what the array looks like:
[
{
number: 0,
name: "bankselectcoarse",
description: "Bank Select (Coarse)",
position: "msb"
},
{
number: 1,
name: "modulationwheelcoarse",
description: "Modulation Wheel (Coarse)",
position: "msb"
},
// etc.
]
Note that if your code references the Enumerations.MIDI_CONTROL_CHANGE_MESSAGES
enum, you will get a deprecation warning in the console, but it will continue to work until version 4. From now on, you should use the Enumerations.CONTROL_CHANGE_MESSAGES
array.
In some edge cases, it is possible that this version will demand an update to your code. Here are the potential problem areas:
If you are using the Utilities.getCcNameByNumber()
method you may get different controller names than before for the following controllers: 16, 17, 18, 19, 39, 64, 66, 69, 72, 73, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 88, 91, 92, 93, 94, 95, 96, 97.
Controller names have been updated to reflect the current state of the MIDI specification. If you are listening to the general rpn
or nrpn
events, the subtype
property of the event may have changed.
Some control change messages (98, 99, 100 and 101) were incorrectly identified (see issue #325). They are now properly labeled as:
nonregisteredparameterfine
nonregisteredparametercoarse
registeredparameterfine
registeredparametercoarse