Guitar Pro (3 through 8)
The files your users hand you may be any of GP3 through GP8 โ three distinct container generations spanning two decades of Guitar Pro releases. One importer path handles all of them: point core.file at the file and alphaTab picks the matching importer from the bytes.
The formats at a glanceโ
Three generations of Guitar Pro use three different container strategies. alphaTab sniffs the input bytes on load and dispatches to the matching importer โ you point at the file and receive a Score back.
- GP3, GP4, GP5 (.gp3 / .gp4 / .gp5) โ proprietary binary streams. GP4 has an official partial spec from Arobas; the rest was reverse-engineered from test files. Coverage is mature: notation, effects, per-track mixing, master bar structure, RSE settings. Older files sometimes stored lyrics in beat texts โ see Tuning importer behavior for the
beatTextAsLyricsflag that recovers them. - GP6 (.gpx) โ the first XML-based generation, wrapped in a custom container that behaves like a compressed filesystem. Inside sit
score.gpif(the notation XML),BinaryStylesheet,PartConfiguration, andLayoutConfiguration. alphaTab reads the notation and the stylesheet knobs it understands. - GP7 and GP8 (.gp) โ a standard ZIP archive holding
Content/score.gpifplus the stylesheet and configuration blobs from GP6. GP8 uses the same envelope as GP7 with additional payloads (embedded audio) and evolvedscore.gpifsemantics for new features. alphaTab covers both with a single importer.
Every version shares the same notation model on the alphaTab side, so tracks, bars, beats, notes, effects, and playback data behave identically once loaded โ the differences are in what the source file was able to encode.
Show it in codeโ
The load call is version-agnostic. Point core.file at the file and alphaTab picks the right importer.
import * as alphaTab from '@coderline/alphatab';
const container = getAlphaTabContainer();
const api = new alphaTab.AlphaTabApi(container, {
core: { file: '/scores/song.gp' },
});
getAlphaTabContainer() is a placeholder for the platform-specific step of obtaining the render target โ a <div> on Web, an AlphaTab control on .NET, or an AlphaTabView on Android. Every other line runs unchanged on all three runtimes.
To load from bytes instead (fetched, uploaded, or read from disk), see Load from bytes.
Where to look nextโ
- Guitar Pro 8 compatibility โ feature-by-feature support table for GP8.
- Guitar Pro 7 compatibility โ the same table for GP7.
- Guitar Pro 6 compatibility โ GPX-specific coverage notes.
- Guitar Pro 3-5 compatibility โ the binary generation, including format quirks.
- Tuning importer behavior โ
beatTextAsLyrics, encoding hints, and the other importer knobs relevant to old GP files. core.fileandapi.loadin the reference.