def durFallingSlopes(Frames, threshold=0.0):
    """Computes durations (counted in number of frames)
    of FALLING slopes.Returns an array of
    all durations of FALLING slopes in the signal.
    
    ARGUMENTS:
        Frames: List of values of pitch or energy.
        threshold: Helping variable (belongs to [0,1] range)
                   that is used to ignore small rising slopes
                   between two more dominant falling slopes.
                   
    RETURNS:
        List of duration of all falling slopes."""
    counter, previous, durations = 1, Frames[0], []
    for i in range(len(Frames)):
        if Frames[i] < previous:
            counter = counter + 1
            peak = Frames[i]
        elif counter > 1:
            if Frames[i] < (1 + threshold) * peak:
                counter = counter + 1
            else:
                durations.append(counter)
                counter = 1
        previous = Frames[i]
    if counter > 1:
        durations.append(counter)
    return durations
