JamesOwers / midi_degradation_toolkit

A toolkit for generating datasets of midi files which have been degraded to be 'un-musical'.
MIT License
38 stars 5 forks source link

data_structures fix_overlapping_{notes,pitches} catch introduction of dur 0 notes #103

Closed JamesOwers closed 4 years ago

JamesOwers commented 5 years ago

TODO: add an assertion to catch dur==0 and add a test

https://github.com/JamesOwers/midi_degradation_toolkit/blob/703885761088d315bec29718dcd8ba46a6834b69/mdtk/data_structures.py#L237

apmcleod commented 5 years ago

This is quite related to #104 I think.

These 2 functions are never actually called in practice, I believe. The actual overlap fix is done in fix_overlaps. These 2 functions are only called from make_monophonic and quantize_df, which we never use.

I also don't think that the overlap fix these methods perform is identical to the one we want (implemented in fix_overlaps--there are tests for fix_overlaps in test_data_structures). Particularly, the offset of the latest note is never changed.

fix_overlaps already removes any notes of dur 0.

I think both of these methods should be removed, and possibly others removed and simplified when we look into #104.

JamesOwers commented 4 years ago

we have 3 overlap fixing functions we only use 1! delete the rest!