Skip to main content

Triplet feel (swing)

Jazz charts are traditionally notated in straight eighths and swung at performance time โ€” the shuffle lives in the player, not the page. Guitar Pro files carry a triplet-feel marker per section (8ths, 16ths, dotted, or Scottish) and alphaTab honors those markers at playback time, turning straight eighths into swung eighths without touching the notation on screen. Flip the toggle off to hear exactly what is written; flip it on to hear how it should feel.

The score below is a four-bar blues shuffle in A โ€” a root/5th/6th/5th eighth-note figure over the classic Iโ€“IVโ€“Iโ€“V changes. Every beat is a pair of straight eighth notes, which is exactly what triplet-feel needs to convert into a shuffle.

00:00 / 00:00

What the switch doesโ€‹

player.playTripletFeel is a boolean. When it is on (the default), the synth converts the notated eighth or sixteenth pairs into their triplet-feel equivalent as declared by the score. When it is off, alphaTab plays the notes exactly as written, so the display and the audio match note-for-note.

The setting only changes playback. The score still shows the "shuffle" or "swing" marker above the staff either way. Reach for the toggle when:

  • You are building a practice tool and want the reader to hear the straight rhythm they see notated.
  • You want an A/B comparison for pedagogy.
  • The score's embedded triplet-feel marker fights with a backing track you also drive.

Show it in codeโ€‹

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

const container = getAlphaTabContainer();
const api = new alphaTab.AlphaTabApi(container, {
core: { file: '/scores/song.gp' },
player: {
playerMode: alphaTab.PlayerMode.EnabledSynthesizer,
playTripletFeel: true,
},
});

// Later, flip it off for a straight playback.
api.settings.player.playTripletFeel = false;
api.updateSettings();

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.

Call api.updateSettings() after mutating settings on the live instance so the player picks up the new value.

Where to look nextโ€‹