Marsyas  0.5.0-beta1
Public Types | Public Member Functions | Static Public Member Functions
peakView Class Reference

Helper class for accessing peaks in a realvec. More...

#include <peakView.h>

Public Types

enum  pkParameter {
  pkFrequency, pkAmplitude, pkPhase, pkDeltaFrequency,
  pkDeltaAmplitude, pkFrame, pkGroup, pkVolume,
  pkPan, pkBinLow, pkBin, pkBinHigh,
  pkTrack, nbPkParameters
}

Public Member Functions

void fromTable (const realvec &vecTable)
mrs_natural getFrameMaxNumPeaks () const
mrs_natural getFrameNumPeaks (const mrs_natural frame=0, const mrs_natural group=-1) const
mrs_natural getFrameSize () const
mrs_real getFs () const
mrs_natural getNumFrames () const
mrs_natural getNumGroups ()
void getPeaksParam (std::vector< realvec > &result, const pkParameter param, mrs_natural startFrame=0, mrs_natural endFrame=0) const
mrs_natural getTotalNumPeaks (const mrs_natural group=-1) const
mrs_realoperator() (const mrs_natural peakIndex, const pkParameter param, const mrs_natural frame=0, const mrs_natural group=-1)
mrs_real operator() (const mrs_natural peakIndex, const pkParameter param, const mrs_natural frame=0, const mrs_natural group=-1) const
bool peakRead (std::string filename)
 peakView (realvec &vec)
bool peakWrite (std::string filename, mrs_real fs=0, mrs_natural frameSize=0)
void removePeak (const mrs_natural peakIndex, const mrs_natural frame)
void toTable (realvec &vecTable)
 ~peakView ()

Static Public Member Functions

static std::string getParamName (mrs_natural paramIdx)

Detailed Description

Helper class for accessing peaks in a realvec.

Definition at line 34 of file peakView.h.


Member Enumeration Documentation

Enumerator:
pkFrequency 
pkAmplitude 
pkPhase 
pkDeltaFrequency 
pkDeltaAmplitude 
pkFrame 
pkGroup 
pkVolume 
pkPan 
pkBinLow 
pkBin 
pkBinHigh 
pkTrack 
nbPkParameters 

Definition at line 37 of file peakView.h.


Constructor & Destructor Documentation

peakView ( realvec vec)

Definition at line 26 of file peakView.cpp.

~peakView ( )

Definition at line 33 of file peakView.cpp.


Member Function Documentation

void fromTable ( const realvec vecTable)

Definition at line 230 of file peakView.cpp.

mrs_natural getFrameMaxNumPeaks ( ) const [inline]

Definition at line 77 of file peakView.h.

mrs_natural getFrameNumPeaks ( const mrs_natural  frame = 0,
const mrs_natural  group = -1 
) const

Definition at line 54 of file peakView.cpp.

mrs_natural getFrameSize ( ) const [inline]

Definition at line 72 of file peakView.h.

mrs_real getFs ( ) const [inline]

Definition at line 71 of file peakView.h.

mrs_natural getNumFrames ( ) const [inline]

Definition at line 74 of file peakView.h.

mrs_natural getNumGroups ( )

Definition at line 39 of file peakView.cpp.

mrs_string getParamName ( mrs_natural  paramIdx) [static]

Definition at line 141 of file peakView.cpp.

void getPeaksParam ( std::vector< realvec > &  result,
const pkParameter  param,
mrs_natural  startFrame = 0,
mrs_natural  endFrame = 0 
) const

Definition at line 111 of file peakView.cpp.

mrs_natural getTotalNumPeaks ( const mrs_natural  group = -1) const

Definition at line 86 of file peakView.cpp.

mrs_real & operator() ( const mrs_natural  peakIndex,
const pkParameter  param,
const mrs_natural  frame = 0,
const mrs_natural  group = -1 
) [inline]

Definition at line 95 of file peakView.h.

mrs_real operator() ( const mrs_natural  peakIndex,
const pkParameter  param,
const mrs_natural  frame = 0,
const mrs_natural  group = -1 
) const [inline]

Definition at line 123 of file peakView.h.

bool peakRead ( std::string  filename)

Definition at line 288 of file peakView.cpp.

bool peakWrite ( std::string  filename,
mrs_real  fs = 0,
mrs_natural  frameSize = 0 
)

Definition at line 272 of file peakView.cpp.

void removePeak ( const mrs_natural  peakIndex,
const mrs_natural  frame 
)

Definition at line 97 of file peakView.cpp.

void toTable ( realvec vecTable)

Definition at line 191 of file peakView.cpp.


The documentation for this class was generated from the following files: