Audacity  3.0.3
Public Member Functions | Private Attributes | List of all members
BoundedEnvelope Class Referencefinal

#include <Envelope.h>

Inheritance diagram for BoundedEnvelope:
Collaboration diagram for BoundedEnvelope:

Public Member Functions

double GetRangeLower () const
double GetRangeUpper () const
void SetRangeLower (double lower)
void SetRangeUpper (double upper)
 Envelope (bool exponential, double minValue, double maxValue, double defaultValue)
 Envelope (const Envelope &orig)
 Envelope (const Envelope &orig, double t0, double t1)
- Public Member Functions inherited from Envelope
 Envelope (bool exponential, double minValue, double maxValue, double defaultValue)
 Envelope (const Envelope &orig)
 Envelope (const Envelope &orig, double t0, double t1)
void Initialize (int numPoints)
virtual ~Envelope ()
bool ConsistencyCheck ()
double GetOffset () const
double GetTrackLen () const
bool GetExponential () const
void SetExponential (bool db)
void Flatten (double value)
double GetMinValue () const
double GetMaxValue () const
void SetRange (double minValue, double maxValue)
double ClampValue (double value)
bool HandleXMLTag (const wxChar *tag, const wxChar **attrs) override
XMLTagHandlerHandleXMLChild (const wxChar *tag) override
void WriteXML (XMLWriter &xmlFile) const
void CollapseRegion (double t0, double t1, double sampleDur)
void PasteEnvelope (double t0, const Envelope *e, double sampleDur)
void InsertSpace (double t0, double tlen)
void SetOffset (double newOffset)
void SetTrackLen (double trackLen, double sampleDur=0.0)
void RescaleValues (double minValue, double maxValue)
void RescaleTimes (double newLength)
double GetValue (double t, double sampleDur=0) const
 Get envelope value at time t. More...
void GetValues (double *buffer, int len, double t0, double tstep) const
 Get many envelope points at once. More...
void Cap (double sampleDur)
double Average (double t0, double t1) const
double AverageOfInverse (double t0, double t1) const
double Integral (double t0, double t1) const
double IntegralOfInverse (double t0, double t1) const
double SolveIntegralOfInverse (double t0, double area) const
void print () const
void testMe ()
bool IsDirty () const
void Clear ()
int InsertOrReplace (double when, double value)
 Add a point at a particular absolute time coordinate. More...
int Reassign (double when, double value)
 Move a point at when to value. More...
void Delete (int point)
 DELETE a point by its position in array. More...
void Insert (int point, const EnvPoint &p)
 insert a point More...
void Insert (double when, double value)
size_t GetNumberOfPoints () const
 Return number of points. More...
const EnvPointoperator[] (int index) const
 Accessor for points. More...
void GetPoints (double *bufferWhen, double *bufferValue, int bufferLen) const
 Returns the sets of when and value pairs. More...
int GetDragPoint () const
void SetDragPoint (int dragPoint)
void SetDragPointValid (bool valid)
bool GetDragPointValid () const
void MoveDragPoint (double newWhen, double value)
void ClearDragPoint ()
- Public Member Functions inherited from XMLTagHandler
 XMLTagHandler ()
virtual ~XMLTagHandler ()
virtual void HandleXMLEndTag (const wxChar *WXUNUSED(tag))
virtual void HandleXMLContent (const wxString &WXUNUSED(content))
bool ReadXMLTag (const char *tag, const char **attrs)
void ReadXMLEndTag (const char *tag)
void ReadXMLContent (const char *s, int len)
XMLTagHandlerReadXMLChild (const char *tag)

Private Attributes

double mRangeLower {}
double mRangeUpper {}

Additional Inherited Members

- Static Public Member Functions inherited from Envelope
static void GetValues (const Envelope &env, double aligned_time, double sampleDur, double *buffer, int bufferLen, int leftOffset, const ZoomInfo &zoomInfo)
 Get many envelope points for pixel columns at once, but don't assume uniform time per pixel. More...

Detailed Description

Definition at line 283 of file Envelope.h.

Member Function Documentation

◆ Envelope() [1/3]


Definition at line 74 of file Envelope.cpp.

46  : mDB(exponential)
47  , mMinValue(minValue)
48  , mMaxValue(maxValue)
49  , mDefaultValue { ClampValue(defaultValue) }
50 {
51 }

◆ Envelope() [2/3]


Definition at line 76 of file Envelope.cpp.

260  : mDB(orig.mDB)
261  , mMinValue(orig.mMinValue)
262  , mMaxValue(orig.mMaxValue)
263  , mDefaultValue(orig.mDefaultValue)
264 {
265  mOffset = orig.mOffset;
266  mTrackLen = orig.mTrackLen;
267  CopyRange(orig, 0, orig.GetNumberOfPoints());
268 }

◆ Envelope() [3/3]


Definition at line 79 of file Envelope.cpp.

246  : mDB(orig.mDB)
247  , mMinValue(orig.mMinValue)
248  , mMaxValue(orig.mMaxValue)
249  , mDefaultValue(orig.mDefaultValue)
250 {
251  mOffset = wxMax(t0, orig.mOffset);
252  mTrackLen = wxMin(t1, orig.mOffset + orig.mTrackLen) - mOffset;
254  auto range1 = orig.EqualRange( t0 - orig.mOffset, 0 );
255  auto range2 = orig.EqualRange( t1 - orig.mOffset, 0 );
256  CopyRange(orig, range1.first, range2.second);
257 }

References Envelope::Delete(), and Envelope::mDragPoint.

Here is the call graph for this function:

◆ GetRangeLower()

double BoundedEnvelope::GetRangeLower ( ) const

Definition at line 288 of file Envelope.h.

288 { return mRangeLower; }

References mRangeLower.

◆ GetRangeUpper()

double BoundedEnvelope::GetRangeUpper ( ) const

Definition at line 289 of file Envelope.h.

289 { return mRangeUpper; }

References mRangeUpper.

◆ SetRangeLower()

void BoundedEnvelope::SetRangeLower ( double  lower)

Definition at line 291 of file Envelope.h.

291 { mRangeLower = lower; }

References mRangeLower.

◆ SetRangeUpper()

void BoundedEnvelope::SetRangeUpper ( double  upper)

Definition at line 292 of file Envelope.h.

292 { mRangeUpper = upper; }

References mRangeUpper.

Member Data Documentation

◆ mRangeLower

double BoundedEnvelope::mRangeLower {}

Definition at line 295 of file Envelope.h.

Referenced by GetRangeLower(), and SetRangeLower().

◆ mRangeUpper

double BoundedEnvelope::mRangeUpper {}

Definition at line 295 of file Envelope.h.

Referenced by GetRangeUpper(), and SetRangeUpper().

The documentation for this class was generated from the following file:
double mMinValue
Definition: Envelope.h:256
double mTrackLen
The length of the envelope, which is the same as the length of the underlying track (normally)
Definition: Envelope.h:248
bool mDB
Definition: Envelope.h:255
double mRangeUpper
Definition: Envelope.h:295
double mDefaultValue
Definition: Envelope.h:257
double ClampValue(double value)
Definition: Envelope.h:110
double mMaxValue
Definition: Envelope.h:256
double mOffset
The time at which the envelope starts, i.e. the start offset.
Definition: Envelope.h:245
void CopyRange(const Envelope &orig, size_t begin, size_t end)
Definition: Envelope.cpp:270
double mRangeLower
Definition: Envelope.h:295