CoderLine / alphaTab

alphaTab is a cross platform music notation and guitar tablature rendering library.
http://www.alphatab.net
Mozilla Public License 2.0
1.27k stars 202 forks source link

AlphaTex Chord Names and Diagrams #203

Closed gburlet closed 6 years ago

gburlet commented 6 years ago

Description

User Story: As a user I would like to be able to specify a chord name above a chord using AlphaTex. User Story: As a user I would like to show chord diagrams above the score using AlphaTex.

I use AlphaTex to create scores within AlphaTab. It looks like the above user stories work for GuitarPro import but not for AlphaTex import.

Regarding chord diagrams, I saw this post on the AlphaTab twitter indicating that some work has been done towards chord diagrams. I see that it is also on the 1.x release milestone, along with Issue #110, and Commit 2315547bf6c79fce810988d1295f88c6154033fd. Therefore, I realize it's currently in the pipeline. Would be great to be able to access the chord diagrams that currently exist in AlphaTab through the AlphaTex interface.

Possible Solutions

Chord Names: AlphaTab seems to already have functionality to render a string of text above a beat, although not from AlphaTex. Create an entry in AlphaTexImporter that reads this information properly.

Chord Diagrams: In terms of possible solutions, it would be great if we could specify in the metadata portion of the AlphaTex which chord diagrams we would like to display. Maybe based on textual chord name as lookup, or maybe a more general text specification that outlines the name and composition of the chord diagram?

I think being able to display chord names above chords is the most important feature for the community and would require not too much work to accomplish. The second user story of chord diagrams is more involved in terms of implementation, I think.

Current Workarounds

None that I'm aware of.

Bounty

@Danielku15, as usual it would be my pleasure to donate you a few beers for tackling this! If anyone else is interested in contributing I'd be happy to donate some beers their way as well. Thanks for making AlphaTab awesome.

Danielku15 commented 6 years ago

Thanks for the comprehensive request. I will quickly get the chord diagram rendering merged and then try to add some reasonable AlphaTex metadata parsing. Shouldn't be too much work.

Danielku15 commented 6 years ago

Changes are done and available on the develop branch. I also updated the documentation accordingly: https://docs.alphatab.net/develop/alphatex/beat-effects#chords

The 2 things I left out so far are.

  1. No fingers can be specified or displayed GP supports indicating which fingers to use per string.
  2. No chord diagrams are shown above beats. I think GP also dropped this feature, So far I do not see a need for it.

Let me know if there is anything more you need. Otherwise feel free to close the issue 😉

gburlet commented 6 years ago

Hi Daniel,

This is awesome! I really like the method for specifying chord names/diagrams in the score metadata.

I would like to use what you've implemented but there seems to be an issue with tied notes on the develop branch. I see that there were some recent changes to tied notes and these issues might be lingering from those. I won't open a new issue since it's on the develop branch, but will provide an example to help debug below:

AlphaTex:

2.4.8 0.1.8 0.2.4 (2.5 4.4 4.3 3.2 0.1).4 | (-.5 -.4 -.3 -.2 -.1).2 (-.5 -.4 -.3 -.2 -.1).8 3.6.8 | (2.5 0.4 0.3 3.2 3.1).2 (2.4 2.3 0.2 0.1).4 | (-.4 -.3 -.2 -.1).4 (2.5 4.4 4.3 3.2 0.1).2

AlphaTab Render on Develop Branch:

bad

AlphaTab Render from stable build I'm using: good

Danielku15 commented 6 years ago

The problem with the tied notes should be fixed with the latest changes.

gburlet commented 6 years ago

Hi Daniel,

Was doing some QA and the latest tied notes fix you made worked for guitar tabs but the tied note issue is still persisting for non-stringed instruments like vocals. Will reopen this issue for continuity instead of opening a new issue.

Steps to reproduce:

On development branch use the following alphatex to create sheet music, the tie notes on the fifth bar break. \tuning none\tempo 145.\ks F \ts 3 4 \clef G2 r.4 r.4 r.8 a4.8 | d5.8 a4.4 d5.8 a4.8 d5.8 | a4.8 a4.4 a4.8 a4.8 g4.8 | g4.4 f4.4 d4.4 | r.8 a4.8 -.4 d5.4 a4.8 d5.8 | a4.8 d5.8 a4.4 a4.8 g4.8

screen shot 2018-10-18 at 12 45 31 pm
Danielku15 commented 6 years ago

Unfortunately this is nothing new and rather a missing feature than a bug. alphaTab does not support tied notes on non stringed instruments. For alphaTab a tied note is looking for a previous note on the same string. It works partly for MusicXML as it specifies somehow on which note ties start and stop.

In your example it could assume that it is directly the note of the previous beat, but this might not be the truth. It could also be the note of the second beat the note is tied to. Same applies if you have multiple notes on the beats.

If you want this working I recommend opening a feature request with your expected behavior for different combinations of notes. With the current feature set I can only offer to make the alphaTex parsing fail if you use tied notes on non stringed instruments.

gburlet commented 6 years ago

Actually, tied notes for non-stringed instruments (e.g., vocal music) was working after Issue #139. Commit 491d8b2d0ff0c94ddb4f0d451a8ab512e6f2afe4 specifically addressed the issue of tied notes in this context. I think linking the tie with the most recent beat of the same pitch makes sense and works for all my use cases.

I will close this issue and open a new one specific to this case. I'll let you determine whether to tag it as a bug or a feature request 👍