xmlplay
xmlplay is a javascript program that renders a score file (MusicXML or ABC) and plays the music
using real time synthesis in the browser. For each musical voice it displays a cursor in the score
that highlightes notes as they are played.
All software is javascript running in the browser.
Features:
- The score is rendered as SVG (Scalable Vector Graphics) with
abc2svg
- Reads ABC or MusicXML (on the fly translated to ABC with
xml2abc-js)
- Plays the music with real time synthesis in the browser.
- Can also play the music with pre-rendered wave forms.
Real time synthesis
xmlplay implements a synthesizer using soundfonts in real time.
Every played note is synthesized from a sample, applying volume envelope, modultated filter, vibrato and tremolo as needed.
Technically speaking xmlplay implements a synthesizer for
SF2 soundfonts.
- Geneva Old Style with real time sf2 synthesis in the browser
- Prelude BWV 539 with real time sf2 synthesis in the browser
- Palace of Twelve Phases, fragment from
The House at Windy Corner
- Marching Drum Cadences (from https://musescore.com/krazsk2/cadences)
- xmlplay.html Try out your own score.
Pre-rendered single notes
xmlplay can also play the music with pre-rendered wave forms.
For every single note a 3 second wave form has been recorded off-line (using FluidSynth) as a short mp3 file.
Playback now does not synthesize at all but just plays these 3 second mp3's for every sounding note.
(known as midi-js, see here and
here)
You can compare the resulting sound with the real time synthesis above.
- Geneva Old Style
no synthesis but large pre-rendered waveforms
- Prelude BWV 539
no synthesis but large pre-rendered waveforms
Embedded ABC
xmlplay_emb is a version of xmlplay that renders ABC notation
embedded in an HTML document. The embedded ABC is turned into score pictures that allow playback. Clicking inside a score
picture starts playback, clicking outside the score stops playback. Clicking inside a playing
score picture repositions playback.
- Demo of ABC embedded in HTML with real time synthesis.
Dropbox demo:
VCF demo
xmlplay understands many parameters from the
SoundFont-2 specification. The following example
shows a modulated low pass filter that is swept from high to low across the audio spectrum. It also
demonstrates vibrato with a slight simulaneous tremolo.
- Brass finale
modulated filter, tremolo and vibrato (in real time with the Web Audio API of the browser)
Download:
xmlplay_141.zip,
usage info, the change log
bug reports, remarks to: