Problem summary
I was trying to use RepeatFinder on a score that contains a percussion track, but it crashes when calling simplify. It tries to convert the measures to strings, and the translateStreamToString method fails due to the Unpitched notes not containing a pitch field.
Steps to reproduce
s = m21.stream.Stream()
s.append(m21.note.Unpitched("B4"))
m21.search.translateStreamToString(s)
Expected vs. actual behaviortranslateStreamToString returns a string representation for the unpitched note.
Thanks for the diagnosis. I put in a quick fix which will prevent crashing, but it treats Unpitched the same as rests for now. A more power algorithm is probably needed.
music21 version
8.3.0
Problem summary I was trying to use RepeatFinder on a score that contains a percussion track, but it crashes when calling
simplify
. It tries to convert the measures to strings, and thetranslateStreamToString
method fails due to the Unpitched notes not containing a pitch field.Steps to reproduce
Expected vs. actual behavior
translateStreamToString
returns a string representation for the unpitched note.More information