Mercurial > hg > nnls-chroma
comparison Tuning.cpp @ 71:b8ffc98eda95 matthiasm-plugin
tuning now has a duration (whole song duration), but I cant get SV to display it as regions layer.
author | Matthias Mauch <mail@matthiasmauch.net> |
---|---|
date | Wed, 27 Oct 2010 21:47:37 +0900 |
parents | 1ccb883b585f |
children | d398e73b46e0 |
comparison
equal
deleted
inserted
replaced
70:b0cb793eab7d | 71:b8ffc98eda95 |
---|---|
104 d0.identifier = "tuning"; | 104 d0.identifier = "tuning"; |
105 d0.name = "Tuning"; | 105 d0.name = "Tuning"; |
106 d0.description = "Returns a single label (at time 0 seconds) containing an estimate of the concert pitch in Hz."; | 106 d0.description = "Returns a single label (at time 0 seconds) containing an estimate of the concert pitch in Hz."; |
107 d0.unit = "Hz"; | 107 d0.unit = "Hz"; |
108 d0.hasFixedBinCount = true; | 108 d0.hasFixedBinCount = true; |
109 d0.binCount = 0; | 109 d0.binCount = 1; |
110 d0.hasKnownExtents = true; | 110 d0.hasKnownExtents = true; |
111 d0.minValue = 427.47; | 111 d0.minValue = 427.47; |
112 d0.maxValue = 452.89; | 112 d0.maxValue = 452.89; |
113 d0.isQuantized = false; | 113 d0.isQuantized = false; |
114 d0.sampleType = OutputDescriptor::VariableSampleRate; | 114 d0.sampleType = OutputDescriptor::VariableSampleRate; |
115 d0.hasDuration = false; | 115 d0.hasDuration = true; |
116 list.push_back(d0); | 116 list.push_back(d0); |
117 m_outputTuning = index++; | 117 m_outputTuning = index++; |
118 | 118 |
119 OutputDescriptor d10; | 119 OutputDescriptor d10; |
120 d10.identifier = "localtuning"; | 120 d10.identifier = "localtuning"; |
201 Feature f0; // tuning | 201 Feature f0; // tuning |
202 f0.hasTimestamp = true; | 202 f0.hasTimestamp = true; |
203 f0.timestamp = Vamp::RealTime::frame2RealTime(0, lrintf(m_inputSampleRate)); | 203 f0.timestamp = Vamp::RealTime::frame2RealTime(0, lrintf(m_inputSampleRate)); |
204 f0.values.push_back(cumulativetuning); | 204 f0.values.push_back(cumulativetuning); |
205 f0.label = buffer0; | 205 f0.label = buffer0; |
206 f0.hasDuration = true; | |
207 f0.duration = m_logSpectrum[m_logSpectrum.size()-1].timestamp; | |
206 fsOut[m_outputTuning].push_back(f0); | 208 fsOut[m_outputTuning].push_back(f0); |
207 | 209 |
208 return fsOut; | 210 return fsOut; |
209 | 211 |
210 } | 212 } |