notator / WebMIDISynthHost

Hosts software Web MIDI Synths that implement a superset of the Web MIDI API Output Device interface.
Other
18 stars 3 forks source link

Determining support for General MIDI #20

Open notator opened 8 years ago

notator commented 8 years ago

I've added an optional boolean supportsGeneralMIDI attribute to WebMIDISynths.

If this attribute is defined, and is true, then

  1. both COMMAND.PATCH and CONTROL.BANK MUST be defined.
  2. GM patch names usefully decribe the sounds of patches in bank 0. (GM patch names are returned by WebMIDI.constants.generalMIDIPatchName(patchIndex). )
  3. when the channel index is 9, GM percussion names usefully describe the sounds of the corresponding notes. (GM percussion names are returned by WebMIDI.constants.generalMIDIPercussionName(noteIndex). )
  4. the synth MAY define the following function: boolean patchIsAvailable(patchIndex). On their own, conditions 1-3 do not guarantee that a particular patch can be set.
  5. the synth MAY define the function: void setSoundFont(soundFont). WebMIDISynths could support GM without using soundfonts, or using only a single soundfont that can't be changed.

This issue/solution applies only to software WebMIDIsynths, but it is closely related to WebMDIAPI issue 110.

See also [issue #13]