Members
-
dhc :HUM.DHC
-
Description
The DHC instance
Details
-
midi :HUM.midi.MidiHub
-
Description
The MidiHub instance
Details
-
midiAccess :MIDIAccess
-
Description
The global MIDIAccess object
Details
-
webMidi :Object
-
Description
Namespace for WebMidiLink
Properties
Name Type Description inputHUM.midi.WebMidiLinkIn The WebMidiLinkIn instance
outputsObject.<string, HUM.midi.WebMidiLinkOut> An array containing all the WebMidiLinkOut instances; the key is the HUM.midi.WebMidiLinkOut#id
outQtynumber How many WebMidiLinkOut instances must be created (integer)
Details
-
selectedOutputs :Map.<string, MIDIPort>
-
Description
The global map of selected MIDI outputs
Details
-
atLeastOneMidi :Object
-
Description
Data structure to keep track of how many ports are available and how many are used.
Just used to inform the user about the current MIDI port situation and give the right advices.Properties
Name Type Description availablePortObject Available ports namespace
Name Type Description inputnumber Number of available input ports
outputnumber Number of available output ports
openPortObject Open ports namespace
Name Type Description inputnumber Number of open input ports
outputnumber Number of open output ports
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
Methods
-
_postRequestMIDI()
-
Description
Inintialize the WebMidiLink Output and make accessible the UI modal panel
Details
-
_initWebMidiLinkOut()
-
Description
Inintialize the WebMidiLink Output
Details
-
_onMidiReject( error )
-
Description
What to do on MIDI Access error, if MIDIAccess exist but there is another kind of problem
Parameters
Name Type Description errorDOMException Possible error
Details
-
_onMidiInit( midiAccess )
-
Description
What to do on MIDI Access, when MIDI is initialized
Parameters
Name Type Description midiAccessMIDIAccess The MIDIAccess object; see the Web MIDI API specs
Details
-
openMidiPanel()
-
Description
Open the MIDI I/O modal panel on UI
Details
-
portLogger( midiPort )
-
Description
Log on the Event Log the informations about a single input or output port
Parameters
Name Type Description midiPortMIDIPort The MIDI port
Details
-
createPortCheckbox( midiPort, htmlElement )
-
Description
Create a single checkbox and its label in a div.
Assign the onclick event to the the checkbox.Parameters
Name Type Description midiPortMIDIPort The MIDI port; see the Web MIDI API specs
htmlElementHTMLElement The 'div' containers of the ports on UI ('this.uiElements.out.inputPorts' or 'this.uiElements.out.outputPorts')
Details
-
portSelect( event )
-
Description
If an Input port has been selected, open that port and start to listen from it.
If an Output port has been selected, start to send MIDI messages to that port.
The function is invoked when a HTML checkbox has been clicked.Parameters
Name Type Description eventEvent OnClick event on the MIDI I/O Ports checkboxes
Name Type Description targetObject The event's target HTML element (could be just a namespace)
Name Type Description checkedboolean Checkbox checked or not
Details
-
midiStateRefresh( event )
-
Description
Midi State Refresh for hot (un)plugging
Update the informations about the state of the MIDI ports/devices in the HTML UIParameters
Name Type Description eventMIDIConnectionEvent Event from MidiAccess.onstatechange; see the Web MIDI API specs
Name Type Description portMIDIPort The MIDI Port; see the Web MIDI API specs
Details
-
checkAtLeastOneMidi( xPut, isOpen )
-
Description
Check if there is at least one available MIDI port (Input or Output)
Check if there is at least one open MIDI port (Input or Output)Parameters
Name Type Description xPut'i' | 'o' | 'io' Check for Input ('i'), Output port ('o') or both ('io')
isOpenboolean false: Check if there are ports selected and used by the user
true: Check if there are available portsDetails