forked from openlp/openlp
Support "add" in chord suffix, support song key definition with "="
This commit is contained in:
parent
bf1ae4a36b
commit
ad56375374
@ -48,7 +48,7 @@ ENGLISH_NOTES = '[CDEFGAB]?'
|
|||||||
GERMAN_NOTES = '[CDEFGABH]?'
|
GERMAN_NOTES = '[CDEFGABH]?'
|
||||||
NEOLATIN_NOTES = '(Do|Re|Mi|Fa|Sol|La|Si)?'
|
NEOLATIN_NOTES = '(Do|Re|Mi|Fa|Sol|La|Si)?'
|
||||||
CHORD_PREFIXES = '(=|\\(|\\|)*?'
|
CHORD_PREFIXES = '(=|\\(|\\|)*?'
|
||||||
CHORD_SUFFIXES = '(b|bb|#|##|x|-|m|maj|min|sus|dim|0|1|2|3|4|5|6|7|8|9|\\))*?'
|
CHORD_SUFFIXES = '(b|bb|#|##|x|-|m|maj|min|sus|dim|add|0|1|2|3|4|5|6|7|8|9|\\))*?'
|
||||||
SLIM_CHARS = 'fiíIÍjlĺľrtť.,;/ ()|"\'!:\\'
|
SLIM_CHARS = 'fiíIÍjlĺľrtť.,;/ ()|"\'!:\\'
|
||||||
CHORD_TEMPLATE = '<span class="chordline">{chord}</span>'
|
CHORD_TEMPLATE = '<span class="chordline">{chord}</span>'
|
||||||
FIRST_CHORD_TEMPLATE = '<span class="chordline">{chord}</span>'
|
FIRST_CHORD_TEMPLATE = '<span class="chordline">{chord}</span>'
|
||||||
|
@ -640,6 +640,12 @@ def transpose_chord(chord, transpose_value, notation):
|
|||||||
current_chord = current_chord[1:]
|
current_chord = current_chord[1:]
|
||||||
else:
|
else:
|
||||||
current_chord = ''
|
current_chord = ''
|
||||||
|
if current_chord and current_chord[0] == '=':
|
||||||
|
transposed_chord += '='
|
||||||
|
if len(current_chord) > 1:
|
||||||
|
current_chord = current_chord[1:]
|
||||||
|
else:
|
||||||
|
current_chord = ''
|
||||||
if len(current_chord) > 0:
|
if len(current_chord) > 0:
|
||||||
if len(current_chord) > 1:
|
if len(current_chord) > 1:
|
||||||
if '#b'.find(current_chord[1]) == -1:
|
if '#b'.find(current_chord[1]) == -1:
|
||||||
|
Loading…
Reference in New Issue
Block a user