def compare_fingerprints(fp1, fp2):
    """
    compute the 'distance' between two fingerprints.
    it consists of the sum of the distance of each frame
    of fp1 from the frame at the same index in fp2.
    since each frame is a sorted list of frequencies, the
    distance between two frames is the sum of the |difference|
    of the values at the same indices in both frames

    :param fp1: a fingerprint (list)
    :param fp2: a fingerprint (list)
    :return: the difference between fp1 fp2 (int)
    """
    s = 0
    x = min(len(fp1), len(fp2))
    y = min(len(fp1[0]), len(fp2[0]))

    for i in range(x):
        t1 = fp1[i]
        t2 = fp2[i]

        for j in range(y):
            s += abs(t1[j] - t2[j])

    return s