I realised that the function estimate_voices() takes the note_array() to estimate the voices. But it looks like it does not include the rests. Is there a way to also estimate the voices for rests?
My use case is: I want to make sure, that every voice is monophonic. So if I get a new Part object, I run estimate_voices with monophonic_voices = True and then I loop over the resulting list of voices and change the voice of every note to the new voice for this note. But I also want to be able to do this with the rests.
And is there a convenient way of getting all notes and rests? Like .notes and .rests combined? My solution here for now is doing an iter_all() over the part and putting all notes and rests in a new list.
I realised that the function
estimate_voices()
takes the note_array() to estimate the voices. But it looks like it does not include the rests. Is there a way to also estimate the voices for rests?My use case is: I want to make sure, that every voice is monophonic. So if I get a new Part object, I run estimate_voices with
monophonic_voices = True
and then I loop over the resulting list of voices and change the voice of every note to the new voice for this note. But I also want to be able to do this with the rests.And is there a convenient way of getting all notes and rests? Like
.notes
and.rests
combined? My solution here for now is doing aniter_all()
over the part and putting all notes and rests in a new list.Thanks!