Capella (CapXML)
Scores authored in Capella arrive as .capx archives โ Capella's XML container format. alphaTab imports them so a Capella export opens in the same viewer as your Guitar Pro and MusicXML files, without a separate conversion step.
The preview below loads a .capx file with the theme of Mozart's variations K. 265 on a piano grand staff, with lyrics under the right hand:
Scope of the Capella importerโ
A .capx file is a ZIP archive holding a single score.xml that follows the CapXML schema. alphaTab reads that XML into the standard score model. The older binary Capella formats are not supported โ export from Capella as CapXML first.
Capella describes many notation elements visually through "graphical objects" rather than semantically, so the importer makes best-guess associations between those objects and the underlying beats and notes. Coverage is basic and lightly tested compared to the Guitar Pro or MusicXML importers. Rely on it for bread-and-butter notation โ notes, rests, voices, ties, standard articulations, lyrics โ and cross-check anything more exotic against the compatibility page below.
The load path is identical to every other format alphaTab supports: point core.file at a .capx, and the importer is dispatched on content sniffing.
Show it in codeโ
import * as alphaTab from '@coderline/alphatab';
const container = getAlphaTabContainer();
const api = new alphaTab.AlphaTabApi(container, {
core: { file: '/scores/song.capx' },
});
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.
Where to look nextโ
- Capella compatibility โ element-by-element support table with the known limitations.
- Handling load errors โ how to react when a
.capxfile fails to parse. core.fileandapi.loadin the reference.