Skip to content

Fixes #199. Segment fragment#236

Open
Luke-Poeppel wants to merge 7 commits into
devfrom
199_segment_fragment
Open

Fixes #199. Segment fragment#236
Luke-Poeppel wants to merge 7 commits into
devfrom
199_segment_fragment

Conversation

@Luke-Poeppel

Copy link
Copy Markdown
Owner

Fixes #199.

@Luke-Poeppel

Copy link
Copy Markdown
Owner Author

Approach I'm taking is to form the groupings in the rolling_hash_search. Instead of creating a single list of frames from roll_window(window), I use groupby to find the partitions and run roll_window on each of the grouped lists individually. All of these individuals are combined and searched.

This avoids the issue of overlap. Does make me think that I should eventually write a utils.skippy_roll_window function...

@Luke-Poeppel

Luke-Poeppel commented Jul 23, 2021

Copy link
Copy Markdown
Owner Author

I realized that a Segment should, for lack of a better term, have some 'give' –– that is, it's possible that the boundaries of a Segment belong to a fragment that follows. For example, the cadence of a chorale often ends on a tone of a longer duration and is preceeded by a number of quarter notes. However, one possible analysis (particularly w.r.t to the prosody) might consider the final two quarters of the segments as belonging to an Anapestic structure...

This complicates the specification a bit. One approach is to add a parameter, say sbc ('segment boundary check/cutoff'). Keep the search completely as planned. But, at the end, search with all of these boundary points and add them at the appropriate location in the final data. Default sbc would probably be 0. If set to non-zero with no min_segment_length, throw standard exception.

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

Merging #236 (9bccc0d) into dev (f648e05) will decrease coverage by 0.18%.
The diff coverage is 55.00%.

@@            Coverage Diff             @@
##              dev     #236      +/-   ##
==========================================
- Coverage   77.56%   77.38%   -0.19%     
==========================================
  Files          18       18              
  Lines        2585     2604      +19     
==========================================
+ Hits         2005     2015      +10     
- Misses        580      589       +9     

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants