• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Optional Chords in ChordPro
#1
I realize this isn’t a MobileSheets issue, however as I use ChordPro sheets in MSP, I was hoping someone with more experience might have a workaround or an idea for a way to handle optional chord symbols in ChordPro.

Here is the situation:

I come across music or chord charts where optional chord symbols are indicated with parentheses. However, if you use parentheses inside of the normal square brackets for chord symbols on a ChordPro sheet, the transposition feature does not work.

Transposition also does not work if another character is placed in the square brackets in front of the chord symbol like a + sign for example.

If I place parentheses on the outside of the square brackets, it screws up the placement of the parentheses.

I did discover I could add parentheses outside of the square brackets like this:

[(][G][)]

However, even though the transposition feature works using this method, it really screws up the chord symbol placement.

Has anyone come up with a workable solution or is there an “official” way to indicate optional chords in ChordPro that I am unaware of?

Thanks in advance for any ideas or enlightenment you can offer!
Reply
#2
The official way in ChordPro (the program) is putting parentheses around the chord:

[A]Hel[(B7)]lo, [E]World!
Johan
johanvromans.nl — hetgeluidvanseptember.nl — mojore.nl -- howsagoin.nl
Samsung Galaxy Note S7FE (T733) 12.4", Android 13.0, AirTurn Duo & Digit (Gigs).
Samsung Galaxy Note S4 (T830) 10.5", Android 10.0 (maintenance and backup).
Samsung A3 (A320FL), Android 8.0.0 (emergency).
Reply
#3
If ChordPro supports parenthesis around the chords, then it sounds like I need to update the code to allow for that. Does chord pro allow for a plus symbol before the chord as well? At what point does the logic stop trying to consider the entry as a valid chord? Does it just ignore symbols at the start?

Mike
Reply
#4
ChordPro tries to recognize what is between the brackets as something that looks like a chord. In its default setting, that should be one of the letters C, D, E, F, G, A, or B, optionally followed by sharp or flat, optionally followed by things like m, maj, 7, aug, etc.

The chord may be parenthesised, e.g. [(A)]. This is treated as an A chord, transposed, and shown with parens. Except for NC (and N.C.) and spaces, eveything else is flagged as 'unknown chord' and treated as an annotation. So [+D] is treated as [*+D].

It is possible to define non-conformant chords but these cannot be transposed:

{defined: +D base-fret  1    frets  X  X  0  2  3  2  }

See also: https://www.chordpro.org/chordpro/chordpro-chords/
Johan
johanvromans.nl — hetgeluidvanseptember.nl — mojore.nl -- howsagoin.nl
Samsung Galaxy Note S7FE (T733) 12.4", Android 13.0, AirTurn Duo & Digit (Gigs).
Samsung Galaxy Note S4 (T830) 10.5", Android 10.0 (maintenance and backup).
Samsung A3 (A320FL), Android 8.0.0 (emergency).
Reply
#5
Second the request to allow parentheses around chords.

In an earlier topic we discussed unrecognized chords that would still transpose what comes after the /
We had the [Astronomical/C] example. I think it'd make sense to apply the same logic to whatever's inside the parentheses. Annotations could then be supported by an * inside the () I suppose
Reply
#6
Chords in brackets are handled differently in MSP and in the ChordPro reference implementation.
[(C7)] takes less space and looks nicer as [(][C7][)], but [(C7)] is not transposed in MSP.
It would be great if MSP could handle it similar to the ChordPro reference implementation.


Attached Files Thumbnail(s)
   

.pro   DirtyOldTown_Ak.pro (Size: 449 bytes / Downloads: 2)
.pdf   DirtyOldTown_F-G_ChordPro.pdf (Size: 153.73 KB / Downloads: 1)
first language: German
Acer A1-830, Android 4.4.2 - HP x2 210 G2 Detachable, Win 10 22H2 - Huawei Media Pad T5, Android 8.0 - Boox Tab Ultra C, Android 11
www.moonlightcrisis.de - www.basdjo.de - www.frankenbaend.de


Reply
#7
I guess a ChordPro update for MSP is needed to handle parentheses... Big Grin

As I only use ChordPro within MSP and reluctantly when I can't find sheet music and I am too lazy to transcribe, I was unaware that parentheses are supported elsewhere.

Just add it to the other 16,000 things you are working on Mike. Wink

In the meantime, thanks everyone for the insight!!
Reply
#8
I've added the changes for this with version 3.4.8 which will be released this week. As long as the chord is surrounded by parenthesis, it should all work well. If you did something like [©/F], that is not going to be supported, so hopefully you would never see something like that.

Mike
Reply
#9
Cute... A copyright chord ☺.

ChordPro doesn't support [©/F] either so no worries.
Johan
johanvromans.nl — hetgeluidvanseptember.nl — mojore.nl -- howsagoin.nl
Samsung Galaxy Note S7FE (T733) 12.4", Android 13.0, AirTurn Duo & Digit (Gigs).
Samsung Galaxy Note S4 (T830) 10.5", Android 10.0 (maintenance and backup).
Samsung A3 (A320FL), Android 8.0.0 (emergency).
Reply
#10
Haha, well that's an interesting feature of the forum that I wasn't expecting. [(D)/G] is a better example then Smile

Sounds like the changes I made should be sufficient then.

Thanks,
Mike
Reply




Users browsing this thread:
1 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2024 MyBB Group.