We can rewrite a MIDI file that ought to synchronize with the audio. Hold on plot(q,p, '-r') hold off Rewriting the MIDI file ![]() % Also plot the DP cost matrix, and the path on top (for the start) % We probably want to zoom in to see the detail % outline() takes a binary matrix and superimposes outlines on an % existing image % avoid log(0) - replace with smallest nonzero value % D returns the (sub-1kHz) spectrogram derived from the wav file, % and M returns the spectrogram-like mask derived from the MIDI. = alignmidiwav(midifile,wavfile,tres,0) ![]() ![]() The 4th argument selects % cosine-distance matching (0), or "peak structure distance" (1). Īddpath() end % Main function takes MIDI file and audio file as input %. % We will need the Jyväskylä MIDI toolbox % from if exist( 'readmidi') ~= 2. The code below shows how to run the alignment using the main alignmidiwav routine, and a couple of ways of how the outputs can be used.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |