# HG changeset patch # User Chris Cannam # Date 1443108995 -3600 # Node ID 5977a0f363d919e8c54f4aa49c2b13eee98c807f # Parent 0d81daeca8d696a2f0cc00712be658f187a70014# Parent e530a07a791a23388c6b83ec958466d12ba87541 Merge diff -r 0d81daeca8d6 -r 5977a0f363d9 .hgtags --- 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 diff -r 0d81daeca8d6 -r 5977a0f363d9 Makefile.osx --- 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 diff -r 0d81daeca8d6 -r 5977a0f363d9 README --- 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. diff -r 0d81daeca8d6 -r 5977a0f363d9 src/Chromagram.cpp --- 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); diff -r 0d81daeca8d6 -r 5977a0f363d9 src/dsp/KaiserWindow.h --- 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 #include +#include "pi.h" + /** * Kaiser window: A windower whose bandwidth and sidelobe height * (signal-noise ratio) can be specified. These parameters are traded diff -r 0d81daeca8d6 -r 5977a0f363d9 src/dsp/MathUtilities.h --- 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 #include "nan-inf.h" +#include "pi.h" /** * Static helper functions for simple mathematical calculations. diff -r 0d81daeca8d6 -r 5977a0f363d9 src/dsp/Resampler.cpp --- 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 #include #include +#include using std::vector; using std::map; diff -r 0d81daeca8d6 -r 5977a0f363d9 src/dsp/SincWindow.h --- 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 +#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. diff -r 0d81daeca8d6 -r 5977a0f363d9 src/dsp/Window.h --- 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 #include #include #include +#include "pi.h" + enum WindowType { RectangularWindow, BartlettWindow, diff -r 0d81daeca8d6 -r 5977a0f363d9 src/dsp/pi.h --- /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 + +#ifndef M_PI +#define M_PI 3.14159265358979323846 +#endif + +#endif diff -r 0d81daeca8d6 -r 5977a0f363d9 vamp/CQChromaVamp.cpp --- 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 diff -r 0d81daeca8d6 -r 5977a0f363d9 vamp/CQVamp.cpp --- 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