def time2frame(time, hop_size=3072, win_len=4096) -> int:
    """
    Takes a time position and outputs the best frame representing it.
    The input must use the same unity of measure for ``time``, ``hop_size``,
    and ``win_len`` (e.g. samples or seconds).  Indices start from 0.

    Returns and int!
    """
    return round((time - win_len / 2) / hop_size)