@classmethod
def ar(cls, attack_length, release_length, peak_level=1, attack_shape=None,
    release_shape=None):
    """
        Construct an attack/release envelope
        :param attack_length: rise time
        :param release_length: release time
        :param peak_level: level reached after attack and before release
        :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 if release_shape is None else
        release_shape)
    return cls.from_levels_and_durations((0, peak_level, 0), (attack_length,
        release_length), curve_shapes=curve_shapes)
