• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ChordPro: transposing lower case chords
#1
Lowercase characters are often used to write down single notes for e.g. intros or interludes.
It would be a big improvement if lowercase characters in square brackets would be transposed like chords.

See https://www.chordpro.org/beta/chordpro-chords/
ChordPro Implementation: Notes
If enabled in the config, ChordPro will understand lowercase root-only chords to mean note names. Note names will be treated (shown, transposed) exactly as chords, but will not account for diagrams.
This can be used for example for intro’s that start with some single notes before the chords:
{comment: Intro [f] [g] [a] [E] }


Attached Files
.pro   ChampsElysees.pro (Size: 1.75 KB / Downloads: 3)
first language: German
Acer A1-830, Android 4.4.2 - HP x2 210 G2 Detachable, Win 10 21H1
www.moonlightcrisis.de - www.basdjo.de - www.frankenbaend.de


Reply
#2
Adding support for this isn't really a big deal, but I need to ask - is it important to make it conditional? Or should I just make it behave that way by default? I would obviously prefer fewer settings if possible.

Mike
Reply
#3
ChordPro is designed for making professional songbooks and tries to prevent unexpected surprises by limiting what it accepts as chords.
A chord can be
  • known (built-in or defined, with diagram) or
  • well-formed (a known root note follwed by a known qualifier and extension).
For special cases, you can select in the config:
  • a relaxed mode (known root note followed by arbitrary) and
  • a note mode where lowercase root notes are accepted (and transposable).
For MSPro this would be overkill, I think. An easier approach can be to split the chord into parts is it contains a slash, and transpose each of the parts if it looks transposable, regardless of case.
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
#4
Johan - that's basically how the code is already implemented. I'm mainly asking in this case if I should just handle lowercase chord letters the same way I handle uppercase. I can just convert the letters to uppercase before looking for a valid chord letter and the code should allow those letters in the same way (although when transposing I guess I would have to modify the code to leave the letter as a lowercase letter instead of converting to an uppercase letter). I was just hoping to get some guidance on whether that is the right thing to do or if it could potentially cause unusual behavior for users that might have put non-chord words inside brackets in lowercase letters to avoid having them handled as actual chords. Your last sentence makes me think you believe I should just allow the lowercase letters and handle them like any other chord definition. If so, I'll move forward with making the necessary changes.

Thanks,
Mike
Reply
#5
I have never encountered users that tried to hide arbitrary words from being interpreted as chords... ChordPro gives a warning if it encounters anything between the [ ] that is not identifyable as a chord. Since we can use [*...] to denote annotations there is no reason to use tricks to hide something from being recognized.

So I'd say: Go for it!
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


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


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