I would like to align the MIDI and the WAV recordings.
I wrote a simple script that:
- Detects when the MIDI starts (simple, looks for first "not on" event)
- Detects when audio starts (not so simple using heuristic: audio starts when the first
samplegets above the mean of all absolute value of
This kind of works, and gets me to 0-500ms delay, depends on the video. To correct that max 500ms delay I generated an audio file from the MIDI recording, and tried to use cross-correlation phase alignment, but its behavior is erratic and it doesn't work as expected.
Is there any tool/software/idea how to align MIDI and WAV files?