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:
standardNotationLineCountoverrides 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.displayTranspositionPitchon aStaffshifts the notes on the standard staff without changing playback pitch. Guitar scores use-12so 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โ
- Guitar tablature โ pair the standard staff with a tab staff.
- Multi-track and grand staff โ combining multiple standard staves for piano or ensemble scores.
Staff.showStandardNotation,Staff.standardNotationLineCount, andStaff.displayTranspositionPitchin the model reference.display.staveProfileโ pick a preset combination of staves at construction time.