Skip to content

Commit

Permalink
Adjust doc test expected val and use getGrace inPlace arg
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandermorgan committed Apr 30, 2024
1 parent 7a566ba commit e03b0cb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions music21/humdrum/spineParser.py
Original file line number Diff line number Diff line change
Expand Up @@ -2193,7 +2193,7 @@ def hdStringToNote(contents, defaultDuration=None):
>>> n = humdrum.spineParser.hdStringToNote('gg#q/LL')
>>> n.duration
<music21.duration.GraceDuration unlinked type:eighth quarterLength:0.0>
<music21.duration.GraceDuration unlinked type:quarter quarterLength:0.0>
>>> n.duration.isGrace
True
Expand Down Expand Up @@ -2377,14 +2377,14 @@ def hdStringToNote(contents, defaultDuration=None):

# 3.2.9 Grace Notes and Groupettos
if qCount := contents.count('q'):
thisObject = thisObject.getGrace()
thisObject.getGrace(inPlace=True)
if qCount == 2:
thisObject.duration.slash = False
elif 'Q' in contents:
thisObject = thisObject.getGrace()
thisObject.getGrace(inPlace=True)
thisObject.duration.slash = False
elif 'P' in contents:
thisObject = thisObject.getGrace(appoggiatura=True)
thisObject.getGrace(appoggiatura=True, inPlace=True)
elif 'p' in contents:
pass # end appoggiatura duration -- not needed in music21...

Expand Down

0 comments on commit e03b0cb

Please sign in to comment.