Skip to main content

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.

ZIP archive (.gp)

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 beatTextAsLyrics flag 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, and LayoutConfiguration. alphaTab reads the notation and the stylesheet knobs it understands.
  • GP7 and GP8 (.gp) โ€” a standard ZIP archive holding Content/score.gpif plus the stylesheet and configuration blobs from GP6. GP8 uses the same envelope as GP7 with additional payloads (embedded audio) and evolved score.gpif semantics 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โ€‹