Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

alphatex tuning piano notation is higher than it should be #449

Closed
sugizo opened this issue Dec 4, 2020 · 5 comments · Fixed by #484
Closed

alphatex tuning piano notation is higher than it should be #449

sugizo opened this issue Dec 4, 2020 · 5 comments · Fixed by #484
Assignees
Labels
area-file-formats Related to supported file formats file-format-alphaTex Related to the built-in language alphaTex state-accepted This is a valid topic to work on. type-bug 🕷️

Comments

@sugizo
Copy link

sugizo commented Dec 4, 2020

Your environment

  • Version used: alphaTab v1.0.1 (, build 2)
  • Platform used: JavaScript
  • Rendering engine used: SVG (default)
  • Browser Name and Version: Google Chrome Version 87.0.4280.67 (Official Build) (x86_64)
  • Operating System and version (desktop or mobile): Darwin MacBookPro.local 16.7.0 Darwin Kernel Version 16.7.0: Sun Jun 2 20:26:31 PDT 2019; root:xnu-3789.73.50~1/RELEASE_X86_64 x86_64
  • Link to your project: https://sugizo.pythonanywhere.com/music/notation/form_score_in_notation

Expected Results

https://en.wikipedia.org/wiki/File:Clef_Diagram.png

Observed Results

screen_shot

Steps to Reproduce (for bugs)

  1. use alphatex with :
\tuning piano
.
:4 c4 d4 e4 g4 a4 c5

Possible Solution

the notation of c4 is higher than it should be, can compare with the result using alphatex and the correct one from wiki
both link and screenshot provided above

@Danielku15 Danielku15 self-assigned this Dec 6, 2020
@Danielku15 Danielku15 added type-bug 🕷️ area-file-formats Related to supported file formats file-format-alphaTex Related to the built-in language alphaTex state-accepted This is a valid topic to work on. labels Dec 6, 2020
@Danielku15 Danielku15 added this to the 1.2 milestone Dec 6, 2020
@Danielku15
Copy link
Member

alphaTab should indeed respect the piano tuning for the display transposition. Note: The standard notation for Guitar is transposed by one octave. In your example file you change the tuning but not the "instrument" of the track. Currently alphaTex requires the instrument to be not a guitar, otherwise it transposes the file.

This means as a workaround until alphaTab consideres also piano tunings for the display, you can change also the playback instrument and the notation will be displayed expected.

\tuning piano
\instrument piano
.
:4 c4 d4 e4 g4 a4 c5

image

@sugizo
Copy link
Author

sugizo commented Dec 6, 2020

you right, not put
\instrument piano
when raised this issue, thanks

suggestion
perhaps if it show the treble clef, it should work as is, mean, just the treble clef like used in every instrument
if default used in guitar it show the octave (8) under the treble clef, not sure this octave clef supported in Guitar Pro or MusicXML

ref
https://en.wikipedia.org/wiki/Clef#Octave_clefs

@sugizo sugizo closed this as completed Dec 6, 2020
@Danielku15
Copy link
Member

The guitar is traditionally notated an octave higher than the actual pitch, presumably so it fits better on the stave.
https://music.stackexchange.com/questions/101432/why-is-guitar-music-written-one-octave-higher
https://music.stackexchange.com/questions/85235/guitarpro-notes-displaying-one-octave-too-low

I am following the usual rules of guitar notes in alphaTab ;) If the instrument is a guitar it is notated one octave lower than the pitch compared to other instruments.

I'm reopening this issue to track the task of also not transposing the notes if we specify the piano tuning

@Danielku15 Danielku15 reopened this Dec 6, 2020
@sugizo
Copy link
Author

sugizo commented Dec 6, 2020

no worries, aware about the guitar notated one octave lower, it's just symbolic using clef octave like on the wiki octave clef link above
for instrument number value on alphatex perhaps it refer to :
https://en.wikipedia.org/wiki/General_MIDI#Program_change_events
isnt it ?

tried

\instument guitar
\instument bass

output still same like piano, so when change with number provided from wiki general midi, it work as expected
perhaps can put some info about general midi number instrument info on documentation or alphatex example or link to wiki about the value
thanks

@Danielku15
Copy link
Member

regarding the octave clef:
Using an octave clef would be wrong because it would then also mean for the guitar to transpose the notes one octave higher than normal. Unfortunately there is nothing like a guitar specific clef annotation to indicate the 1 octave shift specific to these instruments, hence we have to stick to the default ones and apply an additional transposition.

regarding the instrument names:
"guitar" or "bass" are not a valid general midi program name. If you use "Overdriven Guitar" or "Acoustic Bass" it works.
https://www.alphatab.net/docs/alphatex/metadata mentions to use a general midi instrument number or name. I also just added a more comprehensive documentation on the instrument and tuning behavior.

This was referenced Jan 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-file-formats Related to supported file formats file-format-alphaTex Related to the built-in language alphaTex state-accepted This is a valid topic to work on. type-bug 🕷️
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants