annotate Source/ObservationData.h @ 15:585caf503ef5 tip

Tidy up for ROLI
author Geogaddi\David <d.m.ronan@qmul.ac.uk>
date Tue, 17 May 2016 18:50:19 +0100
parents 761289a660c6
children
rev   line source
d@0 1 /*
d@0 2 ==============================================================================
d@0 3
d@0 4 ObservationData.h
d@0 5 Created: 28 Aug 2014 5:28:49pm
d@0 6 Author: david.ronan
d@0 7
d@0 8 ==============================================================================
d@0 9 */
d@0 10
d@0 11 #ifndef OBSERVATIONDATA_H_INCLUDED
d@0 12 #define OBSERVATIONDATA_H_INCLUDED
d@0 13
d@0 14 #include <vector>
d@0 15
d@0 16 class ObservationData
d@0 17 {
d@0 18 public:
d@0 19 ObservationData();
d@0 20 ~ObservationData();
d@0 21
d@10 22 ObservationData(float rms, float peak, float crestfactor, float zcr, float centroid, float spread, float skewness, float kurtosis, float brightness, float rolloff85, float rolloff95, float spectralentropy, float flatness, float spectralcf, float spectralflux, std::vector<float> mfccs, std::vector<float> spectralContrast, std::vector<float> spectralValley, float periodicity, float entropyofenergy)
d@0 23 {
d@0 24 m_peak = peak;
d@0 25 m_rms = rms;
d@0 26 m_crestFactor = crestfactor;
d@0 27 m_zcr = zcr;
d@0 28 m_centroid = centroid;
d@0 29 m_spread = spread;
d@0 30 m_skewness = skewness;
d@0 31 m_kurtosis = kurtosis;
d@0 32 m_brightness = brightness;
d@0 33 m_rolloff85 = rolloff85;
d@0 34 m_rolloff95 = rolloff95;
d@0 35 m_spectralentropy = spectralentropy;
d@0 36 m_flatness = flatness;
d@0 37 m_spectralcf = spectralcf;
d@0 38 m_spectralflux = spectralflux;
d@0 39 m_mfccs = mfccs;
d@10 40 m_spectralContrast = spectralContrast;
d@10 41 m_spectralValley = spectralValley;
d@0 42 m_periodicity = periodicity;
d@0 43 m_entropyofenergy = entropyofenergy;
d@0 44 };
d@0 45
d@10 46 ObservationData(float rms, float peak, float crestfactor, float zcr, float centroid, float spread, float skewness, float kurtosis, float brightness, float rolloff85, float rolloff95, float spectralentropy, float flatness, float spectralcf, float spectralflux, std::vector<float> mfccs, std::vector<float> dmfccs, std::vector<float> spectralContrast, std::vector<float> spectralValley, float periodicity, float entropyofenergy)
d@0 47 {
d@0 48 m_peak = peak;
d@0 49 m_rms = rms;
d@0 50 m_crestFactor = crestfactor;
d@0 51 m_zcr = zcr;
d@0 52 m_centroid = centroid;
d@0 53 m_spread = spread;
d@0 54 m_skewness = skewness;
d@0 55 m_kurtosis = kurtosis;
d@0 56 m_brightness = brightness;
d@0 57 m_rolloff85 = rolloff85;
d@0 58 m_rolloff95 = rolloff95;
d@0 59 m_spectralentropy = spectralentropy;
d@0 60 m_flatness = flatness;
d@0 61 m_spectralcf = spectralcf;
d@12 62 m_spectralflux = spectralflux;
d@12 63 m_mfccs = mfccs;
d@12 64 m_dmfccs = dmfccs;
d@10 65 m_spectralContrast = spectralContrast;
d@10 66 m_spectralValley = spectralValley;
d@0 67 m_periodicity = periodicity;
d@0 68 m_entropyofenergy = entropyofenergy;
d@0 69 };
d@0 70
d@0 71 float GetPeak(){return m_peak;}
d@0 72 float GetRMS(){return m_rms;}
d@0 73 float GetCrestFactor(){return m_crestFactor;}
d@0 74 float GetZCR(){return m_zcr;}
d@0 75 float GetCentroid(){return m_centroid;}
d@0 76 float GetSpread(){return m_spread;}
d@0 77 float GetSkewness(){return m_skewness;}
d@0 78 float GetKurtosis(){return m_kurtosis;}
d@0 79 float GetBrightness(){return m_brightness;}
d@0 80 float GetRollOff85(){return m_rolloff85;}
d@0 81 float GetRollOff95(){return m_rolloff95;}
d@0 82 float GetSpectralEntropy(){return m_spectralentropy;}
d@0 83 float GetFlatness(){return m_flatness;}
d@0 84 float GetSpectralCF(){return m_spectralcf;}
d@0 85 float GetSpectralFlux(){return m_spectralflux;}
d@0 86 float GetPeriodicity(){return m_periodicity;}
d@0 87 float GetEntropyOfEnergy(){return m_entropyofenergy;}
d@0 88 float GetLowEnergy(){return m_lowEnergy;}
d@0 89 std::vector<float> GetMFCCs(){return m_mfccs;}
d@0 90 std::vector<float> GetDeltaMFCCs(){return m_dmfccs;}
d@10 91 std::vector<float> GetSpectralContrast(){ return m_spectralContrast; }
d@10 92 std::vector<float> GetSpectralValley(){ return m_spectralValley; }
d@0 93
d@0 94 //WholeTrack Feature
d@0 95 void SetLowEnergy(float lowEnergy){m_lowEnergy = lowEnergy;}
d@0 96
d@0 97 private:
d@0 98 float m_peak;
d@0 99 float m_rms;
d@0 100 float m_crestFactor;
d@0 101 float m_zcr;
d@0 102 float m_centroid;
d@0 103 float m_spread;
d@0 104 float m_skewness;
d@0 105 float m_kurtosis;
d@0 106 float m_brightness;
d@0 107 float m_rolloff85;
d@0 108 float m_rolloff95;
d@0 109 float m_spectralentropy;
d@0 110 float m_flatness;
d@0 111 float m_spectralcf;
d@0 112 float m_spectralflux;
d@0 113 std::vector<float> m_mfccs;
d@0 114 std::vector<float> m_dmfccs;
d@10 115 std::vector<float> m_spectralContrast;
d@10 116 std::vector<float> m_spectralValley;
d@0 117 float m_periodicity;
d@0 118 float m_lowEnergy;
d@0 119 float m_entropyofenergy;
d@0 120 };
d@0 121
d@0 122
d@0 123
d@0 124 #endif // OBSERVATIONDATA_H_INCLUDED