@classmethod
def asr(cls, attack_length, sustain_level, sustain_length, release_length,
    attack_shape=None, release_shape=None):
    """
        Construct an attack/sustain/release envelope
        :param attack_length: rise time
        :param sustain_level: sustain level reached after attack and before release
        :param sustain_length: length of sustain portion of curve
        :param release_length: release time
        :param attack_shape: sets curve shape for attack portion of the curve
        :param release_shape: sets curve shape for release portion of the curve
        :return: an Envelope constructed accordingly
       """
    curve_shapes = None if attack_shape is release_shape is None else (0 if
        attack_shape is None else attack_shape, 0, 0 if release_shape is
        None else release_shape)
    return cls.from_levels_and_durations((0, sustain_level, sustain_level, 
        0), (attack_length, sustain_length, release_length), curve_shapes=
        curve_shapes)
