def soft_timing(Nframes, time, fpsmin=10, fpsmax=20):
    """determines time & fps; aims for target time, but forces fpsmin < fps < fpsmax.
    
    example usage: target 3 seconds, but force 10 < fps < 25:
        import QOL.animations as aqol
        for i in range(50):
            code_that_makes_plot_number_i()
            aqol.saveframe('moviename')
            plt.close()
        aqol.movie('moviename', **soft_timing(3, 10, 25))
        
    returns dict(time=time, fps=fps)
    """
    if   time > Nframes/fpsmin: #makes sure the movie doesnt go too slow.
        (time, fps) = (None, fpsmin)
    elif time < Nframes/fpsmax: #makes sure the movie doesnt go too fast.
        (time, fps) = (None, fpsmax)
    else: #makes the movie <time> duration if it will have fpsmin < fps < fpsmax.
        (time, fps) = (time, 1) #fps will be ignored in aqol.movie since time is not None. 
    return dict(time=time, fps=fps)