music21j -- Javascript reimplementation of Core music21p features.
music21/keyboard -- PianoKeyboard rendering and display objects
Copyright (c) 2013-18, Michael Scott Cuthbert and cuthbertLab
Based on music21 (=music21p), Copyright (c) 2006–17, Michael Scott Cuthbert and cuthbertLab
Keyboard module, see music21.keyboard
namespace
- Source:
Example
Minimum usage: const kd = document.getElementById('keyboardDiv'); const k = new music21.keyboard.Keyboard(); k.appendKeyboard(kd, 6, 57); // 88 key keyboard // configurable: k.scaleFactor = 1.2; // default 1 k.whiteKeyWidth = 40; // default 23
Requires
- module:music21/pitch
- module:music21/common
- module:music21/miditools
- module:jquery
- module:MIDI
Classes
Methods
-
<static> jazzHighlight(e)
-
highlight the keyboard stored in "this" appropriately
Parameters:
Name Type Description e
music21.miditools.Event - Source:
Example
var midiCallbacksPlay = [music21.miditools.makeChords, music21.miditools.sendToMIDIjs, music21.keyboard.jazzHighlight.bind(k)];
-
<static> triggerToggleShow(e)
-
triggerToggleShow -- event for keyboard is shown or hidden.
Parameters:
Name Type Argument Description e
Event <optional>
- Source: