meinardmueller/synctoolbox

Define a limit on how far to warp

Opened this issue · 1 comments

Firstly, thank you for releasing this library!

I'm working with some data where I know that the midi is roughly well aligned with the audio already, but I want to make an even finer alignment where possible.

Is there a way to restrict the warping so that it yields a path which is always within 50ms of the original timing? (i.e. by limiting the search area) I hope that makes sense but please let me know if I can clarify.

Hi Xavier,

thanks for your interest in synctoolbox! Yes, what you are describing makes a lot of sense. It corresponds to applying a narrow Sakoe-Chiba band along the diagonal (see e.g. Section 3.2.2.3 in "Fundamentals of Music Processing", Müller '15; or the corresponding notebook in the FMP notebooks).

This is not currently implemented in synctoolbox. However, you could easily achieve this by putting infinite costs into the local cost matrix outside of the 50ms band. Then, you can use that modified cost matrix for DTW.

Hope this helps! Please don't hesitate to contact us if you want to discuss this further.