Closed SaschaMzH closed 2 years ago
I prefer to go for option one; keep it simple. When you edit a song, with every keystroke, the file will be parsed. I made '#' ignored by the SongView; we might add a small introduction how Chord Provider deals with custom chords in the template when opening a new file.
As you wrote; you can 'redefine' a chord using the song.
One of my 'magic tricks', haha! If there was no {key: [key]} defined, it used the first chord found. Saw you your issue about 'end_of_xxx' of course; this is of the same kind. Let's forget about it; the first chord doesn't have to be the key. A bit of 'magic' is great, but not this one...
It would be great if this becomes a part of the 'Swifty Chords' package. He is open for pull requests and just merged my first one.
Fixed some parts of my previous pull request:
- The macOS target does not compile because it's missing your new ChordPosition extension file. The 'QLextension' is not part of the 'Target Membership'. Fixed by you. I have renamed the file in terms of a wording.
- If you use a 'custom chord', the base name will be used in the song view because 'major' is the default suffix in the 'processChord' function. It will always be found. That 'base chord' is also added to the chord list. The problem is that the custom defined chord was later defined than usage of that standard chord. There are two ways to solve that problem.
How should this be working? What's you opinion?
- A 'custom define' will not override a default define; it will be added. It should override it in my opinion. Fixed
- When you click on a 'custom define' it will not find it and will show the 'C' chords instead, because that's the fallback (lazy code from my side, haha!). Fixed
- The first found chord is not used anymore as the key when the key is not set manually. What do you mean? I did not see the problem.
That's my test result
` {title: Chord Tests} {subtitle: Testing}
{define: Epower base-fret 5 frets x 3 2 3 1 x}
Bla [Epower]lalal [A]lala [C]dumdidum
{define: A base-fret 3 frets x 5 2 3 1 x} {define: Epower base-fret 5 frets 1 3 2 3 1 x} `