Mercurial > hg > segmenter-vamp-plugin
comparison segmentino/Segmentino.cpp @ 49:1ec0e2823891
Switch to using subrepo copies of qm-dsp, nnls-chroma, vamp-plugin-sdk; update Armadillo version; assume build without external BLAS/LAPACK
author | Chris Cannam |
---|---|
date | Thu, 13 Jun 2013 10:25:24 +0100 |
parents | 69251e11a913 |
children | 413c4582824a |
comparison
equal
deleted
inserted
replaced
48:69251e11a913 | 49:1ec0e2823891 |
---|---|
15 COPYING included with this distribution for more information. | 15 COPYING included with this distribution for more information. |
16 */ | 16 */ |
17 | 17 |
18 #include "Segmentino.h" | 18 #include "Segmentino.h" |
19 | 19 |
20 #include <base/Window.h> | 20 #include <qm-dsp/base/Window.h> |
21 #include <dsp/onsets/DetectionFunction.h> | 21 #include <qm-dsp/dsp/onsets/DetectionFunction.h> |
22 #include <dsp/onsets/PeakPicking.h> | 22 #include <qm-dsp/dsp/onsets/PeakPicking.h> |
23 #include <dsp/transforms/FFT.h> | 23 #include <qm-dsp/dsp/transforms/FFT.h> |
24 #include <dsp/tempotracking/TempoTrackV2.h> | 24 #include <qm-dsp/dsp/tempotracking/TempoTrackV2.h> |
25 #include <dsp/tempotracking/DownBeat.h> | 25 #include <qm-dsp/dsp/tempotracking/DownBeat.h> |
26 #include <chromamethods.h> | 26 #include <qm-dsp/maths/MathUtilities.h> |
27 #include <maths/MathUtilities.h> | 27 |
28 #include <nnls-chroma/chromamethods.h> | |
29 | |
28 #include <boost/numeric/ublas/matrix.hpp> | 30 #include <boost/numeric/ublas/matrix.hpp> |
29 #include <boost/numeric/ublas/io.hpp> | 31 #include <boost/numeric/ublas/io.hpp> |
30 #include <boost/math/distributions/normal.hpp> | 32 #include <boost/math/distributions/normal.hpp> |
31 #include "armadillo" | 33 |
34 #include <armadillo> | |
35 | |
32 #include <fstream> | 36 #include <fstream> |
33 #include <sstream> | 37 #include <sstream> |
34 #include <cmath> | 38 #include <cmath> |
35 #include <vector> | 39 #include <vector> |
36 | 40 |
768 << endl; | 772 << endl; |
769 return FeatureSet(); | 773 return FeatureSet(); |
770 } | 774 } |
771 | 775 |
772 FeatureSet masterFeatureset = beatTrack(); | 776 FeatureSet masterFeatureset = beatTrack(); |
773 Vamp::RealTime last_beattime = masterFeatureset[m_beatOutputNumber][masterFeatureset[m_beatOutputNumber].size()-1].timestamp; | 777 int beatcount = masterFeatureset[m_beatOutputNumber].size(); |
778 if (beatcount == 0) return Segmentino::FeatureSet(); | |
779 Vamp::RealTime last_beattime = masterFeatureset[m_beatOutputNumber][beatcount-1].timestamp; | |
774 masterFeatureset[m_beatOutputNumber].clear(); | 780 masterFeatureset[m_beatOutputNumber].clear(); |
775 Vamp::RealTime beattime = Vamp::RealTime::fromSeconds(1.0); | 781 Vamp::RealTime beattime = Vamp::RealTime::fromSeconds(1.0); |
776 while (beattime < last_beattime) | 782 while (beattime < last_beattime) |
777 { | 783 { |
778 Feature beatfeature; | 784 Feature beatfeature; |