This is an experimental Web MIDI application that gives a single performer control over the performance
of a music score displayed in a browser.
The application uses MIDI input and output devices, and scores stored in a
special SVG format which has been enhanced to
contain MIDI information.
It is written in HTML5 and Javascript, and is being developed as open source software on GitHub.
The application is normally tested in the latest version of Chrome on Windows 10.
Firefox testing will resume when they have completed their implementation of the Web MIDI API (currently in the pipeline).
In a related project, I am currently developing a Resident Sf2 Synth (also on GitHub). This is a software synthesizer that can be sent MIDI messages by any host software, providing that the host and the synth reside on the same web site. The synth uses the Web Audio API, but implements the MIDIOutput interface of the Web MIDI API, so it can be used even if the browser does not support the Web MIDI API. (There is, however, currently an issue with Firefox's timing...)
Browser support for the APIs can be checked at check Web MIDI API and check Web Audio API.
Note that it is not possible to display or play scores in this application unless a MIDI output device has been selected.
Scores and recordings can however be found via the link that appears when a score is selected.
Currently, the only scores that can be played on the Resident Sf2 Synth are the Pianola Music (1967) and Study 1 (2005).
All the other scores require hardware or software output devices that are (or depend on) plugins.
The free Virtual MIDI Synth can be installed and used on Windows.
The user's (hardware or plugin) MIDI input and output devices can be accessed as follows:
In Chrome: "out of the box". Chrome (v43 and
later), supports the Web MIDI API natively.
In Firefox: by installing the Jazz plugin. (This is not currently being tested.)
Firefox does not currently implement the Web MIDI API natively.
Users need to install the Jazz plugin (which works with Chris Wilson's
Web MIDI API Polyfill). The polyfill is included with the
Assistant Performer's code.
A description of how the MIDI information is embedded in the (SVG) score files can be found in a
Moritz issue on GitHub.
The
SVG Score Extensions
document is not currently up to date (22.03.2017).
Note that Moritz'
Assistant Composer automatically creates
two versions of each score: as a continuous scroll, and on separate pages. The scroll version uses space more efficiently on screen in the Assistant Performer, the separate pages are useful for printing (e.g. from a browser). The
Assistant Performer can, however, play both score types.
When a score and a MIDI output device have been selected, a clickable button
appears below the selectors.
An input device can only be selected if the score was designed for use with a MIDI input device.
The MIDI information contained in a score can be performed even if the score was designed for
use with a MIDI input device, and no
such device has been selected.
When the button is clicked, the opening page disappears, and the score is displayed
with the following controls at the top of the screen (from left to right):
- Tracks Control: Each voice in the score has a
control for turning it on or off. The toggles are in voice order, from top to bottom of the score. There can be either one or two voices per staff. Voices and/or staves are greyed out when turned off.
- Speed Control: The speed can be changed before or during non-conducted performances. In conducted performances, the speed control affects the relation between the conductor's speed and the speed of the time pointer (for more about conducted performances see the control below).
- Performance Controls:
- : This control changes into a pause button while the score is performing. Click the pause button to pause a
running performance. Click it again to resume.
- : stops a performance. The Save button appears (see below).
- : Selects the set start marker tool. A click on the score with this tool moves the position of the start marker. To deselect the tool, click
the Set Start marker button again.
- : Works in the same way as the Set Start Marker tool.
- : Sends the start marker to the beginning of the score.
- : sends the end marker to the end of the score.
- : Toggles conducting mode on or off. When this mode is turned on, a time-pointer appears at the start marker. The time-pointer is like the running marker used in non-conducted performances, but it is blue, has an arrow at the top left, and will be under the conductor's control. When the conductor's cursor is moved into the area below the performance controls, it changes to a special shape (a blue circle) and conducting begins.
The distance moved by the conductor's cursor (in any direction) is
converted to milliseconds, using both the ms/px value at the current position of the time-pointer, and the value of the speed control. If the speed control is set to 100%, the time-pointer will therefore move at the same speed as the conductor's cursor.
To exit conducting mode, click the left mouse key or click the button again.
- : This button is not initially visible, but appears when a performance ends (i.e. when the button is
clicked). Clicking this button saves the performance, as a Standard MIDI File. On Windows, the file is saved to the
user's "Downloads" folder.
-
: takes the user back to the application's opening page.
If an input device has been selected when the button is clicked, the
program assumes that the device is going to be used immediately, so the
button is clicked automatically. The program then waits for live MIDI input events.
If the controls need to be changed, just click the button, set the controls
and click the button again.