Skip to main content

Export Data Model

since 1.2.0

After alphaTab has loaded a full Score object from any input source, it can also be exported again to one of the supported export formats. Supported export formats:

  • Guitar Pro 7 (alphaTab.exporter.Gp7Exporter) since 1.2.0-alpha.75

More exporters are planned for the 1.5 release unless special feature requests of users are incoming.

To export a Score object the corresponding exporter needs to be created and called. Then the resulting binary array can be used further to trigger a download, send it to a server, save it to a file etc.

const exporter = new alphaTab.exporter.Gp7Exporter();
const data = exporter.export(api.score, api.settings); // will return a Uint8Array

// trigger download
const a = document.createElement('a'); = api.score.title.length > 0 ? api.score.title + '.gp' : '';
a.href = URL.createObjectURL(new Blob([data]));