Skip to content

Commit

Permalink
Fix test failure and linting error
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandermorgan committed Jan 19, 2024
1 parent 0a381ff commit 8919f86
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions music21/humdrum/spineParser.py
Original file line number Diff line number Diff line change
Expand Up @@ -2137,9 +2137,8 @@ def _noteMemos(contents):
matchedNote = re.search('([a-gA-G]+)([n#-]*)', contents)
if not matchedNote:
raise HumdrumException(f'Could not parse {contents} for note information')
else:
accountedFor += len(matchedNote.group(0))
step = matchedNote.group(1)[0].lower()
accountedFor += len(matchedNote.group(0))
step = matchedNote.group(1)[0].lower()
return (dur_regex, dotCount, matchedNote, step, accountedFor)


Expand Down Expand Up @@ -2278,7 +2277,10 @@ def hdStringToNote(contents, defaultDuration=None):
elif defaultDuration is not None:
dur = defaultDuration
else:
dur = duration.Duration(4, dots=dotCount)
if 'q' in contents:
dur = duration.Duration(.5, dots=dotCount)
else:
dur = duration.Duration(1, dots=dotCount)

# 3.2.1 Pitches and 3.3 Rests

Expand Down

0 comments on commit 8919f86

Please sign in to comment.