def nframes(dur, hop_size=3072, win_len=4096) -> float:
    """
    Compute the numbero of frames given a total duration, the hop size and
    window length. Output unitiy of measure will be the same as the inputs
    unity of measure (e.g. samples or seconds).

    N.B. This returns a float!
    """
    return (dur - win_len) / hop_size + 1