def __freq_for_index(index, len_list):
    """
    Calculates the frequency for a given index based on the list length.
    The base is f(x) = -(x^2) + 1
    The result, which is always between 0.0 and 1.0, is then adjusted to be
    in the interval [15;255]. This value can then be used in the combined list.
    """
    x = index / len_list
    return int(240 * (-(x**2) + 1) + 15)