In [1]:
import numpy as np
import IPython.display as ipd
from versionid import *
In [2]:
y1, sr = load_wavfile("covers80_audio/Toys_In_The_Attic/aerosmith+Toys_In_The_Attic+01-Toys_In_The_Attic.wav")
y2, sr = load_wavfile("covers80_audio/Toys_In_The_Attic/rem+Dead_Letter_Office+07-Toys_In_The_Attic.wav")

Version 1: Aerosmith

In [3]:
ipd.Audio(y1[sr*52:sr*74], rate=sr)
Out[3]:

Version 2: REM

In [4]:
ipd.Audio(y2[sr*39:sr*60], rate=sr)
Out[4]:
In [5]:
downsample_fac = 40
hop_length = 256
C1 = librosa.feature.chroma_cqt(y=y1, sr=sr, hop_length=hop_length)
C1 = librosa.util.sync(C1, np.arange(0, C1.shape[1], downsample_fac), aggregate=np.median)
C2 = librosa.feature.chroma_cqt(y=y2, sr=sr, hop_length=hop_length)
C2 = librosa.util.sync(C2, np.arange(0, C2.shape[1], downsample_fac), aggregate=np.median)
In [6]:
get_oti(C1, C2, do_plot=True)
Out[6]:
10
In [ ]: