craffel / mir_eval

Evaluation functions for music/audio information retrieval/signal processing algorithms.
MIT License
604 stars 112 forks source link

Fix interpolation in sonify.time_frequency #323

Closed daturkel closed 4 years ago

daturkel commented 4 years ago

This fixes #322. The change is (over)-detailed in this comment but the gist is: because the interpolator used in time_frequency uses the midpoints of chord intervals as boundaries for linear interpolation, it misses the period before the midpoint of the first chord interval and the period after the midpoint of the last chord interval.

Using a tuple in fill_value allows us to tell the interpolator to handle the case where we're before the first midpoint or after the last.

craffel commented 4 years ago

Thanks Dan, just one PEP-8 issue and then we can merge.

daturkel commented 4 years ago

Should be fixed per 177a2fb

craffel commented 4 years ago

Thanks!