Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
malcolmsailor committed Aug 19, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 3babd94 commit d3af7bf
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions music21/romanText/tsvConverter.py
Original file line number Diff line number Diff line change
@@ -256,18 +256,20 @@ def _changeRepresentation(self) -> None:
if self.dcml_version == 2:
self.chord = self.chord.replace('%', 'ø')
self.chord = handleAddedTones(self.chord)
# prefix figures for Mm7 chords on degrees other than 'V' with 'd'
if (
self.extra.get('chord_type', '') == 'Mm7'
and self.numeral != 'V'
):
# we need to make sure not to match [add13] and the like
# However, we need to make sure not to match [add13] and
# the like, otherwise we will end up with [addd13]
self.chord = re.sub(
r'''
(\d+) # match one or more digits
(?![\]\d]) # without a digit or a ']' to the right
''',
r'd\1',
self.chord,
r'd\1',
self.chord,
flags=re.VERBOSE)

# Local - relative and figure

0 comments on commit d3af7bf

Please sign in to comment.