Closed gburlet closed 7 years ago
Hi. Thanks for the comprehensive feature request, really appreciate how properly it 😄 In theory both solutions make sense in long term. A pitch offset would allow a quite flexible adjustment of the music notation if required. The octave offset symbols are anyhow part of standard music notation and is a missing feature yet. GuitarPro also has support for them. But I guess you don't want a 8vb--------| indicator spread across all notes.
To directly address your direct use case I'd think I need some more info how you exactly need alphaTab to behave. So far I have following suggestion:
Since you use alphaTex and only display monophonic vocal music, I assume you do not even need the guitar tablature so rendering the standard music notation is sufficient for you: https://jsfiddle.net/danielku15/jctjgz7o/
Entering vocal music with guitar tabs might be quite inconvenient. I think adding support for non-stringed inputs in alphaTex would be nice:
alphaTex:
\tuning none
.
c4 c#4 d4 d#4 | c4 db4 d4 eb4
Result:
If then still required, I could add also add the pitch offset functionality.
Guitar Pro 6 has support for octave offsets on the clef which affect the rendering of the standard music notation (note the numbers on the clef):
But this does neither affect the guitar notation nor the playback since it only indicates that the standard music notation is displayed with a certain offset . Not sure if this is really useful for you.
I prepared a small sample for you which covers all the new features: https://jsfiddle.net/danielku15/p047gsnh/
\tuning none
This will automatically hide the tabs. \lyrics
metadata and the Guitar Pro lyrics format. Does this cover all your needs?
Hi Daniel,
Thanks for your quick response. I donated you a few beers to say thanks!
To answer your questions:
Okay, so with your small example above:
\tuning none
.
c4 c#4 d4 d#4 | c4 db4 d4 eb4
I need to specify data-pitches="[-12]"
to bring everything down an octave on the staff (see this jsfiddle. I think with AlphaSynth it still sounds an octave lower than notated though? Not a huge deal. As it stands, this satisfies my use case.
Cheers, Greg
Yes data-pitches="[-12]"
reduces all notes by 12 semitones (=1 octave). The pitch will be applied to both music notation and playback. Is it common for vocal music notation to show them as lower keys but keep the high pitch during playback/singing?
I think in this case the correct clefs with octave shifts should be used, otherwise the shown notes do not follow the rules of a standard music sheet. Let me know if you have a demand for this feature.
In general, guitar music is notated an octave higher than what is played. Vocals and most other instruments are usually notated exactly as they should be performed. So the vocal example you gave in the first post is correct:
\tuning none
.
c4 c#4 d4 d#4 | c4 db4 d4 eb4
should engrave this sheet music
and a C4 note should sound like a C4 note.
However, the way it's currently implemented, the above AlphaTex engraves this sheet music
which is correct for guitar: a note that sounds like C4 is notated as C5 but every guitar player would know to just play C4. However, a vocalist would sing this exactly as notated. For vocals and most other instruments a C4 is notated and should be played as a C4. I got around this by shifting the notation down by an octave using data-pitches="[-12]"
, which then makes alphaSynth synthesize it an octave lower as well.
Hopefully that makes sense. Again, I realize this is a guitar engraving library, so I'll leave it up to you about what features you care to implement. For my use case, I can now use the data-pitches="[-12]"
to make things look correct although the notes sound a little lower, so I'm happy even if it's not quite correct.
**Important** Also as a heads up, I think the latest changes here have broken regular AlphaTex guitar rendering: see this fiddle as an example.
Error: [AlphaTab][AlphaTex] - MalFormed AlphaTex: @39: Error on block note-string, expected a 2 found a 2
I've tried several of my existing AlphaTex files and they throw similar errors on the latest master build.
Interesting, I never realized that the standard music notation for guitars are shown 1 octave higher. I will double check the behavior of different instruments and ensure the correct display and playback for all instruments.
It is true that alphaTab started as a guitar music engraver but since a while internally everything is prepared for fret-less instruments. It's just the rendering which is wrong by 1 octave.
I also fixed the newly introduced parsing error already. Just update ;)
If you're interested in why guitar is notated like that it's because the pitch range of a guitar can be quite high and it's hard to read notes with lots of ledger lines so the octave modification makes it easier for guitarists to read (See this answer ... I know, I know ... it's a Yahoo answer so not the most reputable or comprehensive, but the first answer explains it quite well). In big symphonies they also do this with some other instruments so that musicians can sight read easily.
Thanks for the fast fix! I'll update.
For your reference, here's a good chart I just found regarding what we were talking about above: instrument transposition chart
Thanks for the transposition table, I will do a comparison with Guitar Pro to find out whether they also apply the same pitches.
I just did a small rework of the initial feature to match better the Guitar Pro 6 behavior (which seems to be correct for real world cases).
TranspositionPitch
tag which contains the correct display transposition for standard notation. By loading this info GPX files should be shown correctly all the time. To support both requirements of transposition I added also 2 separate settings which can be set via data-display-transposition-pitches
and data-transposition-pitches
. (see updated https://jsfiddle.net/danielku15/p047gsnh/)
data-display-transposition-pitches
only applies to the rendering of the standard notation just like it is needed for the GP file reading. This ensures correct rendering of guitar and non-guitar instruments. data-transposition-pitches
does a full transposition which affects also guitar tablature and playback. This is great!
Thanks, Daniel. Cheers.
Feature request
Hi Daniel, hope all is well with you.
I'm in the position where I'm using AlphaTab for rendering monophonic vocal sheet music from AlphaTex. I understand that the main mission of AlphaTab is for guitar sheet music, however I believe that with a couple small changes we can adapt AlphaTab to also engrave vocal sheet music while at the same time adding additional functionality for guitarists: so it's a win-win situation in my eyes.
Basically, guitar sheet music is notated an octave higher than played for ease of reading while other instruments, such as vocals, are not. Currently I am subtracting an octave from each note so that it's displayed properly, but then I run into issues where notes lie outside of the guitar pitch range and when using AlphaSynth they also sound an octave lower even though they're notated correctly.
Your environment
n/a
Expected Results
When specifying a boolean
concert_pitch
flag to AlphaTab when setting up, the notes on the score are rendered as they sound rather than an octave higher.Observed Results
AlphaTab doesn't currently handle this functionality.
Possible Solution 1
We could add a concert pitch/written pitch boolean option when setting up AlphaTab. The value of this setup parameter would influence how the score is engraved and how AlphaSynth interprets the score for synthesis. Internally, I don't suspect this to be a complex change because it involves minor changes to AlphaTab and AlphaSynth to either perform or not perform octave subtractions.
Possible Solution 2
We add possibility for an 8vb symbol to indicate the music is to be played as written rather than transposed an octave.