Mixxx

/home/maxime/Projets/Mixxx/1.10/mixxx/src/bpm/wavesegmentation.h

Go to the documentation of this file.
00001 // wavesegmentation.h: interface for the Segmentation class.
00002 //
00004 
00005 #ifndef WAVESEGMENTATION_H
00006 #define WAVESEGMENTATION_H
00007 
00008 #include "math.h"
00009 
00010 #ifndef min
00011 #define min(A,B) ((A)>(B)?(B):(A))
00012 #endif
00013 
00014 #define MAX_SEGMENT_SIZE 250
00015 
00016 
00017 class WaveSegmentation  
00018 {
00019 public:
00020         WaveSegmentation();
00021         virtual ~WaveSegmentation();
00022         
00023         int Process(double *psdf,int count,float *segPoints,int maxPoints);
00024 
00025 };
00026 
00027 
00028 class Rhythmogram {
00029 private:
00030         double * _rhythmogram;
00031         long r_width;
00032         long r_height;
00033 public:
00034         long width();
00035         long height();
00036         Rhythmogram(double *psdf, 
00037                         int     count,
00038                                 double  FeatureStepSize  = 0.01,
00039                         double  HorzStepSize     = 0.5, 
00040                                 double  BlockSize        = 8.0,
00041                                 double  HighRhythmIntv   = 2.0,
00042                                 double  LowRhythmIntv    = 0.0, 
00043                                 double  ZeroRhythmIntv   = 0.1
00044                                  );
00045         double * column(int c);
00046 
00047         ~Rhythmogram();
00048         static void acf(double *wav, int nwav, double *acf, int nacf);
00049 };
00050 
00051 
00052 class selfsim {
00053 private:
00054         double * _selfsim;
00055         long s_size;
00056 public:
00057         selfsim(Rhythmogram *rg);
00058         ~selfsim();
00059         long size();
00060         double * column(int c);
00061 
00062 };
00063 
00064 
00065 class ShortestPath  
00066 {
00067         int *segPoints;
00068         int nPoints;
00069         double _HorzStepSize;
00070 public:
00071         ShortestPath(selfsim *ss,double Threshold,
00072                          double  HorzStepSize     = 0.5);
00073         ~ShortestPath();
00074         int length();
00075         float getPoint(int n);
00076 };
00077 
00078 
00079 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines