comparison examples/SpectralCentroid.cpp @ 49:aa64a46320d4

* Rename "name" and "description" to "identifier" and "name"; add new "description" that actually contains a description
author cannam
date Mon, 26 Feb 2007 18:08:48 +0000
parents f46bf5e0fa42
children 1982246a3902
comparison
equal deleted inserted replaced
48:f46bf5e0fa42 49:aa64a46320d4
54 SpectralCentroid::~SpectralCentroid() 54 SpectralCentroid::~SpectralCentroid()
55 { 55 {
56 } 56 }
57 57
58 string 58 string
59 SpectralCentroid::getName() const 59 SpectralCentroid::getIdentifier() const
60 { 60 {
61 return "spectralcentroid"; 61 return "spectralcentroid";
62 } 62 }
63 63
64 string 64 string
65 SpectralCentroid::getName() const
66 {
67 return "Spectral Centroid";
68 }
69
70 string
65 SpectralCentroid::getDescription() const 71 SpectralCentroid::getDescription() const
66 { 72 {
67 return "Spectral Centroid"; 73 return "Calculate the centroid frequency of the spectrum of the input signal";
68 } 74 }
69 75
70 string 76 string
71 SpectralCentroid::getMaker() const 77 SpectralCentroid::getMaker() const
72 { 78 {
106 SpectralCentroid::getOutputDescriptors() const 112 SpectralCentroid::getOutputDescriptors() const
107 { 113 {
108 OutputList list; 114 OutputList list;
109 115
110 OutputDescriptor d; 116 OutputDescriptor d;
111 d.name = "logcentroid"; 117 d.identifier = "logcentroid";
118 d.name = "Log Frequency Centroid";
119 d.description = "Centroid of the log weighted frequency spectrum";
112 d.unit = "Hz"; 120 d.unit = "Hz";
113 d.description = "Log Frequency Centroid";
114 d.hasFixedBinCount = true; 121 d.hasFixedBinCount = true;
115 d.binCount = 1; 122 d.binCount = 1;
116 d.hasKnownExtents = false; 123 d.hasKnownExtents = false;
117 d.isQuantized = false; 124 d.isQuantized = false;
118 d.sampleType = OutputDescriptor::OneSamplePerStep; 125 d.sampleType = OutputDescriptor::OneSamplePerStep;
119 list.push_back(d); 126 list.push_back(d);
120 127
121 d.name = "linearcentroid"; 128 d.identifier = "linearcentroid";
122 d.description = "Linear Frequency Centroid"; 129 d.name = "Linear Frequency Centroid";
130 d.description = "Centroid of the linear frequency spectrum";
123 list.push_back(d); 131 list.push_back(d);
124 132
125 return list; 133 return list;
126 } 134 }
127 135