Mercurial > hg > constant-q-cpp
changeset 187:5977a0f363d9
Merge
author | Chris Cannam <c.cannam@qmul.ac.uk> |
---|---|
date | Thu, 24 Sep 2015 16:36:35 +0100 |
parents | 0d81daeca8d6 (current diff) e530a07a791a (diff) |
children | ec540b9b6ae5 |
files | src/dsp/Resampler.cpp |
diffstat | 12 files changed, 32 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/.hgtags Thu Sep 24 16:35:33 2015 +0100 +++ b/.hgtags Thu Sep 24 16:36:35 2015 +0100 @@ -1,3 +1,4 @@ 361b4f8b7b2dbce9aebec3ff577f5c68f6fbb3ae v1.0 361b4f8b7b2dbce9aebec3ff577f5c68f6fbb3ae v1.0 5a4ece568299eba6ca7e54b283de5e98b6a3526b v1.0 +50a61e18af29ab383f210c1f2099b4dc49f1495f v1.1
--- a/Makefile.osx Thu Sep 24 16:35:33 2015 +0100 +++ b/Makefile.osx Thu Sep 24 16:36:35 2015 +0100 @@ -1,8 +1,8 @@ -ARCHFLAGS ?= -mmacosx-version-min=10.6 -arch x86_64 -arch i386 +ARCHFLAGS ?= -mmacosx-version-min=10.7 -arch x86_64 -arch i386 -stdlib=libc++ CFLAGS := $(ARCHFLAGS) -Wall -O3 -ftree-vectorize -CXXFLAGS := $(CFLAGS) +CXXFLAGS := $(CFLAGS) LDFLAGS := $(ARCHFLAGS) PLUGIN_LDFLAGS := -dynamiclib -exported_symbols_list vamp/vamp-plugin.list
--- a/README Thu Sep 24 16:35:33 2015 +0100 +++ b/README Thu Sep 24 16:36:35 2015 +0100 @@ -40,8 +40,8 @@ using multiple kernel atoms per time block. The inverse transform is approximate rather than exact (see the paper for details). -The C++ implementation is by Chris Cannam, Copyright 2014 Queen Mary, -University of London. +The C++ implementation is by Chris Cannam, Copyright 2014-2015 Queen +Mary, University of London. The library is provided under a liberal BSD/MIT-style open source licence. See the file COPYING for more information.
--- a/src/Chromagram.cpp Thu Sep 24 16:35:33 2015 +0100 +++ b/src/Chromagram.cpp Thu Sep 24 16:36:35 2015 +0100 @@ -52,12 +52,12 @@ // floor(bins per semitone / 2) int bps = m_params.binsPerOctave / 12; m_maxFrequency = midiPitchLimitFreq / - pow(2, (1.0 + floor(bps/2)) / m_params.binsPerOctave); + pow(2.0, (1.0 + floor(bps/2)) / m_params.binsPerOctave); // Min frequency is frequency of midiPitchLimit lowered by the // appropriate number of octaveCount. m_minFrequency = midiPitchLimitFreq / - pow(2, m_params.octaveCount + 1); + pow(2.0, m_params.octaveCount + 1); CQParameters p (params.sampleRate, m_minFrequency, m_maxFrequency, params.binsPerOctave);
--- a/src/dsp/KaiserWindow.h Thu Sep 24 16:35:33 2015 +0100 +++ b/src/dsp/KaiserWindow.h Thu Sep 24 16:36:35 2015 +0100 @@ -35,6 +35,8 @@ #include <vector> #include <cmath> +#include "pi.h" + /** * Kaiser window: A windower whose bandwidth and sidelobe height * (signal-noise ratio) can be specified. These parameters are traded
--- a/src/dsp/MathUtilities.h Thu Sep 24 16:35:33 2015 +0100 +++ b/src/dsp/MathUtilities.h Thu Sep 24 16:36:35 2015 +0100 @@ -35,6 +35,7 @@ #include <vector> #include "nan-inf.h" +#include "pi.h" /** * Static helper functions for simple mathematical calculations.
--- a/src/dsp/Resampler.cpp Thu Sep 24 16:35:33 2015 +0100 +++ b/src/dsp/Resampler.cpp Thu Sep 24 16:36:35 2015 +0100 @@ -39,6 +39,7 @@ #include <vector> #include <map> #include <cassert> +#include <algorithm> using std::vector; using std::map;
--- a/src/dsp/SincWindow.h Thu Sep 24 16:35:33 2015 +0100 +++ b/src/dsp/SincWindow.h Thu Sep 24 16:36:35 2015 +0100 @@ -34,6 +34,8 @@ #include <vector> +#include "pi.h" + /** * A window containing values of the sinc function, i.e. sin(x)/x with * sinc(0) == 1, with x == 0 at the centre.
--- a/src/dsp/Window.h Thu Sep 24 16:35:33 2015 +0100 +++ b/src/dsp/Window.h Thu Sep 24 16:36:35 2015 +0100 @@ -29,14 +29,16 @@ authorization. */ -#ifndef _WINDOW_H_ -#define _WINDOW_H_ +#ifndef WINDOW_H +#define WINDOW_H #include <cmath> #include <iostream> #include <map> #include <vector> +#include "pi.h" + enum WindowType { RectangularWindow, BartlettWindow,
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/dsp/pi.h Thu Sep 24 16:36:35 2015 +0100 @@ -0,0 +1,11 @@ + +#ifndef PI_H +#define PI_H + +#include <cmath> + +#ifndef M_PI +#define M_PI 3.14159265358979323846 +#endif + +#endif
--- a/vamp/CQChromaVamp.cpp Thu Sep 24 16:35:33 2015 +0100 +++ b/vamp/CQChromaVamp.cpp Thu Sep 24 16:36:35 2015 +0100 @@ -89,13 +89,13 @@ int CQChromaVamp::getPluginVersion() const { - return 1; + return 2; } string CQChromaVamp::getCopyright() const { - return "Plugin by Chris Cannam. Method by Christian Schörkhuber and Anssi Klapuri. Copyright (c) 2014 QMUL. BSD/MIT licence."; + return "Plugin by Chris Cannam. Method by Christian Schörkhuber and Anssi Klapuri. Copyright (c) 2015 QMUL. BSD/MIT licence."; } CQChromaVamp::ParameterList
--- a/vamp/CQVamp.cpp Thu Sep 24 16:35:33 2015 +0100 +++ b/vamp/CQVamp.cpp Thu Sep 24 16:36:35 2015 +0100 @@ -114,13 +114,13 @@ int CQVamp::getPluginVersion() const { - return 1; + return 2; } string CQVamp::getCopyright() const { - return "Plugin by Chris Cannam. Method by Christian Schörkhuber and Anssi Klapuri. Copyright (c) 2014 QMUL. BSD/MIT licence."; + return "Plugin by Chris Cannam. Method by Christian Schörkhuber and Anssi Klapuri. Copyright (c) 2015 QMUL. BSD/MIT licence."; } CQVamp::ParameterList