Replies: 1 comment
-
|
Welcome to the community!
alphaTab's data model treats bars as indexed entries in a list. While it
can identify an anacrusis for rhythmic timing, it often defaults to
numbering the first rendered bar as "1" because it prioritizes structural
consistency for its playback and cursor synchronization. Forcing a "Bar 0"
can sometimes cause misalignment in third-party players or synchronized
audio if not handled correctly at the model level.

Alternative Solutions
• Use the \ac Command: In alphaTex, you should always mark the pickup bar
with \ac. This tells alphaTab that the bar does not need to follow strict
time signature rules, which is the first step in proper anacrusis handling.
• Manual Bar Number Display: Starting in v1.8, you can use
\barNumberDisplay in alphaTex or score.stylesheet.barNumberDisplay in the
API to control how numbers appear. You can set specific bars to hide their
numbers or display custom values.
• API Offset: If you are developing an app, you can hook into the
scoreLoaded event. You can manually iterate through
score.tracks[].staves[].bars and adjust the barNumber or display properties
before the first render.
Relevant alphaTab Documentation
- Bar Metadata (\ac)
<https://www.google.com/url?sa=i&source=web&rct=j&url=https://alphatab.net/docs/alphatex/bar-metadata&ved=2ahUKEwiHweuSgZKUAxVNPEQIHRqOBXwQy_kOegYIAQgKEAE&opi=89978449&cd&psig=AOvVaw1EYAUt9UmtJZsXGZNyCQv5&ust=1777515973759000>:
Details on the alphaTex syntax for marking anacrusis bars.
- alphaTab Data Model
<https://www.google.com/url?sa=i&source=web&rct=j&url=https://alphatab.net/docs/reference/score&ved=2ahUKEwiHweuSgZKUAxVNPEQIHRqOBXwQy_kOegYIAQgKEAM&opi=89978449&cd&psig=AOvVaw1EYAUt9UmtJZsXGZNyCQv5&ust=1777515973759000>:
Explains the hierarchy (Score > Track > Staff > Bar) and how bars are
indexed.
- Display Settings
<https://www.google.com/url?sa=i&source=web&rct=j&url=https://alphatab.net/docs/reference/settings&ved=2ahUKEwiHweuSgZKUAxVNPEQIHRqOBXwQy_kOegYIAQgKEAU&opi=89978449&cd&psig=AOvVaw1EYAUt9UmtJZsXGZNyCQv5&ust=1777515973759000>:
Reference for startBar and other layout controls.
- v1.8 Release Notes
<https://www.google.com/url?sa=i&source=web&rct=j&url=https://alphatab.net/docs/releases/release1_8&ved=2ahUKEwiHweuSgZKUAxVNPEQIHRqOBXwQy_kOegYIAQgKEAc&opi=89978449&cd&psig=AOvVaw1EYAUt9UmtJZsXGZNyCQv5&ust=1777515973759000>:
Information on the newer barNumberDisplayfeatures.
…On Tue, Apr 28, 2026 at 6:18 PM John ***@***.***> wrote:
Hi!
I am new here, but I think alphatab is amazing and I hope to be a
contributing member in the community as I now use alphatab in my own music
practice and app development quite regularly.
Currently it appears alphatab starts numbering at the very first bar even
if that bar is an anacrusis.
I tested with a guitarpro (.gp) file that had the anacrusis marked. Guitar
Pro xml is a self-closing empty element inside , right before .
I also did a quick search for anacrusis in musicxml but did not find
anything specification there, which surprised me, maybe i was looking in
the wrong place.
Anyway, since it is the convention to start bar numbering after the
anacrusis, I think it would make sense for alphatab to do this as well.
Any input from the community would be great.
—
Reply to this email directly, view it on GitHub
<#2686>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BNLESQARLGMRWXVUS3UJHKD4YFJ4RAVCNFSM6AAAAACYKDLLTOVHI2DSMVQWIX3LMV43ERDJONRXK43TNFXW4OZZHE3TGMZYGQ>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi!
I am new here, but I think alphatab is amazing and I hope to be a contributing member in the community as I now use alphatab in my own music practice and app development quite regularly.
Currently it appears alphatab starts numbering at the very first bar even if that bar is an anacrusis.
I tested with a guitarpro (.gp) file that had the anacrusis marked. Guitar Pro xml
<Anacrusis /> is a self-closing empty element inside <MasterTrack>, right before <Tracks>.I also did a quick search for anacrusis in musicxml but did not find anything specification there, which surprised me, maybe i was looking in the wrong place.
Anyway, since it is the convention to start bar numbering after the anacrusis, I think it would make sense for alphatab to do this as well.
Any input from the community would be great.
Beta Was this translation helpful? Give feedback.
All reactions