def selected_envelope(self): """ Project selected envelope. :type: reapy.Envelope or None """ envelope_id = RPR.GetSelectedTrackEnvelope(self.id) envelope = None if envelope_id == 0 else reapy.Envelope(envelope_id) return envelope
def envelope(self): """ Parameter envelope (or None if it doesn't exist). :type: Envelope or NoneType """ parent_fx = self.parent_list.parent_fx parent = parent_fx.parent if isinstance(parent, reapy.Track): callback = RPR.GetFXEnvelope else: # Then it is a Take callback = self.functions["GetEnvelope"] envelope = reapy.Envelope( parent, callback(parent.id, parent_fx.index, self.index, False)) if not envelope._is_defined: envelope = None return envelope
def add_envelope(self): """ Create envelope for the parameter and return it. Returns ------- envelope : Envelope New envelope for the parameter. Notes ----- If the envelope already exists, the function returns it. """ parent_fx = self.parent_list.parent_fx parent = parent_fx.parent if isinstance(parent, reapy.Track): callback = RPR.GetFXEnvelope else: # Then it is a Take callback = self.functions["GetEnvelope"] envelope = reapy.Envelope( parent, callback(parent.id, parent_fx.index, self.index, True)) return envelope