Exporter

AlphaTab can export an already loaded track as alphaTex.

Open a Guitar Pro file by clicking here to export the first track as alphaTex.
function toTex(track) {
var exporter = new AlphaTab.Exporter.AlphaTexExporter();
exporter.Export(track);
return exporter.ToTex(); 
}

Exported AlphaTex

Open a file to see the generated alphaTex here.