Skip to content

feat(rendering): add per-beat rest display position via beat.restDisplayTone, beat.restDisplayOctave#2721

Open
roscopeeco wants to merge 1 commit into
CoderLine:developfrom
roscopeeco:feature/rest-position-v2
Open

feat(rendering): add per-beat rest display position via beat.restDisplayTone, beat.restDisplayOctave#2721
roscopeeco wants to merge 1 commit into
CoderLine:developfrom
roscopeeco:feature/rest-position-v2

Conversation

@roscopeeco
Copy link
Copy Markdown

Adds Beat.restDisplayTone (Tone enum) and Beat.restDisplayOctave to allow specifying the vertical position of a rest on the staff on a per-beat basis. The AlphaTex restdisplaypitch tag (e.g. r.4{restdisplaypitch E4}) sets these values. AccidentalHelper.calculateRestDisplaySteps converts the pitch to rendering steps, aligned to match the legacy RestPosition enum spacing (+0.5).

Includes 77 visual tests covering treble, bass, alto and tenor clefs across staff positions, durations, multi-voice scenarios, and variable line counts.

This PR only includes TypeScript changes

Issues

Fixes #

Proposed changes

Checklist

  • [ X] I consent that this change becomes part of alphaTab under it's current or any future open source license
  • Changes are implemented
  • [ X] New tests were added

Further details

  • This is a breaking change
  • [ X] This change will require update of the documentation/website

…tch tag

Adds Beat.restDisplayTone (Tone enum) and Beat.restDisplayOctave to allow
specifying the vertical position of a rest on the staff on a per-beat basis.
The AlphaTex restdisplaypitch tag (e.g. r.4{restdisplaypitch E4}) sets these
values. AccidentalHelper.calculateRestDisplaySteps converts the pitch to
rendering steps, aligned to match the legacy RestPosition enum spacing (+0.5).

Includes 77 visual tests covering treble, bass, alto and tenor clefs across
all staff positions, durations, multi-voice scenarios, and variable line counts.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant