CPJKU / partitura

A python package for handling modern staff notation of music
https://partitura.readthedocs.io
Apache License 2.0
227 stars 15 forks source link

musicanalysis.estimate_voices() does not include Rests #330

Closed Lelant closed 4 months ago

Lelant commented 11 months ago

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.

Thanks!

github-actions[bot] commented 5 months ago

This issue had no activity for 6 months. It will be closed in 2 weeks unless there is some new activity. Is this issue already resolved?