Introduction
What is alphaTab?β
alphaTab is a JavaScript, .net and Android library for building music notation software and websites. It allows you to take any of various supported input files, and embed good looking and feature rich music sheets into your website.
As of today alphaTab is not a drop-in component that provides all functionality out of the box. You should rather consider it as an SDK or Library to build components in the way you need it in your website. The needs to music sheets vary from application to application and website to website. You will need a certain development skillset to integrate alphaTab into solution.
On high level alphaTab can be structured into the following submodules:
- The data model
- The file importers
- The render engine
- The audio engine
All these 4 modules together make up alphaTab and allows you to provide modern and interactive music notation into your website or application.
Compatibilityβ
The different flavours version of alphaTab are sharing the same source code. We take our TypeScript code and compile it to C# and other languages using a special toolchain. This way all platforms benefit from the same new features we add. For the future we plan to extend alphaTab to more platforms like Native Android and iOS.
- Vanilla JavaScript
- .net
- Kotlin for Android
alphaTab follows a "web first" approach and the related package is provided as NPM package. Most development and testing happens on this web version. alphaTab runs on all major and modern browsers supporting ES6. We do not maintain a full list of browsers as most of modern browsers are auto-updating anyhow.
ES6 compatible browsers
- Google Chrome 58+
- Microsoft Edge 79+
- Mozilla Firefox 54+
- Safari 10
- Opera 55
Source: https://www.w3schools.com/js/js_es6.asp
Main Web Technologies we use
- Typed Arrays (https://caniuse.com/typedarrays)
- Map/Set
- HTML5 Canvas (https://caniuse.com/canvas)
- SVG (https://caniuse.com/svg)
- Web Workers (https://caniuse.com/webworkers)
- Web Audio API (https://caniuse.com/audio-api)
- Intersection Observer API (https://caniuse.com/mdn-api_intersectionobserver)
- Resize Observer API (https://caniuse.com/resizeobserver)
- TextEncoder/TextDecoder (https://caniuse.com/textencoder)
alphaTab brings everything you need to get it running in modern browsers, no 3rd party dependencies are needed.
Internet Explorer support was dropped in version 1.2. If you still need to support the Internet Explorer on your website (I hope you don't π ) I recommend to use version 1.1 where we still had basic IE support. We also do not officially support test against the old Microsoft Edge before it was based on Chromium.
The .net version of alphaTab comes as NuGet packages.
- The base package targets the .net standard 2.0 and can be used in almost all environments using the low level APIs.
- The windows package targets .net 8.0 and provides WinForms and WPF UI controls.
The .net version of alphaTab has some 3rd party dependencies for drawing and audio APIs but we try to keep them at a minimum.
The Kotlin for Android version of alphaTab comes as Maven package on Maven Central and the Sonatype OSS Index.
- Group:
net.alphatab
- Package Name:
alphaTab-android
The Kotlin for Android version is still fairly new and there might be still some problems. We rely on your feedback to continuously improve this target.
- Pre-Release Snapshots: https://s01.oss.sonatype.org/content/repositories/snapshots/net/alphatab/
- Release Versions: https://central.sonatype.com/artifact/net.alphatab/alphaTab-android
The Kotlin for Android version of alphaTab has some 3rd party dependencies for drawing and coroutines but we try to keep them at a minimum.
The data modelβ
The data model holds all information about a piece of music. This includes general information like song title and artist but goes down to individual note level. Everything alphaTab needs to render or play music sheets is stored in this data model.
The file importersβ
To fill the data model alphaTab uses so called Importers
. There exist various file formats in the market which can hold
the information about music sheets. alphaTab has importers for:
- Guitar Pro 3-5 files
.gp3
,.gp4
,.gp5
which are a proprietary binary format from Arobas Music - Guitar Pro 6 files
.gpx
which are a proprietary archive format storing the music information as XML - Guitar Pro 7 files
.gp
which are a zip archive storing the music information as XML - MusicXML files
.xml
which is an open XML based standard by an open consortium - CapXML files
.cap
which is an open XML based standard by Capella Software - alphaTex which is a text based format optimized for writing music notation in a textual format
There exist many dialects of MusicXML and due to its very nature of describing music sheets in a very visual way, only a limited subset of MusicXML is actually supported. If you encounter issues or missing features do not hesistate to contact us on Gitter or GitHub to add support for missing features.
The render engineβ
This engine is what makes the music sheet visible. alphaTab takes all the information stored in the data model and does a visual layouting and rendering which is called music engraving.
For this, alphaTab builds up a visual tree represntation of all the symbols following the rules of music notation. Using this model alphaTab can very efficiently provide dynamic resizing and relayouting.
The symbols alphaTab is using the SMuFL music font Bravura.
The playerβ
To bring the music to life, alphaTab comes with a MIDI synthesizer embedded. To play the music sheet, alphaTab will convert the data model into MIDI commands, which are then played by a MIDI synthesizer based on TinySoundFont.
We take the data model, convert it to MIDI, put this midi together with a SoundFont2 into the audio engine and violΓ , we have the song being played for human ears.
alphaTab can provide user interactivity and a visual cursor out of the box.