-
Notifications
You must be signed in to change notification settings - Fork 433
Closed
Description
music21 version
7.2.1
Problem summary
If I put a single triplet eighth-note rest at the end of a 3-quarter-note voice (leaving a starting gap of 11 triplet eighth notes) and then call makeRests, it inserts a rest with duration.tuplets = (<music21.duration.Tuplet 12/11/16th>,) instead of what I would expect: duration.tuplets = (<music21.duration.Tuplet 3/2/eighth>,). The actual duration.quarterLength is correct (11/3ql), but I don't understand that weird tuplet choice (12 actual 16th notes in the space of 11 normal 16th notes).
Steps to reproduce
from fractions import Fraction
import music21 as m21
restVoice = m21.stream.Voice()
secondNote = m21.note.Rest()
secondNote.duration = m21.duration.Duration(Fraction(1, 3))
restVoice.insert(Fraction(11, 3), secondNote)
restVoice.makeRests(inPlace=True, hideRests=True)
firstNote = restVoice.notesAndRests[0]
print('firstNote = ', firstNote)
print('firstNote tuplets = ', firstNote.duration.tuplets)
print('secondNote = ', secondNote)
print('secondNote tuplets = ', secondNote.duration.tuplets)
Expected vs. actual behavior
More information
Metadata
Metadata
Assignees
Labels
No labels