Mercurial > hg > segmenter-vamp-plugin
changeset 45:6639d9d53fca
corrected bass attenuation
author | matthiasm |
---|---|
date | Mon, 21 May 2012 15:24:14 +0100 |
parents | 4fd0ce6f1f02 |
children | f59ff6a22f8e |
files | armadillo-2.4.4/examples/Makefile armadillo-2.4.4/include/armadillo_bits/config.hpp songparts/Makefile.osx songparts/SongParts.cpp |
diffstat | 4 files changed, 4 insertions(+), 210 deletions(-) [+] |
line wrap: on
line diff
--- a/armadillo-2.4.4/examples/Makefile Mon May 21 15:19:14 2012 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,86 +0,0 @@ -# The generated "Makefile" from "Makefile.cmake" is only usable after -# the Armadillo library has been configured and installed by CMake. - -CXX=g++ -#CXX=g++-4.2 -## Under MacOS you may have an old compiler as default (e.g. GCC 4.0). -## However, GCC 4.2 or later is available and preferable due to better -## handling of template code. - -#CXX=CC -## When using the Sun Studio compiler - - -# flags configured by CMake -ifeq (macos,macos) - EXTRA_LIB_FLAGS = -framework Accelerate -endif - -#EXTRA_LIB_FLAGS = -library=sunperf -## When using the Sun Studio compiler - - -ifeq (true,true) - BOOST_INCLUDE_FLAG = -I /usr/local/include -endif - - - -LIB_FLAGS = -larmadillo $(EXTRA_LIB_FLAGS) -## NOTE: on Ubuntu and Debian based systems you may need to add -## -lgfortran to LIB_FLAGS - - - -OPT = -O1 -## As the Armadillo library uses recursive templates, -## compilation times depend on the level of optimisation: -## -## -O0: quick compilation, but the resulting program will be slow -## -O1: produces programs which achieve most of the possible speedup -## -O3: produces programs which have almost all possible speedups, -## but compilation takes considerably longer - - -#OPT = -xO4 -xannotate=no -## When using the Sun Studio compiler - - -#EXTRA_OPT = -fwhole-program -## Uncomment the above line if you're compiling -## all source files into one program in a single hit. - - -#DEBUG = -DARMA_EXTRA_DEBUG -## Uncomment the above line to enable low-level -## debugging. Lots of debugging information will -## be printed when a compiled program is run. -## Please enable this option when reporting bugs. - - -#FINAL = -DARMA_NO_DEBUG -## Uncomment the above line to disable Armadillo's checks. -## DANGEROUS! Not recommended unless your code has been -## thoroughly tested. - - -# -# -# - -CXXFLAGS = $(BOOST_INCLUDE_FLAG) $(DEBUG) $(FINAL) $(OPT) $(EXTRA_OPT) - -all: example1 example2 - -example1: example1.cpp - $(CXX) $(CXXFLAGS) -o $@ $< $(LIB_FLAGS) - -example2: example2.cpp - $(CXX) $(CXXFLAGS) -o $@ $< $(LIB_FLAGS) - - -.PHONY: clean - -clean: - rm -f example1 example2 -
--- a/armadillo-2.4.4/include/armadillo_bits/config.hpp Mon May 21 15:19:14 2012 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,109 +0,0 @@ -// Copyright (C) 2008-2012 NICTA (www.nicta.com.au) -// Copyright (C) 2008-2012 Conrad Sanderson -// -// This file is part of the Armadillo C++ library. -// It is provided without any warranty of fitness -// for any purpose. You can redistribute this file -// and/or modify it under the terms of the GNU -// Lesser General Public License (LGPL) as published -// by the Free Software Foundation, either version 3 -// of the License or (at your option) any later version. -// (see http://www.opensource.org/licenses for more info) - - - -// #define ARMA_64BIT_WORD -//// Uncomment the above line if you require matrices/vectors capable of holding more than 4 billion elements. -//// Your machine and compiler must have support for 64 bit integers (eg. via "long" or "long long") - -// #define ARMA_USE_CXX11 -//// Uncomment the above line if you have a C++ compiler that supports the C++11 standard -//// This will enable additional features, such as use of initialiser lists - -#if !defined(ARMA_USE_LAPACK) -#define ARMA_USE_LAPACK -//// Uncomment the above line if you have LAPACK or a fast replacement for LAPACK, -//// such as Intel's MKL, AMD's ACML, or the Accelerate framework. -//// LAPACK is required for matrix decompositions (eg. SVD) and matrix inverse. -#endif - -#if !defined(ARMA_USE_BLAS) -#define ARMA_USE_BLAS -//// Uncomment the above line if you have BLAS or a fast replacement for BLAS, -//// such as GotoBLAS, Intel's MKL, AMD's ACML, or the Accelerate framework. -//// BLAS is used for matrix multiplication. -//// Without BLAS, matrix multiplication will still work, but might be slower. -#endif - -// #define ARMA_BLAS_LONG -//// Uncomment the above line if your BLAS and LAPACK libraries use "long" instead of "int" - -// #define ARMA_BLAS_LONG_LONG -//// Uncomment the above line if your BLAS and LAPACK libraries use "long long" instead of "int" - -#define ARMA_BLAS_UNDERSCORE -//// Uncomment the above line if your BLAS and LAPACK libraries have function names with a trailing underscore. -//// Conversely, comment it out if the function names don't have a trailing underscore. - -// #define ARMA_BLAS_CAPITALS -//// Uncomment the above line if your BLAS and LAPACK libraries have capitalised function names (eg. ACML on 64-bit Windows) - -#if !defined(ARMA_MAT_PREALLOC) - #define ARMA_MAT_PREALLOC 16 -#endif -//// This is the number of preallocated elements used by matrices and vectors; -//// it must be an integer that is at least 1. -//// If you mainly use lots of very small vectors (eg. <= 4 elements), -//// change the number to the size of your vectors. - -// #define ARMA_USE_TBB_ALLOC -//// Uncomment the above line if you want to use Intel TBB scalable_malloc() and scalable_free() instead of standard new[] and delete[] - -/* #undef ARMA_USE_ATLAS */ -#define ARMA_ATLAS_INCLUDE_DIR / -//// If you're using ATLAS and the compiler can't find cblas.h and/or clapack.h -//// uncomment the above define and specify the appropriate include directory. -//// Make sure the directory has a trailing / - -#define ARMA_USE_BOOST -#define ARMA_USE_BOOST_DATE -#define ARMA_USE_WRAPPER - -#if !defined(ARMA_DEFAULT_OSTREAM) - #define ARMA_DEFAULT_OSTREAM std::cout -#endif - -#define ARMA_PRINT_LOGIC_ERRORS -#define ARMA_PRINT_RUNTIME_ERRORS - -#define ARMA_HAVE_STD_ISFINITE -#define ARMA_HAVE_STD_ISINF -#define ARMA_HAVE_STD_ISNAN -#define ARMA_HAVE_STD_SNPRINTF - -#define ARMA_HAVE_LOG1P -#define ARMA_HAVE_GETTIMEOFDAY - -// #define ARMA_EXTRA_DEBUG -// #define ARMA_NO_DEBUG - -#if defined(ARMA_DONT_USE_ATLAS) - #undef ARMA_USE_ATLAS - #undef ARMA_ATLAS_INCLUDE_DIR -#endif - -#if defined(ARMA_DONT_USE_LAPACK) - #undef ARMA_USE_LAPACK -#endif - -#if defined(ARMA_DONT_USE_BLAS) - #undef ARMA_USE_BLAS -#endif - -#if defined(ARMA_DONT_PRINT_LOGIC_ERRORS) - #undef ARMA_PRINT_LOGIC_ERRORS -#endif - -#if defined(ARMA_DONT_PRINT_RUNTIME_ERRORS) - #undef ARMA_PRINT_RUNTIME_ERRORS -#endif
--- a/songparts/Makefile.osx Mon May 21 15:19:14 2012 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,11 +0,0 @@ - -CFLAGS := -O3 -ftree-vectorize -mmacosx-version-min=10.5 -isysroot /Developer/SDKs/MacOSX10.7.sdk -arch i386 -arch x86_64 -I../armadillo-2.4.4/include -I../../boost_1_48_0 -I../../vamp-plugin-sdk -I/Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/Headers/ -DUSE_PTHREADS - -CXXFLAGS := $(CFLAGS) - -LDFLAGS := -isysroot /Developer/SDKs/MacOSX10.7.sdk -mmacosx-version-min=10.5 -arch i386 -arch x86_64 -lqm-dsp ../../vamp-plugin-sdk/libvamp-sdk.a -dynamiclib ../armadillo-2.4.4/libarmadillo.dylib -framework Accelerate -lpthread -install_name qm-vamp-plugins.dylib - -PLUGIN_EXT := .dylib - -include build/general/Makefile.inc -
--- a/songparts/SongParts.cpp Mon May 21 15:19:14 2012 +0100 +++ b/songparts/SongParts.cpp Mon May 21 15:24:14 2012 +0100 @@ -1419,10 +1419,10 @@ arma::mat simmat = 1-simmat0/2; // -------- To delate when the proble with the add of beat will be solved ------- - // for (int i = 0; i < nBeat; ++ i) - // for (int j = 0; j < nBeat; ++ j) - // if (!std::isfinite(simmat(i,j))) - // simmat(i,j)=0; + for (int i = 0; i < nBeat; ++ i) + for (int j = 0; j < nBeat; ++ j) + if (!std::isfinite(simmat(i,j))) + simmat(i,j)=0; // ------------------------------------------------------------------------------ // Median Filtering applied to the Correlation Matrix