Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segment fragment #199

Open
Luke-Poeppel opened this issue Jul 5, 2021 · 0 comments
Open

Segment fragment #199

Luke-Poeppel opened this issue Jul 5, 2021 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@Luke-Poeppel
Copy link
Owner

Luke-Poeppel commented Jul 5, 2021

There are a number of instances (particularly Livre d'Orgue movements and moments of SF) where the rhythm is consecutive X notes (e.g. 16th, 32nd, etc.). In these cases, we don't really care about extracting paths. It would be cool to have a Segment fragment for these regions. So a search/result might look like:

>>> path = path_finder(
...        ....,
...        use_segments=True
>>> )
>>> for x in path:
...         print(x.fragment, x.fragment.num_onsets)
<fragment.GreekFoot Trochee> 2
<fragment.GreekFoot Iamb> 2
<fragment.GreekFoot Iamb> 2
<fragment.Segment> 37
...

This would require some kind of clustering testing (essentially an addition to the neutral source/target pick of Dijkstra). Would also have to set a threshold for segment length. So alternatively maybe:

>>> path = path_finder(
...        ....,
...        min_segment_length=10
>>> )
>>> for x in path:
...         print(x.fragment, x.fragment.num_onsets)
<fragment.GreekFoot Trochee> 2
<fragment.GreekFoot Iamb> 2
<fragment.GreekFoot Iamb> 2
<fragment.Segment> 37
...

The shortest segment would, I think, be of length 5.

@Luke-Poeppel Luke-Poeppel added the enhancement New feature or request label Jul 5, 2021
@Luke-Poeppel Luke-Poeppel self-assigned this Jul 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant