comparison plugins/BeatTrack.cpp @ 31:5cd7e3069553

* minor fixes, and remove DF_POWER again
author Chris Cannam <c.cannam@qmul.ac.uk>
date Mon, 03 Sep 2007 13:37:25 +0000
parents ff5a09e45209
children 3b4572153ce3
comparison
equal deleted inserted replaced
30:ff5a09e45209 31:5cd7e3069553
98 ParameterDescriptor desc; 98 ParameterDescriptor desc;
99 desc.identifier = "dftype"; 99 desc.identifier = "dftype";
100 desc.name = "Onset Detection Function Type"; 100 desc.name = "Onset Detection Function Type";
101 desc.description = "Method used to calculate the onset detection function"; 101 desc.description = "Method used to calculate the onset detection function";
102 desc.minValue = 0; 102 desc.minValue = 0;
103 desc.maxValue = 3; 103 desc.maxValue = 4;
104 desc.defaultValue = 3; 104 desc.defaultValue = 3;
105 desc.isQuantized = true; 105 desc.isQuantized = true;
106 desc.quantizeStep = 1; 106 desc.quantizeStep = 1;
107 desc.valueNames.push_back("High-Frequency Content"); 107 desc.valueNames.push_back("High-Frequency Content");
108 desc.valueNames.push_back("Spectral Difference"); 108 desc.valueNames.push_back("Spectral Difference");
134 case DF_HFC: return 0; 134 case DF_HFC: return 0;
135 case DF_SPECDIFF: return 1; 135 case DF_SPECDIFF: return 1;
136 case DF_PHASEDEV: return 2; 136 case DF_PHASEDEV: return 2;
137 default: case DF_COMPLEXSD: return 3; 137 default: case DF_COMPLEXSD: return 3;
138 case DF_BROADBAND: return 4; 138 case DF_BROADBAND: return 4;
139 case DF_POWER: return 5;
140 } 139 }
141 } else if (name == "whiten") { 140 } else if (name == "whiten") {
142 return m_whiten ? 1.0 : 0.0; 141 return m_whiten ? 1.0 : 0.0;
143 } 142 }
144 return 0.0; 143 return 0.0;
152 case 0: m_dfType = DF_HFC; break; 151 case 0: m_dfType = DF_HFC; break;
153 case 1: m_dfType = DF_SPECDIFF; break; 152 case 1: m_dfType = DF_SPECDIFF; break;
154 case 2: m_dfType = DF_PHASEDEV; break; 153 case 2: m_dfType = DF_PHASEDEV; break;
155 default: case 3: m_dfType = DF_COMPLEXSD; break; 154 default: case 3: m_dfType = DF_COMPLEXSD; break;
156 case 4: m_dfType = DF_BROADBAND; break; 155 case 4: m_dfType = DF_BROADBAND; break;
157 case 5: m_dfType = DF_POWER; break;
158 } 156 }
159 } else if (name == "whiten") { 157 } else if (name == "whiten") {
160 m_whiten = (value > 0.5); 158 m_whiten = (value > 0.5);
161 } 159 }
162 } 160 }
256 tempo.name = "Tempo"; 254 tempo.name = "Tempo";
257 tempo.description = "Locked tempo estimates"; 255 tempo.description = "Locked tempo estimates";
258 tempo.unit = "bpm"; 256 tempo.unit = "bpm";
259 tempo.hasFixedBinCount = true; 257 tempo.hasFixedBinCount = true;
260 tempo.binCount = 1; 258 tempo.binCount = 1;
259 tempo.hasKnownExtents = false;
260 tempo.isQuantized = false;
261 tempo.sampleType = OutputDescriptor::VariableSampleRate; 261 tempo.sampleType = OutputDescriptor::VariableSampleRate;
262 tempo.sampleRate = 1.0 / m_stepSecs; 262 tempo.sampleRate = 1.0 / m_stepSecs;
263 263
264 list.push_back(beat); 264 list.push_back(beat);
265 list.push_back(df); 265 list.push_back(df);