new WebMidiLinkOut( key, id, dhc, midi )

Description

The WebMidiLinkOut port class.

Manage WebMidiLink output messages.

Parameters
Name Type Description
key number

The internal number for the new virtual MIDI port (integer). It will be the port number on the UI.

id string

The id for the new virtual MIDI port.
The prefix should be like "webmidilink_out_", ending with the key number.

dhc HUM.DHC

The DHC instance to which it belongs.

midi HUM.midi.MidiHub

The MidiHub instance to which it belongs.

Members


<static> g200kgSynthList :Array.<WmlSynth>

Description

The original g200kg's synthlist

Details
Array.<WmlSynth>

<static> adhocSynthList :Array.<WmlSynthHum>

Description

The Harmonicarium's adhoc synthlist (internal)

Details
Array.<WmlSynthHum>

dhc :HUM.DHC

Description

The DHC instance

Details

midi :HUM.midi.MidiHub

Description

The MidiHub instance

Details

id :string

Description

The id of this virtual MIDI port.

Details
string

manufacturer :string

Description

The manufacturer of this virtual MIDI port.

Details
string

name :string

Description

The name of this virtual MIDI port with the key number.

Details
string

state :string

Description

The state of this virtual MIDI port.

Details
string

type :string

Description

The type of this virtual MIDI port.

Details
string

key :number

Description

The internal (and UI) number this virtual MIDI port (integer).

Details
number

uniqKey :string

Description

The external id this virtual MIDI port. It must be unique.
It should contain the DHC id and the key.

Details
string

synthWindow :Object

Description

The Window-like object of the page that has been opened by this HUM instace

Details
Object

isReady :boolean

Description

The current state of the "Synth" application that has been opened
true if the "Synth" app sent the "ready" message
(not used yet)

Details
boolean

synthList :'adhocSynthList'|'g200kgSynthList'

Description

What synthlist to use.

  • 'adhocSynthList': An updated and reordered list; apps no longer reachable have been removed.
    In this list there are some extra properties that indicate some useful information for re-tuning.
  • 'g200kgSynthList': The original synthlist from g200kg site (see: SynthList - JSONP)
    To use the 'g200kgSynthList', uncomment one of the two scripts in the "./index.html" file, as explained here: SynthListCallback
Details
'adhocSynthList' | 'g200kgSynthList'

uiElements :Object

Description

UI HTML elements

Properties
Name Type Description
fn Object.<string, HTMLElement>

Functional UI elements

in Object.<string, HTMLElement>

Input UI elements

out Object.<string, HTMLElement>

Output UI elements

Details
Object

Methods


_initUI()

Description

Initialize the UI of the WebMidiLinkOut instance

Details

openPort()

Description

Show the port's URL loader to the user and start check for the "Synth" window state.
To be used when the user check the port checkbox.

Details

closePort()

Description

Hide the port's URL loader to the user, close the "Synth" window (if open), stop check for its state and and change the status on the UI to "NOT LOADED".
To be used when the user uncheck the port checkbox.

Details

load( url )

Description

Show an alert to the user, load the given URL in a new window and start check for the "Synth" window state.

Parameters
Name Type Description
url string

The URL of the "Synth" instrument

Details

unload()

Description

Close the "Synth" window (if open) and change the status on the UI to "NOT LOADED"

Details

send( msg )

Description

Send a "Link Level 0" WebMidiLink message to the "Synth" instrument window.
"Link Level 0" means a simple MIDI message.

Parameters
Name Type Description
msg Uint8Array

The message, an array of integers between 0 and 127.


sendMessage( fullMsg )

Description

Send a complete WebMidiLink message to the "Synth" instrument window.

Parameters
Name Type Description
fullMsg wmlmsg0 | wmlmsg1

The message


startStateCheck()

Description

Start check for the "Synth" window state every 1500ms. If the windows Synth is close, change the status on the UI to "NOT LOADED".

Details

stopStateCheck()

Description

Start check for the "Synth" window state.

Details

becomeReady()

Description

Change the status on the UI if the Synth is loading or is ready (and Link Level 1 enabled).

Details