Skip to content

v1.8.0 regression: Guitar tracks showing bass clef due to B2 threshold #2530

@extremesecrecy

Description

@extremesecrecy

Description

After upgrading to alphaTab 1.8.0, all guitar tracks in GP3/GP4/GP5 files are displaying with bass clef instead of treble clef.

Root Cause

The fix in PR #2483 (for issue #2454) uses B2 as the threshold for switching to bass clef:

"If the tuning of the lowest string is below a B2 they switch to a F4/Bass clef."

However, standard guitar tuning's lowest string is E2, which is below B2. This causes guitar tracks to incorrectly display bass clef.

Expected Behavior

  • Guitar (lowest string E2) → Treble clef (as it was in 1.7.1)
  • Bass guitar (lowest string E1 or B0) → Bass clef

Actual Behavior (v1.8.0)

  • Guitar (lowest string E2) → Bass clef ❌
  • Bass guitar → Bass clef ✓

Reproduction

  1. Load any .gp5 file with standard guitar tuning (E2-A2-D3-G3-B3-E4)
  2. Observe bass clef displayed instead of treble clef

Workaround

Downgrade to alphaTab 1.7.1

Suggested Fix

The threshold should be lower (perhaps E1 or below) to distinguish guitar from bass, or use instrument type metadata if available in the GP file format.

Environment

  • alphaTab version: 1.8.0
  • File formats affected: .gp3, .gp4, .gp5
  • Platform: Web (JavaScript)

Metadata

Metadata

Assignees

Labels

area-file-formatsRelated to supported file formatsplatform-allAffects all platformsstate-acceptedThis is a valid topic to work on.

Type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions