Members
-
dhc :HUM.DHC
-
Description
The DHC instance
Details
-
active :boolean
-
Description
The state of the Hancock; if
false, it is turned off.Details
-
settings :Object
-
Description
Default Qwerty Hancock settings
Properties
Name Type Description idstring Id of the htmlElement in which to put the keyboard
widthnumber Width of the keyboard in pixels
heightnumber Height of the keyboard in pixels
octavesnumber How many octaves to show
startNotestring The note name (hancock numbering) of the first key to show
whiteNotesColourstring Default released key color for white keys (bypassed by classes & css)
blackNotesColourstring Default released key color for black keys (bypassed by classes & css)
hoverColourstring Default pressed-key color for all the keys (bypassed by classes & css)
velocityvelocity The velocity value to be used when sending messages; an integer between 1 and 127
channelmidichan The Channel to be used when sending messages; an integer between 0 and 15
Details
-
uiElements :Object
-
Description
UI HTML elements
Properties
Name Type Description fnObject.<string, HTMLElement> Functional UI elements
inObject.<string, HTMLElement> Input UI elements
outObject.<string, HTMLElement> Output UI elements
Details
-
keyboard :QwertyHancock
-
Description
The instance of Qwerty Hancock piano keyboard
Details
Methods
-
updatesFromDHC( msg )
-
Description
Manage and route an incoming message
Parameters
Name Type Description msgHUM.DHCmsg The incoming message
Details
-
sendMidiNote( note, state )
-
Description
Send a fake MIDI event note ON/OFF directly to midi.in
in order to input Qwerty Hancock as a virtual MIDI deviceParameters
Name Type Description notestring Hancock note name (e.g. G#5)
state0 | 1 0 is Note-OFF | 1 is Note-ON
Details
-
drawKeymap()
-
Description
Bypass the Qwerty Hancock default key colors (released).
Write the key-numbers according to the keymap.Details
-
fitToKeymap()
-
Description
Adapt the Hancock UI parameters in order to fit the keymap to the piano width.
Details
-
keyON( ctrlNum )
-
Description
Bypass the Qwerty Hancock default key colors and set the right color for Note-ON message.
Parameters
Name Type Description ctrlNummidinnum MIDI note number
Details
-
keyOFF( ctrlNum )
-
Description
Bypass the Qwerty Hancock default key colors and set the right color for Note-OFF message.
Parameters
Name Type Description ctrlNummidinnum MIDI note number
Details
-
allNotesOff()
-
Description
Turns off all the keys (from
midinnum0 to 127)Details
-
update()
-
Description
Update the Qwerty Hancock keyboard on UI setting changes
Details
-
changeOffset( midikey )
-
Description
Set the offset of the Qwerty Hancock and update the UI.
The piano keyboard will start from the given note to the right.Parameters
Name Type Description midikeymidinnum MIDI note number representing a piano key
Details
-
changeRange( octaves )
-
Description
Set the octave-range of Qwerty Hancock and update the UI
Parameters
Name Type Description octavesnumber Number of octaves to show
Details
-
changeSize( pixels, dim )
-
Description
Modify the size of Qwerty Hancock and update the UI
Parameters
Name Type Description pixelsnumber Number of pixels
dim'w' | 'h' The dimension to change; 'w' is for weight, 'h' is for height
Details
-
_initUI()
-
Description
Initialize the UI of the Hancock instance
Details