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

Need to deal with missing quarterbeats and duration_qb values due to 1st/2nd endings (voltas) #67

Open
johentsch opened this issue Dec 12, 2023 · 0 comments

Comments

@johentsch
Copy link
Member

pipeline = [
    dict(dtype="HasHarmonyLabelsFilter", keep_values=[True]),
    "KeySlicer",
]
A = D.apply_step(*pipeline) # D  = DLC
B = A.apply_step("ModeGrouper")
A, B = analyzers.BigramAnalyzer(features="BassNotes").process(A, B)
a_table, b_table = A.get_result(), B.get_result()
a_bg_tuples = a_table.make_bigram_tuples(("bass_degree", "intervals_over_bass"), join_str=True)
b_bg_tuples = b_table.make_bigram_tuples(("bass_degree", "intervals_over_bass"), join_str=True)
a_df = a_bg_tuples.df
b_df = b_bg_tuples.filter_index_level(level=0, drop_level=True).reindex(a_df.index)
diff_mask = (a_df != b_df).values
print(f"{diff_mask.sum()} differences")
comparison = pd.concat([a_df[diff_mask], b_df[diff_mask]], axis=1)
comparison

There should be no differences. Currently, both n-gram sequences contain inconsistencies due to this issue, but: comparison.zip

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

No branches or pull requests

1 participant