Skip to main content

Standard notation

Standard notation is what most Western-trained readers expect โ€” a five-line staff, clef, key signature, and pitched noteheads with stems. Use it for piano, vocal, or ensemble scores whose audience reads pitches directly; pair it with a tab staff for a guitar chart that has to serve both readers of the same file.

When to show, when to hideโ€‹

Every Staff starts with showStandardNotation = true. For a piano or a vocal line you keep it on and turn showTablature off. For a guitar chart aimed at players who read tab, do the opposite โ€” hide the score staff and leave tablature (plus rhythm indicators) alone. For arrangements you want to read both ways, keep both staves visible; they render stacked in the order alphaTab derives from the source file.

Two side facts worth knowing:

  • standardNotationLineCount overrides the default five. Percussion staves use 1, 2, or 3 lines; the setting also lets you build custom staves for hand-percussion, single-line rhythm parts, or historical notations.
  • displayTranspositionPitch on a Staff shifts the notes on the standard staff without changing playback pitch. Guitar scores use -12 so the notation sits inside the staff instead of hovering above it.

Show it in codeโ€‹

import * as alphaTab from '@coderline/alphatab';

const container = getAlphaTabContainer();
const api = new alphaTab.AlphaTabApi(container, {
core: { file: '/scores/song.gp' },
});

api.scoreLoaded.on((score) => {
for (const track of score.tracks) {
for (const staff of track.staves) {
staff.showStandardNotation = true;
staff.showTablature = false;
}
}
api.render();
});

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โ€‹