@classmethod
def from_list(cls, constructor_list):
    """
        Construct an envelope from a list that can take a number of formats
        :param constructor_list: either a flat list that just contains levels, or a list of lists either of the form
         [levels_list, total_duration], [levels_list, durations_list] or [levels_list, durations_list, curve_shape_list]
         for example:
         - an input of [1, 0.5, 0.3] is interpreted as evenly spaced levels with a total duration of 1
         - an input of [[1, 0.5, 0.3], 3.0] is interpreted as levels and durations with a total duration of e.g. 3.0
         - an input of [[1, 0.5, 0.3], [0.2, 0.8]] is interpreted as levels and durations
         - an input of [[1, 0.5, 0.3], [0.2, 0.8], [2, 0.5]] is interpreted as levels, durations, and curvatures
        :return: an Envelope constructed accordingly
        """
    assert hasattr(constructor_list, '__len__')
    if hasattr(constructor_list[0], '__len__'):
        if len(constructor_list) == 2:
            if hasattr(constructor_list[1], '__len__'):
                return cls.from_levels_and_durations(constructor_list[0],
                    constructor_list[1])
            else:
                return cls.from_levels(constructor_list[0], length=
                    constructor_list[1])
        elif len(constructor_list) >= 3:
            return cls.from_levels_and_durations(constructor_list[0],
                constructor_list[1], constructor_list[2])
    else:
        return cls.from_levels(constructor_list)
