changeset 48:69251e11a913

Rename SongParts/songpartitioner to Segmentino throughout
author Chris Cannam
date Thu, 13 Jun 2013 09:43:01 +0100
parents 5ead8717a618
children 1ec0e2823891
files segmentino/COPYING segmentino/Makefile.linux64 segmentino/Makefile_ORIGINAL.osx segmentino/Segmentino.cpp segmentino/Segmentino.h segmentino/SongParts/BeatTrackerData.cpp segmentino/SongParts/BeatTrackerData.h segmentino/build/general/Makefile.inc segmentino/build/linux/amd64/atlas/atlas_buildinfo.h segmentino/build/linux/amd64/atlas/atlas_cNCmm.h segmentino/build/linux/amd64/atlas/atlas_cacheedge.h segmentino/build/linux/amd64/atlas/atlas_cmv.h segmentino/build/linux/amd64/atlas/atlas_cmvN.h segmentino/build/linux/amd64/atlas/atlas_cmvS.h segmentino/build/linux/amd64/atlas/atlas_cmvT.h segmentino/build/linux/amd64/atlas/atlas_cr1.h segmentino/build/linux/amd64/atlas/atlas_csNKB.h segmentino/build/linux/amd64/atlas/atlas_csysinfo.h segmentino/build/linux/amd64/atlas/atlas_ctrsmXover.h segmentino/build/linux/amd64/atlas/atlas_dNCmm.h segmentino/build/linux/amd64/atlas/atlas_dmv.h segmentino/build/linux/amd64/atlas/atlas_dmvN.h segmentino/build/linux/amd64/atlas/atlas_dmvS.h segmentino/build/linux/amd64/atlas/atlas_dmvT.h segmentino/build/linux/amd64/atlas/atlas_dr1.h segmentino/build/linux/amd64/atlas/atlas_dsysinfo.h segmentino/build/linux/amd64/atlas/atlas_dtrsmXover.h segmentino/build/linux/amd64/atlas/atlas_sNCmm.h segmentino/build/linux/amd64/atlas/atlas_smv.h segmentino/build/linux/amd64/atlas/atlas_smvN.h segmentino/build/linux/amd64/atlas/atlas_smvS.h segmentino/build/linux/amd64/atlas/atlas_smvT.h segmentino/build/linux/amd64/atlas/atlas_sr1.h segmentino/build/linux/amd64/atlas/atlas_ssysinfo.h segmentino/build/linux/amd64/atlas/atlas_strsmXover.h segmentino/build/linux/amd64/atlas/atlas_trsmNB.h segmentino/build/linux/amd64/atlas/atlas_type.h segmentino/build/linux/amd64/atlas/atlas_zNCmm.h segmentino/build/linux/amd64/atlas/atlas_zdNKB.h segmentino/build/linux/amd64/atlas/atlas_zmv.h segmentino/build/linux/amd64/atlas/atlas_zmvN.h segmentino/build/linux/amd64/atlas/atlas_zmvS.h segmentino/build/linux/amd64/atlas/atlas_zmvT.h segmentino/build/linux/amd64/atlas/atlas_zr1.h segmentino/build/linux/amd64/atlas/atlas_zsysinfo.h segmentino/build/linux/amd64/atlas/atlas_ztrsmXover.h segmentino/build/linux/amd64/atlas/cXover.h segmentino/build/linux/amd64/atlas/cmm.h segmentino/build/linux/amd64/atlas/dXover.h segmentino/build/linux/amd64/atlas/dmm.h segmentino/build/linux/amd64/atlas/sXover.h segmentino/build/linux/amd64/atlas/smm.h segmentino/build/linux/amd64/atlas/zXover.h segmentino/build/linux/amd64/atlas/zmm.h segmentino/build/linux/amd64/cblas.h segmentino/build/linux/amd64/clapack.h segmentino/build/linux/amd64/libatlas.a segmentino/build/linux/amd64/libcblas.a segmentino/build/linux/amd64/libf77blas.a segmentino/build/linux/amd64/liblapack.a segmentino/build/mingw32/atlas.lib segmentino/build/mingw32/cblas.lib segmentino/build/mingw32/f77blas.lib segmentino/build/mingw32/g2cstubs.c segmentino/build/mingw32/g2cstubs.lib segmentino/build/mingw32/lapack.lib segmentino/g2cstubs.c segmentino/libmain.cpp segmentino/segmentino.cat segmentino/segmentino.n3 segmentino/vamp-plugin.list segmentino/vamp-plugin.map songparts/COPYING songparts/Makefile.linux64 songparts/Makefile_ORIGINAL.osx songparts/SongParts.cpp songparts/SongParts.h songparts/SongParts/BeatTrackerData.cpp songparts/SongParts/BeatTrackerData.h songparts/build/general/Makefile.inc songparts/build/linux/amd64/atlas/atlas_buildinfo.h songparts/build/linux/amd64/atlas/atlas_cNCmm.h songparts/build/linux/amd64/atlas/atlas_cacheedge.h songparts/build/linux/amd64/atlas/atlas_cmv.h songparts/build/linux/amd64/atlas/atlas_cmvN.h songparts/build/linux/amd64/atlas/atlas_cmvS.h songparts/build/linux/amd64/atlas/atlas_cmvT.h songparts/build/linux/amd64/atlas/atlas_cr1.h songparts/build/linux/amd64/atlas/atlas_csNKB.h songparts/build/linux/amd64/atlas/atlas_csysinfo.h songparts/build/linux/amd64/atlas/atlas_ctrsmXover.h songparts/build/linux/amd64/atlas/atlas_dNCmm.h songparts/build/linux/amd64/atlas/atlas_dmv.h songparts/build/linux/amd64/atlas/atlas_dmvN.h songparts/build/linux/amd64/atlas/atlas_dmvS.h songparts/build/linux/amd64/atlas/atlas_dmvT.h songparts/build/linux/amd64/atlas/atlas_dr1.h songparts/build/linux/amd64/atlas/atlas_dsysinfo.h songparts/build/linux/amd64/atlas/atlas_dtrsmXover.h songparts/build/linux/amd64/atlas/atlas_sNCmm.h songparts/build/linux/amd64/atlas/atlas_smv.h songparts/build/linux/amd64/atlas/atlas_smvN.h songparts/build/linux/amd64/atlas/atlas_smvS.h songparts/build/linux/amd64/atlas/atlas_smvT.h songparts/build/linux/amd64/atlas/atlas_sr1.h songparts/build/linux/amd64/atlas/atlas_ssysinfo.h songparts/build/linux/amd64/atlas/atlas_strsmXover.h songparts/build/linux/amd64/atlas/atlas_trsmNB.h songparts/build/linux/amd64/atlas/atlas_type.h songparts/build/linux/amd64/atlas/atlas_zNCmm.h songparts/build/linux/amd64/atlas/atlas_zdNKB.h songparts/build/linux/amd64/atlas/atlas_zmv.h songparts/build/linux/amd64/atlas/atlas_zmvN.h songparts/build/linux/amd64/atlas/atlas_zmvS.h songparts/build/linux/amd64/atlas/atlas_zmvT.h songparts/build/linux/amd64/atlas/atlas_zr1.h songparts/build/linux/amd64/atlas/atlas_zsysinfo.h songparts/build/linux/amd64/atlas/atlas_ztrsmXover.h songparts/build/linux/amd64/atlas/cXover.h songparts/build/linux/amd64/atlas/cmm.h songparts/build/linux/amd64/atlas/dXover.h songparts/build/linux/amd64/atlas/dmm.h songparts/build/linux/amd64/atlas/sXover.h songparts/build/linux/amd64/atlas/smm.h songparts/build/linux/amd64/atlas/zXover.h songparts/build/linux/amd64/atlas/zmm.h songparts/build/linux/amd64/cblas.h songparts/build/linux/amd64/clapack.h songparts/build/linux/amd64/libatlas.a songparts/build/linux/amd64/libcblas.a songparts/build/linux/amd64/libf77blas.a songparts/build/linux/amd64/liblapack.a songparts/build/mingw32/atlas.lib songparts/build/mingw32/cblas.lib songparts/build/mingw32/f77blas.lib songparts/build/mingw32/g2cstubs.c songparts/build/mingw32/g2cstubs.lib songparts/build/mingw32/lapack.lib songparts/g2cstubs.c songparts/libmain.cpp songparts/songpartitioner.cat songparts/songpartitioner.n3 songparts/vamp-plugin.list songparts/vamp-plugin.map
diffstat 136 files changed, 4250 insertions(+), 4240 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/segmentino/COPYING	Thu Jun 13 09:43:01 2013 +0100
@@ -0,0 +1,280 @@
+		    GNU GENERAL PUBLIC LICENSE
+		       Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+                          675 Mass Ave, Cambridge, MA 02139, USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+			    Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users.  This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it.  (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.)  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+  To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have.  You must make sure that they, too, receive or can get the
+source code.  And you must show them these terms so they know their
+rights.
+
+  We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+  Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software.  If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+  Finally, any free program is threatened constantly by software
+patents.  We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary.  To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+		    GNU GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License.  The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language.  (Hereinafter, translation is included without limitation in
+the term "modification".)  Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+  1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+  2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) You must cause the modified files to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    b) You must cause any work that you distribute or publish, that in
+    whole or in part contains or is derived from the Program or any
+    part thereof, to be licensed as a whole at no charge to all third
+    parties under the terms of this License.
+
+    c) If the modified program normally reads commands interactively
+    when run, you must cause it, when started running for such
+    interactive use in the most ordinary way, to print or display an
+    announcement including an appropriate copyright notice and a
+    notice that there is no warranty (or else, saying that you provide
+    a warranty) and that users may redistribute the program under
+    these conditions, and telling the user how to view a copy of this
+    License.  (Exception: if the Program itself is interactive but
+    does not normally print such an announcement, your work based on
+    the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+    a) Accompany it with the complete corresponding machine-readable
+    source code, which must be distributed under the terms of Sections
+    1 and 2 above on a medium customarily used for software interchange; or,
+
+    b) Accompany it with a written offer, valid for at least three
+    years, to give any third party, for a charge no more than your
+    cost of physically performing source distribution, a complete
+    machine-readable copy of the corresponding source code, to be
+    distributed under the terms of Sections 1 and 2 above on a medium
+    customarily used for software interchange; or,
+
+    c) Accompany it with the information you received as to the offer
+    to distribute corresponding source code.  (This alternative is
+    allowed only for noncommercial distribution and only if you
+    received the program in object code or executable form with such
+    an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it.  For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable.  However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+  4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License.  Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+  5. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Program or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+  6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+  7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+  8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded.  In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+  9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation.  If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+  10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission.  For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this.  Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+			    NO WARRANTY
+
+  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+		     END OF TERMS AND CONDITIONS
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/segmentino/Makefile.linux64	Thu Jun 13 09:43:01 2013 +0100
@@ -0,0 +1,13 @@
+
+#CFLAGS := -O3 -fPIC -ftree-vectorize -I../armadillo-2.4.4/include -I../../vamp-plugin-sdk -I../../qm-dsp
+
+CFLAGS := -Wall -g -fPIC -I../armadillo-2.4.4/include -I../../vamp-plugin-sdk -I../../qm-dsp
+
+CXXFLAGS  := $(CFLAGS)
+
+LDFLAGS	  := -shared -Wl,-Bstatic -L../../qm-dsp -lqm-dsp -lvamp-sdk -Lbuild/linux/amd64 -llapack -lcblas -lf77blas -latlas -Wl,-Bdynamic 
+
+PLUGIN_EXT   := .so
+
+include build/general/Makefile.inc
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/segmentino/Makefile_ORIGINAL.osx	Thu Jun 13 09:43:01 2013 +0100
@@ -0,0 +1,11 @@
+
+CFLAGS := -O3 -ftree-vectorize -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk -arch i386 -arch x86_64 -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 -arch i386 -arch x86_64 -lqm-dsp ../vamp-plugin-sdk/libvamp-sdk.a -larmadillo -dynamiclib -framework Accelerate -lpthread -install_name qm-vamp-plugins.dylib
+
+PLUGIN_EXT   := .dylib
+
+include build/general/Makefile.inc
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/segmentino/Segmentino.cpp	Thu Jun 13 09:43:01 2013 +0100
@@ -0,0 +1,1930 @@
+/* -*- c-basic-offset: 4 indent-tabs-mode: nil -*-  vi:set ts=8 sts=4 sw=4: */
+
+/*
+    Segmentino
+
+    Code by Massimiliano Zanoni and Matthias Mauch
+    Centre for Digital Music, Queen Mary, University of London
+
+    Copyright 2009-2013 Queen Mary, University of London.
+
+    This program is free software; you can redistribute it and/or
+    modify it under the terms of the GNU General Public License as
+    published by the Free Software Foundation; either version 2 of the
+    License, or (at your option) any later version.  See the file
+    COPYING included with this distribution for more information.
+*/
+
+#include "Segmentino.h"
+
+#include <base/Window.h>
+#include <dsp/onsets/DetectionFunction.h>
+#include <dsp/onsets/PeakPicking.h>
+#include <dsp/transforms/FFT.h>
+#include <dsp/tempotracking/TempoTrackV2.h>
+#include <dsp/tempotracking/DownBeat.h>
+#include <chromamethods.h>
+#include <maths/MathUtilities.h>
+#include <boost/numeric/ublas/matrix.hpp>
+#include <boost/numeric/ublas/io.hpp>
+#include <boost/math/distributions/normal.hpp>
+#include "armadillo"
+#include <fstream>
+#include <sstream>
+#include <cmath>
+#include <vector>
+
+#include <vamp-sdk/Plugin.h>
+
+using namespace boost::numeric;
+using namespace arma;
+using std::string;
+using std::vector;
+using std::cerr;
+using std::cout;
+using std::endl;
+
+
+#ifndef __GNUC__
+#include <alloca.h>
+#endif
+
+
+// Result Struct
+typedef struct Part {
+    int n;
+    vector<int> indices;
+    string letter;
+    int value;
+    int level;
+    int nInd;
+}Part;
+
+
+
+/* ------------------------------------ */
+/* ----- BEAT DETECTOR CLASS ---------- */
+/* ------------------------------------ */
+
+class BeatTrackerData
+{
+    /* --- ATTRIBUTES --- */
+public:
+    DFConfig dfConfig;
+    DetectionFunction *df;
+    DownBeat *downBeat;
+    vector<double> dfOutput;
+    Vamp::RealTime origin;
+    
+    
+    /* --- METHODS --- */
+    
+    /* --- Constructor --- */
+public:
+    BeatTrackerData(float rate, const DFConfig &config) : dfConfig(config) {
+        
+        df = new DetectionFunction(config);
+        // decimation factor aims at resampling to c. 3KHz; must be power of 2
+        int factor = MathUtilities::nextPowerOfTwo(rate / 3000);
+        // std::cerr << "BeatTrackerData: factor = " << factor << std::endl;
+        downBeat = new DownBeat(rate, factor, config.stepSize);
+    }
+    
+    /* --- Desctructor --- */
+    ~BeatTrackerData() {
+        delete df;
+        delete downBeat;
+    }
+    
+    void reset() {
+        delete df;
+        df = new DetectionFunction(dfConfig);
+        dfOutput.clear();
+        downBeat->resetAudioBuffer();
+        origin = Vamp::RealTime::zeroTime;
+    }
+};
+
+
+/* --------------------------------------- */
+/* ----- CHROMA EXTRACTOR CLASS ---------- */
+/* --------------------------------------- */
+
+class ChromaData
+{
+    
+     /* --- ATTRIBUTES --- */
+    
+public:
+    int frameCount;
+    int nBPS;
+    Vamp::Plugin::FeatureList logSpectrum;
+    int blockSize;
+    int lengthOfNoteIndex;
+    vector<float> meanTunings;
+    vector<float> localTunings;
+    float whitening;
+    float preset;
+    float useNNLS;
+    vector<float> localTuning;
+    vector<float> kernelValue;
+    vector<int> kernelFftIndex;
+    vector<int> kernelNoteIndex;
+    float *dict;
+    bool tuneLocal;
+    float doNormalizeChroma;
+    float rollon;
+    float s;
+    vector<float> hw;
+    vector<float> sinvalues;
+    vector<float> cosvalues;
+    Window<float> window;
+    FFTReal fft;
+    int inputSampleRate;
+    
+    /* --- METHODS --- */
+    
+    /* --- Constructor --- */
+    
+public:
+    ChromaData(float inputSampleRate, size_t block_size) :
+        frameCount(0),
+        nBPS(3),
+        logSpectrum(0),
+        blockSize(0),
+        lengthOfNoteIndex(0),
+        meanTunings(0),
+        localTunings(0),
+        whitening(1.0),
+        preset(0.0),
+        useNNLS(1.0),
+        localTuning(0.0),
+        kernelValue(0),
+        kernelFftIndex(0),
+        kernelNoteIndex(0),
+        dict(0),
+        tuneLocal(0.0),
+        doNormalizeChroma(0),
+        rollon(0.0),
+        s(0.7),
+        sinvalues(0),
+        cosvalues(0),
+        window(HanningWindow, block_size),
+        fft(block_size),
+        inputSampleRate(inputSampleRate)
+    {
+        // make the *note* dictionary matrix
+        dict = new float[nNote * 84];
+        for (int i = 0; i < nNote * 84; ++i) dict[i] = 0.0;
+        blockSize = block_size;
+    }
+    
+    
+    /* --- Desctructor --- */
+    
+    ~ChromaData() {
+        delete [] dict;
+    }
+    
+    /* --- Public Methods --- */
+    
+    void reset() {
+        frameCount = 0;
+        logSpectrum.clear();
+        for (int iBPS = 0; iBPS < 3; ++iBPS) {
+            meanTunings[iBPS] = 0;
+            localTunings[iBPS] = 0;
+        }
+        localTuning.clear();
+    }
+    
+    void baseProcess(float *inputBuffers, Vamp::RealTime timestamp)
+    {   
+                
+        frameCount++;   
+        float *magnitude = new float[blockSize/2];
+        double *fftReal = new double[blockSize];
+        double *fftImag = new double[blockSize];
+
+        // FFTReal wants doubles, so we need to make a local copy of inputBuffers
+        double *inputBuffersDouble = new double[blockSize];
+        for (int i = 0; i < blockSize; i++) inputBuffersDouble[i] = inputBuffers[i];
+        
+        fft.process(false, inputBuffersDouble, fftReal, fftImag);
+        
+        float energysum = 0;
+        // make magnitude
+        float maxmag = -10000;
+        for (int iBin = 0; iBin < static_cast<int>(blockSize/2); iBin++) {
+            magnitude[iBin] = sqrt(fftReal[iBin] * fftReal[iBin] + 
+                                   fftImag[iBin] * fftImag[iBin]);
+            if (magnitude[iBin]>blockSize*1.0) magnitude[iBin] = blockSize; 
+            // a valid audio signal (between -1 and 1) should not be limited here.
+            if (maxmag < magnitude[iBin]) maxmag = magnitude[iBin];
+            if (rollon > 0) {
+                energysum += pow(magnitude[iBin],2);
+            }
+        }
+    
+        float cumenergy = 0;
+        if (rollon > 0) {
+            for (int iBin = 2; iBin < static_cast<int>(blockSize/2); iBin++) {
+                cumenergy +=  pow(magnitude[iBin],2);
+                if (cumenergy < energysum * rollon / 100) magnitude[iBin-2] = 0;
+                else break;
+            }
+        }
+    
+        if (maxmag < 2) {
+            // cerr << "timestamp " << timestamp << ": very low magnitude, setting magnitude to all zeros" << endl;
+            for (int iBin = 0; iBin < static_cast<int>(blockSize/2); iBin++) {
+                magnitude[iBin] = 0;
+            }
+        }
+        
+        // cerr << magnitude[200] << endl;
+        
+        // note magnitude mapping using pre-calculated matrix
+        float *nm  = new float[nNote]; // note magnitude
+        for (int iNote = 0; iNote < nNote; iNote++) {
+            nm[iNote] = 0; // initialise as 0
+        }
+        int binCount = 0;
+        for (vector<float>::iterator it = kernelValue.begin(); it != kernelValue.end(); ++it) {
+            nm[kernelNoteIndex[binCount]] += magnitude[kernelFftIndex[binCount]] * kernelValue[binCount];
+            binCount++;  
+        }
+    
+        float one_over_N = 1.0/frameCount;
+        // update means of complex tuning variables
+        for (int iBPS = 0; iBPS < nBPS; ++iBPS) meanTunings[iBPS] *= float(frameCount-1)*one_over_N;
+    
+        for (int iTone = 0; iTone < round(nNote*0.62/nBPS)*nBPS+1; iTone = iTone + nBPS) {
+            for (int iBPS = 0; iBPS < nBPS; ++iBPS) meanTunings[iBPS] += nm[iTone + iBPS]*one_over_N;
+            float ratioOld = 0.997;
+            for (int iBPS = 0; iBPS < nBPS; ++iBPS) {
+                localTunings[iBPS] *= ratioOld; 
+                localTunings[iBPS] += nm[iTone + iBPS] * (1 - ratioOld);
+            }
+        }
+    
+        float localTuningImag = 0;
+        float localTuningReal = 0;
+        for (int iBPS = 0; iBPS < nBPS; ++iBPS) {
+            localTuningReal += localTunings[iBPS] * cosvalues[iBPS];
+            localTuningImag += localTunings[iBPS] * sinvalues[iBPS];
+        }
+    
+        float normalisedtuning = atan2(localTuningImag, localTuningReal)/(2*M_PI);
+        localTuning.push_back(normalisedtuning);
+    
+        Vamp::Plugin::Feature f1; // logfreqspec
+        f1.hasTimestamp = true;
+        f1.timestamp = timestamp;
+        for (int iNote = 0; iNote < nNote; iNote++) {
+            f1.values.push_back(nm[iNote]);
+        }
+    
+        // deletes
+        delete[] inputBuffersDouble;
+        delete[] magnitude;
+        delete[] fftReal;
+        delete[] fftImag;
+        delete[] nm;
+    
+        logSpectrum.push_back(f1); // remember note magnitude
+    }
+    
+    bool initialise()
+    {
+        dictionaryMatrix(dict, s);
+        
+        // make things for tuning estimation
+        for (int iBPS = 0; iBPS < nBPS; ++iBPS) {
+            sinvalues.push_back(sin(2*M_PI*(iBPS*1.0/nBPS)));
+            cosvalues.push_back(cos(2*M_PI*(iBPS*1.0/nBPS)));
+        }
+    
+        
+        // make hamming window of length 1/2 octave
+        int hamwinlength = nBPS * 6 + 1;
+        float hamwinsum = 0;
+        for (int i = 0; i < hamwinlength; ++i) { 
+            hw.push_back(0.54 - 0.46 * cos((2*M_PI*i)/(hamwinlength-1)));    
+            hamwinsum += 0.54 - 0.46 * cos((2*M_PI*i)/(hamwinlength-1));
+        }
+        for (int i = 0; i < hamwinlength; ++i) hw[i] = hw[i] / hamwinsum;
+    
+    
+        // initialise the tuning
+        for (int iBPS = 0; iBPS < nBPS; ++iBPS) {
+            meanTunings.push_back(0);
+            localTunings.push_back(0);
+        }
+        
+        blockSize = blockSize;
+        frameCount = 0;
+        int tempn = nNote * blockSize/2;
+        // cerr << "length of tempkernel : " <<  tempn << endl;
+        float *tempkernel;
+
+        tempkernel = new float[tempn];
+
+        logFreqMatrix(inputSampleRate, blockSize, tempkernel);
+        kernelValue.clear();
+        kernelFftIndex.clear();
+        kernelNoteIndex.clear();
+        int countNonzero = 0;
+        for (int iNote = 0; iNote < nNote; ++iNote) { 
+            // I don't know if this is wise: manually making a sparse matrix
+            for (int iFFT = 0; iFFT < static_cast<int>(blockSize/2); ++iFFT) {
+                if (tempkernel[iFFT + blockSize/2 * iNote] > 0) {
+                    kernelValue.push_back(tempkernel[iFFT + blockSize/2 * iNote]);
+                    if (tempkernel[iFFT + blockSize/2 * iNote] > 0) {
+                        countNonzero++;
+                    }
+                    kernelFftIndex.push_back(iFFT);
+                    kernelNoteIndex.push_back(iNote);
+                }
+            }
+        }
+        delete [] tempkernel;
+
+        return true;
+    }    
+};
+
+
+/* --------------------------------- */
+/* ----- SONG PARTITIONER ---------- */
+/* --------------------------------- */
+
+
+/* --- ATTRIBUTES --- */
+
+float Segmentino::m_stepSecs = 0.01161;            // 512 samples at 44100
+int Segmentino::m_chromaFramesizeFactor = 16;   // 16 times as long as beat tracker's
+int Segmentino::m_chromaStepsizeFactor = 4;     // 4 times as long as beat tracker's
+
+
+/* --- METHODS --- */
+
+/* --- Constructor --- */
+Segmentino::Segmentino(float inputSampleRate) :
+    Vamp::Plugin(inputSampleRate),
+    m_d(0),
+    m_chromadata(0),
+    m_bpb(4),
+    m_pluginFrameCount(0)
+{
+}
+
+
+/* --- Desctructor --- */
+Segmentino::~Segmentino()
+{
+    delete m_d;
+    delete m_chromadata;
+}
+
+
+/* --- Methods --- */
+string Segmentino::getIdentifier() const
+{
+    return "qm-songpartitioner";
+}
+
+string Segmentino::getName() const
+{
+    return "Song Partitioner";
+}
+
+string Segmentino::getDescription() const
+{
+    return "Estimate contiguous segments pertaining to song parts such as verse and chorus.";
+}
+
+string Segmentino::getMaker() const
+{
+    return "Queen Mary, University of London";
+}
+
+int Segmentino::getPluginVersion() const
+{
+    return 2;
+}
+
+string Segmentino::getCopyright() const
+{
+    return "Plugin by Matthew Davies, Christian Landone, Chris Cannam, Matthias Mauch and Massimiliano Zanoni  Copyright (c) 2006-2012 QMUL - All Rights Reserved";
+}
+
+Segmentino::ParameterList Segmentino::getParameterDescriptors() const
+{
+    ParameterList list;
+
+    ParameterDescriptor desc;
+
+    // desc.identifier = "bpb";
+    // desc.name = "Beats per Bar";
+    // desc.description = "The number of beats in each bar";
+    // desc.minValue = 2;
+    // desc.maxValue = 16;
+    // desc.defaultValue = 4;
+    // desc.isQuantized = true;
+    // desc.quantizeStep = 1;
+    // list.push_back(desc);
+
+    return list;
+}
+
+float Segmentino::getParameter(std::string name) const
+{
+    if (name == "bpb") return m_bpb;
+    return 0.0;
+}
+
+void Segmentino::setParameter(std::string name, float value)
+{
+    if (name == "bpb") m_bpb = lrintf(value);
+}
+
+
+// Return the StepSize for Chroma Extractor 
+size_t Segmentino::getPreferredStepSize() const
+{
+    size_t step = size_t(m_inputSampleRate * m_stepSecs + 0.0001);
+    if (step < 1) step = 1;
+
+    return step;
+}
+
+// Return the BlockSize for Chroma Extractor 
+size_t Segmentino::getPreferredBlockSize() const
+{
+    size_t theoretical = getPreferredStepSize() * 2;
+    theoretical *= m_chromaFramesizeFactor; 
+
+    return theoretical;
+}
+
+
+// Initialize the plugin and define Beat Tracker and Chroma Extractor Objects
+bool Segmentino::initialise(size_t channels, size_t stepSize, size_t blockSize)
+{
+    if (m_d) {
+        delete m_d;
+        m_d = 0;
+    }
+    if (m_chromadata) {
+        delete m_chromadata;
+        m_chromadata = 0;
+    }
+
+    if (channels < getMinChannelCount() ||
+        channels > getMaxChannelCount()) {
+        std::cerr << "Segmentino::initialise: Unsupported channel count: "
+                  << channels << std::endl;
+        return false;
+    }
+
+    if (stepSize != getPreferredStepSize()) {
+        std::cerr << "ERROR: Segmentino::initialise: Unsupported step size for this sample rate: "
+                  << stepSize << " (wanted " << (getPreferredStepSize()) << ")" << std::endl;
+        return false;
+    }
+
+    if (blockSize != getPreferredBlockSize()) {
+        std::cerr << "WARNING: Segmentino::initialise: Sub-optimal block size for this sample rate: "
+                  << blockSize << " (wanted " << getPreferredBlockSize() << ")" << std::endl;
+    }
+
+    // Beat tracker and Chroma extractor has two different configuration parameters 
+    
+    // Configuration Parameters for Beat Tracker
+    DFConfig dfConfig;
+    dfConfig.DFType = DF_COMPLEXSD;
+    dfConfig.stepSize = stepSize;
+    dfConfig.frameLength = blockSize / m_chromaFramesizeFactor;
+    dfConfig.dbRise = 3;
+    dfConfig.adaptiveWhitening = false;
+    dfConfig.whiteningRelaxCoeff = -1;
+    dfConfig.whiteningFloor = -1;
+    
+    // Initialise Beat Tracker
+    m_d = new BeatTrackerData(m_inputSampleRate, dfConfig);
+    m_d->downBeat->setBeatsPerBar(m_bpb);
+    
+    // Initialise Chroma Extractor
+    m_chromadata = new ChromaData(m_inputSampleRate, blockSize);
+    m_chromadata->initialise();
+    
+    return true;
+}
+
+void Segmentino::reset()
+{
+    if (m_d) m_d->reset();
+    if (m_chromadata) m_chromadata->reset();
+    m_pluginFrameCount = 0;
+}
+
+Segmentino::OutputList Segmentino::getOutputDescriptors() const
+{
+    OutputList list;
+    int outputCounter = 0;
+
+    OutputDescriptor beat;
+    beat.identifier = "beats";
+    beat.name = "Beats";
+    beat.description = "Beat locations labelled with metrical position";
+    beat.unit = "";
+    beat.hasFixedBinCount = true;
+    beat.binCount = 0;
+    beat.sampleType = OutputDescriptor::VariableSampleRate;
+    beat.sampleRate = 1.0 / m_stepSecs;
+    m_beatOutputNumber = outputCounter++;
+
+    OutputDescriptor bars;
+    bars.identifier = "bars";
+    bars.name = "Bars";
+    bars.description = "Bar locations";
+    bars.unit = "";
+    bars.hasFixedBinCount = true;
+    bars.binCount = 0;
+    bars.sampleType = OutputDescriptor::VariableSampleRate;
+    bars.sampleRate = 1.0 / m_stepSecs;
+    m_barsOutputNumber = outputCounter++;
+
+    OutputDescriptor beatcounts;
+    beatcounts.identifier = "beatcounts";
+    beatcounts.name = "Beat Count";
+    beatcounts.description = "Beat counter function";
+    beatcounts.unit = "";
+    beatcounts.hasFixedBinCount = true;
+    beatcounts.binCount = 1;
+    beatcounts.sampleType = OutputDescriptor::VariableSampleRate;
+    beatcounts.sampleRate = 1.0 / m_stepSecs;
+    m_beatcountsOutputNumber = outputCounter++;
+
+    OutputDescriptor beatsd;
+    beatsd.identifier = "beatsd";
+    beatsd.name = "Beat Spectral Difference";
+    beatsd.description = "Beat spectral difference function used for bar-line detection";
+    beatsd.unit = "";
+    beatsd.hasFixedBinCount = true;
+    beatsd.binCount = 1;
+    beatsd.sampleType = OutputDescriptor::VariableSampleRate;
+    beatsd.sampleRate = 1.0 / m_stepSecs;
+    m_beatsdOutputNumber = outputCounter++;
+    
+    OutputDescriptor logscalespec;
+    logscalespec.identifier = "logscalespec";
+    logscalespec.name = "Log-Frequency Spectrum";
+    logscalespec.description = "Spectrum with linear frequency on a log scale.";
+    logscalespec.unit = "";
+    logscalespec.hasFixedBinCount = true;
+    logscalespec.binCount = nNote;
+    logscalespec.hasKnownExtents = false;
+    logscalespec.isQuantized = false;
+    logscalespec.sampleType = OutputDescriptor::FixedSampleRate;
+    logscalespec.hasDuration = false;
+    logscalespec.sampleRate = m_inputSampleRate/2048;
+    m_logscalespecOutputNumber = outputCounter++;
+    
+    OutputDescriptor bothchroma;
+    bothchroma.identifier = "bothchroma";
+    bothchroma.name = "Chromagram and Bass Chromagram";
+    bothchroma.description = "Tuning-adjusted chromagram and bass chromagram (stacked on top of each other) from NNLS approximate transcription.";
+    bothchroma.unit = "";
+    bothchroma.hasFixedBinCount = true;
+    bothchroma.binCount = 24;
+    bothchroma.hasKnownExtents = false;
+    bothchroma.isQuantized = false;
+    bothchroma.sampleType = OutputDescriptor::FixedSampleRate;
+    bothchroma.hasDuration = false;
+    bothchroma.sampleRate = m_inputSampleRate/2048;
+    m_bothchromaOutputNumber = outputCounter++;
+    
+    OutputDescriptor qchromafw;
+    qchromafw.identifier = "qchromafw";
+    qchromafw.name = "Pseudo-Quantised Chromagram and Bass Chromagram";
+    qchromafw.description = "Pseudo-Quantised Chromagram and Bass Chromagram (frames between two beats are identical).";
+    qchromafw.unit = "";
+    qchromafw.hasFixedBinCount = true;
+    qchromafw.binCount = 24;
+    qchromafw.hasKnownExtents = false;
+    qchromafw.isQuantized = false;
+    qchromafw.sampleType = OutputDescriptor::FixedSampleRate;
+    qchromafw.hasDuration = false;
+    qchromafw.sampleRate = m_inputSampleRate/2048;
+    m_qchromafwOutputNumber = outputCounter++;    
+    
+    OutputDescriptor qchroma;
+    qchroma.identifier = "qchroma";
+    qchroma.name = "Quantised Chromagram and Bass Chromagram";
+    qchroma.description = "Quantised Chromagram and Bass Chromagram.";
+    qchroma.unit = "";
+    qchroma.hasFixedBinCount = true;
+    qchroma.binCount = 24;
+    qchroma.hasKnownExtents = false;
+    qchroma.isQuantized = false;
+    qchroma.sampleType = OutputDescriptor::FixedSampleRate;
+    qchroma.hasDuration = true;
+    qchroma.sampleRate = m_inputSampleRate/2048;
+    m_qchromaOutputNumber = outputCounter++;
+
+    OutputDescriptor segm;
+    segm.identifier = "segmentation";
+    segm.name = "Segmentation";
+    segm.description = "Segmentation";
+    segm.unit = "segment-type";
+    segm.hasFixedBinCount = true;
+    //segm.binCount = 24;
+    segm.binCount = 1;
+    segm.hasKnownExtents = true;
+    segm.minValue = 1;
+    segm.maxValue = 5;
+    segm.isQuantized = true;
+    segm.quantizeStep = 1;
+    segm.sampleType = OutputDescriptor::VariableSampleRate;
+    segm.sampleRate = 1.0 / m_stepSecs;
+    segm.hasDuration = true;
+    m_segmOutputNumber = outputCounter++;
+    
+    
+   /* 
+    OutputList list;
+    OutputDescriptor segmentation;
+    segmentation.identifier = "segmentation";
+    segmentation.name = "Segmentation";
+    segmentation.description = "Segmentation";
+    segmentation.unit = "segment-type";
+    segmentation.hasFixedBinCount = true;
+    segmentation.binCount = 1;
+    segmentation.hasKnownExtents = true;
+    segmentation.minValue = 1;
+    segmentation.maxValue = nSegmentTypes;
+    segmentation.isQuantized = true;
+    segmentation.quantizeStep = 1;
+    segmentation.sampleType = OutputDescriptor::VariableSampleRate;
+    segmentation.sampleRate = m_inputSampleRate / getPreferredStepSize();
+    list.push_back(segmentation);
+    return list;
+    */
+    
+    
+    list.push_back(beat);
+    list.push_back(bars);
+    list.push_back(beatcounts);
+    list.push_back(beatsd);
+    list.push_back(logscalespec);
+    list.push_back(bothchroma);
+    list.push_back(qchromafw);
+    list.push_back(qchroma);
+    list.push_back(segm);
+
+    return list;
+}
+
+// Executed for each frame - called from the host  
+
+// We use time domain input, because DownBeat requires it -- so we
+// use the time-domain version of DetectionFunction::process which
+// does its own FFT.  It requires doubles as input, so we need to
+// make a temporary copy
+
+// We only support a single input channel
+Segmentino::FeatureSet Segmentino::process(const float *const *inputBuffers,Vamp::RealTime timestamp)
+{
+    if (!m_d) {
+        cerr << "ERROR: Segmentino::process: "
+             << "Segmentino has not been initialised"
+             << endl;
+        return FeatureSet();
+    }
+
+    const int fl = m_d->dfConfig.frameLength;
+#ifndef __GNUC__
+    double *dfinput = (double *)alloca(fl * sizeof(double));
+#else
+    double dfinput[fl];
+#endif
+    int sampleOffset = ((m_chromaFramesizeFactor-1) * fl) / 2;
+    
+    // Since chroma needs a much longer frame size, we only ever use the very
+    // beginning of the frame for beat tracking.
+    for (int i = 0; i < fl; ++i) dfinput[i] = inputBuffers[0][i];
+    double output = m_d->df->process(dfinput);
+
+    if (m_d->dfOutput.empty()) m_d->origin = timestamp;
+
+//    std::cerr << "df[" << m_d->dfOutput.size() << "] is " << output << std::endl;
+    m_d->dfOutput.push_back(output);
+
+    // Downsample and store the incoming audio block.
+    // We have an overlap on the incoming audio stream (step size is
+    // half block size) -- this function is configured to take only a
+    // step size's worth, so effectively ignoring the overlap.  Note
+    // however that this means we omit the last blocksize - stepsize
+    // samples completely for the purposes of barline detection
+    // (hopefully not a problem)
+    m_d->downBeat->pushAudioBlock(inputBuffers[0]);
+
+    // The following is not done every time, but only every m_chromaFramesizeFactor times,
+    // because the chroma does not need dense time frames.
+    
+    if (m_pluginFrameCount % m_chromaStepsizeFactor == 0)
+    {    
+        
+        // Window the full time domain, data, FFT it and process chroma stuff.
+    
+        #ifndef __GNUC__
+            float *windowedBuffers = (float *)alloca(m_chromadata->blockSize * sizeof(float));
+        #else
+            float windowedBuffers[m_chromadata->blockSize];
+        #endif
+        m_chromadata->window.cut(&inputBuffers[0][0], &windowedBuffers[0]);
+    
+        // adjust timestamp (we want the middle of the frame)
+        timestamp = timestamp + Vamp::RealTime::frame2RealTime(sampleOffset, lrintf(m_inputSampleRate));
+
+        m_chromadata->baseProcess(&windowedBuffers[0], timestamp);
+        
+    }
+    m_pluginFrameCount++;
+    
+    FeatureSet fs;
+    fs[m_logscalespecOutputNumber].push_back(
+        m_chromadata->logSpectrum.back());
+    return fs;
+}
+
+Segmentino::FeatureSet Segmentino::getRemainingFeatures()
+{
+    if (!m_d) {
+        cerr << "ERROR: Segmentino::getRemainingFeatures: "
+             << "Segmentino has not been initialised"
+             << endl;
+        return FeatureSet();
+    }
+
+    FeatureSet masterFeatureset = beatTrack();
+    Vamp::RealTime last_beattime = masterFeatureset[m_beatOutputNumber][masterFeatureset[m_beatOutputNumber].size()-1].timestamp;
+    masterFeatureset[m_beatOutputNumber].clear();
+    Vamp::RealTime beattime = Vamp::RealTime::fromSeconds(1.0);
+    while (beattime < last_beattime)
+    {
+        Feature beatfeature;
+        beatfeature.hasTimestamp = true;
+        beatfeature.timestamp = beattime;
+        masterFeatureset[m_beatOutputNumber].push_back(beatfeature);
+        beattime = beattime + Vamp::RealTime::fromSeconds(0.5);
+    }
+    
+    
+    FeatureList chromaList = chromaFeatures();
+    
+    for (int i = 0; i < (int)chromaList.size(); ++i)
+    {
+        masterFeatureset[m_bothchromaOutputNumber].push_back(chromaList[i]);
+    }
+    
+    // quantised and pseudo-quantised (beat-wise) chroma
+    std::vector<FeatureList> quantisedChroma = beatQuantiser(chromaList, masterFeatureset[m_beatOutputNumber]);
+
+    if (quantisedChroma.empty()) return masterFeatureset;
+    
+    masterFeatureset[m_qchromafwOutputNumber] = quantisedChroma[0];
+    masterFeatureset[m_qchromaOutputNumber] = quantisedChroma[1];
+    
+    // Segmentation
+    try {
+        masterFeatureset[m_segmOutputNumber] = runSegmenter(quantisedChroma[1]);
+    } catch (std::bad_alloc &a) {
+        cerr << "ERROR: Segmentino::getRemainingFeatures: Failed to run segmenter, not enough memory (song too long?)" << endl;
+    }
+    
+    return(masterFeatureset);
+}
+
+/* ------ Beat Tracker ------ */
+
+Segmentino::FeatureSet Segmentino::beatTrack()
+{
+    vector<double> df;
+    vector<double> beatPeriod;
+    vector<double> tempi;
+    
+    for (int i = 2; i < (int)m_d->dfOutput.size(); ++i) { // discard first two elts
+        df.push_back(m_d->dfOutput[i]);
+        beatPeriod.push_back(0.0);
+    }
+    if (df.empty()) return FeatureSet();
+
+    TempoTrackV2 tt(m_inputSampleRate, m_d->dfConfig.stepSize);
+    tt.calculateBeatPeriod(df, beatPeriod, tempi);
+
+    vector<double> beats;
+    tt.calculateBeats(df, beatPeriod, beats);
+
+    vector<int> downbeats;
+    size_t downLength = 0;
+    const float *downsampled = m_d->downBeat->getBufferedAudio(downLength);
+    m_d->downBeat->findDownBeats(downsampled, downLength, beats, downbeats);
+
+    vector<double> beatsd;
+    m_d->downBeat->getBeatSD(beatsd);
+    
+    /*std::cout << "BeatTracker: found downbeats at: ";
+    for (int i = 0; i < downbeats.size(); ++i) std::cout << downbeats[i] << " " << std::endl;*/
+    
+    FeatureSet returnFeatures;
+
+    char label[20];
+
+    int dbi = 0;
+    int beat = 0;
+    int bar = 0;
+
+    if (!downbeats.empty()) {
+        // get the right number for the first beat; this will be
+        // incremented before use (at top of the following loop)
+        int firstDown = downbeats[0];
+        beat = m_bpb - firstDown - 1;
+        if (beat == m_bpb) beat = 0;
+    }
+
+    for (int i = 0; i < (int)beats.size(); ++i) {
+        
+        int frame = beats[i] * m_d->dfConfig.stepSize;
+        
+        if (dbi < (int)downbeats.size() && i == downbeats[dbi]) {
+            beat = 0;
+            ++bar;
+            ++dbi;
+        } else {
+            ++beat;
+        }
+        
+        /* Ooutput Section */
+        
+        // outputs are:
+        //
+        // 0 -> beats
+        // 1 -> bars
+        // 2 -> beat counter function
+        
+        Feature feature;
+        feature.hasTimestamp = true;
+        feature.timestamp = m_d->origin + Vamp::RealTime::frame2RealTime (frame, lrintf(m_inputSampleRate));
+        
+        sprintf(label, "%d", beat + 1);
+        feature.label = label;
+        returnFeatures[m_beatOutputNumber].push_back(feature);          // labelled beats
+        
+        feature.values.push_back(beat + 1);
+        returnFeatures[m_beatcountsOutputNumber].push_back(feature);    // beat function
+        
+        if (i > 0 && i <= (int)beatsd.size()) {
+            feature.values.clear();
+            feature.values.push_back(beatsd[i-1]);
+            feature.label = "";
+            returnFeatures[m_beatsdOutputNumber].push_back(feature);    // beat spectral difference
+        }
+        
+        if (beat == 0) {
+            feature.values.clear();
+            sprintf(label, "%d", bar);
+            feature.label = label;
+            returnFeatures[m_barsOutputNumber].push_back(feature);      // bars
+        }
+    }
+
+    return returnFeatures;
+}
+
+
+/* ------ Chroma Extractor ------ */
+
+Segmentino::FeatureList Segmentino::chromaFeatures()
+{
+        
+    FeatureList returnFeatureList;
+    FeatureList tunedlogfreqspec;
+    
+    if (m_chromadata->logSpectrum.size() == 0) return returnFeatureList;
+
+    /**  Calculate Tuning
+         calculate tuning from (using the angle of the complex number defined by the 
+         cumulative mean real and imag values)
+    **/
+    float meanTuningImag = 0;
+    float meanTuningReal = 0;
+    for (int iBPS = 0; iBPS < nBPS; ++iBPS) {
+        meanTuningReal += m_chromadata->meanTunings[iBPS] * m_chromadata->cosvalues[iBPS];
+        meanTuningImag += m_chromadata->meanTunings[iBPS] * m_chromadata->sinvalues[iBPS];
+    }
+    float cumulativetuning = 440 * pow(2,atan2(meanTuningImag, meanTuningReal)/(24*M_PI));
+    float normalisedtuning = atan2(meanTuningImag, meanTuningReal)/(2*M_PI);
+    int intShift = floor(normalisedtuning * 3);
+    float floatShift = normalisedtuning * 3 - intShift; // floatShift is a really bad name for this
+     
+    char buffer0 [50];
+ 
+    sprintf(buffer0, "estimated tuning: %0.1f Hz", cumulativetuning);
+                 
+    /** Tune Log-Frequency Spectrogram
+        calculate a tuned log-frequency spectrogram (f2): use the tuning estimated above (kinda f0) to 
+        perform linear interpolation on the existing log-frequency spectrogram (kinda f1).
+    **/
+    cerr << endl << "[NNLS Chroma Plugin] Tuning Log-Frequency Spectrogram ... ";
+             
+    float tempValue = 0;
+
+    int count = 0;
+    
+    for (FeatureList::iterator i = m_chromadata->logSpectrum.begin(); i != m_chromadata->logSpectrum.end(); ++i) 
+    {
+        
+        Feature f1 = *i;
+        Feature f2; // tuned log-frequency spectrum
+        
+        f2.hasTimestamp = true;
+        f2.timestamp = f1.timestamp;
+        
+        f2.values.push_back(0.0); 
+        f2.values.push_back(0.0); // set lower edge to zero
+
+        if (m_chromadata->tuneLocal) {
+            intShift = floor(m_chromadata->localTuning[count] * 3);
+            floatShift = m_chromadata->localTuning[count] * 3 - intShift; 
+            // floatShift is a really bad name for this
+        }
+
+        for (int k = 2; k < (int)f1.values.size() - 3; ++k) 
+        { // interpolate all inner bins
+            tempValue = f1.values[k + intShift] * (1-floatShift) + f1.values[k+intShift+1] * floatShift;
+            f2.values.push_back(tempValue);
+        }
+         
+        f2.values.push_back(0.0); 
+        f2.values.push_back(0.0); 
+        f2.values.push_back(0.0); // upper edge
+
+        vector<float> runningmean = SpecialConvolution(f2.values,m_chromadata->hw);
+        vector<float> runningstd;
+        for (int i = 0; i < nNote; i++) { // first step: squared values into vector (variance)
+            runningstd.push_back((f2.values[i] - runningmean[i]) * (f2.values[i] - runningmean[i]));
+        }
+        runningstd = SpecialConvolution(runningstd,m_chromadata->hw); // second step convolve
+        for (int i = 0; i < nNote; i++) 
+        { 
+            
+            runningstd[i] = sqrt(runningstd[i]); 
+            // square root to finally have running std
+            
+            if (runningstd[i] > 0) 
+            {
+                f2.values[i] = (f2.values[i] - runningmean[i]) > 0 ?
+                    (f2.values[i] - runningmean[i]) / pow(runningstd[i],m_chromadata->whitening) : 0;
+            }
+            
+            if (f2.values[i] < 0) {
+                
+                cerr << "ERROR: negative value in logfreq spectrum" << endl;
+                
+            }
+        }
+        tunedlogfreqspec.push_back(f2);
+        count++;
+    }
+    cerr << "done." << endl;    
+    /** Semitone spectrum and chromagrams
+        Semitone-spaced log-frequency spectrum derived 
+        from the tuned log-freq spectrum above. the spectrum
+        is inferred using a non-negative least squares algorithm.
+        Three different kinds of chromagram are calculated, "treble", "bass", and "both" (which means 
+        bass and treble stacked onto each other).
+    **/
+    if (m_chromadata->useNNLS == 0) {
+        cerr << "[NNLS Chroma Plugin] Mapping to semitone spectrum and chroma ... ";
+    } else {
+        cerr << "[NNLS Chroma Plugin] Performing NNLS and mapping to chroma ... ";
+    }
+    
+    vector<float> oldchroma = vector<float>(12,0);
+    vector<float> oldbasschroma = vector<float>(12,0);
+    count = 0;
+
+    for (FeatureList::iterator it = tunedlogfreqspec.begin(); it != tunedlogfreqspec.end(); ++it) {
+        Feature logfreqsp = *it; // logfreq spectrum
+        Feature bothchroma; // treble and bass chromagram
+                            
+        bothchroma.hasTimestamp = true;
+        bothchroma.timestamp = logfreqsp.timestamp;
+        
+        float b[nNote];
+
+        bool some_b_greater_zero = false;
+        float sumb = 0;
+        for (int i = 0; i < nNote; i++) {
+            b[i] = logfreqsp.values[i];
+            sumb += b[i];
+            if (b[i] > 0) {
+                some_b_greater_zero = true;
+            }            
+        }
+    
+        // here's where the non-negative least squares algorithm calculates the note activation x
+
+        vector<float> chroma = vector<float>(12, 0);
+        vector<float> basschroma = vector<float>(12, 0);
+        float currval;
+        int iSemitone = 0;
+     
+        if (some_b_greater_zero) {
+            if (m_chromadata->useNNLS == 0) {
+                for (int iNote = nBPS/2 + 2; iNote < nNote - nBPS/2; iNote += nBPS) {
+                    currval = 0;
+                    for (int iBPS = -nBPS/2; iBPS < nBPS/2+1; ++iBPS) {
+                        currval += b[iNote + iBPS] * (1-abs(iBPS*1.0/(nBPS/2+1)));                       
+                    }
+                    chroma[iSemitone % 12] += currval * treblewindow[iSemitone];
+                    basschroma[iSemitone % 12] += currval * basswindow[iSemitone];
+                    iSemitone++;
+                }
+         
+            } else {
+                float x[84+1000];
+                for (int i = 1; i < 1084; ++i) x[i] = 1.0;
+                vector<int> signifIndex;
+                int index=0;
+                sumb /= 84.0;
+                for (int iNote = nBPS/2 + 2; iNote < nNote - nBPS/2; iNote += nBPS) {
+                    float currval = 0;
+                    for (int iBPS = -nBPS/2; iBPS < nBPS/2+1; ++iBPS) {
+                        currval += b[iNote + iBPS]; 
+                    }
+                    if (currval > 0) signifIndex.push_back(index);
+                    index++;
+                }
+                float rnorm;
+                float w[84+1000];
+                float zz[84+1000];
+                int indx[84+1000];
+                int mode;
+                int dictsize = nNote*signifIndex.size();
+
+                float *curr_dict = new float[dictsize];
+                for (int iNote = 0; iNote < (int)signifIndex.size(); ++iNote) {
+                    for (int iBin = 0; iBin < nNote; iBin++) {
+                        curr_dict[iNote * nNote + iBin] = 
+                            1.0 * m_chromadata->dict[signifIndex[iNote] * nNote + iBin];
+                    }
+                }
+                nnls(curr_dict, nNote, nNote, signifIndex.size(), b, x, &rnorm, w, zz, indx, &mode);
+                delete [] curr_dict;
+                for (int iNote = 0; iNote < (int)signifIndex.size(); ++iNote) {
+                    // cerr << mode << endl;
+                    chroma[signifIndex[iNote] % 12] += x[iNote] * treblewindow[signifIndex[iNote]];
+                    basschroma[signifIndex[iNote] % 12] += x[iNote] * basswindow[signifIndex[iNote]];
+                }
+            }    
+        }
+ 
+        chroma.insert(chroma.begin(), basschroma.begin(), basschroma.end()); 
+        // just stack the both chromas 
+        
+        bothchroma.values = chroma; 
+        returnFeatureList.push_back(bothchroma);
+        count++;
+    }
+    cerr << "done." << endl;
+
+    return returnFeatureList;     
+}
+
+/* ------ Beat Quantizer ------ */
+
+std::vector<Vamp::Plugin::FeatureList>
+Segmentino::beatQuantiser(Vamp::Plugin::FeatureList chromagram, Vamp::Plugin::FeatureList beats)
+{
+    std::vector<FeatureList> returnVector;
+    
+    FeatureList fwQchromagram; // frame-wise beat-quantised chroma
+    FeatureList bwQchromagram; // beat-wise beat-quantised chroma
+
+
+    size_t nChromaFrame = chromagram.size();
+    size_t nBeat = beats.size();
+    
+    if (nBeat == 0 && nChromaFrame == 0) return returnVector;
+    
+    int nBin = chromagram[0].values.size();
+    
+    vector<float> tempChroma = vector<float>(nBin);
+    
+    Vamp::RealTime beatTimestamp = Vamp::RealTime::zeroTime;
+    int currBeatCount = -1; // start before first beat
+    int framesInBeat = 0;
+    
+    for (size_t iChroma = 0; iChroma < nChromaFrame; ++iChroma)
+    {
+        Vamp::RealTime frameTimestamp = chromagram[iChroma].timestamp;
+        Vamp::RealTime newBeatTimestamp;
+                
+        if (currBeatCount != (int)beats.size() - 1) {
+            newBeatTimestamp = beats[currBeatCount+1].timestamp;
+        } else {
+            newBeatTimestamp = chromagram[nChromaFrame-1].timestamp;
+        }
+                
+        if (frameTimestamp > newBeatTimestamp ||
+            iChroma == nChromaFrame-1)
+        {
+            // new beat (or last chroma frame)
+            // 1. finish all the old beat processing
+            if (framesInBeat > 0)
+            {
+                for (int i = 0; i < nBin; ++i) tempChroma[i] /= framesInBeat; // average
+            }
+            
+            Feature bwQchromaFrame;
+            bwQchromaFrame.hasTimestamp = true;
+            bwQchromaFrame.timestamp = beatTimestamp;
+            bwQchromaFrame.values = tempChroma;
+            bwQchromaFrame.duration = newBeatTimestamp - beatTimestamp;
+            bwQchromagram.push_back(bwQchromaFrame);
+            
+            for (int iFrame = -framesInBeat; iFrame < 0; ++iFrame)
+            {
+                Feature fwQchromaFrame;
+                fwQchromaFrame.hasTimestamp = true;
+                fwQchromaFrame.timestamp = chromagram[iChroma+iFrame].timestamp;
+                fwQchromaFrame.values = tempChroma; // all between two beats get the same
+                fwQchromagram.push_back(fwQchromaFrame);
+            }
+            
+            // 2. increments / resets for current (new) beat
+            currBeatCount++;
+            beatTimestamp = newBeatTimestamp;
+            for (int i = 0; i < nBin; ++i) tempChroma[i] = 0; // average
+            framesInBeat = 0;
+        }
+        framesInBeat++;
+        for (int i = 0; i < nBin; ++i) tempChroma[i] += chromagram[iChroma].values[i];
+    }
+    returnVector.push_back(fwQchromagram);
+    returnVector.push_back(bwQchromagram);
+    return returnVector;
+}
+
+
+
+/* -------------------------------- */
+/* ------ Support Functions  ------ */
+/* -------------------------------- */
+
+// one-dimesion median filter
+arma::vec medfilt1(arma::vec v, int medfilt_length)
+{    
+    // TODO: check if this works with odd and even medfilt_length !!!
+    int halfWin = medfilt_length/2;
+    
+    // result vector
+    arma::vec res = arma::zeros<arma::vec>(v.size());
+    
+    // padding 
+    arma::vec padV = arma::zeros<arma::vec>(v.size()+medfilt_length-1);
+    
+    for (int i=medfilt_length/2; i < medfilt_length/2+(int)v.size(); ++ i)
+    {
+        padV(i) = v(i-medfilt_length/2);
+    }
+    
+    // the above loop leaves the boundaries at 0, 
+    // the two loops below fill them with the start or end values of v at start and end
+    for (int i = 0; i < halfWin; ++i) padV(i) = v(0);
+    for (int i = halfWin+(int)v.size(); i < (int)v.size()+2*halfWin; ++i) padV(i) = v(v.size()-1);
+    
+    
+    
+    // Median filter
+    arma::vec win = arma::zeros<arma::vec>(medfilt_length);
+    
+    for (int i=0; i < (int)v.size(); ++i)
+    {
+        win = padV.subvec(i,i+halfWin*2);
+        win = sort(win);
+        res(i) = win(halfWin);
+    }
+    
+    return res;
+}
+
+
+// Quantile
+double quantile(arma::vec v, double p)
+{
+    arma::vec sortV = arma::sort(v);
+    int n = sortV.size();
+    arma::vec x = arma::zeros<vec>(n+2);
+    arma::vec y = arma::zeros<vec>(n+2);
+    
+    x(0) = 0;
+    x(n+1) = 100; 
+    
+    for (int i=1; i<n+1; ++i)
+        x(i) = 100*(0.5+(i-1))/n;
+        
+    y(0) = sortV(0);
+    y.subvec(1,n) = sortV;
+    y(n+1) = sortV(n-1);
+    
+    arma::uvec x2index = find(x>=p*100);
+    
+    // Interpolation
+    double x1 = x(x2index(0)-1);
+    double x2 = x(x2index(0));
+    double y1 = y(x2index(0)-1);
+    double y2 = y(x2index(0));
+    
+    double res = (y2-y1)/(x2-x1)*(p*100-x1)+y1;
+    
+    return res;
+}
+
+// Max Filtering
+arma::mat maxfilt1(arma::mat inmat, int len)
+{
+    arma::mat outmat = inmat;
+    
+    for (int i=0; i < (int)inmat.n_rows; ++i)
+    {
+        if (arma::sum(inmat.row(i)) > 0)
+        {
+            // Take a window of rows
+            int startWin;
+            int endWin;
+            
+            if (0 > i-len)
+                startWin = 0;
+            else
+                startWin = i-len;
+            
+            if ((int)inmat.n_rows-1 < i+len-1)
+                endWin = inmat.n_rows-1;
+            else
+                endWin = i+len-1;
+    
+            outmat(i,span::all) = arma::max(inmat(span(startWin,endWin),span::all));
+        }
+    }
+    
+    return outmat;
+    
+}
+
+// Null Parts
+Part nullpart(vector<Part> parts, arma::vec barline)
+{
+    arma::uvec nullindices = arma::ones<arma::uvec>(barline.size());
+    for (int iPart=0; iPart<(int)parts.size(); ++iPart)
+    {
+        //for (int iIndex=0; iIndex < parts[0].indices.size(); ++iIndex) 
+        for (int iIndex=0; iIndex < (int)parts[iPart].indices.size(); ++iIndex) 
+            for (int i=0; i<parts[iPart].n; ++i) 
+            {
+                int ind = parts[iPart].indices[iIndex]+i;
+                nullindices(ind) = 0;
+            }
+    }
+
+    Part newPart;
+    newPart.n = 1;
+    uvec q = find(nullindices > 0);
+    
+    for (int i=0; i<(int)q.size();++i) 
+        newPart.indices.push_back(q(i));
+
+    newPart.letter = '-';
+    newPart.value = 0;
+    newPart.level = 0;
+    
+    return newPart;    
+}
+
+
+// Merge Nulls
+void mergenulls(vector<Part> &parts)
+{
+    for (int iPart=0; iPart<(int)parts.size(); ++iPart)
+    {
+        
+        vector<Part> newVectorPart;
+        
+        if (parts[iPart].letter.compare("-")==0)
+        {
+            sort (parts[iPart].indices.begin(), parts[iPart].indices.end());
+            int newpartind = -1;
+            
+            vector<int> indices;
+            indices.push_back(-2);
+            
+            for (int iIndex=0; iIndex<(int)parts[iPart].indices.size(); ++iIndex) 
+                indices.push_back(parts[iPart].indices[iIndex]);
+            
+            for (int iInd=1; iInd < (int)indices.size(); ++iInd)
+            { 
+                if (indices[iInd] - indices[iInd-1] > 1)
+                {
+                    newpartind++;
+
+                    Part newPart;
+                    newPart.letter = 'N';
+                    std::stringstream out;
+                    out << newpartind+1;
+                    newPart.letter.append(out.str());
+                    // newPart.value = 20+newpartind+1;
+                    newPart.value = 0;
+                    newPart.n = 1;
+                    newPart.indices.push_back(indices[iInd]);
+                    newPart.level = 0;   
+                    
+                    newVectorPart.push_back(newPart);
+                }
+                else
+                {
+                    newVectorPart[newpartind].n = newVectorPart[newpartind].n+1;
+                }
+            }
+            parts.erase (parts.end());
+            
+            for (int i=0; i<(int)newVectorPart.size(); ++i)
+                parts.push_back(newVectorPart[i]);
+        }
+    }
+}
+
+/* ------ Segmentation ------ */
+
+vector<Part> songSegment(Vamp::Plugin::FeatureList quantisedChromagram)
+{
+    
+    
+    /* ------ Parameters ------ */
+    double thresh_beat = 0.85;
+    double thresh_seg = 0.80;
+    int medfilt_length = 5; 
+    int minlength = 28;
+    int maxlength = 2*128;
+    double quantilePerc = 0.1;
+    /* ------------------------ */
+    
+    
+    // Collect Info
+    int nBeat = quantisedChromagram.size();                      // Number of feature vector
+    int nFeatValues = quantisedChromagram[0].values.size();      // Number of values for each feature vector
+    
+    if (nBeat < minlength) {
+        // return a single part
+        vector<Part> parts;
+        Part newPart;
+        newPart.n = 1;
+        newPart.indices.push_back(0);
+        newPart.letter = "n1";
+        newPart.value = 20;
+        newPart.level = 0;
+        parts.push_back(newPart);
+        return parts;
+    }
+
+    arma::irowvec timeStamp = arma::zeros<arma::imat>(1,nBeat);       // Vector of Time Stamps
+    
+    // Save time stamp as a Vector
+    if (quantisedChromagram[0].hasTimestamp)
+    {
+        for (int i = 0; i < nBeat; ++ i)
+            timeStamp[i] = quantisedChromagram[i].timestamp.nsec;
+    }
+    
+    
+    // Build a ObservationTOFeatures Matrix
+    arma::mat featVal = arma::zeros<mat>(nBeat,nFeatValues/2);
+    
+    for (int i = 0; i < nBeat; ++ i)
+        for (int j = 0; j < nFeatValues/2; ++ j)
+        {
+            featVal(i,j) = 0.8 * quantisedChromagram[i].values[j] + quantisedChromagram[i].values[j+12]; // bass attenuated
+        }
+    
+    // Set to arbitrary value to feature vectors with low std
+    arma::mat a = stddev(featVal,1,1);
+    
+    // Feature Correlation Matrix
+    arma::mat simmat0 = 1-arma::cor(arma::trans(featVal));
+    
+
+    for (int i = 0; i < nBeat; ++ i)
+    {
+        if (a(i)<0.000001)
+        {
+            featVal(i,1) = 1000;  // arbitrary  
+            
+            for (int j = 0; j < nFeatValues/2; ++j)
+            {
+                simmat0(i,j) = 1;
+                simmat0(j,i) = 1;
+            }
+        }
+    }
+    
+    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;
+    // ------------------------------------------------------------------------------
+    
+    // Median Filtering applied to the Correlation Matrix
+    // The median filter is for each diagonal of the Matrix
+    arma::mat median_simmat = arma::zeros<arma::mat>(nBeat,nBeat);
+    
+    for (int i = 0; i < nBeat; ++ i)
+    {
+        arma::vec temp = medfilt1(simmat.diag(i),medfilt_length);
+        median_simmat.diag(i) = temp;
+        median_simmat.diag(-i) = temp;
+    }
+
+    for (int i = 0; i < nBeat; ++ i)
+        for (int j = 0; j < nBeat; ++ j)
+            if (!std::isfinite(median_simmat(i,j)))
+                median_simmat(i,j) = 0;
+    
+    // -------------- NOT CONVERTED -------------------------------------    
+    //    if param.seg.standardise
+    //        med_median_simmat = repmat(median(median_simmat),nBeat,1);
+    //    std_median_simmat = repmat(std(median_simmat),nBeat,1);
+    //    median_simmat = (median_simmat - med_median_simmat) ./ std_median_simmat;
+    //    end
+    // --------------------------------------------------------
+    
+    // Retrieve Bar Bounderies
+    arma::uvec dup = find(median_simmat > thresh_beat);
+    arma::mat potential_duplicates = arma::zeros<arma::mat>(nBeat,nBeat);
+    potential_duplicates.elem(dup) = arma::ones<arma::vec>(dup.size());
+    potential_duplicates = trimatu(potential_duplicates);
+    
+    int nPartlengths = round((maxlength-minlength)/4)+1;
+    arma::vec partlengths = zeros<arma::vec>(nPartlengths);
+    
+    for (int i = 0; i < nPartlengths; ++ i)
+        partlengths(i) = (i*4) + minlength;
+    
+    // initialise arrays
+    arma::cube simArray = zeros<arma::cube>(nBeat,nBeat,nPartlengths);
+    arma::cube decisionArray2 = zeros<arma::cube>(nBeat,nBeat,nPartlengths);
+
+    for (int iLength = 0; iLength < nPartlengths; ++ iLength)
+    // for (int iLength = 0; iLength < 20; ++ iLength)
+    {
+        int len = partlengths(iLength);
+        int nUsedBeat = nBeat - len + 1;                   // number of potential rep beginnings: they can't overlap at the end of the song
+
+        if (nUsedBeat < 1) continue;
+        
+        for (int iBeat = 0; iBeat < nUsedBeat; ++ iBeat)   // looping over all columns (arbitrarily chosen columns)
+        {
+            arma::uvec help2 = find(potential_duplicates(span(0,nUsedBeat-1),iBeat)==1);
+            
+            for (int i=0; i < (int)help2.size(); ++i)
+            {
+
+                // measure how well two length len segments go together
+                int kBeat = help2(i);
+                arma::vec distrib = median_simmat(span(iBeat,iBeat+len-1),span(kBeat,kBeat+len-1)).diag(0);
+                simArray(iBeat,kBeat,iLength) = quantile(distrib,quantilePerc);
+            }
+        }
+        
+        arma::mat tempM = simArray(span(0,nUsedBeat-1),span(0,nUsedBeat-1),span(iLength,iLength));
+        simArray.slice(iLength)(span(0,nUsedBeat-1),span(0,nUsedBeat-1)) = tempM + arma::trans(tempM) - (eye<mat>(nUsedBeat,nUsedBeat)%tempM); 
+        
+        // convolution
+        arma::vec K = arma::zeros<vec>(3);
+        K << 0.01 << 0.98 << 0.01;
+        
+        
+        for (int i=0; i < (int)simArray.n_rows; ++i)
+        {
+            arma::rowvec t = arma::conv((arma::rowvec)simArray.slice(iLength).row(i),K);
+            simArray.slice(iLength)(i,span::all) = t.subvec(1,t.size()-2);
+        }
+ 
+        // take only over-average bars that do not overlap
+        
+        arma::mat temp = arma::zeros<mat>(simArray.n_rows, simArray.n_cols);
+        temp(span::all, span(0,nUsedBeat-1)) = simArray.slice(iLength)(span::all,span(0,nUsedBeat-1));
+        
+        for (int i=0; i < (int)temp.n_rows; ++i)
+            for (int j=0; j < nUsedBeat; ++j)
+                if (temp(i,j) < thresh_seg)
+                    temp(i,j) = 0;
+        
+        decisionArray2.slice(iLength) = temp;
+
+        arma::mat maxMat = maxfilt1(decisionArray2.slice(iLength),len-1);
+        
+        for (int i=0; i < (int)decisionArray2.n_rows; ++i)
+            for (int j=0; j < (int)decisionArray2.n_cols; ++j)
+                if (decisionArray2.slice(iLength)(i,j) < maxMat(i,j))
+                    decisionArray2.slice(iLength)(i,j) = 0;
+        
+        decisionArray2.slice(iLength) = decisionArray2.slice(iLength) % arma::trans(decisionArray2.slice(iLength));
+        
+        for (int i=0; i < (int)simArray.n_rows; ++i)
+            for (int j=0; j < (int)simArray.n_cols; ++j)
+                if (simArray.slice(iLength)(i,j) < thresh_seg)
+                    potential_duplicates(i,j) = 0; 
+    }
+    
+    // Milk the data
+    
+    arma::mat bestval;
+    
+    for (int iLength=0; iLength<nPartlengths; ++iLength)
+    {
+        arma::mat temp = arma::zeros<arma::mat>(decisionArray2.n_rows,decisionArray2.n_cols);
+
+       for (int rows=0; rows < (int)decisionArray2.n_rows; ++rows)
+            for (int cols=0; cols < (int)decisionArray2.n_cols; ++cols)
+                if (decisionArray2.slice(iLength)(rows,cols) > 0)
+                    temp(rows,cols) = 1;
+        
+        arma::vec currLogicSum = arma::sum(temp,1);
+        
+        for (int iBeat=0; iBeat < nBeat; ++iBeat)
+            if (currLogicSum(iBeat) > 1)
+            {
+                arma::vec t = decisionArray2.slice(iLength)(span::all,iBeat);
+                double currSum = sum(t);
+                
+                int count = 0;
+                for (int i=0; i < (int)t.size(); ++i)
+                    if (t(i)>0)
+                        count++;
+                
+                currSum = (currSum/count)/2;
+                
+                arma::rowvec t1;
+                t1 << (currLogicSum(iBeat)-1) * partlengths(iLength) << currSum << iLength << iBeat << currLogicSum(iBeat);
+                
+                bestval = join_cols(bestval,t1);
+            }
+    }
+    
+    // Definition of the resulting vector
+    vector<Part> parts;
+    
+    // make a table of all valid sets of parts
+    
+    char partletters[] = {'A','B','C','D','E','F','G', 'H','I','J','K','L','M','N','O','P','Q','R','S'};
+    int partvalues[] = {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19};
+    arma::vec valid_sets = arma::ones<arma::vec>(bestval.n_rows);
+    
+    if (!bestval.is_empty())
+    {
+        
+        // In questo punto viene introdotto un errore alla 3 cifra decimale
+        
+        arma::colvec t = arma::zeros<arma::colvec>(bestval.n_rows);
+        for (int i=0; i < (int)bestval.n_rows; ++i)
+        {
+            t(i) = bestval(i,1)*2;
+        }
+        
+        double m = t.max();
+        
+        bestval(span::all,1) = bestval(span::all,1) / m; 
+        bestval(span::all,0) = bestval(span::all,0) + bestval(span::all,1);
+        
+        arma::mat bestval2;
+        for (int i=0; i < (int)bestval.n_cols; ++i)
+            if (i!=1)
+                bestval2 = join_rows(bestval2,bestval.col(i));
+        
+        for (int kSeg=0; kSeg<6; ++kSeg)
+        {
+            arma::mat currbestvals = arma::zeros<arma::mat>(bestval2.n_rows, bestval2.n_cols);
+            for (int i=0; i < (int)bestval2.n_rows; ++i)
+                for (int j=0; j < (int)bestval2.n_cols; ++j)
+                    if (valid_sets(i))
+                        currbestvals(i,j) = bestval2(i,j);
+            
+            arma::vec t1 = currbestvals.col(0);
+            double ma;
+            uword maIdx;
+            ma = t1.max(maIdx);
+            
+            if ((maIdx == 0)&&(ma == 0))
+                break;
+
+            int bestLength = lrint(partlengths(currbestvals(maIdx,1)));
+            arma::rowvec bestIndices = decisionArray2.slice(currbestvals(maIdx,1))(currbestvals(maIdx,2),span::all);
+                
+            arma::rowvec bestIndicesMap = arma::zeros<arma::rowvec>(bestIndices.size());
+            for (int i=0; i < (int)bestIndices.size(); ++i)
+                if (bestIndices(i)>0)
+                    bestIndicesMap(i) = 1;
+                   
+            arma::rowvec mask = arma::zeros<arma::rowvec>(bestLength*2-1);
+            for (int i=0; i<bestLength; ++i)
+                mask(i+bestLength-1) = 1;
+            
+            arma::rowvec t2 = arma::conv(bestIndicesMap,mask); 
+            arma::rowvec island = t2.subvec(mask.size()/2,t2.size()-1-mask.size()/2);
+            
+            // Save results in the structure
+            Part newPart;
+            newPart.n = bestLength;
+            uvec q1 = find(bestIndices > 0);
+            
+            for (int i=0; i < (int)q1.size();++i)
+                newPart.indices.push_back(q1(i));
+            
+            newPart.letter = partletters[kSeg];
+            newPart.value = partvalues[kSeg];
+            newPart.level = kSeg+1;
+            parts.push_back(newPart);
+            
+            uvec q2 = find(valid_sets==1);
+            
+            for (int i=0; i < (int)q2.size(); ++i)
+            {
+                int iSet = q2(i);
+                int s = partlengths(bestval2(iSet,1));
+                
+                arma::rowvec mask1 = arma::zeros<arma::rowvec>(s*2-1);
+                for (int i=0; i<s; ++i)
+                    mask1(i+s-1) = 1;
+                
+                arma::rowvec Ind = decisionArray2.slice(bestval2(iSet,1))(bestval2(iSet,2),span::all);
+                arma::rowvec IndMap = arma::zeros<arma::rowvec>(Ind.size());
+                for (int i=0; i < (int)Ind.size(); ++i)
+                    if (Ind(i)>0)
+                        IndMap(i) = 2;
+                
+                arma::rowvec t3 = arma::conv(IndMap,mask1); 
+                arma::rowvec currislands = t3.subvec(mask1.size()/2,t3.size()-1-mask1.size()/2);       
+                arma::rowvec islandsdMult = currislands%island;
+                
+                arma::uvec islandsIndex = find(islandsdMult > 0);
+                
+                if (islandsIndex.size() > 0)
+                    valid_sets(iSet) = 0;
+            }
+        }
+    }
+    else
+    {
+        Part newPart;
+        newPart.n = nBeat;
+        newPart.indices.push_back(0);
+        newPart.letter = 'A';
+        newPart.value = 1;
+        newPart.level = 1;
+        parts.push_back(newPart);
+    }
+   
+    arma::vec bar = linspace(1,nBeat,nBeat);    
+    Part np = nullpart(parts,bar);
+    
+    parts.push_back(np);
+    
+    // -------------- NOT CONVERTED -------------------------------------  
+    // if param.seg.editor
+    //    [pa, ta] = partarray(parts);
+    //    parts = editorssearch(pa, ta, parts);
+    //    parts = [parts, nullpart(parts,1:nBeat)];
+    // end
+    // ------------------------------------------------------------------
+
+    
+    mergenulls(parts);
+    
+    
+    // -------------- NOT CONVERTED -------------------------------------  
+    // if param.seg.editor
+    //    [pa, ta] = partarray(parts);
+    //    parts = editorssearch(pa, ta, parts);
+    //    parts = [parts, nullpart(parts,1:nBeat)];
+    // end
+    // ------------------------------------------------------------------
+    
+    return parts;
+}
+
+
+
+void songSegmentChroma(Vamp::Plugin::FeatureList quantisedChromagram, vector<Part> &parts)
+{
+    // Collect Info
+    int nBeat = quantisedChromagram.size();                      // Number of feature vector
+    int nFeatValues = quantisedChromagram[0].values.size();      // Number of values for each feature vector
+
+    arma::mat synchTreble = arma::zeros<mat>(nBeat,nFeatValues/2);
+    
+    for (int i = 0; i < nBeat; ++ i)
+        for (int j = 0; j < nFeatValues/2; ++ j)
+        {
+            synchTreble(i,j) = quantisedChromagram[i].values[j];
+        }
+    
+    arma::mat synchBass = arma::zeros<mat>(nBeat,nFeatValues/2);
+    
+    for (int i = 0; i < nBeat; ++ i)
+        for (int j = 0; j < nFeatValues/2; ++ j)
+        {
+            synchBass(i,j) = quantisedChromagram[i].values[j+12];
+        }
+
+    // Process
+    
+    arma::mat segTreble = arma::zeros<arma::mat>(quantisedChromagram.size(),quantisedChromagram[0].values.size()/2);
+    arma::mat segBass = arma::zeros<arma::mat>(quantisedChromagram.size(),quantisedChromagram[0].values.size()/2);
+    
+    for (int iPart=0; iPart < (int)parts.size(); ++iPart)
+    {
+        parts[iPart].nInd = parts[iPart].indices.size();
+        
+        for (int kOccur=0; kOccur<parts[iPart].nInd; ++kOccur)
+        {
+            int kStartIndex = parts[iPart].indices[kOccur];
+            int kEndIndex = kStartIndex + parts[iPart].n-1;
+            
+            segTreble.rows(kStartIndex,kEndIndex) = segTreble.rows(kStartIndex,kEndIndex) + synchTreble.rows(kStartIndex,kEndIndex);
+            segBass.rows(kStartIndex,kEndIndex) = segBass.rows(kStartIndex,kEndIndex) + synchBass.rows(kStartIndex,kEndIndex);
+        }
+    }
+}
+
+
+// Segment Integration
+vector<Part> songSegmentIntegration(vector<Part> &parts)
+{
+    // Break up parts (every part will have one instance)
+    vector<Part> newPartVector;
+    vector<int> partindices;
+    
+    for (int iPart=0; iPart < (int)parts.size(); ++iPart)
+    {
+        parts[iPart].nInd = parts[iPart].indices.size();
+        for (int iInstance=0; iInstance<parts[iPart].nInd; ++iInstance)
+        {
+            Part newPart;
+            newPart.n = parts[iPart].n;
+            newPart.letter = parts[iPart].letter;
+            newPart.value = parts[iPart].value;
+            newPart.level = parts[iPart].level;
+            newPart.indices.push_back(parts[iPart].indices[iInstance]);
+            newPart.nInd = 1;
+            partindices.push_back(parts[iPart].indices[iInstance]);
+            
+            newPartVector.push_back(newPart);
+        }
+    }
+    
+    
+    // Sort the parts in order of occurrence
+    sort (partindices.begin(), partindices.end());
+    
+    for (int i=0; i < (int)partindices.size(); ++i)
+    {
+        bool found = false;
+        int in=0;    
+        while (!found)
+        {
+            if (newPartVector[in].indices[0] == partindices[i])
+            {
+                newPartVector.push_back(newPartVector[in]);
+                newPartVector.erase(newPartVector.begin()+in);
+                found = true;
+            }
+            else
+                in++;
+        }  
+    }
+    
+    // Clear the vector
+    for (int iNewpart=1; iNewpart < (int)newPartVector.size(); ++iNewpart)
+    {
+        if (newPartVector[iNewpart].n < 12)
+        {
+            newPartVector[iNewpart-1].n = newPartVector[iNewpart-1].n + newPartVector[iNewpart].n;
+            newPartVector.erase(newPartVector.begin()+iNewpart);
+        }
+    }
+
+    return newPartVector;
+}
+
+// Segmenter
+Vamp::Plugin::FeatureList Segmentino::runSegmenter(Vamp::Plugin::FeatureList quantisedChromagram)
+{
+    /* --- Display Information --- */
+//    int numBeat = quantisedChromagram.size();
+//    int numFeats = quantisedChromagram[0].values.size();
+
+    vector<Part> parts;
+    vector<Part> finalParts;
+    
+    parts = songSegment(quantisedChromagram);
+    songSegmentChroma(quantisedChromagram,parts);
+    
+    finalParts = songSegmentIntegration(parts);
+    
+    
+    // TEMP ----
+    /*for (int i=0;i<finalParts.size(); ++i)
+     {
+     std::cout << "Parts n° " << i << std::endl;
+     std::cout << "n°: " << finalParts[i].n << std::endl;
+     std::cout << "letter: " <<  finalParts[i].letter << std::endl;
+     
+     std::cout << "indices: ";
+     for (int j=0;j<finalParts[i].indices.size(); ++j)
+         std::cout << finalParts[i].indices[j] << " ";
+       
+     std::cout << std::endl;
+     std::cout <<  "level: " << finalParts[i].level << std::endl;
+     }*/
+    
+    // ---------
+    
+    
+    // Output
+
+    Vamp::Plugin::FeatureList results;
+    
+    
+    Feature seg;
+    
+    arma::vec indices;
+//    int idx=0;
+    vector<int> values;
+    vector<string> letters;
+    
+    for (int iPart=0; iPart < (int)finalParts.size()-1; ++iPart)
+    {
+        int iInstance=0;
+        seg.hasTimestamp = true;
+         
+        int ind = finalParts[iPart].indices[iInstance];
+        int ind1 = finalParts[iPart+1].indices[iInstance];
+         
+        seg.timestamp = quantisedChromagram[ind].timestamp;
+        seg.hasDuration = true;
+        seg.duration = quantisedChromagram[ind1].timestamp-quantisedChromagram[ind].timestamp;
+        seg.values.clear();
+        seg.values.push_back(finalParts[iPart].value);
+        seg.label = finalParts[iPart].letter;
+         
+        results.push_back(seg);
+    }
+    
+    if (finalParts.size() > 0) {
+        int ind = finalParts[finalParts.size()-1].indices[0];
+        seg.hasTimestamp = true;
+        seg.timestamp = quantisedChromagram[ind].timestamp;
+        seg.hasDuration = true;
+        seg.duration = quantisedChromagram[quantisedChromagram.size()-1].timestamp-quantisedChromagram[ind].timestamp;
+        seg.values.clear();
+        seg.values.push_back(finalParts[finalParts.size()-1].value);
+        seg.label = finalParts[finalParts.size()-1].letter;
+    
+        results.push_back(seg);
+    }
+
+    return results;    
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/segmentino/Segmentino.h	Thu Jun 13 09:43:01 2013 +0100
@@ -0,0 +1,83 @@
+/* -*- c-basic-offset: 4 indent-tabs-mode: nil -*-  vi:set ts=8 sts=4 sw=4: */
+
+/*
+    Segmentino
+
+    Code by Massimiliano Zanoni and Matthias Mauch
+    Centre for Digital Music, Queen Mary, University of London
+
+    Copyright 2009-2013 Queen Mary, University of London.
+
+    This program is free software; you can redistribute it and/or
+    modify it under the terms of the GNU General Public License as
+    published by the Free Software Foundation; either version 2 of the
+    License, or (at your option) any later version.  See the file
+    COPYING included with this distribution for more information.
+*/
+
+#ifndef _SEGMENTINO_PLUGIN_H_
+#define _SEGMENTINO_PLUGIN_H_
+
+#include <vamp-sdk/Plugin.h>
+
+class BeatTrackerData;
+
+class ChromaData;
+
+class Segmentino : public Vamp::Plugin
+{
+public:
+    Segmentino(float inputSampleRate);
+    virtual ~Segmentino();
+
+    bool initialise(size_t channels, size_t stepSize, size_t blockSize);
+    void reset();
+
+    InputDomain getInputDomain() const { return TimeDomain; }
+
+    std::string getIdentifier() const;
+    std::string getName() const;
+    std::string getDescription() const;
+    std::string getMaker() const;
+    int getPluginVersion() const;
+    std::string getCopyright() const;
+
+    ParameterList getParameterDescriptors() const;
+    float getParameter(std::string) const;
+    void setParameter(std::string, float);
+
+    size_t getPreferredStepSize() const;
+    size_t getPreferredBlockSize() const;
+
+    OutputList getOutputDescriptors() const;
+
+    FeatureSet process(const float *const *inputBuffers, Vamp::RealTime timestamp);
+    FeatureSet getRemainingFeatures();
+
+protected:
+    BeatTrackerData *m_d;
+    ChromaData *m_chromadata;
+    static float m_stepSecs;
+    static int m_chromaFramesizeFactor;
+    static int m_chromaStepsizeFactor;
+    int m_bpb;
+    int m_pluginFrameCount;
+    FeatureSet beatTrack();
+    FeatureList chromaFeatures();
+    std::vector<FeatureList> beatQuantiser(FeatureList chromagram, FeatureList beats);
+    FeatureList runSegmenter(FeatureList quantisedChromagram);
+    
+    mutable int m_beatOutputNumber;
+    mutable int m_barsOutputNumber;
+    mutable int m_beatcountsOutputNumber;
+    mutable int m_beatsdOutputNumber;
+    mutable int m_logscalespecOutputNumber;
+    mutable int m_bothchromaOutputNumber;
+    mutable int m_qchromafwOutputNumber;
+    mutable int m_qchromaOutputNumber;
+    mutable int m_segmOutputNumber;
+    
+};
+
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/segmentino/SongParts/BeatTrackerData.cpp	Thu Jun 13 09:43:01 2013 +0100
@@ -0,0 +1,94 @@
+/* -*- c-basic-offset: 4 indent-tabs-mode: nil -*-  vi:set ts=8 sts=4 sw=4: */
+
+/*
+    QM Vamp Plugin Set
+
+    Centre for Digital Music, Queen Mary, University of London.
+
+    This program is free software; you can redistribute it and/or
+    modify it under the terms of the GNU General Public License as
+    published by the Free Software Foundation; either version 2 of the
+    License, or (at your option) any later version.  See the file
+    COPYING included with this distribution for more information.
+*/
+
+//#include "SongParts.h"
+
+#include "BeatTrackerData.h"
+
+//#include <base/Window.h>
+#include <dsp/onsets/DetectionFunction.h>
+//#include <dsp/onsets/PeakPicking.h>
+//#include <dsp/transforms/FFT.h>
+//#include <dsp/tempotracking/TempoTrackV2.h>
+//#include <dsp/tempotracking/DownBeat.h>
+//#include <chromamethods.h>
+//#include <maths/MathUtilities.h>
+
+// #include <vamp-sdk/Plugin.h>
+
+using std::string;
+using std::vector;
+using std::cerr;
+using std::endl;
+
+
+//#ifndef __GNUC__
+//#include <alloca.h>
+//#endif
+
+
+/* ------------------------------------ */
+/* ----- BEAT DETECTOR CLASS ---------- */
+/* ------------------------------------ */
+
+
+/* --- ATTRIBUTES --- */
+private:
+DFConfig dfConfig;
+DetectionFunction *df;
+DownBeat *downBeat;
+vector<double> dfOutput;
+Vamp::RealTime origin;
+
+
+/* --- METHODS --- */
+
+/* --- Constructor --- */
+public:
+BeatTrackerData(float rate, const DFConfig &config) : dfConfig(config) {
+
+    df = new DetectionFunction(config);
+    // decimation factor aims at resampling to c. 3KHz; must be power of 2
+    int factor = MathUtilities::nextPowerOfTwo(rate / 3000);
+    // std::cerr << "BeatTrackerData: factor = " << factor << std::endl;
+    downBeat = new DownBeat(rate, factor, config.stepSize);
+}
+
+/* --- Desctructor --- */
+~BeatTrackerData() {
+delete df;
+    delete downBeat;
+}
+
+void reset() {
+    delete df;
+    df = new DetectionFunction(dfConfig);
+    dfOutput.clear();
+    downBeat->resetAudioBuffer();
+    origin = Vamp::RealTime::zeroTime;
+}
+
+/* --- Getter Methods ---*/
+DFConfig getdfConfig(){
+return dfConfig;
+}
+
+
+
+
+
+
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/segmentino/SongParts/BeatTrackerData.h	Thu Jun 13 09:43:01 2013 +0100
@@ -0,0 +1,25 @@
+/* -*- c-basic-offset: 4 indent-tabs-mode: nil -*-  vi:set ts=8 sts=4 sw=4: */
+
+/*
+    QM Vamp Plugin Set
+
+    Centre for Digital Music, Queen Mary, University of London.
+
+    This program is free software; you can redistribute it and/or
+    modify it under the terms of the GNU General Public License as
+    published by the Free Software Foundation; either version 2 of the
+    License, or (at your option) any later version.  See the file
+    COPYING included with this distribution for more information.
+*/
+
+
+#include <dsp/onsets/DetectionFunction.h>
+
+
+class BeatTrackerData
+{
+public:
+    BeatTrackerData(float rate, const DFConfig &config);
+    virtual ~BeatTrackerData();
+    void reset();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/segmentino/build/general/Makefile.inc	Thu Jun 13 09:43:01 2013 +0100
@@ -0,0 +1,29 @@
+
+PLUGIN_EXT	?= .so
+PLUGIN	?= segmentino$(PLUGIN_EXT)
+CXX	?= g++
+CC	?= gcc
+
+CFLAGS	:= $(CFLAGS) -I. -I../../qm-dsp -I../../nnls-chroma
+CXXFLAGS	:= $(CXXFLAGS) -I. -I../../qm-dsp -I../../nnls-chroma
+LDFLAGS		:= -L../../qm-dsp  $(LDFLAGS)
+
+HEADERS := Segmentino.h
+
+SOURCES := Segmentino.cpp \
+           libmain.cpp \
+	   g2cstubs.c \
+           ../../nnls-chroma/chromamethods.cpp \
+           ../../nnls-chroma/nnls.c
+
+OBJECTS := $(SOURCES:.cpp=.o)
+OBJECTS := $(OBJECTS:.c=.o)
+
+$(PLUGIN):	$(OBJECTS)
+		$(CXX) -o $@ $^ $(LDFLAGS)
+
+clean:		
+		rm $(OBJECTS)
+
+distclean:	clean
+		rm $(PLUGIN)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/segmentino/build/linux/amd64/atlas/atlas_buildinfo.h	Thu Jun 13 09:43:01 2013 +0100
@@ -0,0 +1,31 @@
+#ifndef ATL_INSTINFO_H
+   #define ATL_INSTINFO_H
+
+#define ATL_ARCH "Core2Duo64SSE3"
+#define ATL_INSTFLAGS "-1 0 -a 1"
+#define ATL_F2CDEFS "-DAdd__ -DF77_INTEGER=int -DStringSunStyle"
+#define ATL_ARCHDEFS "-DATL_OS_Linux -DATL_ARCH_Core2Duo -DATL_CPUMHZ=1500 -DATL_SSE3 -DATL_SSE2 -DATL_SSE1 -DATL_USE64BITS -DATL_GAS_x8664"
+#define ATL_DKCFLAGS "-fomit-frame-pointer -mfpmath=sse -msse3 -O2 -fPIC -m64"
+#define ATL_DKC "gcc"
+#define ATL_SKCFLAGS "-fomit-frame-pointer -mfpmath=sse -msse3 -O2 -fPIC -m64"
+#define ATL_SKC "gcc"
+#define ATL_DMCFLAGS "-fomit-frame-pointer -mfpmath=sse -msse3 -O2 -fPIC -m64"
+#define ATL_DMC "gcc"
+#define ATL_SMCFLAGS "-fomit-frame-pointer -mfpmath=sse -msse3 -O2 -fPIC -m64"
+#define ATL_SMC "gcc"
+#define ATL_ICCFLAGS "-DL2SIZE=4194304 -I/home/cannam/ATLAS/build/include -I/home/cannam/ATLAS/build/..//include -I/home/cannam/ATLAS/build/..//include/contrib -DAdd__ -DF77_INTEGER=int -DStringSunStyle -DATL_OS_Linux -DATL_ARCH_Core2Duo -DATL_CPUMHZ=1500 -DATL_SSE3 -DATL_SSE2 -DATL_SSE1 -DATL_USE64BITS -DATL_GAS_x8664 -DPentiumCPS=1000 -fomit-frame-pointer -mfpmath=sse -msse3 -O2 -fPIC -m64"
+#define ATL_ICC "gcc-4.2"
+#define ATL_F77FLAGS "-O -fPIC -m64"
+#define ATL_F77 "g77"
+#define ATL_DKCVERS "gcc (GCC) 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)"
+#define ATL_SKCVERS "gcc (GCC) 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)"
+#define ATL_DMCVERS "gcc (GCC) 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)"
+#define ATL_SMCVERS "gcc (GCC) 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)"
+#define ATL_ICCVERS "gcc-4.2 (GCC) 4.2.1 (Ubuntu 4.2.1-5ubuntu4)"
+#define ATL_F77VERS "GNU Fortran (GCC) 3.4.6 (Ubuntu 3.4.6-6ubuntu2)"
+#define ATL_SYSINFO "Linux yves-laptop 2.6.22-14-generic #1 SMP Thu Jan 31 23:33:13 UTC 2008 x86_64 GNU/Linux"
+#define ATL_DATE    "Wed Feb 13 11:25:06 GMT 2008"
+#define ATL_UNAM    "cannam"
+#define ATL_VERS    "3.8.0"
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/segmentino/build/linux/amd64/atlas/atlas_cNCmm.h	Thu Jun 13 09:43:01 2013 +0100
@@ -0,0 +1,23 @@
+#ifndef CMM_H
+   #define CMM_H
+
+   #define ATL_mmMULADD
+   #define ATL_mmLAT 1
+   #define ATL_mmMU  12
+   #define ATL_mmNU  1
+   #define ATL_mmKU  72
+   #define MB 48
+   #define NB 48
+   #define KB 48
+   #define NBNB 2304
+   #define MBNB 2304
+   #define MBKB 2304
+   #define NBKB 2304
+   #define NB2 96
+   #define NBNB2 4608
+
+   #define ATL_MulByNB(N_) ((N_) * 48)
+   #define ATL_DivByNB(N_) ((N_) / 48)
+   #define ATL_MulByNBNB(N_) ((N_) * 2304)
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/segmentino/build/linux/amd64/atlas/atlas_cacheedge.h	Thu Jun 13 09:43:01 2013 +0100
@@ -0,0 +1,4 @@
+#ifndef ATLAS_CACHEEDGE_H
+   #define ATLAS_CACHEEDGE_H
+   #define CacheEdge 0
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/segmentino/build/linux/amd64/atlas/atlas_cmv.h	Thu Jun 13 09:43:01 2013 +0100
@@ -0,0 +1,9 @@
+#ifndef ATLAS_CMV_H
+#define ATLAS_CMV_H
+
+#define ATL_L1mvelts 3932
+#include "atlas_cmvN.h"
+#include "atlas_cmvT.h"
+#include "atlas_cmvS.h"
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/segmentino/build/linux/amd64/atlas/atlas_cmvN.h	Thu Jun 13 09:43:01 2013 +0100
@@ -0,0 +1,21 @@
+#ifndef ATLAS_MVN_H
+#define ATLAS_MVN_H
+
+#include "atlas_misc.h"
+
+#define ATL_mvNMU 32
+#define ATL_mvNNU 1
+#ifndef ATL_L1mvelts
+   #define ATL_L1mvelts ((3*ATL_L1elts)>>2)
+#endif
+#define ATL_AXPYMV
+
+#define ATL_GetPartMVN(A_, lda_, mb_, nb_) \
+{ \
+   *(mb_) = (ATL_L1mvelts - (ATL_mvNNU<<1)) / ((ATL_mvNNU<<1)+1); \
+   if (*(mb_) > ATL_mvNMU) *(mb_) = ATL_mvNMU*( *(mb_)/ATL_mvNMU ); \
+   else *(mb_) = ATL_mvNMU; \
+   *(nb_) = ATL_mvNNU; \
+}
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/segmentino/build/linux/amd64/atlas/atlas_cmvS.h	Thu Jun 13 09:43:01 2013 +0100
@@ -0,0 +1,23 @@
+#ifndef ATLAS_MVS_H
+#define ATLAS_MVS_H
+
+#include "atlas_misc.h"
+
+#define ATL_mvSMU 2
+#define ATL_mvSNU 32
+#ifndef ATL_L1mvelts
+   #define ATL_L1mvelts ((3*ATL_L1elts)>>2)
+#endif
+#ifndef ATL_mvNNU
+   #include "atlas_cmvN.h"
+#endif
+#ifndef ATL_mvTNU
+   #include "atlas_cmvT.h"
+#endif
+#define ATL_GetPartSYMV(A_, lda_, mb_, nb_) \
+{ \
+   *(nb_) = ATL_mvSMU; \
+   *(mb_) = 320; \
+}
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/segmentino/build/linux/amd64/atlas/atlas_cmvT.h	Thu Jun 13 09:43:01 2013 +0100
@@ -0,0 +1,23 @@
+#ifndef ATLAS_MVT_H
+#define ATLAS_MVT_H
+
+#include "atlas_misc.h"
+
+#define ATL_mvTMU 2
+#define ATL_mvTNU 8
+#ifndef ATL_L1mvelts
+   #define ATL_L1mvelts ((3*ATL_L1elts)>>2)
+#endif
+#ifndef ATL_mvNNU
+   #include "atlas_cmvN.h"
+#endif
+
+#define ATL_GetPartMVT(A_, lda_, mb_, nb_) \
+{ \
+   *(mb_) = (ATL_L1mvelts - (ATL_mvTMU<<1)) / ((ATL_mvTMU<<1)+1); \
+   if (*(mb_) > ATL_mvTNU) *(mb_) = (*(mb_)/ATL_mvTNU)*ATL_mvTNU; \
+   else (*mb_) = ATL_mvTNU; \
+   *(nb_) = ATL_mvTMU; \
+}
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/segmentino/build/linux/amd64/atlas/atlas_cr1.h	Thu Jun 13 09:43:01 2013 +0100
@@ -0,0 +1,16 @@
+#ifndef ATLAS_CR1_H
+#define ATLAS_CR1_H
+
+#define ATL_L1r1elts 3809
+#define ATL_r1MU 16
+#define ATL_r1NU 1
+
+#define ATL_GetPartR1(A_, lda_, mb_, nb_) \
+{ \
+   (mb_) = (ATL_L1r1elts - (ATL_r1NU+ATL_r1NU)) / (ATL_r1NU+ATL_r1NU+1); \
+   if ((mb_) > ATL_r1MU) (mb_) = ATL_r1MU*((mb_)/ATL_r1MU); \
+   else (mb_) = ATL_r1MU; \
+   (nb_) = ATL_r1NU; \
+}
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/segmentino/build/linux/amd64/atlas/atlas_csNKB.h	Thu Jun 13 09:43:01 2013 +0100
@@ -0,0 +1,4 @@
+#ifndef ATLAS_CSNKB_H
+   #define ATLAS_CSNKB_H
+   #define ATL_CSNKB 0
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/segmentino/build/linux/amd64/atlas/atlas_csysinfo.h	Thu Jun 13 09:43:01 2013 +0100
@@ -0,0 +1,11 @@
+#ifndef ATL_CSYSINFO_H
+   #define ATL_CSYSINFO_H
+
+#define ATL_MULADD
+#define ATL_L1elts 2048
+#define ATL_fplat  4
+#define ATL_lbnreg 16
+#define ATL_mmnreg 18
+#define ATL_nkflop 879334
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/segmentino/build/linux/amd64/atlas/atlas_dNCmm.h	Thu Jun 13 09:43:01 2013 +0100
@@ -0,0 +1,23 @@
+#ifndef DMM_H
+   #define DMM_H
+
+   #define ATL_mmNOMULADD
+   #define ATL_mmLAT 1
+   #define ATL_mmMU  12
+   #define ATL_mmNU  1
+   #define ATL_mmKU  56
+   #define MB 24
+   #define NB 24
+   #define KB 24
+   #define NBNB 576
+   #define MBNB 576
+   #define MBKB 576
+   #define NBKB 576
+   #define NB2 48
+   #define NBNB2 1152
+
+   #define ATL_MulByNB(N_) ((N_) * 24)
+   #define ATL_DivByNB(N_) ((N_) / 24)
+   #define ATL_MulByNBNB(N_) ((N_) * 576)
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/segmentino/build/linux/amd64/atlas/atlas_dmv.h	Thu Jun 13 09:43:01 2013 +0100
@@ -0,0 +1,9 @@
+#ifndef ATLAS_DMV_H
+#define ATLAS_DMV_H
+
+#define ATL_L1mvelts 3317
+#include "atlas_dmvN.h"
+#include "atlas_dmvT.h"
+#include "atlas_dmvS.h"
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/segmentino/build/linux/amd64/atlas/atlas_dmvN.h	Thu Jun 13 09:43:01 2013 +0100
@@ -0,0 +1,21 @@
+#ifndef ATLAS_MVN_H
+#define ATLAS_MVN_H
+
+#include "atlas_misc.h"
+
+#define ATL_mvNMU 32
+#define ATL_mvNNU 1
+#ifndef ATL_L1mvelts
+   #define ATL_L1mvelts ((3*ATL_L1elts)>>2)
+#endif
+#define ATL_AXPYMV
+
+#define ATL_GetPartMVN(A_, lda_, mb_, nb_) \
+{ \
+   *(mb_) = (ATL_L1mvelts - (ATL_mvNNU<<1)) / ((ATL_mvNNU<<1)+1); \
+   if (*(mb_) > ATL_mvNMU) *(mb_) = ATL_mvNMU*( *(mb_)/ATL_mvNMU ); \
+   else *(mb_) = ATL_mvNMU; \
+   *(nb_) = ATL_mvNNU; \
+}
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/segmentino/build/linux/amd64/atlas/atlas_dmvS.h	Thu Jun 13 09:43:01 2013 +0100
@@ -0,0 +1,23 @@
+#ifndef ATLAS_MVS_H
+#define ATLAS_MVS_H
+
+#include "atlas_misc.h"
+
+#define ATL_mvSMU 2
+#define ATL_mvSNU 32
+#ifndef ATL_L1mvelts
+   #define ATL_L1mvelts ((3*ATL_L1elts)>>2)
+#endif
+#ifndef ATL_mvNNU
+   #include "atlas_dmvN.h"
+#endif
+#ifndef ATL_mvTNU
+   #include "atlas_dmvT.h"
+#endif
+#define ATL_GetPartSYMV(A_, lda_, mb_, nb_) \
+{ \
+   *(nb_) = ATL_mvSMU; \
+   *(mb_) = 256; \
+}
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/segmentino/build/linux/amd64/atlas/atlas_dmvT.h	Thu Jun 13 09:43:01 2013 +0100
@@ -0,0 +1,23 @@
+#ifndef ATLAS_MVT_H
+#define ATLAS_MVT_H
+
+#include "atlas_misc.h"
+
+#define ATL_mvTMU 2
+#define ATL_mvTNU 16
+#ifndef ATL_L1mvelts
+   #define ATL_L1mvelts ((3*ATL_L1elts)>>2)
+#endif
+#ifndef ATL_mvNNU
+   #include "atlas_dmvN.h"
+#endif
+
+#define ATL_GetPartMVT(A_, lda_, mb_, nb_) \
+{ \
+   *(mb_) = (ATL_L1mvelts - (ATL_mvTMU<<1)) / ((ATL_mvTMU<<1)+1); \
+   if (*(mb_) > ATL_mvTNU) *(mb_) = (*(mb_)/ATL_mvTNU)*ATL_mvTNU; \
+   else (*mb_) = ATL_mvTNU; \
+   *(nb_) = ATL_mvTMU; \
+}
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/segmentino/build/linux/amd64/atlas/atlas_dr1.h	Thu Jun 13 09:43:01 2013 +0100
@@ -0,0 +1,16 @@
+#ifndef ATLAS_DR1_H
+#define ATLAS_DR1_H
+
+#define ATL_L1r1elts 3809
+#define ATL_r1MU 16
+#define ATL_r1NU 1
+
+#define ATL_GetPartR1(A_, lda_, mb_, nb_) \
+{ \
+   (mb_) = (ATL_L1r1elts - (ATL_r1NU+ATL_r1NU)) / (ATL_r1NU+ATL_r1NU+1); \
+   if ((mb_) > ATL_r1MU) (mb_) = ATL_r1MU*((mb_)/ATL_r1MU); \
+   else (mb_) = ATL_r1MU; \
+   (nb_) = ATL_r1NU; \
+}
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/segmentino/build/linux/amd64/atlas/atlas_dsysinfo.h	Thu Jun 13 09:43:01 2013 +0100
@@ -0,0 +1,11 @@
+#ifndef ATL_DSYSINFO_H
+   #define ATL_DSYSINFO_H
+
+#define ATL_MULADD
+#define ATL_L1elts 4096
+#define ATL_fplat  12
+#define ATL_lbnreg 16
+#define ATL_mmnreg 18
+#define ATL_nkflop 2159859
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/segmentino/build/linux/amd64/atlas/atlas_sNCmm.h	Thu Jun 13 09:43:01 2013 +0100
@@ -0,0 +1,23 @@
+#ifndef SMM_H
+   #define SMM_H
+
+   #define ATL_mmMULADD
+   #define ATL_mmLAT 1
+   #define ATL_mmMU  12
+   #define ATL_mmNU  1
+   #define ATL_mmKU  80
+   #define MB 36
+   #define NB 36
+   #define KB 36
+   #define NBNB 1296
+   #define MBNB 1296
+   #define MBKB 1296
+   #define NBKB 1296
+   #define NB2 72
+   #define NBNB2 2592
+
+   #define ATL_MulByNB(N_) ((N_) * 36)
+   #define ATL_DivByNB(N_) ((N_) / 36)
+   #define ATL_MulByNBNB(N_) ((N_) * 1296)
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/segmentino/build/linux/amd64/atlas/atlas_smv.h	Thu Jun 13 09:43:01 2013 +0100
@@ -0,0 +1,9 @@
+#ifndef ATLAS_SMV_H
+#define ATLAS_SMV_H
+
+#define ATL_L1mvelts 7127
+#include "atlas_smvN.h"
+#include "atlas_smvT.h"
+#include "atlas_smvS.h"
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/segmentino/build/linux/amd64/atlas/atlas_smvN.h	Thu Jun 13 09:43:01 2013 +0100
@@ -0,0 +1,21 @@
+#ifndef ATLAS_MVN_H
+#define ATLAS_MVN_H
+
+#include "atlas_misc.h"
+
+#define ATL_mvNMU 32
+#define ATL_mvNNU 1
+#ifndef ATL_L1mvelts
+   #define ATL_L1mvelts ((3*ATL_L1elts)>>2)
+#endif
+#define ATL_AXPYMV
+
+#define ATL_GetPartMVN(A_, lda_, mb_, nb_) \
+{ \
+   *(mb_) = (ATL_L1mvelts - (ATL_mvNNU<<1)) / ((ATL_mvNNU<<1)+1); \
+   if (*(mb_) > ATL_mvNMU) *(mb_) = ATL_mvNMU*( *(mb_)/ATL_mvNMU ); \
+   else *(mb_) = ATL_mvNMU; \
+   *(nb_) = ATL_mvNNU; \
+}
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/segmentino/build/linux/amd64/atlas/atlas_smvS.h	Thu Jun 13 09:43:01 2013 +0100
@@ -0,0 +1,23 @@
+#ifndef ATLAS_MVS_H
+#define ATLAS_MVS_H
+
+#include "atlas_misc.h"
+
+#define ATL_mvSMU 2
+#define ATL_mvSNU 32
+#ifndef ATL_L1mvelts
+   #define ATL_L1mvelts ((3*ATL_L1elts)>>2)
+#endif
+#ifndef ATL_mvNNU
+   #include "atlas_smvN.h"
+#endif
+#ifndef ATL_mvTNU
+   #include "atlas_smvT.h"
+#endif
+#define ATL_GetPartSYMV(A_, lda_, mb_, nb_) \
+{ \
+   *(nb_) = ATL_mvSMU; \
+   *(mb_) = 576; \
+}
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/segmentino/build/linux/amd64/atlas/atlas_smvT.h	Thu Jun 13 09:43:01 2013 +0100
@@ -0,0 +1,23 @@
+#ifndef ATLAS_MVT_H
+#define ATLAS_MVT_H
+
+#include "atlas_misc.h"
+
+#define ATL_mvTMU 2
+#define ATL_mvTNU 16
+#ifndef ATL_L1mvelts
+   #define ATL_L1mvelts ((3*ATL_L1elts)>>2)
+#endif
+#ifndef ATL_mvNNU
+   #include "atlas_smvN.h"
+#endif
+
+#define ATL_GetPartMVT(A_, lda_, mb_, nb_) \
+{ \
+   *(mb_) = (ATL_L1mvelts - (ATL_mvTMU<<1)) / ((ATL_mvTMU<<1)+1); \
+   if (*(mb_) > ATL_mvTNU) *(mb_) = (*(mb_)/ATL_mvTNU)*ATL_mvTNU; \
+   else (*mb_) = ATL_mvTNU; \
+   *(nb_) = ATL_mvTMU; \
+}
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/segmentino/build/linux/amd64/atlas/atlas_sr1.h	Thu Jun 13 09:43:01 2013 +0100
@@ -0,0 +1,16 @@
+#ifndef ATLAS_SR1_H
+#define ATLAS_SR1_H
+
+#define ATL_L1r1elts 7127
+#define ATL_r1MU 16
+#define ATL_r1NU 1
+
+#define ATL_GetPartR1(A_, lda_, mb_, nb_) \
+{ \
+   (mb_) = (ATL_L1r1elts - (ATL_r1NU+ATL_r1NU)) / (ATL_r1NU+ATL_r1NU+1); \
+   if ((mb_) > ATL_r1MU) (mb_) = ATL_r1MU*((mb_)/ATL_r1MU); \
+   else (mb_) = ATL_r1MU; \
+   (nb_) = ATL_r1NU; \
+}
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/segmentino/build/linux/amd64/atlas/atlas_ssysinfo.h	Thu Jun 13 09:43:01 2013 +0100
@@ -0,0 +1,11 @@
+#ifndef ATL_SSYSINFO_H
+   #define ATL_SSYSINFO_H
+
+#define ATL_MULADD
+#define ATL_L1elts 8192
+#define ATL_fplat  4
+#define ATL_lbnreg 16
+#define ATL_mmnreg 18
+#define ATL_nkflop 879334
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/segmentino/build/linux/amd64/atlas/atlas_trsmNB.h	Thu Jun 13 09:43:01 2013 +0100
@@ -0,0 +1,12 @@
+#ifndef ATLAS_TRSMNB_H
+   #define ATLAS_TRSMNB_H
+
+   #ifdef SREAL
+      #define TRSM_NB 60
+   #elif defined(DREAL)
+      #define TRSM_NB 12
+   #else
+      #define TRSM_NB 4
+   #endif
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/segmentino/build/linux/amd64/atlas/atlas_type.h	Thu Jun 13 09:43:01 2013 +0100
@@ -0,0 +1,20 @@
+#ifndef ATLAS_TYPE_H
+#define ATLAS_TYPE_H
+
+#define ATL_isize 4
+#define ATL_ssize 4
+#define ATL_dsize 8
+#define ATL_csize 8
+#define ATL_zsize 16
+#define ATL_iMulBySize(N_) ((((N_)) << 2))
+#define ATL_sMulBySize(N_) ((((N_)) << 2))
+#define ATL_dMulBySize(N_) ((((N_)) << 3))
+#define ATL_cMulBySize(N_) ((((N_)) << 3))
+#define ATL_zMulBySize(N_) ((((N_)) << 4))
+#define ATL_iDivBySize(N_) ((N_) >> 2)
+#define ATL_sDivBySize(N_) ((N_) >> 2)
+#define ATL_cDivBySize(N_) ((N_) >> 3)
+#define ATL_dDivBySize(N_) ((N_) >> 3)
+#define ATL_zDivBySize(N_) ((N_) >> 4)
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/segmentino/build/linux/amd64/atlas/atlas_zNCmm.h	Thu Jun 13 09:43:01 2013 +0100
@@ -0,0 +1,23 @@
+#ifndef ZMM_H
+   #define ZMM_H
+
+   #define ATL_mmMULADD
+   #define ATL_mmLAT 1
+   #define ATL_mmMU  12
+   #define ATL_mmNU  1
+   #define ATL_mmKU  48
+   #define MB 36
+   #define NB 36
+   #define KB 36
+   #define NBNB 1296
+   #define MBNB 1296
+   #define MBKB 1296
+   #define NBKB 1296
+   #define NB2 72
+   #define NBNB2 2592
+
+   #define ATL_MulByNB(N_) ((N_) * 36)
+   #define ATL_DivByNB(N_) ((N_) / 36)
+   #define ATL_MulByNBNB(N_) ((N_) * 1296)
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/segmentino/build/linux/amd64/atlas/atlas_zdNKB.h	Thu Jun 13 09:43:01 2013 +0100
@@ -0,0 +1,4 @@
+#ifndef ATLAS_ZDNKB_H
+   #define ATLAS_ZDNKB_H
+   #define ATL_ZDNKB 0
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/segmentino/build/linux/amd64/atlas/atlas_zmv.h	Thu Jun 13 09:43:01 2013 +0100
@@ -0,0 +1,9 @@
+#ifndef ATLAS_ZMV_H
+#define ATLAS_ZMV_H
+
+#define ATL_L1mvelts 2048
+#include "atlas_zmvN.h"
+#include "atlas_zmvT.h"
+#include "atlas_zmvS.h"
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/segmentino/build/linux/amd64/atlas/atlas_zmvN.h	Thu Jun 13 09:43:01 2013 +0100
@@ -0,0 +1,21 @@
+#ifndef ATLAS_MVN_H
+#define ATLAS_MVN_H
+
+#include "atlas_misc.h"
+
+#define ATL_mvNMU 32
+#define ATL_mvNNU 1
+#ifndef ATL_L1mvelts
+   #define ATL_L1mvelts ((3*ATL_L1elts)>>2)
+#endif
+#define ATL_AXPYMV
+
+#define ATL_GetPartMVN(A_, lda_, mb_, nb_) \
+{ \
+   *(mb_) = (ATL_L1mvelts - (ATL_mvNNU<<1)) / ((ATL_mvNNU<<1)+1); \
+   if (*(mb_) > ATL_mvNMU) *(mb_) = ATL_mvNMU*( *(mb_)/ATL_mvNMU ); \
+   else *(mb_) = ATL_mvNMU; \
+   *(nb_) = ATL_mvNNU; \
+}
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/segmentino/build/linux/amd64/atlas/atlas_zmvS.h	Thu Jun 13 09:43:01 2013 +0100
@@ -0,0 +1,23 @@
+#ifndef ATLAS_MVS_H
+#define ATLAS_MVS_H
+
+#include "atlas_misc.h"
+
+#define ATL_mvSMU 2
+#define ATL_mvSNU 32
+#ifndef ATL_L1mvelts
+   #define ATL_L1mvelts ((3*ATL_L1elts)>>2)
+#endif
+#ifndef ATL_mvNNU
+   #include "atlas_zmvN.h"
+#endif
+#ifndef ATL_mvTNU
+   #include "atlas_zmvT.h"
+#endif
+#define ATL_GetPartSYMV(A_, lda_, mb_, nb_) \
+{ \
+   *(nb_) = ATL_mvSMU; \
+   *(mb_) = 160; \
+}
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/segmentino/build/linux/amd64/atlas/atlas_zmvT.h	Thu Jun 13 09:43:01 2013 +0100
@@ -0,0 +1,23 @@
+#ifndef ATLAS_MVT_H
+#define ATLAS_MVT_H
+
+#include "atlas_misc.h"
+
+#define ATL_mvTMU 2
+#define ATL_mvTNU 8
+#ifndef ATL_L1mvelts
+   #define ATL_L1mvelts ((3*ATL_L1elts)>>2)
+#endif
+#ifndef ATL_mvNNU
+   #include "atlas_zmvN.h"
+#endif
+
+#define ATL_GetPartMVT(A_, lda_, mb_, nb_) \
+{ \
+   *(mb_) = (ATL_L1mvelts - (ATL_mvTMU<<1)) / ((ATL_mvTMU<<1)+1); \
+   if (*(mb_) > ATL_mvTNU) *(mb_) = (*(mb_)/ATL_mvTNU)*ATL_mvTNU; \
+   else (*mb_) = ATL_mvTNU; \
+   *(nb_) = ATL_mvTMU; \
+}
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/segmentino/build/linux/amd64/atlas/atlas_zr1.h	Thu Jun 13 09:43:01 2013 +0100
@@ -0,0 +1,16 @@
+#ifndef ATLAS_ZR1_H
+#define ATLAS_ZR1_H
+
+#define ATL_L1r1elts 2048
+#define ATL_r1MU 16
+#define ATL_r1NU 1
+
+#define ATL_GetPartR1(A_, lda_, mb_, nb_) \
+{ \
+   (mb_) = (ATL_L1r1elts - (ATL_r1NU+ATL_r1NU)) / (ATL_r1NU+ATL_r1NU+1); \
+   if ((mb_) > ATL_r1MU) (mb_) = ATL_r1MU*((mb_)/ATL_r1MU); \
+   else (mb_) = ATL_r1MU; \
+   (nb_) = ATL_r1NU; \
+}
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/segmentino/build/linux/amd64/atlas/atlas_zsysinfo.h	Thu Jun 13 09:43:01 2013 +0100
@@ -0,0 +1,11 @@
+#ifndef ATL_ZSYSINFO_H
+   #define ATL_ZSYSINFO_H
+
+#define ATL_MULADD
+#define ATL_L1elts 4096
+#define ATL_fplat  12
+#define ATL_lbnreg 16
+#define ATL_mmnreg 18
+#define ATL_nkflop 2159859
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/segmentino/build/linux/amd64/atlas/cXover.h	Thu Jun 13 09:43:01 2013 +0100
@@ -0,0 +1,27 @@
+#ifndef CXOVER_H
+#define CXOVER_H
+
+#define ATL_3NB 216
+#define NN_MNK_M 7200
+#define NN_MNK_N 7200
+#define NN_MNK_MN 51840
+#define NN_MNK_K 16200
+#define NN_MNK_GE 1000
+#define NT_MNK_M 7200
+#define NT_MNK_N 7200
+#define NT_MNK_MN 51840
+#define NT_MNK_K 16200
+#define NT_MNK_GE 1000
+#define TN_MNK_M 7200
+#define TN_MNK_N 7200
+#define TN_MNK_MN 51840
+#define TN_MNK_K 41472
+#define TN_MNK_GE 3375
+#define TT_MNK_M 7200
+#define TT_MNK_N 7200
+#define TT_MNK_MN 51840
+#define TT_MNK_K 16200
+#define TT_MNK_GE 1000
+#define C2R_K 278
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/segmentino/build/linux/amd64/atlas/cmm.h	Thu Jun 13 09:43:01 2013 +0100
@@ -0,0 +1,51 @@
+#ifndef CMM_H
+   #define CMM_H
+
+   #define ATL_mmMULADD
+   #define ATL_mmLAT 1
+   #define ATL_mmMU  12
+   #define ATL_mmNU  1
+   #define ATL_mmKU  72
+   #define MB 72
+   #define NB 72
+   #define KB 72
+   #define NBNB 5184
+   #define MBNB 5184
+   #define MBKB 5184
+   #define NBKB 5184
+   #define NB2 144
+   #define NBNB2 10368
+
+   #define ATL_MulByNB(N_) ((N_) * 72)
+   #define ATL_DivByNB(N_) ((N_) / 72)
+   #define ATL_MulByNBNB(N_) ((N_) * 5184)
+void ATL_cJIK72x72x72TN72x72x0_a1_b0(const int M, const int N, const int K, const TYPE alpha, const TYPE *A, const int lda, const TYPE *B, const int ldb, const TYPE beta, TYPE *C, const int ldc);
+void ATL_cJIK72x72x72TN72x72x0_a1_b1(const int M, const int N, const int K, const TYPE alpha, const TYPE *A, const int lda, const TYPE *B, const int ldb, const TYPE beta, TYPE *C, const int ldc);
+void ATL_cJIK72x72x72TN72x72x0_a1_bX(const int M, const int N, const int K, const TYPE alpha, const TYPE *A, const int lda, const TYPE *B, const int ldb, const TYPE beta, TYPE *C, const int ldc);
+
+   #define NBmm_b1(m_, n_, k_, al_, A_, lda_, B_, ldb_, be_, C_, ldc_) \
+{ \
+   ATL_cJIK72x72x72TN72x72x0_a1_bX(m_, n_, k_, al_, (A_), lda_, (B_), ldb_, ATL_rnone, C_, ldc_); \
+   ATL_cJIK72x72x72TN72x72x0_a1_b1(m_, n_, k_, al_, (A_), lda_, (B_)+NBNB, ldb_, ATL_rone, (C_)+1, ldc_); \
+   ATL_cJIK72x72x72TN72x72x0_a1_bX(m_, n_, k_, al_, (A_)+NBNB, lda_, (B_)+NBNB, ldb_, ATL_rnone, C_, ldc_); \
+   ATL_cJIK72x72x72TN72x72x0_a1_b1(m_, n_, k_, al_, (A_)+NBNB, lda_, (B_), ldb_, ATL_rone, (C_)+1, ldc_); \
+   }
+   #define NBmm_b0(m_, n_, k_, al_, A_, lda_, B_, ldb_, be_, C_, ldc_) \
+{ \
+   ATL_cJIK72x72x72TN72x72x0_a1_b0(m_, n_, k_, al_, (A_), lda_, (B_), ldb_, ATL_rzero, C_, ldc_); \
+   ATL_cJIK72x72x72TN72x72x0_a1_b0(m_, n_, k_, al_, (A_), lda_, (B_)+NBNB, ldb_, ATL_rzero, (C_)+1, ldc_); \
+   ATL_cJIK72x72x72TN72x72x0_a1_bX(m_, n_, k_, al_, (A_)+NBNB, lda_, (B_)+NBNB, ldb_, ATL_rnone, C_, ldc_); \
+   ATL_cJIK72x72x72TN72x72x0_a1_b1(m_, n_, k_, al_, (A_)+NBNB, lda_, (B_), ldb_, ATL_rone, (C_)+1, ldc_); \
+   }
+   #define NBmm_bX(m_, n_, k_, al_, A_, lda_, B_, ldb_, be_, C_, ldc_) \
+{ \
+   ATL_cJIK72x72x72TN72x72x0_a1_bX(m_, n_, k_, al_, (A_), lda_, (B_), ldb_, -(be_), C_, ldc_); \
+   ATL_cJIK72x72x72TN72x72x0_a1_bX(m_, n_, k_, al_, (A_), lda_, (B_)+NBNB, ldb_, be_, (C_)+1, ldc_); \
+   ATL_cJIK72x72x72TN72x72x0_a1_bX(m_, n_, k_, al_, (A_)+NBNB, lda_, (B_)+NBNB, ldb_, ATL_rnone, C_, ldc_); \
+   ATL_cJIK72x72x72TN72x72x0_a1_b1(m_, n_, k_, al_, (A_)+NBNB, lda_, (B_), ldb_, ATL_rone, (C_)+1, ldc_); \
+   }
+   #define rNBmm_b1 ATL_sJIK72x72x72TN72x72x0_a1_b1
+   #define rNBmm_b0 ATL_sJIK72x72x72TN72x72x0_a1_b0
+   #define rNBmm_bX ATL_sJIK72x72x72TN72x72x0_a1_bX
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/segmentino/build/linux/amd64/atlas/dXover.h	Thu Jun 13 09:43:01 2013 +0100
@@ -0,0 +1,26 @@
+#ifndef DXOVER_H
+#define DXOVER_H
+
+#define ATL_3NB 168
+#define NN_MNK_M 5600
+#define NN_MNK_N 12600
+#define NN_MNK_MN 31360
+#define NN_MNK_K 80864
+#define NN_MNK_GE 13824
+#define NT_MNK_M 5600
+#define NT_MNK_N 5600
+#define NT_MNK_MN 31360
+#define NT_MNK_K 32256
+#define NT_MNK_GE 3375
+#define TN_MNK_M 5600
+#define TN_MNK_N 5600
+#define TN_MNK_MN 31360
+#define TN_MNK_K 80864
+#define TN_MNK_GE 13824
+#define TT_MNK_M 5600
+#define TT_MNK_N 12600
+#define TT_MNK_MN 31360
+#define TT_MNK_K 32256
+#define TT_MNK_GE 3375
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/segmentino/build/linux/amd64/atlas/dmm.h	Thu Jun 13 09:43:01 2013 +0100
@@ -0,0 +1,27 @@
+#ifndef DMM_H
+   #define DMM_H
+
+   #define ATL_mmNOMULADD
+   #define ATL_mmLAT 1
+   #define ATL_mmMU  12
+   #define ATL_mmNU  1
+   #define ATL_mmKU  56
+   #define MB 56
+   #define NB 56
+   #define KB 56
+   #define NBNB 3136
+   #define MBNB 3136
+   #define MBKB 3136
+   #define NBKB 3136
+   #define NB2 112
+   #define NBNB2 6272
+
+   #define ATL_MulByNB(N_) ((N_) * 56)
+   #define ATL_DivByNB(N_) ((N_) / 56)
+   #define ATL_MulByNBNB(N_) ((N_) * 3136)
+   #define NBmm ATL_dJIK56x56x56TN56x56x0_a1_b1
+   #define NBmm_b1 ATL_dJIK56x56x56TN56x56x0_a1_b1
+   #define NBmm_b0 ATL_dJIK56x56x56TN56x56x0_a1_b0
+   #define NBmm_bX ATL_dJIK56x56x56TN56x56x0_a1_bX
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/segmentino/build/linux/amd64/atlas/sXover.h	Thu Jun 13 09:43:01 2013 +0100
@@ -0,0 +1,26 @@
+#ifndef SXOVER_H
+#define SXOVER_H
+
+#define ATL_3NB 216
+#define NN_MNK_M 7200
+#define NN_MNK_N 16200
+#define NN_MNK_MN 51840
+#define NN_MNK_K 41472
+#define NN_MNK_GE 13824
+#define NT_MNK_M 7200
+#define NT_MNK_N 7200
+#define NT_MNK_MN 51840
+#define NT_MNK_K 16200
+#define NT_MNK_GE 3375
+#define TN_MNK_M 7200
+#define TN_MNK_N 16200
+#define TN_MNK_MN 51840
+#define TN_MNK_K 352800
+#define TN_MNK_GE 27000
+#define TT_MNK_M 7200
+#define TT_MNK_N 7200
+#define TT_MNK_MN 51840
+#define TT_MNK_K 41472
+#define TT_MNK_GE 3375
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/segmentino/build/linux/amd64/atlas/smm.h	Thu Jun 13 09:43:01 2013 +0100
@@ -0,0 +1,27 @@
+#ifndef SMM_H
+   #define SMM_H
+
+   #define ATL_mmMULADD
+   #define ATL_mmLAT 1
+   #define ATL_mmMU  12
+   #define ATL_mmNU  1
+   #define ATL_mmKU  80
+   #define MB 80
+   #define NB 80
+   #define KB 80
+   #define NBNB 6400
+   #define MBNB 6400
+   #define MBKB 6400
+   #define NBKB 6400
+   #define NB2 160
+   #define NBNB2 12800
+
+   #define ATL_MulByNB(N_) ((N_) * 80)
+   #define ATL_DivByNB(N_) ((N_) / 80)
+   #define ATL_MulByNBNB(N_) ((N_) * 6400)
+   #define NBmm ATL_sJIK80x80x80TN80x80x0_a1_b1
+   #define NBmm_b1 ATL_sJIK80x80x80TN80x80x0_a1_b1
+   #define NBmm_b0 ATL_sJIK80x80x80TN80x80x0_a1_b0
+   #define NBmm_bX ATL_sJIK80x80x80TN80x80x0_a1_bX
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/segmentino/build/linux/amd64/atlas/zXover.h	Thu Jun 13 09:43:01 2013 +0100
@@ -0,0 +1,27 @@
+#ifndef ZXOVER_H
+#define ZXOVER_H
+
+#define ATL_3NB 144
+#define NN_MNK_M 4800
+#define NN_MNK_N 4800
+#define NN_MNK_MN 23040
+#define NN_MNK_K 4800
+#define NN_MNK_GE 1000
+#define NT_MNK_M 4800
+#define NT_MNK_N 4800
+#define NT_MNK_MN 23040
+#define NT_MNK_K 4800
+#define NT_MNK_GE 1000
+#define TN_MNK_M 4800
+#define TN_MNK_N 4800
+#define TN_MNK_MN 23040
+#define TN_MNK_K 10800
+#define TN_MNK_GE 1000
+#define TT_MNK_M 4800
+#define TT_MNK_N 4800
+#define TT_MNK_MN 23040
+#define TT_MNK_K 10800
+#define TT_MNK_GE 1000
+#define C2R_K 570
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/segmentino/build/linux/amd64/atlas/zmm.h	Thu Jun 13 09:43:01 2013 +0100
@@ -0,0 +1,51 @@
+#ifndef ZMM_H
+   #define ZMM_H
+
+   #define ATL_mmMULADD
+   #define ATL_mmLAT 1
+   #define ATL_mmMU  12
+   #define ATL_mmNU  1
+   #define ATL_mmKU  48
+   #define MB 48
+   #define NB 48
+   #define KB 48
+   #define NBNB 2304
+   #define MBNB 2304
+   #define MBKB 2304
+   #define NBKB 2304
+   #define NB2 96
+   #define NBNB2 4608
+
+   #define ATL_MulByNB(N_) ((N_) * 48)
+   #define ATL_DivByNB(N_) ((N_) / 48)
+   #define ATL_MulByNBNB(N_) ((N_) * 2304)
+void ATL_zJIK48x48x48TN48x48x0_a1_b0(const int M, const int N, const int K, const TYPE alpha, const TYPE *A, const int lda, const TYPE *B, const int ldb, const TYPE beta, TYPE *C, const int ldc);
+void ATL_zJIK48x48x48TN48x48x0_a1_b1(const int M, const int N, const int K, const TYPE alpha, const TYPE *A, const int lda, const TYPE *B, const int ldb, const TYPE beta, TYPE *C, const int ldc);
+void ATL_zJIK48x48x48TN48x48x0_a1_bX(const int M, const int N, const int K, const TYPE alpha, const TYPE *A, const int lda, const TYPE *B, const int ldb, const TYPE beta, TYPE *C, const int ldc);
+
+   #define NBmm_b1(m_, n_, k_, al_, A_, lda_, B_, ldb_, be_, C_, ldc_) \
+{ \
+   ATL_zJIK48x48x48TN48x48x0_a1_bX(m_, n_, k_, al_, (A_), lda_, (B_), ldb_, ATL_rnone, C_, ldc_); \
+   ATL_zJIK48x48x48TN48x48x0_a1_b1(m_, n_, k_, al_, (A_), lda_, (B_)+NBNB, ldb_, ATL_rone, (C_)+1, ldc_); \
+   ATL_zJIK48x48x48TN48x48x0_a1_bX(m_, n_, k_, al_, (A_)+NBNB, lda_, (B_)+NBNB, ldb_, ATL_rnone, C_, ldc_); \
+   ATL_zJIK48x48x48TN48x48x0_a1_b1(m_, n_, k_, al_, (A_)+NBNB, lda_, (B_), ldb_, ATL_rone, (C_)+1, ldc_); \
+   }
+   #define NBmm_b0(m_, n_, k_, al_, A_, lda_, B_, ldb_, be_, C_, ldc_) \
+{ \
+   ATL_zJIK48x48x48TN48x48x0_a1_b0(m_, n_, k_, al_, (A_), lda_, (B_), ldb_, ATL_rzero, C_, ldc_); \
+   ATL_zJIK48x48x48TN48x48x0_a1_b0(m_, n_, k_, al_, (A_), lda_, (B_)+NBNB, ldb_, ATL_rzero, (C_)+1, ldc_); \
+   ATL_zJIK48x48x48TN48x48x0_a1_bX(m_, n_, k_, al_, (A_)+NBNB, lda_, (B_)+NBNB, ldb_, ATL_rnone, C_, ldc_); \
+   ATL_zJIK48x48x48TN48x48x0_a1_b1(m_, n_, k_, al_, (A_)+NBNB, lda_, (B_), ldb_, ATL_rone, (C_)+1, ldc_); \
+   }
+   #define NBmm_bX(m_, n_, k_, al_, A_, lda_, B_, ldb_, be_, C_, ldc_) \
+{ \
+   ATL_zJIK48x48x48TN48x48x0_a1_bX(m_, n_, k_, al_, (A_), lda_, (B_), ldb_, -(be_), C_, ldc_); \
+   ATL_zJIK48x48x48TN48x48x0_a1_bX(m_, n_, k_, al_, (A_), lda_, (B_)+NBNB, ldb_, be_, (C_)+1, ldc_); \
+   ATL_zJIK48x48x48TN48x48x0_a1_bX(m_, n_, k_, al_, (A_)+NBNB, lda_, (B_)+NBNB, ldb_, ATL_rnone, C_, ldc_); \
+   ATL_zJIK48x48x48TN48x48x0_a1_b1(m_, n_, k_, al_, (A_)+NBNB, lda_, (B_), ldb_, ATL_rone, (C_)+1, ldc_); \
+   }
+   #define rNBmm_b1 ATL_dJIK48x48x48TN48x48x0_a1_b1
+   #define rNBmm_b0 ATL_dJIK48x48x48TN48x48x0_a1_b0
+   #define rNBmm_bX ATL_dJIK48x48x48TN48x48x0_a1_bX
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/segmentino/build/linux/amd64/cblas.h	Thu Jun 13 09:43:01 2013 +0100
@@ -0,0 +1,596 @@
+#ifndef CBLAS_H
+
+#ifndef CBLAS_ENUM_DEFINED_H
+   #define CBLAS_ENUM_DEFINED_H
+   enum CBLAS_ORDER {CblasRowMajor=101, CblasColMajor=102 };
+   enum CBLAS_TRANSPOSE {CblasNoTrans=111, CblasTrans=112, CblasConjTrans=113,
+                         AtlasConj=114};
+   enum CBLAS_UPLO  {CblasUpper=121, CblasLower=122};
+   enum CBLAS_DIAG  {CblasNonUnit=131, CblasUnit=132};
+   enum CBLAS_SIDE  {CblasLeft=141, CblasRight=142};
+#endif
+
+#ifndef CBLAS_ENUM_ONLY
+#define CBLAS_H
+#define CBLAS_INDEX int
+
+int cblas_errprn(int ierr, int info, char *form, ...);
+
+/*
+ * ===========================================================================
+ * Prototypes for level 1 BLAS functions (complex are recast as routines)
+ * ===========================================================================
+ */
+float  cblas_sdsdot(const int N, const float alpha, const float *X,
+                    const int incX, const float *Y, const int incY);
+double cblas_dsdot(const int N, const float *X, const int incX, const float *Y,
+                   const int incY);
+float  cblas_sdot(const int N, const float  *X, const int incX,
+                  const float  *Y, const int incY);
+double cblas_ddot(const int N, const double *X, const int incX,
+                  const double *Y, const int incY);
+/*
+ * Functions having prefixes Z and C only
+ */
+void   cblas_cdotu_sub(const int N, const void *X, const int incX,
+                       const void *Y, const int incY, void *dotu);
+void   cblas_cdotc_sub(const int N, const void *X, const int incX,
+                       const void *Y, const int incY, void *dotc);
+
+void   cblas_zdotu_sub(const int N, const void *X, const int incX,
+                       const void *Y, const int incY, void *dotu);
+void   cblas_zdotc_sub(const int N, const void *X, const int incX,
+                       const void *Y, const int incY, void *dotc);
+
+
+/*
+ * Functions having prefixes S D SC DZ
+ */
+float  cblas_snrm2(const int N, const float *X, const int incX);
+float  cblas_sasum(const int N, const float *X, const int incX);
+
+double cblas_dnrm2(const int N, const double *X, const int incX);
+double cblas_dasum(const int N, const double *X, const int incX);
+
+float  cblas_scnrm2(const int N, const void *X, const int incX);
+float  cblas_scasum(const int N, const void *X, const int incX);
+
+double cblas_dznrm2(const int N, const void *X, const int incX);
+double cblas_dzasum(const int N, const void *X, const int incX);
+
+
+/*
+ * Functions having standard 4 prefixes (S D C Z)
+ */
+CBLAS_INDEX cblas_isamax(const int N, const float  *X, const int incX);
+CBLAS_INDEX cblas_idamax(const int N, const double *X, const int incX);
+CBLAS_INDEX cblas_icamax(const int N, const void   *X, const int incX);
+CBLAS_INDEX cblas_izamax(const int N, const void   *X, const int incX);
+
+/*
+ * ===========================================================================
+ * Prototypes for level 1 BLAS routines
+ * ===========================================================================
+ */
+
+/*
+ * Routines with standard 4 prefixes (s, d, c, z)
+ */
+void cblas_sswap(const int N, float *X, const int incX,
+                 float *Y, const int incY);
+void cblas_scopy(const int N, const float *X, const int incX,
+                 float *Y, const int incY);
+void cblas_saxpy(const int N, const float alpha, const float *X,
+                 const int incX, float *Y, const int incY);
+void catlas_saxpby(const int N, const float alpha, const float *X,
+                  const int incX, const float beta, float *Y, const int incY);
+void catlas_sset
+   (const int N, const float alpha, float *X, const int incX);
+
+void cblas_dswap(const int N, double *X, const int incX,
+                 double *Y, const int incY);
+void cblas_dcopy(const int N, const double *X, const int incX,
+                 double *Y, const int incY);
+void cblas_daxpy(const int N, const double alpha, const double *X,
+                 const int incX, double *Y, const int incY);
+void catlas_daxpby(const int N, const double alpha, const double *X,
+                  const int incX, const double beta, double *Y, const int incY);
+void catlas_dset
+   (const int N, const double alpha, double *X, const int incX);
+
+void cblas_cswap(const int N, void *X, const int incX,
+                 void *Y, const int incY);
+void cblas_ccopy(const int N, const void *X, const int incX,
+                 void *Y, const int incY);
+void cblas_caxpy(const int N, const void *alpha, const void *X,
+                 const int incX, void *Y, const int incY);
+void catlas_caxpby(const int N, const void *alpha, const void *X,
+                  const int incX, const void *beta, void *Y, const int incY);
+void catlas_cset
+   (const int N, const void *alpha, void *X, const int incX);
+
+void cblas_zswap(const int N, void *X, const int incX,
+                 void *Y, const int incY);
+void cblas_zcopy(const int N, const void *X, const int incX,
+                 void *Y, const int incY);
+void cblas_zaxpy(const int N, const void *alpha, const void *X,
+                 const int incX, void *Y, const int incY);
+void catlas_zaxpby(const int N, const void *alpha, const void *X,
+                  const int incX, const void *beta, void *Y, const int incY);
+void catlas_zset
+   (const int N, const void *alpha, void *X, const int incX);
+
+
+/*
+ * Routines with S and D prefix only
+ */
+void cblas_srotg(float *a, float *b, float *c, float *s);
+void cblas_srotmg(float *d1, float *d2, float *b1, const float b2, float *P);
+void cblas_srot(const int N, float *X, const int incX,
+                float *Y, const int incY, const float c, const float s);
+void cblas_srotm(const int N, float *X, const int incX,
+                float *Y, const int incY, const float *P);
+
+void cblas_drotg(double *a, double *b, double *c, double *s);
+void cblas_drotmg(double *d1, double *d2, double *b1, const double b2, double *P);
+void cblas_drot(const int N, double *X, const int incX,
+                double *Y, const int incY, const double c, const double s);
+void cblas_drotm(const int N, double *X, const int incX,
+                double *Y, const int incY, const double *P);
+
+
+/*
+ * Routines with S D C Z CS and ZD prefixes
+ */
+void cblas_sscal(const int N, const float alpha, float *X, const int incX);
+void cblas_dscal(const int N, const double alpha, double *X, const int incX);
+void cblas_cscal(const int N, const void *alpha, void *X, const int incX);
+void cblas_zscal(const int N, const void *alpha, void *X, const int incX);
+void cblas_csscal(const int N, const float alpha, void *X, const int incX);
+void cblas_zdscal(const int N, const double alpha, void *X, const int incX);
+
+/*
+ * Extra reference routines provided by ATLAS, but not mandated by the standard
+ */
+void cblas_crotg(void *a, void *b, void *c, void *s);
+void cblas_zrotg(void *a, void *b, void *c, void *s);
+void cblas_csrot(const int N, void *X, const int incX, void *Y, const int incY,
+                 const float c, const float s);
+void cblas_zdrot(const int N, void *X, const int incX, void *Y, const int incY,
+                 const double c, const double s);
+
+/*
+ * ===========================================================================
+ * Prototypes for level 2 BLAS
+ * ===========================================================================
+ */
+
+/*
+ * Routines with standard 4 prefixes (S, D, C, Z)
+ */
+void cblas_sgemv(const enum CBLAS_ORDER Order,
+                 const enum CBLAS_TRANSPOSE TransA, const int M, const int N,
+                 const float alpha, const float *A, const int lda,
+                 const float *X, const int incX, const float beta,
+                 float *Y, const int incY);
+void cblas_sgbmv(const enum CBLAS_ORDER Order,
+                 const enum CBLAS_TRANSPOSE TransA, const int M, const int N,
+                 const int KL, const int KU, const float alpha,
+                 const float *A, const int lda, const float *X,
+                 const int incX, const float beta, float *Y, const int incY);
+void cblas_strmv(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
+                 const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
+                 const int N, const float *A, const int lda,
+                 float *X, const int incX);
+void cblas_stbmv(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
+                 const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
+                 const int N, const int K, const float *A, const int lda,
+                 float *X, const int incX);
+void cblas_stpmv(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
+                 const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
+                 const int N, const float *Ap, float *X, const int incX);
+void cblas_strsv(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
+                 const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
+                 const int N, const float *A, const int lda, float *X,
+                 const int incX);
+void cblas_stbsv(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
+                 const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
+                 const int N, const int K, const float *A, const int lda,
+                 float *X, const int incX);
+void cblas_stpsv(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
+                 const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
+                 const int N, const float *Ap, float *X, const int incX);
+
+void cblas_dgemv(const enum CBLAS_ORDER Order,
+                 const enum CBLAS_TRANSPOSE TransA, const int M, const int N,
+                 const double alpha, const double *A, const int lda,
+                 const double *X, const int incX, const double beta,
+                 double *Y, const int incY);
+void cblas_dgbmv(const enum CBLAS_ORDER Order,
+                 const enum CBLAS_TRANSPOSE TransA, const int M, const int N,
+                 const int KL, const int KU, const double alpha,
+                 const double *A, const int lda, const double *X,
+                 const int incX, const double beta, double *Y, const int incY);
+void cblas_dtrmv(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
+                 const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
+                 const int N, const double *A, const int lda,
+                 double *X, const int incX);
+void cblas_dtbmv(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
+                 const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
+                 const int N, const int K, const double *A, const int lda,
+                 double *X, const int incX);
+void cblas_dtpmv(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
+                 const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
+                 const int N, const double *Ap, double *X, const int incX);
+void cblas_dtrsv(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
+                 const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
+                 const int N, const double *A, const int lda, double *X,
+                 const int incX);
+void cblas_dtbsv(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
+                 const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
+                 const int N, const int K, const double *A, const int lda,
+                 double *X, const int incX);
+void cblas_dtpsv(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
+                 const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
+                 const int N, const double *Ap, double *X, const int incX);
+
+void cblas_cgemv(const enum CBLAS_ORDER Order,
+                 const enum CBLAS_TRANSPOSE TransA, const int M, const int N,
+                 const void *alpha, const void *A, const int lda,
+                 const void *X, const int incX, const void *beta,
+                 void *Y, const int incY);
+void cblas_cgbmv(const enum CBLAS_ORDER Order,
+                 const enum CBLAS_TRANSPOSE TransA, const int M, const int N,
+                 const int KL, const int KU, const void *alpha,
+                 const void *A, const int lda, const void *X,
+                 const int incX, const void *beta, void *Y, const int incY);
+void cblas_ctrmv(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
+                 const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
+                 const int N, const void *A, const int lda,
+                 void *X, const int incX);
+void cblas_ctbmv(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
+                 const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
+                 const int N, const int K, const void *A, const int lda,
+                 void *X, const int incX);
+void cblas_ctpmv(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
+                 const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
+                 const int N, const void *Ap, void *X, const int incX);
+void cblas_ctrsv(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
+                 const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
+                 const int N, const void *A, const int lda, void *X,
+                 const int incX);
+void cblas_ctbsv(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
+                 const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
+                 const int N, const int K, const void *A, const int lda,
+                 void *X, const int incX);
+void cblas_ctpsv(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
+                 const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
+                 const int N, const void *Ap, void *X, const int incX);
+
+void cblas_zgemv(const enum CBLAS_ORDER Order,
+                 const enum CBLAS_TRANSPOSE TransA, const int M, const int N,
+                 const void *alpha, const void *A, const int lda,
+                 const void *X, const int incX, const void *beta,
+                 void *Y, const int incY);
+void cblas_zgbmv(const enum CBLAS_ORDER Order,
+                 const enum CBLAS_TRANSPOSE TransA, const int M, const int N,
+                 const int KL, const int KU, const void *alpha,
+                 const void *A, const int lda, const void *X,
+                 const int incX, const void *beta, void *Y, const int incY);
+void cblas_ztrmv(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
+                 const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
+                 const int N, const void *A, const int lda,
+                 void *X, const int incX);
+void cblas_ztbmv(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
+                 const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
+                 const int N, const int K, const void *A, const int lda,
+                 void *X, const int incX);
+void cblas_ztpmv(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
+                 const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
+                 const int N, const void *Ap, void *X, const int incX);
+void cblas_ztrsv(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
+                 const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
+                 const int N, const void *A, const int lda, void *X,
+                 const int incX);
+void cblas_ztbsv(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
+                 const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
+                 const int N, const int K, const void *A, const int lda,
+                 void *X, const int incX);
+void cblas_ztpsv(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
+                 const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
+                 const int N, const void *Ap, void *X, const int incX);
+
+
+/*
+ * Routines with S and D prefixes only
+ */
+void cblas_ssymv(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
+                 const int N, const float alpha, const float *A,
+                 const int lda, const float *X, const int incX,
+                 const float beta, float *Y, const int incY);
+void cblas_ssbmv(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
+                 const int N, const int K, const float alpha, const float *A,
+                 const int lda, const float *X, const int incX,
+                 const float beta, float *Y, const int incY);
+void cblas_sspmv(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
+                 const int N, const float alpha, const float *Ap,
+                 const float *X, const int incX,
+                 const float beta, float *Y, const int incY);
+void cblas_sger(const enum CBLAS_ORDER Order, const int M, const int N,
+                const float alpha, const float *X, const int incX,
+                const float *Y, const int incY, float *A, const int lda);
+void cblas_ssyr(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
+                const int N, const float alpha, const float *X,
+                const int incX, float *A, const int lda);
+void cblas_sspr(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
+                const int N, const float alpha, const float *X,
+                const int incX, float *Ap);
+void cblas_ssyr2(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
+                const int N, const float alpha, const float *X,
+                const int incX, const float *Y, const int incY, float *A,
+                const int lda);
+void cblas_sspr2(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
+                const int N, const float alpha, const float *X,
+                const int incX, const float *Y, const int incY, float *A);
+
+void cblas_dsymv(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
+                 const int N, const double alpha, const double *A,
+                 const int lda, const double *X, const int incX,
+                 const double beta, double *Y, const int incY);
+void cblas_dsbmv(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
+                 const int N, const int K, const double alpha, const double *A,
+                 const int lda, const double *X, const int incX,
+                 const double beta, double *Y, const int incY);
+void cblas_dspmv(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
+                 const int N, const double alpha, const double *Ap,
+                 const double *X, const int incX,
+                 const double beta, double *Y, const int incY);
+void cblas_dger(const enum CBLAS_ORDER Order, const int M, const int N,
+                const double alpha, const double *X, const int incX,
+                const double *Y, const int incY, double *A, const int lda);
+void cblas_dsyr(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
+                const int N, const double alpha, const double *X,
+                const int incX, double *A, const int lda);
+void cblas_dspr(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
+                const int N, const double alpha, const double *X,
+                const int incX, double *Ap);
+void cblas_dsyr2(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
+                const int N, const double alpha, const double *X,
+                const int incX, const double *Y, const int incY, double *A,
+                const int lda);
+void cblas_dspr2(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
+                const int N, const double alpha, const double *X,
+                const int incX, const double *Y, const int incY, double *A);
+
+
+/*
+ * Routines with C and Z prefixes only
+ */
+void cblas_chemv(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
+                 const int N, const void *alpha, const void *A,
+                 const int lda, const void *X, const int incX,
+                 const void *beta, void *Y, const int incY);
+void cblas_chbmv(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
+                 const int N, const int K, const void *alpha, const void *A,
+                 const int lda, const void *X, const int incX,
+                 const void *beta, void *Y, const int incY);
+void cblas_chpmv(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
+                 const int N, const void *alpha, const void *Ap,
+                 const void *X, const int incX,
+                 const void *beta, void *Y, const int incY);
+void cblas_cgeru(const enum CBLAS_ORDER Order, const int M, const int N,
+                 const void *alpha, const void *X, const int incX,
+                 const void *Y, const int incY, void *A, const int lda);
+void cblas_cgerc(const enum CBLAS_ORDER Order, const int M, const int N,
+                 const void *alpha, const void *X, const int incX,
+                 const void *Y, const int incY, void *A, const int lda);
+void cblas_cher(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
+                const int N, const float alpha, const void *X, const int incX,
+                void *A, const int lda);
+void cblas_chpr(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
+                const int N, const float alpha, const void *X,
+                const int incX, void *A);
+void cblas_cher2(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo, const int N,
+                const void *alpha, const void *X, const int incX,
+                const void *Y, const int incY, void *A, const int lda);
+void cblas_chpr2(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo, const int N,
+                const void *alpha, const void *X, const int incX,
+                const void *Y, const int incY, void *Ap);
+
+void cblas_zhemv(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
+                 const int N, const void *alpha, const void *A,
+                 const int lda, const void *X, const int incX,
+                 const void *beta, void *Y, const int incY);
+void cblas_zhbmv(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
+                 const int N, const int K, const void *alpha, const void *A,
+                 const int lda, const void *X, const int incX,
+                 const void *beta, void *Y, const int incY);
+void cblas_zhpmv(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
+                 const int N, const void *alpha, const void *Ap,
+                 const void *X, const int incX,
+                 const void *beta, void *Y, const int incY);
+void cblas_zgeru(const enum CBLAS_ORDER Order, const int M, const int N,
+                 const void *alpha, const void *X, const int incX,
+                 const void *Y, const int incY, void *A, const int lda);
+void cblas_zgerc(const enum CBLAS_ORDER Order, const int M, const int N,
+                 const void *alpha, const void *X, const int incX,
+                 const void *Y, const int incY, void *A, const int lda);
+void cblas_zher(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
+                const int N, const double alpha, const void *X, const int incX,
+                void *A, const int lda);
+void cblas_zhpr(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
+                const int N, const double alpha, const void *X,
+                const int incX, void *A);
+void cblas_zher2(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo, const int N,
+                const void *alpha, const void *X, const int incX,
+                const void *Y, const int incY, void *A, const int lda);
+void cblas_zhpr2(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo, const int N,
+                const void *alpha, const void *X, const int incX,
+                const void *Y, const int incY, void *Ap);
+
+/*
+ * ===========================================================================
+ * Prototypes for level 3 BLAS
+ * ===========================================================================
+ */
+
+/*
+ * Routines with standard 4 prefixes (S, D, C, Z)
+ */
+void cblas_sgemm(const enum CBLAS_ORDER Order, const enum CBLAS_TRANSPOSE TransA,
+                 const enum CBLAS_TRANSPOSE TransB, const int M, const int N,
+                 const int K, const float alpha, const float *A,
+                 const int lda, const float *B, const int ldb,
+                 const float beta, float *C, const int ldc);
+void cblas_ssymm(const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side,
+                 const enum CBLAS_UPLO Uplo, const int M, const int N,
+                 const float alpha, const float *A, const int lda,
+                 const float *B, const int ldb, const float beta,
+                 float *C, const int ldc);
+void cblas_ssyrk(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
+                 const enum CBLAS_TRANSPOSE Trans, const int N, const int K,
+                 const float alpha, const float *A, const int lda,
+                 const float beta, float *C, const int ldc);
+void cblas_ssyr2k(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
+                  const enum CBLAS_TRANSPOSE Trans, const int N, const int K,
+                  const float alpha, const float *A, const int lda,
+                  const float *B, const int ldb, const float beta,
+                  float *C, const int ldc);
+void cblas_strmm(const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side,
+                 const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE TransA,
+                 const enum CBLAS_DIAG Diag, const int M, const int N,
+                 const float alpha, const float *A, const int lda,
+                 float *B, const int ldb);
+void cblas_strsm(const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side,
+                 const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE TransA,
+                 const enum CBLAS_DIAG Diag, const int M, const int N,
+                 const float alpha, const float *A, const int lda,
+                 float *B, const int ldb);
+
+void cblas_dgemm(const enum CBLAS_ORDER Order, const enum CBLAS_TRANSPOSE TransA,
+                 const enum CBLAS_TRANSPOSE TransB, const int M, const int N,
+                 const int K, const double alpha, const double *A,
+                 const int lda, const double *B, const int ldb,
+                 const double beta, double *C, const int ldc);
+void cblas_dsymm(const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side,
+                 const enum CBLAS_UPLO Uplo, const int M, const int N,
+                 const double alpha, const double *A, const int lda,
+                 const double *B, const int ldb, const double beta,
+                 double *C, const int ldc);
+void cblas_dsyrk(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
+                 const enum CBLAS_TRANSPOSE Trans, const int N, const int K,
+                 const double alpha, const double *A, const int lda,
+                 const double beta, double *C, const int ldc);
+void cblas_dsyr2k(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
+                  const enum CBLAS_TRANSPOSE Trans, const int N, const int K,
+                  const double alpha, const double *A, const int lda,
+                  const double *B, const int ldb, const double beta,
+                  double *C, const int ldc);
+void cblas_dtrmm(const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side,
+                 const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE TransA,
+                 const enum CBLAS_DIAG Diag, const int M, const int N,
+                 const double alpha, const double *A, const int lda,
+                 double *B, const int ldb);
+void cblas_dtrsm(const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side,
+                 const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE TransA,
+                 const enum CBLAS_DIAG Diag, const int M, const int N,
+                 const double alpha, const double *A, const int lda,
+                 double *B, const int ldb);
+
+void cblas_cgemm(const enum CBLAS_ORDER Order, const enum CBLAS_TRANSPOSE TransA,
+                 const enum CBLAS_TRANSPOSE TransB, const int M, const int N,
+                 const int K, const void *alpha, const void *A,
+                 const int lda, const void *B, const int ldb,
+                 const void *beta, void *C, const int ldc);
+void cblas_csymm(const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side,
+                 const enum CBLAS_UPLO Uplo, const int M, const int N,
+                 const void *alpha, const void *A, const int lda,
+                 const void *B, const int ldb, const void *beta,
+                 void *C, const int ldc);
+void cblas_csyrk(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
+                 const enum CBLAS_TRANSPOSE Trans, const int N, const int K,
+                 const void *alpha, const void *A, const int lda,
+                 const void *beta, void *C, const int ldc);
+void cblas_csyr2k(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
+                  const enum CBLAS_TRANSPOSE Trans, const int N, const int K,
+                  const void *alpha, const void *A, const int lda,
+                  const void *B, const int ldb, const void *beta,
+                  void *C, const int ldc);
+void cblas_ctrmm(const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side,
+                 const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE TransA,
+                 const enum CBLAS_DIAG Diag, const int M, const int N,
+                 const void *alpha, const void *A, const int lda,
+                 void *B, const int ldb);
+void cblas_ctrsm(const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side,
+                 const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE TransA,
+                 const enum CBLAS_DIAG Diag, const int M, const int N,
+                 const void *alpha, const void *A, const int lda,
+                 void *B, const int ldb);
+
+void cblas_zgemm(const enum CBLAS_ORDER Order, const enum CBLAS_TRANSPOSE TransA,
+                 const enum CBLAS_TRANSPOSE TransB, const int M, const int N,
+                 const int K, const void *alpha, const void *A,
+                 const int lda, const void *B, const int ldb,
+                 const void *beta, void *C, const int ldc);
+void cblas_zsymm(const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side,
+                 const enum CBLAS_UPLO Uplo, const int M, const int N,
+                 const void *alpha, const void *A, const int lda,
+                 const void *B, const int ldb, const void *beta,
+                 void *C, const int ldc);
+void cblas_zsyrk(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
+                 const enum CBLAS_TRANSPOSE Trans, const int N, const int K,
+                 const void *alpha, const void *A, const int lda,
+                 const void *beta, void *C, const int ldc);
+void cblas_zsyr2k(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
+                  const enum CBLAS_TRANSPOSE Trans, const int N, const int K,
+                  const void *alpha, const void *A, const int lda,
+                  const void *B, const int ldb, const void *beta,
+                  void *C, const int ldc);
+void cblas_ztrmm(const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side,
+                 const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE TransA,
+                 const enum CBLAS_DIAG Diag, const int M, const int N,
+                 const void *alpha, const void *A, const int lda,
+                 void *B, const int ldb);
+void cblas_ztrsm(const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side,
+                 const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE TransA,
+                 const enum CBLAS_DIAG Diag, const int M, const int N,
+                 const void *alpha, const void *A, const int lda,
+                 void *B, const int ldb);
+
+
+/*
+ * Routines with prefixes C and Z only
+ */
+void cblas_chemm(const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side,
+                 const enum CBLAS_UPLO Uplo, const int M, const int N,
+                 const void *alpha, const void *A, const int lda,
+                 const void *B, const int ldb, const void *beta,
+                 void *C, const int ldc);
+void cblas_cherk(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
+                 const enum CBLAS_TRANSPOSE Trans, const int N, const int K,
+                 const float alpha, const void *A, const int lda,
+                 const float beta, void *C, const int ldc);
+void cblas_cher2k(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
+                  const enum CBLAS_TRANSPOSE Trans, const int N, const int K,
+                  const void *alpha, const void *A, const int lda,
+                  const void *B, const int ldb, const float beta,
+                  void *C, const int ldc);
+void cblas_zhemm(const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side,
+                 const enum CBLAS_UPLO Uplo, const int M, const int N,
+                 const void *alpha, const void *A, const int lda,
+                 const void *B, const int ldb, const void *beta,
+                 void *C, const int ldc);
+void cblas_zherk(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
+                 const enum CBLAS_TRANSPOSE Trans, const int N, const int K,
+                 const double alpha, const void *A, const int lda,
+                 const double beta, void *C, const int ldc);
+void cblas_zher2k(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
+                  const enum CBLAS_TRANSPOSE Trans, const int N, const int K,
+                  const void *alpha, const void *A, const int lda,
+                  const void *B, const int ldb, const double beta,
+                  void *C, const int ldc);
+
+int cblas_errprn(int ierr, int info, char *form, ...);
+
+#endif  /* end #ifdef CBLAS_ENUM_ONLY */
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/segmentino/build/linux/amd64/clapack.h	Thu Jun 13 09:43:01 2013 +0100
@@ -0,0 +1,149 @@
+/*
+ *             Automatically Tuned Linear Algebra Software v3.8.0
+ *                    (C) Copyright 1999 R. Clint Whaley
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *   1. Redistributions of source code must retain the above copyright
+ *      notice, this list of conditions and the following disclaimer.
+ *   2. Redistributions in binary form must reproduce the above copyright
+ *      notice, this list of conditions, and the following disclaimer in the
+ *      documentation and/or other materials provided with the distribution.
+ *   3. The name of the ATLAS group or the names of its contributers may
+ *      not be used to endorse or promote products derived from this
+ *      software without specific written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ATLAS GROUP OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ */
+
+#ifndef CLAPACK_H
+
+#define CLAPACK_H
+#include "cblas.h"
+
+#ifndef ATLAS_ORDER
+   #define ATLAS_ORDER CBLAS_ORDER
+#endif
+#ifndef ATLAS_UPLO
+   #define ATLAS_UPLO CBLAS_UPLO
+#endif
+#ifndef ATLAS_DIAG
+   #define ATLAS_DIAG CBLAS_DIAG
+#endif
+int clapack_sgesv(const enum CBLAS_ORDER Order, const int N, const int NRHS,
+                  float *A, const int lda, int *ipiv,
+                  float *B, const int ldb);
+int clapack_sgetrf(const enum CBLAS_ORDER Order, const int M, const int N,
+                   float *A, const int lda, int *ipiv);
+int clapack_sgetrs
+   (const enum CBLAS_ORDER Order, const enum CBLAS_TRANSPOSE Trans,
+    const int N, const int NRHS, const float *A, const int lda,
+    const int *ipiv, float *B, const int ldb);
+int clapack_sgetri(const enum CBLAS_ORDER Order, const int N, float *A,
+                   const int lda, const int *ipiv);
+int clapack_sposv(const enum ATLAS_ORDER Order, const enum ATLAS_UPLO Uplo,
+                  const int N, const int NRHS, float *A, const int lda,
+                  float *B, const int ldb);
+int clapack_spotrf(const enum ATLAS_ORDER Order, const enum ATLAS_UPLO Uplo,
+                   const int N, float *A, const int lda);
+int clapack_spotrs(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
+                   const int N, const int NRHS, const float *A, const int lda,
+                   float *B, const int ldb);
+int clapack_spotri(const enum ATLAS_ORDER Order, const enum ATLAS_UPLO Uplo,
+                   const int N, float *A, const int lda);
+int clapack_slauum(const enum ATLAS_ORDER Order, const enum ATLAS_UPLO Uplo,
+                   const int N, float *A, const int lda);
+int clapack_strtri(const enum ATLAS_ORDER Order,const enum ATLAS_UPLO Uplo,
+                  const enum ATLAS_DIAG Diag,const int N, float *A, const int lda);
+
+int clapack_dgesv(const enum CBLAS_ORDER Order, const int N, const int NRHS,
+                  double *A, const int lda, int *ipiv,
+                  double *B, const int ldb);
+int clapack_dgetrf(const enum CBLAS_ORDER Order, const int M, const int N,
+                   double *A, const int lda, int *ipiv);
+int clapack_dgetrs
+   (const enum CBLAS_ORDER Order, const enum CBLAS_TRANSPOSE Trans,
+    const int N, const int NRHS, const double *A, const int lda,
+    const int *ipiv, double *B, const int ldb);
+int clapack_dgetri(const enum CBLAS_ORDER Order, const int N, double *A,
+                   const int lda, const int *ipiv);
+int clapack_dposv(const enum ATLAS_ORDER Order, const enum ATLAS_UPLO Uplo,
+                  const int N, const int NRHS, double *A, const int lda,
+                  double *B, const int ldb);
+int clapack_dpotrf(const enum ATLAS_ORDER Order, const enum ATLAS_UPLO Uplo,
+                   const int N, double *A, const int lda);
+int clapack_dpotrs(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
+                   const int N, const int NRHS, const double *A, const int lda,
+                   double *B, const int ldb);
+int clapack_dpotri(const enum ATLAS_ORDER Order, const enum ATLAS_UPLO Uplo,
+                   const int N, double *A, const int lda);
+int clapack_dlauum(const enum ATLAS_ORDER Order, const enum ATLAS_UPLO Uplo,
+                   const int N, double *A, const int lda);
+int clapack_dtrtri(const enum ATLAS_ORDER Order,const enum ATLAS_UPLO Uplo,
+                  const enum ATLAS_DIAG Diag,const int N, double *A, const int lda);
+
+int clapack_cgesv(const enum CBLAS_ORDER Order, const int N, const int NRHS,
+                  void *A, const int lda, int *ipiv,
+                  void *B, const int ldb);
+int clapack_cgetrf(const enum CBLAS_ORDER Order, const int M, const int N,
+                   void *A, const int lda, int *ipiv);
+int clapack_cgetrs
+   (const enum CBLAS_ORDER Order, const enum CBLAS_TRANSPOSE Trans,
+    const int N, const int NRHS, const void *A, const int lda,
+    const int *ipiv, void *B, const int ldb);
+int clapack_cgetri(const enum CBLAS_ORDER Order, const int N, void *A,
+                   const int lda, const int *ipiv);
+int clapack_cposv(const enum ATLAS_ORDER Order, const enum ATLAS_UPLO Uplo,
+                  const int N, const int NRHS, void *A, const int lda,
+                  void *B, const int ldb);
+int clapack_cpotrf(const enum ATLAS_ORDER Order, const enum ATLAS_UPLO Uplo,
+                   const int N, void *A, const int lda);
+int clapack_cpotrs(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
+                   const int N, const int NRHS, const void *A, const int lda,
+                   void *B, const int ldb);
+int clapack_cpotri(const enum ATLAS_ORDER Order, const enum ATLAS_UPLO Uplo,
+                   const int N, void *A, const int lda);
+int clapack_clauum(const enum ATLAS_ORDER Order, const enum ATLAS_UPLO Uplo,
+                   const int N, void *A, const int lda);
+int clapack_ctrtri(const enum ATLAS_ORDER Order,const enum ATLAS_UPLO Uplo,
+                  const enum ATLAS_DIAG Diag,const int N, void *A, const int lda);
+
+int clapack_zgesv(const enum CBLAS_ORDER Order, const int N, const int NRHS,
+                  void *A, const int lda, int *ipiv,
+                  void *B, const int ldb);
+int clapack_zgetrf(const enum CBLAS_ORDER Order, const int M, const int N,
+                   void *A, const int lda, int *ipiv);
+int clapack_zgetrs
+   (const enum CBLAS_ORDER Order, const enum CBLAS_TRANSPOSE Trans,
+    const int N, const int NRHS, const void *A, const int lda,
+    const int *ipiv, void *B, const int ldb);
+int clapack_zgetri(const enum CBLAS_ORDER Order, const int N, void *A,
+                   const int lda, const int *ipiv);
+int clapack_zposv(const enum ATLAS_ORDER Order, const enum ATLAS_UPLO Uplo,
+                  const int N, const int NRHS, void *A, const int lda,
+                  void *B, const int ldb);
+int clapack_zpotrf(const enum ATLAS_ORDER Order, const enum ATLAS_UPLO Uplo,
+                   const int N, void *A, const int lda);
+int clapack_zpotrs(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
+                   const int N, const int NRHS, const void *A, const int lda,
+                   void *B, const int ldb);
+int clapack_zpotri(const enum ATLAS_ORDER Order, const enum ATLAS_UPLO Uplo,
+                   const int N, void *A, const int lda);
+int clapack_zlauum(const enum ATLAS_ORDER Order, const enum ATLAS_UPLO Uplo,
+                   const int N, void *A, const int lda);
+int clapack_ztrtri(const enum ATLAS_ORDER Order,const enum ATLAS_UPLO Uplo,
+                  const enum ATLAS_DIAG Diag,const int N, void *A, const int lda);
+
+#endif
Binary file segmentino/build/linux/amd64/libatlas.a has changed
Binary file segmentino/build/linux/amd64/libcblas.a has changed
Binary file segmentino/build/linux/amd64/libf77blas.a has changed
Binary file segmentino/build/linux/amd64/liblapack.a has changed
Binary file segmentino/build/mingw32/atlas.lib has changed
Binary file segmentino/build/mingw32/cblas.lib has changed
Binary file segmentino/build/mingw32/f77blas.lib has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/segmentino/build/mingw32/g2cstubs.c	Thu Jun 13 09:43:01 2013 +0100
@@ -0,0 +1,5 @@
+
+void s_wsfe() { }
+void do_fio() { }
+void e_wsfe() { }
+void s_stop() { }
Binary file segmentino/build/mingw32/g2cstubs.lib has changed
Binary file segmentino/build/mingw32/lapack.lib has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/segmentino/g2cstubs.c	Thu Jun 13 09:43:01 2013 +0100
@@ -0,0 +1,5 @@
+
+void s_wsfe() { }
+void do_fio() { }
+void e_wsfe() { }
+void s_stop() { }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/segmentino/libmain.cpp	Thu Jun 13 09:43:01 2013 +0100
@@ -0,0 +1,35 @@
+/* -*- c-basic-offset: 4 indent-tabs-mode: nil -*-  vi:set ts=8 sts=4 sw=4: */
+
+/*
+    Segmentino
+
+    Code by Massimiliano Zanoni and Matthias Mauch
+    Centre for Digital Music, Queen Mary, University of London
+
+    Copyright 2009-2013 Queen Mary, University of London.
+
+    This program is free software; you can redistribute it and/or
+    modify it under the terms of the GNU General Public License as
+    published by the Free Software Foundation; either version 2 of the
+    License, or (at your option) any later version.  See the file
+    COPYING included with this distribution for more information.
+*/
+
+#include <vamp/vamp.h>
+#include <vamp-sdk/PluginAdapter.h>
+
+#include "Segmentino.h"
+
+static Vamp::PluginAdapter<Segmentino> segmentinoAdapter;
+
+const VampPluginDescriptor *vampGetPluginDescriptor(unsigned int vampApiVersion,
+                                                    unsigned int index)
+{
+    if (vampApiVersion < 1) return 0;
+
+    switch (index) {
+    case 0: return segmentinoAdapter.getDescriptor();
+    default: return 0;
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/segmentino/segmentino.cat	Thu Jun 13 09:43:01 2013 +0100
@@ -0,0 +1,1 @@
+vamp:songpartitioner:qm-songpartitioner::Classification
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/segmentino/segmentino.n3	Thu Jun 13 09:43:01 2013 +0100
@@ -0,0 +1,148 @@
+@prefix rdfs:     <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix xsd:      <http://www.w3.org/2001/XMLSchema#> .
+@prefix vamp:     <http://purl.org/ontology/vamp/> .
+@prefix plugbase: <http://vamp-plugins.org/rdf/plugins/songpartitioner#> .
+@prefix owl:      <http://www.w3.org/2002/07/owl#> .
+@prefix dc:       <http://purl.org/dc/elements/1.1/> .
+@prefix af:       <http://purl.org/ontology/af/> .
+@prefix foaf:     <http://xmlns.com/foaf/0.1/> .
+@prefix cc:       <http://web.resource.org/cc/> .
+@prefix :         <#> .
+
+<>  a   vamp:PluginDescription ;
+    foaf:maker          <http://www.vamp-plugins.org/doap.rdf#template-generator> ;
+    foaf:primaryTopic   <http://vamp-plugins.org/rdf/plugins/songpartitioner> .
+
+:songpartitioner a  vamp:PluginLibrary ;
+    vamp:identifier "songpartitioner"  ; 
+    vamp:available_plugin plugbase:qm-songpartitioner 
+    .
+
+plugbase:qm-songpartitioner a   vamp:Plugin ;
+    dc:title              "Song Partitioner" ;
+    vamp:name             "Song Partitioner" ;
+    dc:description        """Estimate contiguous segments pertaining to song parts such as verse and chorus.""" ;
+    foaf:maker            [ foaf:name "Queen Mary, University of London" ] ;
+    dc:rights             """Plugin by Matthew Davies, Christian Landone, Chris Cannam, Matthias Mauch and Massimiliano Zanoni  Copyright (c) 2006-2012 QMUL - All Rights Reserved""" ;
+    cc:license            <www.gnu.org/licenses/gpl-2.0.html> ; 
+    vamp:identifier       "qm-songpartitioner" ;
+    vamp:vamp_API_version vamp:api_version_2 ;
+    owl:versionInfo       "2" ;
+    vamp:input_domain     vamp:TimeDomain ;
+
+    vamp:parameter   plugbase:qm-songpartitioner_param_bpb ;
+
+    vamp:output      plugbase:qm-songpartitioner_output_beats ;
+    vamp:output      plugbase:qm-songpartitioner_output_bars ;
+    vamp:output      plugbase:qm-songpartitioner_output_beatcounts ;
+    vamp:output      plugbase:qm-songpartitioner_output_beatsd ;
+    vamp:output      plugbase:qm-songpartitioner_output_logscalespec ;
+    vamp:output      plugbase:qm-songpartitioner_output_bothchroma ;
+    vamp:output      plugbase:qm-songpartitioner_output_qchromafw ;
+    vamp:output      plugbase:qm-songpartitioner_output_qchroma ;
+    vamp:output      plugbase:qm-songpartitioner_output_segmentation ;
+    .
+plugbase:qm-songpartitioner_param_bpb a  vamp:QuantizedParameter ;
+    vamp:identifier     "bpb" ;
+    dc:title            "Beats per Bar" ;
+    dc:format           "" ;
+    vamp:min_value       2 ;
+    vamp:max_value       16 ;
+    vamp:unit           "" ;
+    vamp:quantize_step   1  ;
+    vamp:default_value   4 ;
+    vamp:value_names     ();
+    .
+plugbase:qm-songpartitioner_output_beats a  vamp:SparseOutput ;
+    vamp:identifier       "beats" ;
+    dc:title              "Beats" ;
+    dc:description        """Beat locations labelled with metrical position"""  ;
+    vamp:fixed_bin_count  "true" ;
+    vamp:unit             "" ;
+    vamp:bin_count        0 ;
+    vamp:sample_type      vamp:VariableSampleRate ;
+    vamp:sample_rate      86.1326 ;
+    vamp:computes_event_type   af:Beat
+    .
+plugbase:qm-songpartitioner_output_bars a  vamp:SparseOutput ;
+    vamp:identifier       "bars" ;
+    dc:title              "Bars" ;
+    dc:description        """Bar locations"""  ;
+    vamp:fixed_bin_count  "true" ;
+    vamp:unit             "" ;
+    vamp:bin_count        0 ;
+    vamp:sample_type      vamp:VariableSampleRate ;
+    vamp:sample_rate      86.1326 
+    .
+plugbase:qm-songpartitioner_output_beatcounts a  vamp:SparseOutput ;
+    vamp:identifier       "beatcounts" ;
+    dc:title              "Beat Count" ;
+    dc:description        """Beat counter function"""  ;
+    vamp:fixed_bin_count  "true" ;
+    vamp:unit             "" ;
+    vamp:bin_count        1 ;
+    vamp:sample_type      vamp:VariableSampleRate ;
+    vamp:sample_rate      86.1326 
+    .
+plugbase:qm-songpartitioner_output_beatsd a  vamp:SparseOutput ;
+    vamp:identifier       "beatsd" ;
+    dc:title              "Beat Spectral Difference" ;
+    dc:description        """Beat spectral difference function used for bar-line detection"""  ;
+    vamp:fixed_bin_count  "true" ;
+    vamp:unit             "" ;
+    vamp:bin_count        1 ;
+    vamp:sample_type      vamp:VariableSampleRate ;
+    vamp:sample_rate      86.1326 
+    .
+plugbase:qm-songpartitioner_output_logscalespec a  vamp:DenseOutput ;
+    vamp:identifier       "logscalespec" ;
+    dc:title              "Log-Frequency Spectrum" ;
+    dc:description        """Spectrum with linear frequency on a log scale."""  ;
+    vamp:fixed_bin_count  "true" ;
+    vamp:unit             "" ;
+    vamp:bin_count        256 
+    .
+plugbase:qm-songpartitioner_output_bothchroma a  vamp:DenseOutput ;
+    vamp:identifier       "bothchroma" ;
+    dc:title              "Chromagram and Bass Chromagram" ;
+    dc:description        """Tuning-adjusted chromagram and bass chromagram (stacked on top of each other) from NNLS approximate transcription."""  ;
+    vamp:fixed_bin_count  "true" ;
+    vamp:unit             "" ;
+    vamp:bin_count        24 ;
+    vamp:computes_signal_type  af:Chromagram
+    .
+plugbase:qm-songpartitioner_output_qchromafw a  vamp:DenseOutput ;
+    vamp:identifier       "qchromafw" ;
+    dc:title              "Pseudo-Quantised Chromagram and Bass Chromagram" ;
+    dc:description        """Pseudo-Quantised Chromagram and Bass Chromagram (frames between two beats are identical)."""  ;
+    vamp:fixed_bin_count  "true" ;
+    vamp:unit             "" ;
+    vamp:bin_count        24 ;
+    vamp:computes_signal_type  af:Chromagram
+    .
+plugbase:qm-songpartitioner_output_qchroma a  vamp:DenseOutput ;
+    vamp:identifier       "qchroma" ;
+    dc:title              "Quantised Chromagram and Bass Chromagram" ;
+    dc:description        """Quantised Chromagram and Bass Chromagram."""  ;
+    vamp:fixed_bin_count  "true" ;
+    vamp:unit             "" ;
+    vamp:bin_count        24 ;
+    vamp:computes_signal_type  af:Chromagram
+    .
+plugbase:qm-songpartitioner_output_segmentation a  vamp:SparseOutput ;
+    vamp:identifier       "segmentation" ;
+    dc:title              "Segmentation" ;
+    dc:description        """Segmentation"""  ;
+    vamp:fixed_bin_count  "true" ;
+    vamp:unit             "segment-type" ;
+    a                     vamp:QuantizedOutput ;
+    vamp:quantize_step    1  ;
+    a                 vamp:KnownExtentsOutput ;
+    vamp:min_value    1  ;
+    vamp:max_value    5  ;
+    vamp:bin_count        1 ;
+    vamp:sample_type      vamp:VariableSampleRate ;
+    vamp:sample_rate      86.1326 ;
+    vamp:computes_event_type  af:StructuralSegment
+    .
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/segmentino/vamp-plugin.list	Thu Jun 13 09:43:01 2013 +0100
@@ -0,0 +1,1 @@
+_vampGetPluginDescriptor
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/segmentino/vamp-plugin.map	Thu Jun 13 09:43:01 2013 +0100
@@ -0,0 +1,4 @@
+{
+	global: vampGetPluginDescriptor;
+	local: *;
+};
--- a/songparts/COPYING	Wed Jun 12 19:23:03 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,280 +0,0 @@
-		    GNU GENERAL PUBLIC LICENSE
-		       Version 2, June 1991
-
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.
-                          675 Mass Ave, Cambridge, MA 02139, USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-			    Preamble
-
-  The licenses for most software are designed to take away your
-freedom to share and change it.  By contrast, the GNU General Public
-License is intended to guarantee your freedom to share and change free
-software--to make sure the software is free for all its users.  This
-General Public License applies to most of the Free Software
-Foundation's software and to any other program whose authors commit to
-using it.  (Some other Free Software Foundation software is covered by
-the GNU Library General Public License instead.)  You can apply it to
-your programs, too.
-
-  When we speak of free software, we are referring to freedom, not
-price.  Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
-  To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if you
-distribute copies of the software, or if you modify it.
-
-  For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must give the recipients all the rights that
-you have.  You must make sure that they, too, receive or can get the
-source code.  And you must show them these terms so they know their
-rights.
-
-  We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
-
-  Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software.  If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
-
-  Finally, any free program is threatened constantly by software
-patents.  We wish to avoid the danger that redistributors of a free
-program will individually obtain patent licenses, in effect making the
-program proprietary.  To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
-
-  The precise terms and conditions for copying, distribution and
-modification follow.
-
-		    GNU GENERAL PUBLIC LICENSE
-   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
-  0. This License applies to any program or other work which contains
-a notice placed by the copyright holder saying it may be distributed
-under the terms of this General Public License.  The "Program", below,
-refers to any such program or work, and a "work based on the Program"
-means either the Program or any derivative work under copyright law:
-that is to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into another
-language.  (Hereinafter, translation is included without limitation in
-the term "modification".)  Each licensee is addressed as "you".
-
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope.  The act of
-running the Program is not restricted, and the output from the Program
-is covered only if its contents constitute a work based on the
-Program (independent of having been made by running the Program).
-Whether that is true depends on what the Program does.
-
-  1. You may copy and distribute verbatim copies of the Program's
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the
-notices that refer to this License and to the absence of any warranty;
-and give any other recipients of the Program a copy of this License
-along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a fee.
-
-  2. You may modify your copy or copies of the Program or any portion
-of it, thus forming a work based on the Program, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
-    a) You must cause the modified files to carry prominent notices
-    stating that you changed the files and the date of any change.
-
-    b) You must cause any work that you distribute or publish, that in
-    whole or in part contains or is derived from the Program or any
-    part thereof, to be licensed as a whole at no charge to all third
-    parties under the terms of this License.
-
-    c) If the modified program normally reads commands interactively
-    when run, you must cause it, when started running for such
-    interactive use in the most ordinary way, to print or display an
-    announcement including an appropriate copyright notice and a
-    notice that there is no warranty (or else, saying that you provide
-    a warranty) and that users may redistribute the program under
-    these conditions, and telling the user how to view a copy of this
-    License.  (Exception: if the Program itself is interactive but
-    does not normally print such an announcement, your work based on
-    the Program is not required to print an announcement.)
-
-These requirements apply to the modified work as a whole.  If
-identifiable sections of that work are not derived from the Program,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works.  But when you
-distribute the same sections as part of a whole which is a work based
-on the Program, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Program.
-
-In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
-  3. You may copy and distribute the Program (or a work based on it,
-under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you also do one of the following:
-
-    a) Accompany it with the complete corresponding machine-readable
-    source code, which must be distributed under the terms of Sections
-    1 and 2 above on a medium customarily used for software interchange; or,
-
-    b) Accompany it with a written offer, valid for at least three
-    years, to give any third party, for a charge no more than your
-    cost of physically performing source distribution, a complete
-    machine-readable copy of the corresponding source code, to be
-    distributed under the terms of Sections 1 and 2 above on a medium
-    customarily used for software interchange; or,
-
-    c) Accompany it with the information you received as to the offer
-    to distribute corresponding source code.  (This alternative is
-    allowed only for noncommercial distribution and only if you
-    received the program in object code or executable form with such
-    an offer, in accord with Subsection b above.)
-
-The source code for a work means the preferred form of the work for
-making modifications to it.  For an executable work, complete source
-code means all the source code for all modules it contains, plus any
-associated interface definition files, plus the scripts used to
-control compilation and installation of the executable.  However, as a
-special exception, the source code distributed need not include
-anything that is normally distributed (in either source or binary
-form) with the major components (compiler, kernel, and so on) of the
-operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-If distribution of executable or object code is made by offering
-access to copy from a designated place, then offering equivalent
-access to copy the source code from the same place counts as
-distribution of the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
-  4. You may not copy, modify, sublicense, or distribute the Program
-except as expressly provided under this License.  Any attempt
-otherwise to copy, modify, sublicense or distribute the Program is
-void, and will automatically terminate your rights under this License.
-However, parties who have received copies, or rights, from you under
-this License will not have their licenses terminated so long as such
-parties remain in full compliance.
-
-  5. You are not required to accept this License, since you have not
-signed it.  However, nothing else grants you permission to modify or
-distribute the Program or its derivative works.  These actions are
-prohibited by law if you do not accept this License.  Therefore, by
-modifying or distributing the Program (or any work based on the
-Program), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Program or works based on it.
-
-  6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the
-original licensor to copy, distribute or modify the Program subject to
-these terms and conditions.  You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
-
-  7. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License.  If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Program at all.  For example, if a patent
-license would not permit royalty-free redistribution of the Program by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Program.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system, which is
-implemented by public license practices.  Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
-  8. If the distribution and/or use of the Program is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Program under this License
-may add an explicit geographical distribution limitation excluding
-those countries, so that distribution is permitted only in or among
-countries not thus excluded.  In such case, this License incorporates
-the limitation as if written in the body of this License.
-
-  9. The Free Software Foundation may publish revised and/or new versions
-of the General Public License from time to time.  Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-Each version is given a distinguishing version number.  If the Program
-specifies a version number of this License which applies to it and "any
-later version", you have the option of following the terms and conditions
-either of that version or of any later version published by the Free
-Software Foundation.  If the Program does not specify a version number of
-this License, you may choose any version ever published by the Free Software
-Foundation.
-
-  10. If you wish to incorporate parts of the Program into other free
-programs whose distribution conditions are different, write to the author
-to ask for permission.  For software which is copyrighted by the Free
-Software Foundation, write to the Free Software Foundation; we sometimes
-make exceptions for this.  Our decision will be guided by the two goals
-of preserving the free status of all derivatives of our free software and
-of promoting the sharing and reuse of software generally.
-
-			    NO WARRANTY
-
-  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
-TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-REPAIR OR CORRECTION.
-
-  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
-TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
-YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGES.
-
-		     END OF TERMS AND CONDITIONS
--- a/songparts/Makefile.linux64	Wed Jun 12 19:23:03 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,12 +0,0 @@
-
-#CFLAGS := -O3 -fPIC -ftree-vectorize -I../armadillo-2.4.4/include -I../../vamp-plugin-sdk -I../../qm-dsp
-CFLAGS := -Wall -g -fPIC -I../armadillo-2.4.4/include -I../../vamp-plugin-sdk -I../../qm-dsp
-
-CXXFLAGS  := $(CFLAGS)
-
-LDFLAGS	  := -shared -Wl,-Bstatic -L../../qm-dsp -lqm-dsp -lvamp-sdk -Lbuild/linux/amd64 -llapack -lcblas -lf77blas -latlas -Wl,-Bdynamic 
-
-PLUGIN_EXT   := .so
-
-include build/general/Makefile.inc
-
--- a/songparts/Makefile_ORIGINAL.osx	Wed Jun 12 19:23:03 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,11 +0,0 @@
-
-CFLAGS := -O3 -ftree-vectorize -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk -arch i386 -arch x86_64 -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 -arch i386 -arch x86_64 -lqm-dsp ../vamp-plugin-sdk/libvamp-sdk.a -larmadillo -dynamiclib -framework Accelerate -lpthread -install_name qm-vamp-plugins.dylib
-
-PLUGIN_EXT   := .dylib
-
-include build/general/Makefile.inc
-
--- a/songparts/SongParts.cpp	Wed Jun 12 19:23:03 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1927 +0,0 @@
-/* -*- c-basic-offset: 4 indent-tabs-mode: nil -*-  vi:set ts=8 sts=4 sw=4: */
-
-/*
-    QM Vamp Plugin Set
-
-    Centre for Digital Music, Queen Mary, University of London.
-
-    This program is free software; you can redistribute it and/or
-    modify it under the terms of the GNU General Public License as
-    published by the Free Software Foundation; either version 2 of the
-    License, or (at your option) any later version.  See the file
-    COPYING included with this distribution for more information.
-*/
-
-#include "SongParts.h"
-
-#include <base/Window.h>
-#include <dsp/onsets/DetectionFunction.h>
-#include <dsp/onsets/PeakPicking.h>
-#include <dsp/transforms/FFT.h>
-#include <dsp/tempotracking/TempoTrackV2.h>
-#include <dsp/tempotracking/DownBeat.h>
-#include <chromamethods.h>
-#include <maths/MathUtilities.h>
-#include <boost/numeric/ublas/matrix.hpp>
-#include <boost/numeric/ublas/io.hpp>
-#include <boost/math/distributions/normal.hpp>
-#include "armadillo"
-#include <fstream>
-#include <sstream>
-#include <cmath>
-#include <vector>
-
-#include <vamp-sdk/Plugin.h>
-
-using namespace boost::numeric;
-using namespace arma;
-using std::string;
-using std::vector;
-using std::cerr;
-using std::cout;
-using std::endl;
-
-
-#ifndef __GNUC__
-#include <alloca.h>
-#endif
-
-
-// Result Struct
-typedef struct Part {
-    int n;
-    vector<int> indices;
-    string letter;
-    int value;
-    int level;
-    int nInd;
-}Part;
-
-
-
-/* ------------------------------------ */
-/* ----- BEAT DETECTOR CLASS ---------- */
-/* ------------------------------------ */
-
-class BeatTrackerData
-{
-    /* --- ATTRIBUTES --- */
-public:
-    DFConfig dfConfig;
-    DetectionFunction *df;
-    DownBeat *downBeat;
-    vector<double> dfOutput;
-    Vamp::RealTime origin;
-    
-    
-    /* --- METHODS --- */
-    
-    /* --- Constructor --- */
-public:
-    BeatTrackerData(float rate, const DFConfig &config) : dfConfig(config) {
-        
-        df = new DetectionFunction(config);
-        // decimation factor aims at resampling to c. 3KHz; must be power of 2
-        int factor = MathUtilities::nextPowerOfTwo(rate / 3000);
-        // std::cerr << "BeatTrackerData: factor = " << factor << std::endl;
-        downBeat = new DownBeat(rate, factor, config.stepSize);
-    }
-    
-    /* --- Desctructor --- */
-    ~BeatTrackerData() {
-        delete df;
-        delete downBeat;
-    }
-    
-    void reset() {
-        delete df;
-        df = new DetectionFunction(dfConfig);
-        dfOutput.clear();
-        downBeat->resetAudioBuffer();
-        origin = Vamp::RealTime::zeroTime;
-    }
-};
-
-
-/* --------------------------------------- */
-/* ----- CHROMA EXTRACTOR CLASS ---------- */
-/* --------------------------------------- */
-
-class ChromaData
-{
-    
-     /* --- ATTRIBUTES --- */
-    
-public:
-    int frameCount;
-    int nBPS;
-    Vamp::Plugin::FeatureList logSpectrum;
-    int blockSize;
-    int lengthOfNoteIndex;
-    vector<float> meanTunings;
-    vector<float> localTunings;
-    float whitening;
-    float preset;
-    float useNNLS;
-    vector<float> localTuning;
-    vector<float> kernelValue;
-    vector<int> kernelFftIndex;
-    vector<int> kernelNoteIndex;
-    float *dict;
-    bool tuneLocal;
-    float doNormalizeChroma;
-    float rollon;
-    float s;
-    vector<float> hw;
-    vector<float> sinvalues;
-    vector<float> cosvalues;
-    Window<float> window;
-    FFTReal fft;
-    int inputSampleRate;
-    
-    /* --- METHODS --- */
-    
-    /* --- Constructor --- */
-    
-public:
-    ChromaData(float inputSampleRate, size_t block_size) :
-        frameCount(0),
-        nBPS(3),
-        logSpectrum(0),
-        blockSize(0),
-        lengthOfNoteIndex(0),
-        meanTunings(0),
-        localTunings(0),
-        whitening(1.0),
-        preset(0.0),
-        useNNLS(1.0),
-        localTuning(0.0),
-        kernelValue(0),
-        kernelFftIndex(0),
-        kernelNoteIndex(0),
-        dict(0),
-        tuneLocal(0.0),
-        doNormalizeChroma(0),
-        rollon(0.0),
-        s(0.7),
-        sinvalues(0),
-        cosvalues(0),
-        window(HanningWindow, block_size),
-        fft(block_size),
-        inputSampleRate(inputSampleRate)
-    {
-        // make the *note* dictionary matrix
-        dict = new float[nNote * 84];
-        for (int i = 0; i < nNote * 84; ++i) dict[i] = 0.0;
-        blockSize = block_size;
-    }
-    
-    
-    /* --- Desctructor --- */
-    
-    ~ChromaData() {
-        delete [] dict;
-    }
-    
-    /* --- Public Methods --- */
-    
-    void reset() {
-        frameCount = 0;
-        logSpectrum.clear();
-        for (int iBPS = 0; iBPS < 3; ++iBPS) {
-            meanTunings[iBPS] = 0;
-            localTunings[iBPS] = 0;
-        }
-        localTuning.clear();
-    }
-    
-    void baseProcess(float *inputBuffers, Vamp::RealTime timestamp)
-    {   
-                
-        frameCount++;   
-        float *magnitude = new float[blockSize/2];
-        double *fftReal = new double[blockSize];
-        double *fftImag = new double[blockSize];
-
-        // FFTReal wants doubles, so we need to make a local copy of inputBuffers
-        double *inputBuffersDouble = new double[blockSize];
-        for (int i = 0; i < blockSize; i++) inputBuffersDouble[i] = inputBuffers[i];
-        
-        fft.process(false, inputBuffersDouble, fftReal, fftImag);
-        
-        float energysum = 0;
-        // make magnitude
-        float maxmag = -10000;
-        for (int iBin = 0; iBin < static_cast<int>(blockSize/2); iBin++) {
-            magnitude[iBin] = sqrt(fftReal[iBin] * fftReal[iBin] + 
-                                   fftImag[iBin] * fftImag[iBin]);
-            if (magnitude[iBin]>blockSize*1.0) magnitude[iBin] = blockSize; 
-            // a valid audio signal (between -1 and 1) should not be limited here.
-            if (maxmag < magnitude[iBin]) maxmag = magnitude[iBin];
-            if (rollon > 0) {
-                energysum += pow(magnitude[iBin],2);
-            }
-        }
-    
-        float cumenergy = 0;
-        if (rollon > 0) {
-            for (int iBin = 2; iBin < static_cast<int>(blockSize/2); iBin++) {
-                cumenergy +=  pow(magnitude[iBin],2);
-                if (cumenergy < energysum * rollon / 100) magnitude[iBin-2] = 0;
-                else break;
-            }
-        }
-    
-        if (maxmag < 2) {
-            // cerr << "timestamp " << timestamp << ": very low magnitude, setting magnitude to all zeros" << endl;
-            for (int iBin = 0; iBin < static_cast<int>(blockSize/2); iBin++) {
-                magnitude[iBin] = 0;
-            }
-        }
-        
-        // cerr << magnitude[200] << endl;
-        
-        // note magnitude mapping using pre-calculated matrix
-        float *nm  = new float[nNote]; // note magnitude
-        for (int iNote = 0; iNote < nNote; iNote++) {
-            nm[iNote] = 0; // initialise as 0
-        }
-        int binCount = 0;
-        for (vector<float>::iterator it = kernelValue.begin(); it != kernelValue.end(); ++it) {
-            nm[kernelNoteIndex[binCount]] += magnitude[kernelFftIndex[binCount]] * kernelValue[binCount];
-            binCount++;  
-        }
-    
-        float one_over_N = 1.0/frameCount;
-        // update means of complex tuning variables
-        for (int iBPS = 0; iBPS < nBPS; ++iBPS) meanTunings[iBPS] *= float(frameCount-1)*one_over_N;
-    
-        for (int iTone = 0; iTone < round(nNote*0.62/nBPS)*nBPS+1; iTone = iTone + nBPS) {
-            for (int iBPS = 0; iBPS < nBPS; ++iBPS) meanTunings[iBPS] += nm[iTone + iBPS]*one_over_N;
-            float ratioOld = 0.997;
-            for (int iBPS = 0; iBPS < nBPS; ++iBPS) {
-                localTunings[iBPS] *= ratioOld; 
-                localTunings[iBPS] += nm[iTone + iBPS] * (1 - ratioOld);
-            }
-        }
-    
-        float localTuningImag = 0;
-        float localTuningReal = 0;
-        for (int iBPS = 0; iBPS < nBPS; ++iBPS) {
-            localTuningReal += localTunings[iBPS] * cosvalues[iBPS];
-            localTuningImag += localTunings[iBPS] * sinvalues[iBPS];
-        }
-    
-        float normalisedtuning = atan2(localTuningImag, localTuningReal)/(2*M_PI);
-        localTuning.push_back(normalisedtuning);
-    
-        Vamp::Plugin::Feature f1; // logfreqspec
-        f1.hasTimestamp = true;
-        f1.timestamp = timestamp;
-        for (int iNote = 0; iNote < nNote; iNote++) {
-            f1.values.push_back(nm[iNote]);
-        }
-    
-        // deletes
-        delete[] inputBuffersDouble;
-        delete[] magnitude;
-        delete[] fftReal;
-        delete[] fftImag;
-        delete[] nm;
-    
-        logSpectrum.push_back(f1); // remember note magnitude
-    }
-    
-    bool initialise()
-    {
-        dictionaryMatrix(dict, s);
-        
-        // make things for tuning estimation
-        for (int iBPS = 0; iBPS < nBPS; ++iBPS) {
-            sinvalues.push_back(sin(2*M_PI*(iBPS*1.0/nBPS)));
-            cosvalues.push_back(cos(2*M_PI*(iBPS*1.0/nBPS)));
-        }
-    
-        
-        // make hamming window of length 1/2 octave
-        int hamwinlength = nBPS * 6 + 1;
-        float hamwinsum = 0;
-        for (int i = 0; i < hamwinlength; ++i) { 
-            hw.push_back(0.54 - 0.46 * cos((2*M_PI*i)/(hamwinlength-1)));    
-            hamwinsum += 0.54 - 0.46 * cos((2*M_PI*i)/(hamwinlength-1));
-        }
-        for (int i = 0; i < hamwinlength; ++i) hw[i] = hw[i] / hamwinsum;
-    
-    
-        // initialise the tuning
-        for (int iBPS = 0; iBPS < nBPS; ++iBPS) {
-            meanTunings.push_back(0);
-            localTunings.push_back(0);
-        }
-        
-        blockSize = blockSize;
-        frameCount = 0;
-        int tempn = nNote * blockSize/2;
-        // cerr << "length of tempkernel : " <<  tempn << endl;
-        float *tempkernel;
-
-        tempkernel = new float[tempn];
-
-        logFreqMatrix(inputSampleRate, blockSize, tempkernel);
-        kernelValue.clear();
-        kernelFftIndex.clear();
-        kernelNoteIndex.clear();
-        int countNonzero = 0;
-        for (int iNote = 0; iNote < nNote; ++iNote) { 
-            // I don't know if this is wise: manually making a sparse matrix
-            for (int iFFT = 0; iFFT < static_cast<int>(blockSize/2); ++iFFT) {
-                if (tempkernel[iFFT + blockSize/2 * iNote] > 0) {
-                    kernelValue.push_back(tempkernel[iFFT + blockSize/2 * iNote]);
-                    if (tempkernel[iFFT + blockSize/2 * iNote] > 0) {
-                        countNonzero++;
-                    }
-                    kernelFftIndex.push_back(iFFT);
-                    kernelNoteIndex.push_back(iNote);
-                }
-            }
-        }
-        delete [] tempkernel;
-
-        return true;
-    }    
-};
-
-
-/* --------------------------------- */
-/* ----- SONG PARTITIONER ---------- */
-/* --------------------------------- */
-
-
-/* --- ATTRIBUTES --- */
-
-float SongPartitioner::m_stepSecs = 0.01161;            // 512 samples at 44100
-int SongPartitioner::m_chromaFramesizeFactor = 16;   // 16 times as long as beat tracker's
-int SongPartitioner::m_chromaStepsizeFactor = 4;     // 4 times as long as beat tracker's
-
-
-/* --- METHODS --- */
-
-/* --- Constructor --- */
-SongPartitioner::SongPartitioner(float inputSampleRate) :
-    Vamp::Plugin(inputSampleRate),
-    m_d(0),
-    m_chromadata(0),
-    m_bpb(4),
-    m_pluginFrameCount(0)
-{
-}
-
-
-/* --- Desctructor --- */
-SongPartitioner::~SongPartitioner()
-{
-    delete m_d;
-    delete m_chromadata;
-}
-
-
-/* --- Methods --- */
-string SongPartitioner::getIdentifier() const
-{
-    return "qm-songpartitioner";
-}
-
-string SongPartitioner::getName() const
-{
-    return "Song Partitioner";
-}
-
-string SongPartitioner::getDescription() const
-{
-    return "Estimate contiguous segments pertaining to song parts such as verse and chorus.";
-}
-
-string SongPartitioner::getMaker() const
-{
-    return "Queen Mary, University of London";
-}
-
-int SongPartitioner::getPluginVersion() const
-{
-    return 2;
-}
-
-string SongPartitioner::getCopyright() const
-{
-    return "Plugin by Matthew Davies, Christian Landone, Chris Cannam, Matthias Mauch and Massimiliano Zanoni  Copyright (c) 2006-2012 QMUL - All Rights Reserved";
-}
-
-SongPartitioner::ParameterList SongPartitioner::getParameterDescriptors() const
-{
-    ParameterList list;
-
-    ParameterDescriptor desc;
-
-    // desc.identifier = "bpb";
-    // desc.name = "Beats per Bar";
-    // desc.description = "The number of beats in each bar";
-    // desc.minValue = 2;
-    // desc.maxValue = 16;
-    // desc.defaultValue = 4;
-    // desc.isQuantized = true;
-    // desc.quantizeStep = 1;
-    // list.push_back(desc);
-
-    return list;
-}
-
-float SongPartitioner::getParameter(std::string name) const
-{
-    if (name == "bpb") return m_bpb;
-    return 0.0;
-}
-
-void SongPartitioner::setParameter(std::string name, float value)
-{
-    if (name == "bpb") m_bpb = lrintf(value);
-}
-
-
-// Return the StepSize for Chroma Extractor 
-size_t SongPartitioner::getPreferredStepSize() const
-{
-    size_t step = size_t(m_inputSampleRate * m_stepSecs + 0.0001);
-    if (step < 1) step = 1;
-
-    return step;
-}
-
-// Return the BlockSize for Chroma Extractor 
-size_t SongPartitioner::getPreferredBlockSize() const
-{
-    size_t theoretical = getPreferredStepSize() * 2;
-    theoretical *= m_chromaFramesizeFactor; 
-
-    return theoretical;
-}
-
-
-// Initialize the plugin and define Beat Tracker and Chroma Extractor Objects
-bool SongPartitioner::initialise(size_t channels, size_t stepSize, size_t blockSize)
-{
-    if (m_d) {
-        delete m_d;
-        m_d = 0;
-    }
-    if (m_chromadata) {
-        delete m_chromadata;
-        m_chromadata = 0;
-    }
-
-    if (channels < getMinChannelCount() ||
-        channels > getMaxChannelCount()) {
-        std::cerr << "SongPartitioner::initialise: Unsupported channel count: "
-                  << channels << std::endl;
-        return false;
-    }
-
-    if (stepSize != getPreferredStepSize()) {
-        std::cerr << "ERROR: SongPartitioner::initialise: Unsupported step size for this sample rate: "
-                  << stepSize << " (wanted " << (getPreferredStepSize()) << ")" << std::endl;
-        return false;
-    }
-
-    if (blockSize != getPreferredBlockSize()) {
-        std::cerr << "WARNING: SongPartitioner::initialise: Sub-optimal block size for this sample rate: "
-                  << blockSize << " (wanted " << getPreferredBlockSize() << ")" << std::endl;
-    }
-
-    // Beat tracker and Chroma extractor has two different configuration parameters 
-    
-    // Configuration Parameters for Beat Tracker
-    DFConfig dfConfig;
-    dfConfig.DFType = DF_COMPLEXSD;
-    dfConfig.stepSize = stepSize;
-    dfConfig.frameLength = blockSize / m_chromaFramesizeFactor;
-    dfConfig.dbRise = 3;
-    dfConfig.adaptiveWhitening = false;
-    dfConfig.whiteningRelaxCoeff = -1;
-    dfConfig.whiteningFloor = -1;
-    
-    // Initialise Beat Tracker
-    m_d = new BeatTrackerData(m_inputSampleRate, dfConfig);
-    m_d->downBeat->setBeatsPerBar(m_bpb);
-    
-    // Initialise Chroma Extractor
-    m_chromadata = new ChromaData(m_inputSampleRate, blockSize);
-    m_chromadata->initialise();
-    
-    return true;
-}
-
-void SongPartitioner::reset()
-{
-    if (m_d) m_d->reset();
-    if (m_chromadata) m_chromadata->reset();
-    m_pluginFrameCount = 0;
-}
-
-SongPartitioner::OutputList SongPartitioner::getOutputDescriptors() const
-{
-    OutputList list;
-    int outputCounter = 0;
-
-    OutputDescriptor beat;
-    beat.identifier = "beats";
-    beat.name = "Beats";
-    beat.description = "Beat locations labelled with metrical position";
-    beat.unit = "";
-    beat.hasFixedBinCount = true;
-    beat.binCount = 0;
-    beat.sampleType = OutputDescriptor::VariableSampleRate;
-    beat.sampleRate = 1.0 / m_stepSecs;
-    m_beatOutputNumber = outputCounter++;
-
-    OutputDescriptor bars;
-    bars.identifier = "bars";
-    bars.name = "Bars";
-    bars.description = "Bar locations";
-    bars.unit = "";
-    bars.hasFixedBinCount = true;
-    bars.binCount = 0;
-    bars.sampleType = OutputDescriptor::VariableSampleRate;
-    bars.sampleRate = 1.0 / m_stepSecs;
-    m_barsOutputNumber = outputCounter++;
-
-    OutputDescriptor beatcounts;
-    beatcounts.identifier = "beatcounts";
-    beatcounts.name = "Beat Count";
-    beatcounts.description = "Beat counter function";
-    beatcounts.unit = "";
-    beatcounts.hasFixedBinCount = true;
-    beatcounts.binCount = 1;
-    beatcounts.sampleType = OutputDescriptor::VariableSampleRate;
-    beatcounts.sampleRate = 1.0 / m_stepSecs;
-    m_beatcountsOutputNumber = outputCounter++;
-
-    OutputDescriptor beatsd;
-    beatsd.identifier = "beatsd";
-    beatsd.name = "Beat Spectral Difference";
-    beatsd.description = "Beat spectral difference function used for bar-line detection";
-    beatsd.unit = "";
-    beatsd.hasFixedBinCount = true;
-    beatsd.binCount = 1;
-    beatsd.sampleType = OutputDescriptor::VariableSampleRate;
-    beatsd.sampleRate = 1.0 / m_stepSecs;
-    m_beatsdOutputNumber = outputCounter++;
-    
-    OutputDescriptor logscalespec;
-    logscalespec.identifier = "logscalespec";
-    logscalespec.name = "Log-Frequency Spectrum";
-    logscalespec.description = "Spectrum with linear frequency on a log scale.";
-    logscalespec.unit = "";
-    logscalespec.hasFixedBinCount = true;
-    logscalespec.binCount = nNote;
-    logscalespec.hasKnownExtents = false;
-    logscalespec.isQuantized = false;
-    logscalespec.sampleType = OutputDescriptor::FixedSampleRate;
-    logscalespec.hasDuration = false;
-    logscalespec.sampleRate = m_inputSampleRate/2048;
-    m_logscalespecOutputNumber = outputCounter++;
-    
-    OutputDescriptor bothchroma;
-    bothchroma.identifier = "bothchroma";
-    bothchroma.name = "Chromagram and Bass Chromagram";
-    bothchroma.description = "Tuning-adjusted chromagram and bass chromagram (stacked on top of each other) from NNLS approximate transcription.";
-    bothchroma.unit = "";
-    bothchroma.hasFixedBinCount = true;
-    bothchroma.binCount = 24;
-    bothchroma.hasKnownExtents = false;
-    bothchroma.isQuantized = false;
-    bothchroma.sampleType = OutputDescriptor::FixedSampleRate;
-    bothchroma.hasDuration = false;
-    bothchroma.sampleRate = m_inputSampleRate/2048;
-    m_bothchromaOutputNumber = outputCounter++;
-    
-    OutputDescriptor qchromafw;
-    qchromafw.identifier = "qchromafw";
-    qchromafw.name = "Pseudo-Quantised Chromagram and Bass Chromagram";
-    qchromafw.description = "Pseudo-Quantised Chromagram and Bass Chromagram (frames between two beats are identical).";
-    qchromafw.unit = "";
-    qchromafw.hasFixedBinCount = true;
-    qchromafw.binCount = 24;
-    qchromafw.hasKnownExtents = false;
-    qchromafw.isQuantized = false;
-    qchromafw.sampleType = OutputDescriptor::FixedSampleRate;
-    qchromafw.hasDuration = false;
-    qchromafw.sampleRate = m_inputSampleRate/2048;
-    m_qchromafwOutputNumber = outputCounter++;    
-    
-    OutputDescriptor qchroma;
-    qchroma.identifier = "qchroma";
-    qchroma.name = "Quantised Chromagram and Bass Chromagram";
-    qchroma.description = "Quantised Chromagram and Bass Chromagram.";
-    qchroma.unit = "";
-    qchroma.hasFixedBinCount = true;
-    qchroma.binCount = 24;
-    qchroma.hasKnownExtents = false;
-    qchroma.isQuantized = false;
-    qchroma.sampleType = OutputDescriptor::FixedSampleRate;
-    qchroma.hasDuration = true;
-    qchroma.sampleRate = m_inputSampleRate/2048;
-    m_qchromaOutputNumber = outputCounter++;
-
-    OutputDescriptor segm;
-    segm.identifier = "segmentation";
-    segm.name = "Segmentation";
-    segm.description = "Segmentation";
-    segm.unit = "segment-type";
-    segm.hasFixedBinCount = true;
-    //segm.binCount = 24;
-    segm.binCount = 1;
-    segm.hasKnownExtents = true;
-    segm.minValue = 1;
-    segm.maxValue = 5;
-    segm.isQuantized = true;
-    segm.quantizeStep = 1;
-    segm.sampleType = OutputDescriptor::VariableSampleRate;
-    segm.sampleRate = 1.0 / m_stepSecs;
-    segm.hasDuration = true;
-    m_segmOutputNumber = outputCounter++;
-    
-    
-   /* 
-    OutputList list;
-    OutputDescriptor segmentation;
-    segmentation.identifier = "segmentation";
-    segmentation.name = "Segmentation";
-    segmentation.description = "Segmentation";
-    segmentation.unit = "segment-type";
-    segmentation.hasFixedBinCount = true;
-    segmentation.binCount = 1;
-    segmentation.hasKnownExtents = true;
-    segmentation.minValue = 1;
-    segmentation.maxValue = nSegmentTypes;
-    segmentation.isQuantized = true;
-    segmentation.quantizeStep = 1;
-    segmentation.sampleType = OutputDescriptor::VariableSampleRate;
-    segmentation.sampleRate = m_inputSampleRate / getPreferredStepSize();
-    list.push_back(segmentation);
-    return list;
-    */
-    
-    
-    list.push_back(beat);
-    list.push_back(bars);
-    list.push_back(beatcounts);
-    list.push_back(beatsd);
-    list.push_back(logscalespec);
-    list.push_back(bothchroma);
-    list.push_back(qchromafw);
-    list.push_back(qchroma);
-    list.push_back(segm);
-
-    return list;
-}
-
-// Executed for each frame - called from the host  
-
-// We use time domain input, because DownBeat requires it -- so we
-// use the time-domain version of DetectionFunction::process which
-// does its own FFT.  It requires doubles as input, so we need to
-// make a temporary copy
-
-// We only support a single input channel
-SongPartitioner::FeatureSet SongPartitioner::process(const float *const *inputBuffers,Vamp::RealTime timestamp)
-{
-    if (!m_d) {
-        cerr << "ERROR: SongPartitioner::process: "
-             << "SongPartitioner has not been initialised"
-             << endl;
-        return FeatureSet();
-    }
-
-    const int fl = m_d->dfConfig.frameLength;
-#ifndef __GNUC__
-    double *dfinput = (double *)alloca(fl * sizeof(double));
-#else
-    double dfinput[fl];
-#endif
-    int sampleOffset = ((m_chromaFramesizeFactor-1) * fl) / 2;
-    
-    // Since chroma needs a much longer frame size, we only ever use the very
-    // beginning of the frame for beat tracking.
-    for (int i = 0; i < fl; ++i) dfinput[i] = inputBuffers[0][i];
-    double output = m_d->df->process(dfinput);
-
-    if (m_d->dfOutput.empty()) m_d->origin = timestamp;
-
-//    std::cerr << "df[" << m_d->dfOutput.size() << "] is " << output << std::endl;
-    m_d->dfOutput.push_back(output);
-
-    // Downsample and store the incoming audio block.
-    // We have an overlap on the incoming audio stream (step size is
-    // half block size) -- this function is configured to take only a
-    // step size's worth, so effectively ignoring the overlap.  Note
-    // however that this means we omit the last blocksize - stepsize
-    // samples completely for the purposes of barline detection
-    // (hopefully not a problem)
-    m_d->downBeat->pushAudioBlock(inputBuffers[0]);
-
-    // The following is not done every time, but only every m_chromaFramesizeFactor times,
-    // because the chroma does not need dense time frames.
-    
-    if (m_pluginFrameCount % m_chromaStepsizeFactor == 0)
-    {    
-        
-        // Window the full time domain, data, FFT it and process chroma stuff.
-    
-        #ifndef __GNUC__
-            float *windowedBuffers = (float *)alloca(m_chromadata->blockSize * sizeof(float));
-        #else
-            float windowedBuffers[m_chromadata->blockSize];
-        #endif
-        m_chromadata->window.cut(&inputBuffers[0][0], &windowedBuffers[0]);
-    
-        // adjust timestamp (we want the middle of the frame)
-        timestamp = timestamp + Vamp::RealTime::frame2RealTime(sampleOffset, lrintf(m_inputSampleRate));
-
-        m_chromadata->baseProcess(&windowedBuffers[0], timestamp);
-        
-    }
-    m_pluginFrameCount++;
-    
-    FeatureSet fs;
-    fs[m_logscalespecOutputNumber].push_back(
-        m_chromadata->logSpectrum.back());
-    return fs;
-}
-
-SongPartitioner::FeatureSet SongPartitioner::getRemainingFeatures()
-{
-    if (!m_d) {
-        cerr << "ERROR: SongPartitioner::getRemainingFeatures: "
-             << "SongPartitioner has not been initialised"
-             << endl;
-        return FeatureSet();
-    }
-
-    FeatureSet masterFeatureset = beatTrack();
-    Vamp::RealTime last_beattime = masterFeatureset[m_beatOutputNumber][masterFeatureset[m_beatOutputNumber].size()-1].timestamp;
-    masterFeatureset[m_beatOutputNumber].clear();
-    Vamp::RealTime beattime = Vamp::RealTime::fromSeconds(1.0);
-    while (beattime < last_beattime)
-    {
-        Feature beatfeature;
-        beatfeature.hasTimestamp = true;
-        beatfeature.timestamp = beattime;
-        masterFeatureset[m_beatOutputNumber].push_back(beatfeature);
-        beattime = beattime + Vamp::RealTime::fromSeconds(0.5);
-    }
-    
-    
-    FeatureList chromaList = chromaFeatures();
-    
-    for (int i = 0; i < (int)chromaList.size(); ++i)
-    {
-        masterFeatureset[m_bothchromaOutputNumber].push_back(chromaList[i]);
-    }
-    
-    // quantised and pseudo-quantised (beat-wise) chroma
-    std::vector<FeatureList> quantisedChroma = beatQuantiser(chromaList, masterFeatureset[m_beatOutputNumber]);
-
-    if (quantisedChroma.empty()) return masterFeatureset;
-    
-    masterFeatureset[m_qchromafwOutputNumber] = quantisedChroma[0];
-    masterFeatureset[m_qchromaOutputNumber] = quantisedChroma[1];
-    
-    // Segmentation
-    try {
-        masterFeatureset[m_segmOutputNumber] = runSegmenter(quantisedChroma[1]);
-    } catch (std::bad_alloc &a) {
-        cerr << "ERROR: SongPartitioner::getRemainingFeatures: Failed to run segmenter, not enough memory (song too long?)" << endl;
-    }
-    
-    return(masterFeatureset);
-}
-
-/* ------ Beat Tracker ------ */
-
-SongPartitioner::FeatureSet SongPartitioner::beatTrack()
-{
-    vector<double> df;
-    vector<double> beatPeriod;
-    vector<double> tempi;
-    
-    for (int i = 2; i < (int)m_d->dfOutput.size(); ++i) { // discard first two elts
-        df.push_back(m_d->dfOutput[i]);
-        beatPeriod.push_back(0.0);
-    }
-    if (df.empty()) return FeatureSet();
-
-    TempoTrackV2 tt(m_inputSampleRate, m_d->dfConfig.stepSize);
-    tt.calculateBeatPeriod(df, beatPeriod, tempi);
-
-    vector<double> beats;
-    tt.calculateBeats(df, beatPeriod, beats);
-
-    vector<int> downbeats;
-    size_t downLength = 0;
-    const float *downsampled = m_d->downBeat->getBufferedAudio(downLength);
-    m_d->downBeat->findDownBeats(downsampled, downLength, beats, downbeats);
-
-    vector<double> beatsd;
-    m_d->downBeat->getBeatSD(beatsd);
-    
-    /*std::cout << "BeatTracker: found downbeats at: ";
-    for (int i = 0; i < downbeats.size(); ++i) std::cout << downbeats[i] << " " << std::endl;*/
-    
-    FeatureSet returnFeatures;
-
-    char label[20];
-
-    int dbi = 0;
-    int beat = 0;
-    int bar = 0;
-
-    if (!downbeats.empty()) {
-        // get the right number for the first beat; this will be
-        // incremented before use (at top of the following loop)
-        int firstDown = downbeats[0];
-        beat = m_bpb - firstDown - 1;
-        if (beat == m_bpb) beat = 0;
-    }
-
-    for (int i = 0; i < (int)beats.size(); ++i) {
-        
-        int frame = beats[i] * m_d->dfConfig.stepSize;
-        
-        if (dbi < (int)downbeats.size() && i == downbeats[dbi]) {
-            beat = 0;
-            ++bar;
-            ++dbi;
-        } else {
-            ++beat;
-        }
-        
-        /* Ooutput Section */
-        
-        // outputs are:
-        //
-        // 0 -> beats
-        // 1 -> bars
-        // 2 -> beat counter function
-        
-        Feature feature;
-        feature.hasTimestamp = true;
-        feature.timestamp = m_d->origin + Vamp::RealTime::frame2RealTime (frame, lrintf(m_inputSampleRate));
-        
-        sprintf(label, "%d", beat + 1);
-        feature.label = label;
-        returnFeatures[m_beatOutputNumber].push_back(feature);          // labelled beats
-        
-        feature.values.push_back(beat + 1);
-        returnFeatures[m_beatcountsOutputNumber].push_back(feature);    // beat function
-        
-        if (i > 0 && i <= (int)beatsd.size()) {
-            feature.values.clear();
-            feature.values.push_back(beatsd[i-1]);
-            feature.label = "";
-            returnFeatures[m_beatsdOutputNumber].push_back(feature);    // beat spectral difference
-        }
-        
-        if (beat == 0) {
-            feature.values.clear();
-            sprintf(label, "%d", bar);
-            feature.label = label;
-            returnFeatures[m_barsOutputNumber].push_back(feature);      // bars
-        }
-    }
-
-    return returnFeatures;
-}
-
-
-/* ------ Chroma Extractor ------ */
-
-SongPartitioner::FeatureList SongPartitioner::chromaFeatures()
-{
-        
-    FeatureList returnFeatureList;
-    FeatureList tunedlogfreqspec;
-    
-    if (m_chromadata->logSpectrum.size() == 0) return returnFeatureList;
-
-    /**  Calculate Tuning
-         calculate tuning from (using the angle of the complex number defined by the 
-         cumulative mean real and imag values)
-    **/
-    float meanTuningImag = 0;
-    float meanTuningReal = 0;
-    for (int iBPS = 0; iBPS < nBPS; ++iBPS) {
-        meanTuningReal += m_chromadata->meanTunings[iBPS] * m_chromadata->cosvalues[iBPS];
-        meanTuningImag += m_chromadata->meanTunings[iBPS] * m_chromadata->sinvalues[iBPS];
-    }
-    float cumulativetuning = 440 * pow(2,atan2(meanTuningImag, meanTuningReal)/(24*M_PI));
-    float normalisedtuning = atan2(meanTuningImag, meanTuningReal)/(2*M_PI);
-    int intShift = floor(normalisedtuning * 3);
-    float floatShift = normalisedtuning * 3 - intShift; // floatShift is a really bad name for this
-     
-    char buffer0 [50];
- 
-    sprintf(buffer0, "estimated tuning: %0.1f Hz", cumulativetuning);
-                 
-    /** Tune Log-Frequency Spectrogram
-        calculate a tuned log-frequency spectrogram (f2): use the tuning estimated above (kinda f0) to 
-        perform linear interpolation on the existing log-frequency spectrogram (kinda f1).
-    **/
-    cerr << endl << "[NNLS Chroma Plugin] Tuning Log-Frequency Spectrogram ... ";
-             
-    float tempValue = 0;
-
-    int count = 0;
-    
-    for (FeatureList::iterator i = m_chromadata->logSpectrum.begin(); i != m_chromadata->logSpectrum.end(); ++i) 
-    {
-        
-        Feature f1 = *i;
-        Feature f2; // tuned log-frequency spectrum
-        
-        f2.hasTimestamp = true;
-        f2.timestamp = f1.timestamp;
-        
-        f2.values.push_back(0.0); 
-        f2.values.push_back(0.0); // set lower edge to zero
-
-        if (m_chromadata->tuneLocal) {
-            intShift = floor(m_chromadata->localTuning[count] * 3);
-            floatShift = m_chromadata->localTuning[count] * 3 - intShift; 
-            // floatShift is a really bad name for this
-        }
-
-        for (int k = 2; k < (int)f1.values.size() - 3; ++k) 
-        { // interpolate all inner bins
-            tempValue = f1.values[k + intShift] * (1-floatShift) + f1.values[k+intShift+1] * floatShift;
-            f2.values.push_back(tempValue);
-        }
-         
-        f2.values.push_back(0.0); 
-        f2.values.push_back(0.0); 
-        f2.values.push_back(0.0); // upper edge
-
-        vector<float> runningmean = SpecialConvolution(f2.values,m_chromadata->hw);
-        vector<float> runningstd;
-        for (int i = 0; i < nNote; i++) { // first step: squared values into vector (variance)
-            runningstd.push_back((f2.values[i] - runningmean[i]) * (f2.values[i] - runningmean[i]));
-        }
-        runningstd = SpecialConvolution(runningstd,m_chromadata->hw); // second step convolve
-        for (int i = 0; i < nNote; i++) 
-        { 
-            
-            runningstd[i] = sqrt(runningstd[i]); 
-            // square root to finally have running std
-            
-            if (runningstd[i] > 0) 
-            {
-                f2.values[i] = (f2.values[i] - runningmean[i]) > 0 ?
-                    (f2.values[i] - runningmean[i]) / pow(runningstd[i],m_chromadata->whitening) : 0;
-            }
-            
-            if (f2.values[i] < 0) {
-                
-                cerr << "ERROR: negative value in logfreq spectrum" << endl;
-                
-            }
-        }
-        tunedlogfreqspec.push_back(f2);
-        count++;
-    }
-    cerr << "done." << endl;    
-    /** Semitone spectrum and chromagrams
-        Semitone-spaced log-frequency spectrum derived 
-        from the tuned log-freq spectrum above. the spectrum
-        is inferred using a non-negative least squares algorithm.
-        Three different kinds of chromagram are calculated, "treble", "bass", and "both" (which means 
-        bass and treble stacked onto each other).
-    **/
-    if (m_chromadata->useNNLS == 0) {
-        cerr << "[NNLS Chroma Plugin] Mapping to semitone spectrum and chroma ... ";
-    } else {
-        cerr << "[NNLS Chroma Plugin] Performing NNLS and mapping to chroma ... ";
-    }
-    
-    vector<float> oldchroma = vector<float>(12,0);
-    vector<float> oldbasschroma = vector<float>(12,0);
-    count = 0;
-
-    for (FeatureList::iterator it = tunedlogfreqspec.begin(); it != tunedlogfreqspec.end(); ++it) {
-        Feature logfreqsp = *it; // logfreq spectrum
-        Feature bothchroma; // treble and bass chromagram
-                            
-        bothchroma.hasTimestamp = true;
-        bothchroma.timestamp = logfreqsp.timestamp;
-        
-        float b[nNote];
-
-        bool some_b_greater_zero = false;
-        float sumb = 0;
-        for (int i = 0; i < nNote; i++) {
-            b[i] = logfreqsp.values[i];
-            sumb += b[i];
-            if (b[i] > 0) {
-                some_b_greater_zero = true;
-            }            
-        }
-    
-        // here's where the non-negative least squares algorithm calculates the note activation x
-
-        vector<float> chroma = vector<float>(12, 0);
-        vector<float> basschroma = vector<float>(12, 0);
-        float currval;
-        int iSemitone = 0;
-     
-        if (some_b_greater_zero) {
-            if (m_chromadata->useNNLS == 0) {
-                for (int iNote = nBPS/2 + 2; iNote < nNote - nBPS/2; iNote += nBPS) {
-                    currval = 0;
-                    for (int iBPS = -nBPS/2; iBPS < nBPS/2+1; ++iBPS) {
-                        currval += b[iNote + iBPS] * (1-abs(iBPS*1.0/(nBPS/2+1)));                       
-                    }
-                    chroma[iSemitone % 12] += currval * treblewindow[iSemitone];
-                    basschroma[iSemitone % 12] += currval * basswindow[iSemitone];
-                    iSemitone++;
-                }
-         
-            } else {
-                float x[84+1000];
-                for (int i = 1; i < 1084; ++i) x[i] = 1.0;
-                vector<int> signifIndex;
-                int index=0;
-                sumb /= 84.0;
-                for (int iNote = nBPS/2 + 2; iNote < nNote - nBPS/2; iNote += nBPS) {
-                    float currval = 0;
-                    for (int iBPS = -nBPS/2; iBPS < nBPS/2+1; ++iBPS) {
-                        currval += b[iNote + iBPS]; 
-                    }
-                    if (currval > 0) signifIndex.push_back(index);
-                    index++;
-                }
-                float rnorm;
-                float w[84+1000];
-                float zz[84+1000];
-                int indx[84+1000];
-                int mode;
-                int dictsize = nNote*signifIndex.size();
-
-                float *curr_dict = new float[dictsize];
-                for (int iNote = 0; iNote < (int)signifIndex.size(); ++iNote) {
-                    for (int iBin = 0; iBin < nNote; iBin++) {
-                        curr_dict[iNote * nNote + iBin] = 
-                            1.0 * m_chromadata->dict[signifIndex[iNote] * nNote + iBin];
-                    }
-                }
-                nnls(curr_dict, nNote, nNote, signifIndex.size(), b, x, &rnorm, w, zz, indx, &mode);
-                delete [] curr_dict;
-                for (int iNote = 0; iNote < (int)signifIndex.size(); ++iNote) {
-                    // cerr << mode << endl;
-                    chroma[signifIndex[iNote] % 12] += x[iNote] * treblewindow[signifIndex[iNote]];
-                    basschroma[signifIndex[iNote] % 12] += x[iNote] * basswindow[signifIndex[iNote]];
-                }
-            }    
-        }
- 
-        chroma.insert(chroma.begin(), basschroma.begin(), basschroma.end()); 
-        // just stack the both chromas 
-        
-        bothchroma.values = chroma; 
-        returnFeatureList.push_back(bothchroma);
-        count++;
-    }
-    cerr << "done." << endl;
-
-    return returnFeatureList;     
-}
-
-/* ------ Beat Quantizer ------ */
-
-std::vector<Vamp::Plugin::FeatureList>
-SongPartitioner::beatQuantiser(Vamp::Plugin::FeatureList chromagram, Vamp::Plugin::FeatureList beats)
-{
-    std::vector<FeatureList> returnVector;
-    
-    FeatureList fwQchromagram; // frame-wise beat-quantised chroma
-    FeatureList bwQchromagram; // beat-wise beat-quantised chroma
-
-
-    size_t nChromaFrame = chromagram.size();
-    size_t nBeat = beats.size();
-    
-    if (nBeat == 0 && nChromaFrame == 0) return returnVector;
-    
-    int nBin = chromagram[0].values.size();
-    
-    vector<float> tempChroma = vector<float>(nBin);
-    
-    Vamp::RealTime beatTimestamp = Vamp::RealTime::zeroTime;
-    int currBeatCount = -1; // start before first beat
-    int framesInBeat = 0;
-    
-    for (size_t iChroma = 0; iChroma < nChromaFrame; ++iChroma)
-    {
-        Vamp::RealTime frameTimestamp = chromagram[iChroma].timestamp;
-        Vamp::RealTime newBeatTimestamp;
-                
-        if (currBeatCount != (int)beats.size() - 1) {
-            newBeatTimestamp = beats[currBeatCount+1].timestamp;
-        } else {
-            newBeatTimestamp = chromagram[nChromaFrame-1].timestamp;
-        }
-                
-        if (frameTimestamp > newBeatTimestamp ||
-            iChroma == nChromaFrame-1)
-        {
-            // new beat (or last chroma frame)
-            // 1. finish all the old beat processing
-            if (framesInBeat > 0)
-            {
-                for (int i = 0; i < nBin; ++i) tempChroma[i] /= framesInBeat; // average
-            }
-            
-            Feature bwQchromaFrame;
-            bwQchromaFrame.hasTimestamp = true;
-            bwQchromaFrame.timestamp = beatTimestamp;
-            bwQchromaFrame.values = tempChroma;
-            bwQchromaFrame.duration = newBeatTimestamp - beatTimestamp;
-            bwQchromagram.push_back(bwQchromaFrame);
-            
-            for (int iFrame = -framesInBeat; iFrame < 0; ++iFrame)
-            {
-                Feature fwQchromaFrame;
-                fwQchromaFrame.hasTimestamp = true;
-                fwQchromaFrame.timestamp = chromagram[iChroma+iFrame].timestamp;
-                fwQchromaFrame.values = tempChroma; // all between two beats get the same
-                fwQchromagram.push_back(fwQchromaFrame);
-            }
-            
-            // 2. increments / resets for current (new) beat
-            currBeatCount++;
-            beatTimestamp = newBeatTimestamp;
-            for (int i = 0; i < nBin; ++i) tempChroma[i] = 0; // average
-            framesInBeat = 0;
-        }
-        framesInBeat++;
-        for (int i = 0; i < nBin; ++i) tempChroma[i] += chromagram[iChroma].values[i];
-    }
-    returnVector.push_back(fwQchromagram);
-    returnVector.push_back(bwQchromagram);
-    return returnVector;
-}
-
-
-
-/* -------------------------------- */
-/* ------ Support Functions  ------ */
-/* -------------------------------- */
-
-// one-dimesion median filter
-arma::vec medfilt1(arma::vec v, int medfilt_length)
-{    
-    // TODO: check if this works with odd and even medfilt_length !!!
-    int halfWin = medfilt_length/2;
-    
-    // result vector
-    arma::vec res = arma::zeros<arma::vec>(v.size());
-    
-    // padding 
-    arma::vec padV = arma::zeros<arma::vec>(v.size()+medfilt_length-1);
-    
-    for (int i=medfilt_length/2; i < medfilt_length/2+(int)v.size(); ++ i)
-    {
-        padV(i) = v(i-medfilt_length/2);
-    }
-    
-    // the above loop leaves the boundaries at 0, 
-    // the two loops below fill them with the start or end values of v at start and end
-    for (int i = 0; i < halfWin; ++i) padV(i) = v(0);
-    for (int i = halfWin+(int)v.size(); i < (int)v.size()+2*halfWin; ++i) padV(i) = v(v.size()-1);
-    
-    
-    
-    // Median filter
-    arma::vec win = arma::zeros<arma::vec>(medfilt_length);
-    
-    for (int i=0; i < (int)v.size(); ++i)
-    {
-        win = padV.subvec(i,i+halfWin*2);
-        win = sort(win);
-        res(i) = win(halfWin);
-    }
-    
-    return res;
-}
-
-
-// Quantile
-double quantile(arma::vec v, double p)
-{
-    arma::vec sortV = arma::sort(v);
-    int n = sortV.size();
-    arma::vec x = arma::zeros<vec>(n+2);
-    arma::vec y = arma::zeros<vec>(n+2);
-    
-    x(0) = 0;
-    x(n+1) = 100; 
-    
-    for (int i=1; i<n+1; ++i)
-        x(i) = 100*(0.5+(i-1))/n;
-        
-    y(0) = sortV(0);
-    y.subvec(1,n) = sortV;
-    y(n+1) = sortV(n-1);
-    
-    arma::uvec x2index = find(x>=p*100);
-    
-    // Interpolation
-    double x1 = x(x2index(0)-1);
-    double x2 = x(x2index(0));
-    double y1 = y(x2index(0)-1);
-    double y2 = y(x2index(0));
-    
-    double res = (y2-y1)/(x2-x1)*(p*100-x1)+y1;
-    
-    return res;
-}
-
-// Max Filtering
-arma::mat maxfilt1(arma::mat inmat, int len)
-{
-    arma::mat outmat = inmat;
-    
-    for (int i=0; i < (int)inmat.n_rows; ++i)
-    {
-        if (arma::sum(inmat.row(i)) > 0)
-        {
-            // Take a window of rows
-            int startWin;
-            int endWin;
-            
-            if (0 > i-len)
-                startWin = 0;
-            else
-                startWin = i-len;
-            
-            if ((int)inmat.n_rows-1 < i+len-1)
-                endWin = inmat.n_rows-1;
-            else
-                endWin = i+len-1;
-    
-            outmat(i,span::all) = arma::max(inmat(span(startWin,endWin),span::all));
-        }
-    }
-    
-    return outmat;
-    
-}
-
-// Null Parts
-Part nullpart(vector<Part> parts, arma::vec barline)
-{
-    arma::uvec nullindices = arma::ones<arma::uvec>(barline.size());
-    for (int iPart=0; iPart<(int)parts.size(); ++iPart)
-    {
-        //for (int iIndex=0; iIndex < parts[0].indices.size(); ++iIndex) 
-        for (int iIndex=0; iIndex < (int)parts[iPart].indices.size(); ++iIndex) 
-            for (int i=0; i<parts[iPart].n; ++i) 
-            {
-                int ind = parts[iPart].indices[iIndex]+i;
-                nullindices(ind) = 0;
-            }
-    }
-
-    Part newPart;
-    newPart.n = 1;
-    uvec q = find(nullindices > 0);
-    
-    for (int i=0; i<(int)q.size();++i) 
-        newPart.indices.push_back(q(i));
-
-    newPart.letter = '-';
-    newPart.value = 0;
-    newPart.level = 0;
-    
-    return newPart;    
-}
-
-
-// Merge Nulls
-void mergenulls(vector<Part> &parts)
-{
-    for (int iPart=0; iPart<(int)parts.size(); ++iPart)
-    {
-        
-        vector<Part> newVectorPart;
-        
-        if (parts[iPart].letter.compare("-")==0)
-        {
-            sort (parts[iPart].indices.begin(), parts[iPart].indices.end());
-            int newpartind = -1;
-            
-            vector<int> indices;
-            indices.push_back(-2);
-            
-            for (int iIndex=0; iIndex<(int)parts[iPart].indices.size(); ++iIndex) 
-                indices.push_back(parts[iPart].indices[iIndex]);
-            
-            for (int iInd=1; iInd < (int)indices.size(); ++iInd)
-            { 
-                if (indices[iInd] - indices[iInd-1] > 1)
-                {
-                    newpartind++;
-
-                    Part newPart;
-                    newPart.letter = 'N';
-                    std::stringstream out;
-                    out << newpartind+1;
-                    newPart.letter.append(out.str());
-                    // newPart.value = 20+newpartind+1;
-                    newPart.value = 0;
-                    newPart.n = 1;
-                    newPart.indices.push_back(indices[iInd]);
-                    newPart.level = 0;   
-                    
-                    newVectorPart.push_back(newPart);
-                }
-                else
-                {
-                    newVectorPart[newpartind].n = newVectorPart[newpartind].n+1;
-                }
-            }
-            parts.erase (parts.end());
-            
-            for (int i=0; i<(int)newVectorPart.size(); ++i)
-                parts.push_back(newVectorPart[i]);
-        }
-    }
-}
-
-/* ------ Segmentation ------ */
-
-vector<Part> songSegment(Vamp::Plugin::FeatureList quantisedChromagram)
-{
-    
-    
-    /* ------ Parameters ------ */
-    double thresh_beat = 0.85;
-    double thresh_seg = 0.80;
-    int medfilt_length = 5; 
-    int minlength = 28;
-    int maxlength = 2*128;
-    double quantilePerc = 0.1;
-    /* ------------------------ */
-    
-    
-    // Collect Info
-    int nBeat = quantisedChromagram.size();                      // Number of feature vector
-    int nFeatValues = quantisedChromagram[0].values.size();      // Number of values for each feature vector
-    
-    if (nBeat < minlength) {
-        // return a single part
-        vector<Part> parts;
-        Part newPart;
-        newPart.n = 1;
-        newPart.indices.push_back(0);
-        newPart.letter = "n1";
-        newPart.value = 20;
-        newPart.level = 0;
-        parts.push_back(newPart);
-        return parts;
-    }
-
-    arma::irowvec timeStamp = arma::zeros<arma::imat>(1,nBeat);       // Vector of Time Stamps
-    
-    // Save time stamp as a Vector
-    if (quantisedChromagram[0].hasTimestamp)
-    {
-        for (int i = 0; i < nBeat; ++ i)
-            timeStamp[i] = quantisedChromagram[i].timestamp.nsec;
-    }
-    
-    
-    // Build a ObservationTOFeatures Matrix
-    arma::mat featVal = arma::zeros<mat>(nBeat,nFeatValues/2);
-    
-    for (int i = 0; i < nBeat; ++ i)
-        for (int j = 0; j < nFeatValues/2; ++ j)
-        {
-            featVal(i,j) = 0.8 * quantisedChromagram[i].values[j] + quantisedChromagram[i].values[j+12]; // bass attenuated
-        }
-    
-    // Set to arbitrary value to feature vectors with low std
-    arma::mat a = stddev(featVal,1,1);
-    
-    // Feature Correlation Matrix
-    arma::mat simmat0 = 1-arma::cor(arma::trans(featVal));
-    
-
-    for (int i = 0; i < nBeat; ++ i)
-    {
-        if (a(i)<0.000001)
-        {
-            featVal(i,1) = 1000;  // arbitrary  
-            
-            for (int j = 0; j < nFeatValues/2; ++j)
-            {
-                simmat0(i,j) = 1;
-                simmat0(j,i) = 1;
-            }
-        }
-    }
-    
-    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;
-    // ------------------------------------------------------------------------------
-    
-    // Median Filtering applied to the Correlation Matrix
-    // The median filter is for each diagonal of the Matrix
-    arma::mat median_simmat = arma::zeros<arma::mat>(nBeat,nBeat);
-    
-    for (int i = 0; i < nBeat; ++ i)
-    {
-        arma::vec temp = medfilt1(simmat.diag(i),medfilt_length);
-        median_simmat.diag(i) = temp;
-        median_simmat.diag(-i) = temp;
-    }
-
-    for (int i = 0; i < nBeat; ++ i)
-        for (int j = 0; j < nBeat; ++ j)
-            if (!std::isfinite(median_simmat(i,j)))
-                median_simmat(i,j) = 0;
-    
-    // -------------- NOT CONVERTED -------------------------------------    
-    //    if param.seg.standardise
-    //        med_median_simmat = repmat(median(median_simmat),nBeat,1);
-    //    std_median_simmat = repmat(std(median_simmat),nBeat,1);
-    //    median_simmat = (median_simmat - med_median_simmat) ./ std_median_simmat;
-    //    end
-    // --------------------------------------------------------
-    
-    // Retrieve Bar Bounderies
-    arma::uvec dup = find(median_simmat > thresh_beat);
-    arma::mat potential_duplicates = arma::zeros<arma::mat>(nBeat,nBeat);
-    potential_duplicates.elem(dup) = arma::ones<arma::vec>(dup.size());
-    potential_duplicates = trimatu(potential_duplicates);
-    
-    int nPartlengths = round((maxlength-minlength)/4)+1;
-    arma::vec partlengths = zeros<arma::vec>(nPartlengths);
-    
-    for (int i = 0; i < nPartlengths; ++ i)
-        partlengths(i) = (i*4) + minlength;
-    
-    // initialise arrays
-    arma::cube simArray = zeros<arma::cube>(nBeat,nBeat,nPartlengths);
-    arma::cube decisionArray2 = zeros<arma::cube>(nBeat,nBeat,nPartlengths);
-
-    for (int iLength = 0; iLength < nPartlengths; ++ iLength)
-    // for (int iLength = 0; iLength < 20; ++ iLength)
-    {
-        int len = partlengths(iLength);
-        int nUsedBeat = nBeat - len + 1;                   // number of potential rep beginnings: they can't overlap at the end of the song
-
-        if (nUsedBeat < 1) continue;
-        
-        for (int iBeat = 0; iBeat < nUsedBeat; ++ iBeat)   // looping over all columns (arbitrarily chosen columns)
-        {
-            arma::uvec help2 = find(potential_duplicates(span(0,nUsedBeat-1),iBeat)==1);
-            
-            for (int i=0; i < (int)help2.size(); ++i)
-            {
-
-                // measure how well two length len segments go together
-                int kBeat = help2(i);
-                arma::vec distrib = median_simmat(span(iBeat,iBeat+len-1),span(kBeat,kBeat+len-1)).diag(0);
-                simArray(iBeat,kBeat,iLength) = quantile(distrib,quantilePerc);
-            }
-        }
-        
-        arma::mat tempM = simArray(span(0,nUsedBeat-1),span(0,nUsedBeat-1),span(iLength,iLength));
-        simArray.slice(iLength)(span(0,nUsedBeat-1),span(0,nUsedBeat-1)) = tempM + arma::trans(tempM) - (eye<mat>(nUsedBeat,nUsedBeat)%tempM); 
-        
-        // convolution
-        arma::vec K = arma::zeros<vec>(3);
-        K << 0.01 << 0.98 << 0.01;
-        
-        
-        for (int i=0; i < (int)simArray.n_rows; ++i)
-        {
-            arma::rowvec t = arma::conv((arma::rowvec)simArray.slice(iLength).row(i),K);
-            simArray.slice(iLength)(i,span::all) = t.subvec(1,t.size()-2);
-        }
- 
-        // take only over-average bars that do not overlap
-        
-        arma::mat temp = arma::zeros<mat>(simArray.n_rows, simArray.n_cols);
-        temp(span::all, span(0,nUsedBeat-1)) = simArray.slice(iLength)(span::all,span(0,nUsedBeat-1));
-        
-        for (int i=0; i < (int)temp.n_rows; ++i)
-            for (int j=0; j < nUsedBeat; ++j)
-                if (temp(i,j) < thresh_seg)
-                    temp(i,j) = 0;
-        
-        decisionArray2.slice(iLength) = temp;
-
-        arma::mat maxMat = maxfilt1(decisionArray2.slice(iLength),len-1);
-        
-        for (int i=0; i < (int)decisionArray2.n_rows; ++i)
-            for (int j=0; j < (int)decisionArray2.n_cols; ++j)
-                if (decisionArray2.slice(iLength)(i,j) < maxMat(i,j))
-                    decisionArray2.slice(iLength)(i,j) = 0;
-        
-        decisionArray2.slice(iLength) = decisionArray2.slice(iLength) % arma::trans(decisionArray2.slice(iLength));
-        
-        for (int i=0; i < (int)simArray.n_rows; ++i)
-            for (int j=0; j < (int)simArray.n_cols; ++j)
-                if (simArray.slice(iLength)(i,j) < thresh_seg)
-                    potential_duplicates(i,j) = 0; 
-    }
-    
-    // Milk the data
-    
-    arma::mat bestval;
-    
-    for (int iLength=0; iLength<nPartlengths; ++iLength)
-    {
-        arma::mat temp = arma::zeros<arma::mat>(decisionArray2.n_rows,decisionArray2.n_cols);
-
-       for (int rows=0; rows < (int)decisionArray2.n_rows; ++rows)
-            for (int cols=0; cols < (int)decisionArray2.n_cols; ++cols)
-                if (decisionArray2.slice(iLength)(rows,cols) > 0)
-                    temp(rows,cols) = 1;
-        
-        arma::vec currLogicSum = arma::sum(temp,1);
-        
-        for (int iBeat=0; iBeat < nBeat; ++iBeat)
-            if (currLogicSum(iBeat) > 1)
-            {
-                arma::vec t = decisionArray2.slice(iLength)(span::all,iBeat);
-                double currSum = sum(t);
-                
-                int count = 0;
-                for (int i=0; i < (int)t.size(); ++i)
-                    if (t(i)>0)
-                        count++;
-                
-                currSum = (currSum/count)/2;
-                
-                arma::rowvec t1;
-                t1 << (currLogicSum(iBeat)-1) * partlengths(iLength) << currSum << iLength << iBeat << currLogicSum(iBeat);
-                
-                bestval = join_cols(bestval,t1);
-            }
-    }
-    
-    // Definition of the resulting vector
-    vector<Part> parts;
-    
-    // make a table of all valid sets of parts
-    
-    char partletters[] = {'A','B','C','D','E','F','G', 'H','I','J','K','L','M','N','O','P','Q','R','S'};
-    int partvalues[] = {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19};
-    arma::vec valid_sets = arma::ones<arma::vec>(bestval.n_rows);
-    
-    if (!bestval.is_empty())
-    {
-        
-        // In questo punto viene introdotto un errore alla 3 cifra decimale
-        
-        arma::colvec t = arma::zeros<arma::colvec>(bestval.n_rows);
-        for (int i=0; i < (int)bestval.n_rows; ++i)
-        {
-            t(i) = bestval(i,1)*2;
-        }
-        
-        double m = t.max();
-        
-        bestval(span::all,1) = bestval(span::all,1) / m; 
-        bestval(span::all,0) = bestval(span::all,0) + bestval(span::all,1);
-        
-        arma::mat bestval2;
-        for (int i=0; i < (int)bestval.n_cols; ++i)
-            if (i!=1)
-                bestval2 = join_rows(bestval2,bestval.col(i));
-        
-        for (int kSeg=0; kSeg<6; ++kSeg)
-        {
-            arma::mat currbestvals = arma::zeros<arma::mat>(bestval2.n_rows, bestval2.n_cols);
-            for (int i=0; i < (int)bestval2.n_rows; ++i)
-                for (int j=0; j < (int)bestval2.n_cols; ++j)
-                    if (valid_sets(i))
-                        currbestvals(i,j) = bestval2(i,j);
-            
-            arma::vec t1 = currbestvals.col(0);
-            double ma;
-            uword maIdx;
-            ma = t1.max(maIdx);
-            
-            if ((maIdx == 0)&&(ma == 0))
-                break;
-
-            int bestLength = lrint(partlengths(currbestvals(maIdx,1)));
-            arma::rowvec bestIndices = decisionArray2.slice(currbestvals(maIdx,1))(currbestvals(maIdx,2),span::all);
-                
-            arma::rowvec bestIndicesMap = arma::zeros<arma::rowvec>(bestIndices.size());
-            for (int i=0; i < (int)bestIndices.size(); ++i)
-                if (bestIndices(i)>0)
-                    bestIndicesMap(i) = 1;
-                   
-            arma::rowvec mask = arma::zeros<arma::rowvec>(bestLength*2-1);
-            for (int i=0; i<bestLength; ++i)
-                mask(i+bestLength-1) = 1;
-            
-            arma::rowvec t2 = arma::conv(bestIndicesMap,mask); 
-            arma::rowvec island = t2.subvec(mask.size()/2,t2.size()-1-mask.size()/2);
-            
-            // Save results in the structure
-            Part newPart;
-            newPart.n = bestLength;
-            uvec q1 = find(bestIndices > 0);
-            
-            for (int i=0; i < (int)q1.size();++i)
-                newPart.indices.push_back(q1(i));
-            
-            newPart.letter = partletters[kSeg];
-            newPart.value = partvalues[kSeg];
-            newPart.level = kSeg+1;
-            parts.push_back(newPart);
-            
-            uvec q2 = find(valid_sets==1);
-            
-            for (int i=0; i < (int)q2.size(); ++i)
-            {
-                int iSet = q2(i);
-                int s = partlengths(bestval2(iSet,1));
-                
-                arma::rowvec mask1 = arma::zeros<arma::rowvec>(s*2-1);
-                for (int i=0; i<s; ++i)
-                    mask1(i+s-1) = 1;
-                
-                arma::rowvec Ind = decisionArray2.slice(bestval2(iSet,1))(bestval2(iSet,2),span::all);
-                arma::rowvec IndMap = arma::zeros<arma::rowvec>(Ind.size());
-                for (int i=0; i < (int)Ind.size(); ++i)
-                    if (Ind(i)>0)
-                        IndMap(i) = 2;
-                
-                arma::rowvec t3 = arma::conv(IndMap,mask1); 
-                arma::rowvec currislands = t3.subvec(mask1.size()/2,t3.size()-1-mask1.size()/2);       
-                arma::rowvec islandsdMult = currislands%island;
-                
-                arma::uvec islandsIndex = find(islandsdMult > 0);
-                
-                if (islandsIndex.size() > 0)
-                    valid_sets(iSet) = 0;
-            }
-        }
-    }
-    else
-    {
-        Part newPart;
-        newPart.n = nBeat;
-        newPart.indices.push_back(0);
-        newPart.letter = 'A';
-        newPart.value = 1;
-        newPart.level = 1;
-        parts.push_back(newPart);
-    }
-   
-    arma::vec bar = linspace(1,nBeat,nBeat);    
-    Part np = nullpart(parts,bar);
-    
-    parts.push_back(np);
-    
-    // -------------- NOT CONVERTED -------------------------------------  
-    // if param.seg.editor
-    //    [pa, ta] = partarray(parts);
-    //    parts = editorssearch(pa, ta, parts);
-    //    parts = [parts, nullpart(parts,1:nBeat)];
-    // end
-    // ------------------------------------------------------------------
-
-    
-    mergenulls(parts);
-    
-    
-    // -------------- NOT CONVERTED -------------------------------------  
-    // if param.seg.editor
-    //    [pa, ta] = partarray(parts);
-    //    parts = editorssearch(pa, ta, parts);
-    //    parts = [parts, nullpart(parts,1:nBeat)];
-    // end
-    // ------------------------------------------------------------------
-    
-    return parts;
-}
-
-
-
-void songSegmentChroma(Vamp::Plugin::FeatureList quantisedChromagram, vector<Part> &parts)
-{
-    // Collect Info
-    int nBeat = quantisedChromagram.size();                      // Number of feature vector
-    int nFeatValues = quantisedChromagram[0].values.size();      // Number of values for each feature vector
-
-    arma::mat synchTreble = arma::zeros<mat>(nBeat,nFeatValues/2);
-    
-    for (int i = 0; i < nBeat; ++ i)
-        for (int j = 0; j < nFeatValues/2; ++ j)
-        {
-            synchTreble(i,j) = quantisedChromagram[i].values[j];
-        }
-    
-    arma::mat synchBass = arma::zeros<mat>(nBeat,nFeatValues/2);
-    
-    for (int i = 0; i < nBeat; ++ i)
-        for (int j = 0; j < nFeatValues/2; ++ j)
-        {
-            synchBass(i,j) = quantisedChromagram[i].values[j+12];
-        }
-
-    // Process
-    
-    arma::mat segTreble = arma::zeros<arma::mat>(quantisedChromagram.size(),quantisedChromagram[0].values.size()/2);
-    arma::mat segBass = arma::zeros<arma::mat>(quantisedChromagram.size(),quantisedChromagram[0].values.size()/2);
-    
-    for (int iPart=0; iPart < (int)parts.size(); ++iPart)
-    {
-        parts[iPart].nInd = parts[iPart].indices.size();
-        
-        for (int kOccur=0; kOccur<parts[iPart].nInd; ++kOccur)
-        {
-            int kStartIndex = parts[iPart].indices[kOccur];
-            int kEndIndex = kStartIndex + parts[iPart].n-1;
-            
-            segTreble.rows(kStartIndex,kEndIndex) = segTreble.rows(kStartIndex,kEndIndex) + synchTreble.rows(kStartIndex,kEndIndex);
-            segBass.rows(kStartIndex,kEndIndex) = segBass.rows(kStartIndex,kEndIndex) + synchBass.rows(kStartIndex,kEndIndex);
-        }
-    }
-}
-
-
-// Segment Integration
-vector<Part> songSegmentIntegration(vector<Part> &parts)
-{
-    // Break up parts (every part will have one instance)
-    vector<Part> newPartVector;
-    vector<int> partindices;
-    
-    for (int iPart=0; iPart < (int)parts.size(); ++iPart)
-    {
-        parts[iPart].nInd = parts[iPart].indices.size();
-        for (int iInstance=0; iInstance<parts[iPart].nInd; ++iInstance)
-        {
-            Part newPart;
-            newPart.n = parts[iPart].n;
-            newPart.letter = parts[iPart].letter;
-            newPart.value = parts[iPart].value;
-            newPart.level = parts[iPart].level;
-            newPart.indices.push_back(parts[iPart].indices[iInstance]);
-            newPart.nInd = 1;
-            partindices.push_back(parts[iPart].indices[iInstance]);
-            
-            newPartVector.push_back(newPart);
-        }
-    }
-    
-    
-    // Sort the parts in order of occurrence
-    sort (partindices.begin(), partindices.end());
-    
-    for (int i=0; i < (int)partindices.size(); ++i)
-    {
-        bool found = false;
-        int in=0;    
-        while (!found)
-        {
-            if (newPartVector[in].indices[0] == partindices[i])
-            {
-                newPartVector.push_back(newPartVector[in]);
-                newPartVector.erase(newPartVector.begin()+in);
-                found = true;
-            }
-            else
-                in++;
-        }  
-    }
-    
-    // Clear the vector
-    for (int iNewpart=1; iNewpart < (int)newPartVector.size(); ++iNewpart)
-    {
-        if (newPartVector[iNewpart].n < 12)
-        {
-            newPartVector[iNewpart-1].n = newPartVector[iNewpart-1].n + newPartVector[iNewpart].n;
-            newPartVector.erase(newPartVector.begin()+iNewpart);
-        }
-    }
-
-    return newPartVector;
-}
-
-// Segmenter
-Vamp::Plugin::FeatureList SongPartitioner::runSegmenter(Vamp::Plugin::FeatureList quantisedChromagram)
-{
-    /* --- Display Information --- */
-//    int numBeat = quantisedChromagram.size();
-//    int numFeats = quantisedChromagram[0].values.size();
-
-    vector<Part> parts;
-    vector<Part> finalParts;
-    
-    parts = songSegment(quantisedChromagram);
-    songSegmentChroma(quantisedChromagram,parts);
-    
-    finalParts = songSegmentIntegration(parts);
-    
-    
-    // TEMP ----
-    /*for (int i=0;i<finalParts.size(); ++i)
-     {
-     std::cout << "Parts n° " << i << std::endl;
-     std::cout << "n°: " << finalParts[i].n << std::endl;
-     std::cout << "letter: " <<  finalParts[i].letter << std::endl;
-     
-     std::cout << "indices: ";
-     for (int j=0;j<finalParts[i].indices.size(); ++j)
-         std::cout << finalParts[i].indices[j] << " ";
-       
-     std::cout << std::endl;
-     std::cout <<  "level: " << finalParts[i].level << std::endl;
-     }*/
-    
-    // ---------
-    
-    
-    // Output
-
-    Vamp::Plugin::FeatureList results;
-    
-    
-    Feature seg;
-    
-    arma::vec indices;
-//    int idx=0;
-    vector<int> values;
-    vector<string> letters;
-    
-    for (int iPart=0; iPart < (int)finalParts.size()-1; ++iPart)
-    {
-        int iInstance=0;
-        seg.hasTimestamp = true;
-         
-        int ind = finalParts[iPart].indices[iInstance];
-        int ind1 = finalParts[iPart+1].indices[iInstance];
-         
-        seg.timestamp = quantisedChromagram[ind].timestamp;
-        seg.hasDuration = true;
-        seg.duration = quantisedChromagram[ind1].timestamp-quantisedChromagram[ind].timestamp;
-        seg.values.clear();
-        seg.values.push_back(finalParts[iPart].value);
-        seg.label = finalParts[iPart].letter;
-         
-        results.push_back(seg);
-    }
-    
-    if (finalParts.size() > 0) {
-        int ind = finalParts[finalParts.size()-1].indices[0];
-        seg.hasTimestamp = true;
-        seg.timestamp = quantisedChromagram[ind].timestamp;
-        seg.hasDuration = true;
-        seg.duration = quantisedChromagram[quantisedChromagram.size()-1].timestamp-quantisedChromagram[ind].timestamp;
-        seg.values.clear();
-        seg.values.push_back(finalParts[finalParts.size()-1].value);
-        seg.label = finalParts[finalParts.size()-1].letter;
-    
-        results.push_back(seg);
-    }
-
-    return results;    
-}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
--- a/songparts/SongParts.h	Wed Jun 12 19:23:03 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,80 +0,0 @@
-/* -*- c-basic-offset: 4 indent-tabs-mode: nil -*-  vi:set ts=8 sts=4 sw=4: */
-
-/*
-    QM Vamp Plugin Set
-
-    Centre for Digital Music, Queen Mary, University of London.
-
-    This program is free software; you can redistribute it and/or
-    modify it under the terms of the GNU General Public License as
-    published by the Free Software Foundation; either version 2 of the
-    License, or (at your option) any later version.  See the file
-    COPYING included with this distribution for more information.
-*/
-
-#ifndef _SONG_PARTS_PLUGIN_H_
-#define _SONG_PARTS_PLUGIN_H_
-
-#include <vamp-sdk/Plugin.h>
-
-class BeatTrackerData;
-
-class ChromaData;
-
-class SongPartitioner : public Vamp::Plugin
-{
-public:
-    SongPartitioner(float inputSampleRate);
-    virtual ~SongPartitioner();
-
-    bool initialise(size_t channels, size_t stepSize, size_t blockSize);
-    void reset();
-
-    InputDomain getInputDomain() const { return TimeDomain; }
-
-    std::string getIdentifier() const;
-    std::string getName() const;
-    std::string getDescription() const;
-    std::string getMaker() const;
-    int getPluginVersion() const;
-    std::string getCopyright() const;
-
-    ParameterList getParameterDescriptors() const;
-    float getParameter(std::string) const;
-    void setParameter(std::string, float);
-
-    size_t getPreferredStepSize() const;
-    size_t getPreferredBlockSize() const;
-
-    OutputList getOutputDescriptors() const;
-
-    FeatureSet process(const float *const *inputBuffers, Vamp::RealTime timestamp);
-    FeatureSet getRemainingFeatures();
-
-protected:
-    BeatTrackerData *m_d;
-    ChromaData *m_chromadata;
-    static float m_stepSecs;
-    static int m_chromaFramesizeFactor;
-    static int m_chromaStepsizeFactor;
-    int m_bpb;
-    int m_pluginFrameCount;
-    FeatureSet beatTrack();
-    FeatureList chromaFeatures();
-    std::vector<FeatureList> beatQuantiser(FeatureList chromagram, FeatureList beats);
-    FeatureList runSegmenter(FeatureList quantisedChromagram);
-    
-    mutable int m_beatOutputNumber;
-    mutable int m_barsOutputNumber;
-    mutable int m_beatcountsOutputNumber;
-    mutable int m_beatsdOutputNumber;
-    mutable int m_logscalespecOutputNumber;
-    mutable int m_bothchromaOutputNumber;
-    mutable int m_qchromafwOutputNumber;
-    mutable int m_qchromaOutputNumber;
-    mutable int m_segmOutputNumber;
-    
-};
-
-
-#endif
--- a/songparts/SongParts/BeatTrackerData.cpp	Wed Jun 12 19:23:03 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,94 +0,0 @@
-/* -*- c-basic-offset: 4 indent-tabs-mode: nil -*-  vi:set ts=8 sts=4 sw=4: */
-
-/*
-    QM Vamp Plugin Set
-
-    Centre for Digital Music, Queen Mary, University of London.
-
-    This program is free software; you can redistribute it and/or
-    modify it under the terms of the GNU General Public License as
-    published by the Free Software Foundation; either version 2 of the
-    License, or (at your option) any later version.  See the file
-    COPYING included with this distribution for more information.
-*/
-
-//#include "SongParts.h"
-
-#include "BeatTrackerData.h"
-
-//#include <base/Window.h>
-#include <dsp/onsets/DetectionFunction.h>
-//#include <dsp/onsets/PeakPicking.h>
-//#include <dsp/transforms/FFT.h>
-//#include <dsp/tempotracking/TempoTrackV2.h>
-//#include <dsp/tempotracking/DownBeat.h>
-//#include <chromamethods.h>
-//#include <maths/MathUtilities.h>
-
-// #include <vamp-sdk/Plugin.h>
-
-using std::string;
-using std::vector;
-using std::cerr;
-using std::endl;
-
-
-//#ifndef __GNUC__
-//#include <alloca.h>
-//#endif
-
-
-/* ------------------------------------ */
-/* ----- BEAT DETECTOR CLASS ---------- */
-/* ------------------------------------ */
-
-
-/* --- ATTRIBUTES --- */
-private:
-DFConfig dfConfig;
-DetectionFunction *df;
-DownBeat *downBeat;
-vector<double> dfOutput;
-Vamp::RealTime origin;
-
-
-/* --- METHODS --- */
-
-/* --- Constructor --- */
-public:
-BeatTrackerData(float rate, const DFConfig &config) : dfConfig(config) {
-
-    df = new DetectionFunction(config);
-    // decimation factor aims at resampling to c. 3KHz; must be power of 2
-    int factor = MathUtilities::nextPowerOfTwo(rate / 3000);
-    // std::cerr << "BeatTrackerData: factor = " << factor << std::endl;
-    downBeat = new DownBeat(rate, factor, config.stepSize);
-}
-
-/* --- Desctructor --- */
-~BeatTrackerData() {
-delete df;
-    delete downBeat;
-}
-
-void reset() {
-    delete df;
-    df = new DetectionFunction(dfConfig);
-    dfOutput.clear();
-    downBeat->resetAudioBuffer();
-    origin = Vamp::RealTime::zeroTime;
-}
-
-/* --- Getter Methods ---*/
-DFConfig getdfConfig(){
-return dfConfig;
-}
-
-
-
-
-
-
-
-
-
--- a/songparts/SongParts/BeatTrackerData.h	Wed Jun 12 19:23:03 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,25 +0,0 @@
-/* -*- c-basic-offset: 4 indent-tabs-mode: nil -*-  vi:set ts=8 sts=4 sw=4: */
-
-/*
-    QM Vamp Plugin Set
-
-    Centre for Digital Music, Queen Mary, University of London.
-
-    This program is free software; you can redistribute it and/or
-    modify it under the terms of the GNU General Public License as
-    published by the Free Software Foundation; either version 2 of the
-    License, or (at your option) any later version.  See the file
-    COPYING included with this distribution for more information.
-*/
-
-
-#include <dsp/onsets/DetectionFunction.h>
-
-
-class BeatTrackerData
-{
-public:
-    BeatTrackerData(float rate, const DFConfig &config);
-    virtual ~BeatTrackerData();
-    void reset();
-}
--- a/songparts/build/general/Makefile.inc	Wed Jun 12 19:23:03 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,29 +0,0 @@
-
-PLUGIN_EXT	?= .so
-PLUGIN	?= songpartitioner$(PLUGIN_EXT)
-CXX	?= g++
-CC	?= gcc
-
-CFLAGS	:= $(CFLAGS) -I. -I../../qm-dsp -I../../nnls-chroma
-CXXFLAGS	:= $(CXXFLAGS) -I. -I../../qm-dsp -I../../nnls-chroma
-LDFLAGS		:= -L../../qm-dsp  $(LDFLAGS)
-
-HEADERS := SongParts.h
-
-SOURCES := SongParts.cpp \
-           libmain.cpp \
-	   g2cstubs.c \
-           ../../nnls-chroma/chromamethods.cpp \
-           ../../nnls-chroma/nnls.c
-
-OBJECTS := $(SOURCES:.cpp=.o)
-OBJECTS := $(OBJECTS:.c=.o)
-
-$(PLUGIN):	$(OBJECTS)
-		$(CXX) -o $@ $^ $(LDFLAGS)
-
-clean:		
-		rm $(OBJECTS)
-
-distclean:	clean
-		rm $(PLUGIN)
--- a/songparts/build/linux/amd64/atlas/atlas_buildinfo.h	Wed Jun 12 19:23:03 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,31 +0,0 @@
-#ifndef ATL_INSTINFO_H
-   #define ATL_INSTINFO_H
-
-#define ATL_ARCH "Core2Duo64SSE3"
-#define ATL_INSTFLAGS "-1 0 -a 1"
-#define ATL_F2CDEFS "-DAdd__ -DF77_INTEGER=int -DStringSunStyle"
-#define ATL_ARCHDEFS "-DATL_OS_Linux -DATL_ARCH_Core2Duo -DATL_CPUMHZ=1500 -DATL_SSE3 -DATL_SSE2 -DATL_SSE1 -DATL_USE64BITS -DATL_GAS_x8664"
-#define ATL_DKCFLAGS "-fomit-frame-pointer -mfpmath=sse -msse3 -O2 -fPIC -m64"
-#define ATL_DKC "gcc"
-#define ATL_SKCFLAGS "-fomit-frame-pointer -mfpmath=sse -msse3 -O2 -fPIC -m64"
-#define ATL_SKC "gcc"
-#define ATL_DMCFLAGS "-fomit-frame-pointer -mfpmath=sse -msse3 -O2 -fPIC -m64"
-#define ATL_DMC "gcc"
-#define ATL_SMCFLAGS "-fomit-frame-pointer -mfpmath=sse -msse3 -O2 -fPIC -m64"
-#define ATL_SMC "gcc"
-#define ATL_ICCFLAGS "-DL2SIZE=4194304 -I/home/cannam/ATLAS/build/include -I/home/cannam/ATLAS/build/..//include -I/home/cannam/ATLAS/build/..//include/contrib -DAdd__ -DF77_INTEGER=int -DStringSunStyle -DATL_OS_Linux -DATL_ARCH_Core2Duo -DATL_CPUMHZ=1500 -DATL_SSE3 -DATL_SSE2 -DATL_SSE1 -DATL_USE64BITS -DATL_GAS_x8664 -DPentiumCPS=1000 -fomit-frame-pointer -mfpmath=sse -msse3 -O2 -fPIC -m64"
-#define ATL_ICC "gcc-4.2"
-#define ATL_F77FLAGS "-O -fPIC -m64"
-#define ATL_F77 "g77"
-#define ATL_DKCVERS "gcc (GCC) 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)"
-#define ATL_SKCVERS "gcc (GCC) 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)"
-#define ATL_DMCVERS "gcc (GCC) 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)"
-#define ATL_SMCVERS "gcc (GCC) 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)"
-#define ATL_ICCVERS "gcc-4.2 (GCC) 4.2.1 (Ubuntu 4.2.1-5ubuntu4)"
-#define ATL_F77VERS "GNU Fortran (GCC) 3.4.6 (Ubuntu 3.4.6-6ubuntu2)"
-#define ATL_SYSINFO "Linux yves-laptop 2.6.22-14-generic #1 SMP Thu Jan 31 23:33:13 UTC 2008 x86_64 GNU/Linux"
-#define ATL_DATE    "Wed Feb 13 11:25:06 GMT 2008"
-#define ATL_UNAM    "cannam"
-#define ATL_VERS    "3.8.0"
-
-#endif
--- a/songparts/build/linux/amd64/atlas/atlas_cNCmm.h	Wed Jun 12 19:23:03 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,23 +0,0 @@
-#ifndef CMM_H
-   #define CMM_H
-
-   #define ATL_mmMULADD
-   #define ATL_mmLAT 1
-   #define ATL_mmMU  12
-   #define ATL_mmNU  1
-   #define ATL_mmKU  72
-   #define MB 48
-   #define NB 48
-   #define KB 48
-   #define NBNB 2304
-   #define MBNB 2304
-   #define MBKB 2304
-   #define NBKB 2304
-   #define NB2 96
-   #define NBNB2 4608
-
-   #define ATL_MulByNB(N_) ((N_) * 48)
-   #define ATL_DivByNB(N_) ((N_) / 48)
-   #define ATL_MulByNBNB(N_) ((N_) * 2304)
-
-#endif
--- a/songparts/build/linux/amd64/atlas/atlas_cacheedge.h	Wed Jun 12 19:23:03 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,4 +0,0 @@
-#ifndef ATLAS_CACHEEDGE_H
-   #define ATLAS_CACHEEDGE_H
-   #define CacheEdge 0
-#endif
--- a/songparts/build/linux/amd64/atlas/atlas_cmv.h	Wed Jun 12 19:23:03 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,9 +0,0 @@
-#ifndef ATLAS_CMV_H
-#define ATLAS_CMV_H
-
-#define ATL_L1mvelts 3932
-#include "atlas_cmvN.h"
-#include "atlas_cmvT.h"
-#include "atlas_cmvS.h"
-
-#endif
--- a/songparts/build/linux/amd64/atlas/atlas_cmvN.h	Wed Jun 12 19:23:03 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,21 +0,0 @@
-#ifndef ATLAS_MVN_H
-#define ATLAS_MVN_H
-
-#include "atlas_misc.h"
-
-#define ATL_mvNMU 32
-#define ATL_mvNNU 1
-#ifndef ATL_L1mvelts
-   #define ATL_L1mvelts ((3*ATL_L1elts)>>2)
-#endif
-#define ATL_AXPYMV
-
-#define ATL_GetPartMVN(A_, lda_, mb_, nb_) \
-{ \
-   *(mb_) = (ATL_L1mvelts - (ATL_mvNNU<<1)) / ((ATL_mvNNU<<1)+1); \
-   if (*(mb_) > ATL_mvNMU) *(mb_) = ATL_mvNMU*( *(mb_)/ATL_mvNMU ); \
-   else *(mb_) = ATL_mvNMU; \
-   *(nb_) = ATL_mvNNU; \
-}
-
-#endif
--- a/songparts/build/linux/amd64/atlas/atlas_cmvS.h	Wed Jun 12 19:23:03 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,23 +0,0 @@
-#ifndef ATLAS_MVS_H
-#define ATLAS_MVS_H
-
-#include "atlas_misc.h"
-
-#define ATL_mvSMU 2
-#define ATL_mvSNU 32
-#ifndef ATL_L1mvelts
-   #define ATL_L1mvelts ((3*ATL_L1elts)>>2)
-#endif
-#ifndef ATL_mvNNU
-   #include "atlas_cmvN.h"
-#endif
-#ifndef ATL_mvTNU
-   #include "atlas_cmvT.h"
-#endif
-#define ATL_GetPartSYMV(A_, lda_, mb_, nb_) \
-{ \
-   *(nb_) = ATL_mvSMU; \
-   *(mb_) = 320; \
-}
-
-#endif
--- a/songparts/build/linux/amd64/atlas/atlas_cmvT.h	Wed Jun 12 19:23:03 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,23 +0,0 @@
-#ifndef ATLAS_MVT_H
-#define ATLAS_MVT_H
-
-#include "atlas_misc.h"
-
-#define ATL_mvTMU 2
-#define ATL_mvTNU 8
-#ifndef ATL_L1mvelts
-   #define ATL_L1mvelts ((3*ATL_L1elts)>>2)
-#endif
-#ifndef ATL_mvNNU
-   #include "atlas_cmvN.h"
-#endif
-
-#define ATL_GetPartMVT(A_, lda_, mb_, nb_) \
-{ \
-   *(mb_) = (ATL_L1mvelts - (ATL_mvTMU<<1)) / ((ATL_mvTMU<<1)+1); \
-   if (*(mb_) > ATL_mvTNU) *(mb_) = (*(mb_)/ATL_mvTNU)*ATL_mvTNU; \
-   else (*mb_) = ATL_mvTNU; \
-   *(nb_) = ATL_mvTMU; \
-}
-
-#endif
--- a/songparts/build/linux/amd64/atlas/atlas_cr1.h	Wed Jun 12 19:23:03 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,16 +0,0 @@
-#ifndef ATLAS_CR1_H
-#define ATLAS_CR1_H
-
-#define ATL_L1r1elts 3809
-#define ATL_r1MU 16
-#define ATL_r1NU 1
-
-#define ATL_GetPartR1(A_, lda_, mb_, nb_) \
-{ \
-   (mb_) = (ATL_L1r1elts - (ATL_r1NU+ATL_r1NU)) / (ATL_r1NU+ATL_r1NU+1); \
-   if ((mb_) > ATL_r1MU) (mb_) = ATL_r1MU*((mb_)/ATL_r1MU); \
-   else (mb_) = ATL_r1MU; \
-   (nb_) = ATL_r1NU; \
-}
-
-#endif
--- a/songparts/build/linux/amd64/atlas/atlas_csNKB.h	Wed Jun 12 19:23:03 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,4 +0,0 @@
-#ifndef ATLAS_CSNKB_H
-   #define ATLAS_CSNKB_H
-   #define ATL_CSNKB 0
-#endif
--- a/songparts/build/linux/amd64/atlas/atlas_csysinfo.h	Wed Jun 12 19:23:03 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,11 +0,0 @@
-#ifndef ATL_CSYSINFO_H
-   #define ATL_CSYSINFO_H
-
-#define ATL_MULADD
-#define ATL_L1elts 2048
-#define ATL_fplat  4
-#define ATL_lbnreg 16
-#define ATL_mmnreg 18
-#define ATL_nkflop 879334
-
-#endif
--- a/songparts/build/linux/amd64/atlas/atlas_dNCmm.h	Wed Jun 12 19:23:03 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,23 +0,0 @@
-#ifndef DMM_H
-   #define DMM_H
-
-   #define ATL_mmNOMULADD
-   #define ATL_mmLAT 1
-   #define ATL_mmMU  12
-   #define ATL_mmNU  1
-   #define ATL_mmKU  56
-   #define MB 24
-   #define NB 24
-   #define KB 24
-   #define NBNB 576
-   #define MBNB 576
-   #define MBKB 576
-   #define NBKB 576
-   #define NB2 48
-   #define NBNB2 1152
-
-   #define ATL_MulByNB(N_) ((N_) * 24)
-   #define ATL_DivByNB(N_) ((N_) / 24)
-   #define ATL_MulByNBNB(N_) ((N_) * 576)
-
-#endif
--- a/songparts/build/linux/amd64/atlas/atlas_dmv.h	Wed Jun 12 19:23:03 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,9 +0,0 @@
-#ifndef ATLAS_DMV_H
-#define ATLAS_DMV_H
-
-#define ATL_L1mvelts 3317
-#include "atlas_dmvN.h"
-#include "atlas_dmvT.h"
-#include "atlas_dmvS.h"
-
-#endif
--- a/songparts/build/linux/amd64/atlas/atlas_dmvN.h	Wed Jun 12 19:23:03 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,21 +0,0 @@
-#ifndef ATLAS_MVN_H
-#define ATLAS_MVN_H
-
-#include "atlas_misc.h"
-
-#define ATL_mvNMU 32
-#define ATL_mvNNU 1
-#ifndef ATL_L1mvelts
-   #define ATL_L1mvelts ((3*ATL_L1elts)>>2)
-#endif
-#define ATL_AXPYMV
-
-#define ATL_GetPartMVN(A_, lda_, mb_, nb_) \
-{ \
-   *(mb_) = (ATL_L1mvelts - (ATL_mvNNU<<1)) / ((ATL_mvNNU<<1)+1); \
-   if (*(mb_) > ATL_mvNMU) *(mb_) = ATL_mvNMU*( *(mb_)/ATL_mvNMU ); \
-   else *(mb_) = ATL_mvNMU; \
-   *(nb_) = ATL_mvNNU; \
-}
-
-#endif
--- a/songparts/build/linux/amd64/atlas/atlas_dmvS.h	Wed Jun 12 19:23:03 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,23 +0,0 @@
-#ifndef ATLAS_MVS_H
-#define ATLAS_MVS_H
-
-#include "atlas_misc.h"
-
-#define ATL_mvSMU 2
-#define ATL_mvSNU 32
-#ifndef ATL_L1mvelts
-   #define ATL_L1mvelts ((3*ATL_L1elts)>>2)
-#endif
-#ifndef ATL_mvNNU
-   #include "atlas_dmvN.h"
-#endif
-#ifndef ATL_mvTNU
-   #include "atlas_dmvT.h"
-#endif
-#define ATL_GetPartSYMV(A_, lda_, mb_, nb_) \
-{ \
-   *(nb_) = ATL_mvSMU; \
-   *(mb_) = 256; \
-}
-
-#endif
--- a/songparts/build/linux/amd64/atlas/atlas_dmvT.h	Wed Jun 12 19:23:03 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,23 +0,0 @@
-#ifndef ATLAS_MVT_H
-#define ATLAS_MVT_H
-
-#include "atlas_misc.h"
-
-#define ATL_mvTMU 2
-#define ATL_mvTNU 16
-#ifndef ATL_L1mvelts
-   #define ATL_L1mvelts ((3*ATL_L1elts)>>2)
-#endif
-#ifndef ATL_mvNNU
-   #include "atlas_dmvN.h"
-#endif
-
-#define ATL_GetPartMVT(A_, lda_, mb_, nb_) \
-{ \
-   *(mb_) = (ATL_L1mvelts - (ATL_mvTMU<<1)) / ((ATL_mvTMU<<1)+1); \
-   if (*(mb_) > ATL_mvTNU) *(mb_) = (*(mb_)/ATL_mvTNU)*ATL_mvTNU; \
-   else (*mb_) = ATL_mvTNU; \
-   *(nb_) = ATL_mvTMU; \
-}
-
-#endif
--- a/songparts/build/linux/amd64/atlas/atlas_dr1.h	Wed Jun 12 19:23:03 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,16 +0,0 @@
-#ifndef ATLAS_DR1_H
-#define ATLAS_DR1_H
-
-#define ATL_L1r1elts 3809
-#define ATL_r1MU 16
-#define ATL_r1NU 1
-
-#define ATL_GetPartR1(A_, lda_, mb_, nb_) \
-{ \
-   (mb_) = (ATL_L1r1elts - (ATL_r1NU+ATL_r1NU)) / (ATL_r1NU+ATL_r1NU+1); \
-   if ((mb_) > ATL_r1MU) (mb_) = ATL_r1MU*((mb_)/ATL_r1MU); \
-   else (mb_) = ATL_r1MU; \
-   (nb_) = ATL_r1NU; \
-}
-
-#endif
--- a/songparts/build/linux/amd64/atlas/atlas_dsysinfo.h	Wed Jun 12 19:23:03 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,11 +0,0 @@
-#ifndef ATL_DSYSINFO_H
-   #define ATL_DSYSINFO_H
-
-#define ATL_MULADD
-#define ATL_L1elts 4096
-#define ATL_fplat  12
-#define ATL_lbnreg 16
-#define ATL_mmnreg 18
-#define ATL_nkflop 2159859
-
-#endif
--- a/songparts/build/linux/amd64/atlas/atlas_sNCmm.h	Wed Jun 12 19:23:03 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,23 +0,0 @@
-#ifndef SMM_H
-   #define SMM_H
-
-   #define ATL_mmMULADD
-   #define ATL_mmLAT 1
-   #define ATL_mmMU  12
-   #define ATL_mmNU  1
-   #define ATL_mmKU  80
-   #define MB 36
-   #define NB 36
-   #define KB 36
-   #define NBNB 1296
-   #define MBNB 1296
-   #define MBKB 1296
-   #define NBKB 1296
-   #define NB2 72
-   #define NBNB2 2592
-
-   #define ATL_MulByNB(N_) ((N_) * 36)
-   #define ATL_DivByNB(N_) ((N_) / 36)
-   #define ATL_MulByNBNB(N_) ((N_) * 1296)
-
-#endif
--- a/songparts/build/linux/amd64/atlas/atlas_smv.h	Wed Jun 12 19:23:03 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,9 +0,0 @@
-#ifndef ATLAS_SMV_H
-#define ATLAS_SMV_H
-
-#define ATL_L1mvelts 7127
-#include "atlas_smvN.h"
-#include "atlas_smvT.h"
-#include "atlas_smvS.h"
-
-#endif
--- a/songparts/build/linux/amd64/atlas/atlas_smvN.h	Wed Jun 12 19:23:03 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,21 +0,0 @@
-#ifndef ATLAS_MVN_H
-#define ATLAS_MVN_H
-
-#include "atlas_misc.h"
-
-#define ATL_mvNMU 32
-#define ATL_mvNNU 1
-#ifndef ATL_L1mvelts
-   #define ATL_L1mvelts ((3*ATL_L1elts)>>2)
-#endif
-#define ATL_AXPYMV
-
-#define ATL_GetPartMVN(A_, lda_, mb_, nb_) \
-{ \
-   *(mb_) = (ATL_L1mvelts - (ATL_mvNNU<<1)) / ((ATL_mvNNU<<1)+1); \
-   if (*(mb_) > ATL_mvNMU) *(mb_) = ATL_mvNMU*( *(mb_)/ATL_mvNMU ); \
-   else *(mb_) = ATL_mvNMU; \
-   *(nb_) = ATL_mvNNU; \
-}
-
-#endif
--- a/songparts/build/linux/amd64/atlas/atlas_smvS.h	Wed Jun 12 19:23:03 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,23 +0,0 @@
-#ifndef ATLAS_MVS_H
-#define ATLAS_MVS_H
-
-#include "atlas_misc.h"
-
-#define ATL_mvSMU 2
-#define ATL_mvSNU 32
-#ifndef ATL_L1mvelts
-   #define ATL_L1mvelts ((3*ATL_L1elts)>>2)
-#endif
-#ifndef ATL_mvNNU
-   #include "atlas_smvN.h"
-#endif
-#ifndef ATL_mvTNU
-   #include "atlas_smvT.h"
-#endif
-#define ATL_GetPartSYMV(A_, lda_, mb_, nb_) \
-{ \
-   *(nb_) = ATL_mvSMU; \
-   *(mb_) = 576; \
-}
-
-#endif
--- a/songparts/build/linux/amd64/atlas/atlas_smvT.h	Wed Jun 12 19:23:03 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,23 +0,0 @@
-#ifndef ATLAS_MVT_H
-#define ATLAS_MVT_H
-
-#include "atlas_misc.h"
-
-#define ATL_mvTMU 2
-#define ATL_mvTNU 16
-#ifndef ATL_L1mvelts
-   #define ATL_L1mvelts ((3*ATL_L1elts)>>2)
-#endif
-#ifndef ATL_mvNNU
-   #include "atlas_smvN.h"
-#endif
-
-#define ATL_GetPartMVT(A_, lda_, mb_, nb_) \
-{ \
-   *(mb_) = (ATL_L1mvelts - (ATL_mvTMU<<1)) / ((ATL_mvTMU<<1)+1); \
-   if (*(mb_) > ATL_mvTNU) *(mb_) = (*(mb_)/ATL_mvTNU)*ATL_mvTNU; \
-   else (*mb_) = ATL_mvTNU; \
-   *(nb_) = ATL_mvTMU; \
-}
-
-#endif
--- a/songparts/build/linux/amd64/atlas/atlas_sr1.h	Wed Jun 12 19:23:03 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,16 +0,0 @@
-#ifndef ATLAS_SR1_H
-#define ATLAS_SR1_H
-
-#define ATL_L1r1elts 7127
-#define ATL_r1MU 16
-#define ATL_r1NU 1
-
-#define ATL_GetPartR1(A_, lda_, mb_, nb_) \
-{ \
-   (mb_) = (ATL_L1r1elts - (ATL_r1NU+ATL_r1NU)) / (ATL_r1NU+ATL_r1NU+1); \
-   if ((mb_) > ATL_r1MU) (mb_) = ATL_r1MU*((mb_)/ATL_r1MU); \
-   else (mb_) = ATL_r1MU; \
-   (nb_) = ATL_r1NU; \
-}
-
-#endif
--- a/songparts/build/linux/amd64/atlas/atlas_ssysinfo.h	Wed Jun 12 19:23:03 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,11 +0,0 @@
-#ifndef ATL_SSYSINFO_H
-   #define ATL_SSYSINFO_H
-
-#define ATL_MULADD
-#define ATL_L1elts 8192
-#define ATL_fplat  4
-#define ATL_lbnreg 16
-#define ATL_mmnreg 18
-#define ATL_nkflop 879334
-
-#endif
--- a/songparts/build/linux/amd64/atlas/atlas_trsmNB.h	Wed Jun 12 19:23:03 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,12 +0,0 @@
-#ifndef ATLAS_TRSMNB_H
-   #define ATLAS_TRSMNB_H
-
-   #ifdef SREAL
-      #define TRSM_NB 60
-   #elif defined(DREAL)
-      #define TRSM_NB 12
-   #else
-      #define TRSM_NB 4
-   #endif
-
-#endif
--- a/songparts/build/linux/amd64/atlas/atlas_type.h	Wed Jun 12 19:23:03 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,20 +0,0 @@
-#ifndef ATLAS_TYPE_H
-#define ATLAS_TYPE_H
-
-#define ATL_isize 4
-#define ATL_ssize 4
-#define ATL_dsize 8
-#define ATL_csize 8
-#define ATL_zsize 16
-#define ATL_iMulBySize(N_) ((((N_)) << 2))
-#define ATL_sMulBySize(N_) ((((N_)) << 2))
-#define ATL_dMulBySize(N_) ((((N_)) << 3))
-#define ATL_cMulBySize(N_) ((((N_)) << 3))
-#define ATL_zMulBySize(N_) ((((N_)) << 4))
-#define ATL_iDivBySize(N_) ((N_) >> 2)
-#define ATL_sDivBySize(N_) ((N_) >> 2)
-#define ATL_cDivBySize(N_) ((N_) >> 3)
-#define ATL_dDivBySize(N_) ((N_) >> 3)
-#define ATL_zDivBySize(N_) ((N_) >> 4)
-
-#endif
--- a/songparts/build/linux/amd64/atlas/atlas_zNCmm.h	Wed Jun 12 19:23:03 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,23 +0,0 @@
-#ifndef ZMM_H
-   #define ZMM_H
-
-   #define ATL_mmMULADD
-   #define ATL_mmLAT 1
-   #define ATL_mmMU  12
-   #define ATL_mmNU  1
-   #define ATL_mmKU  48
-   #define MB 36
-   #define NB 36
-   #define KB 36
-   #define NBNB 1296
-   #define MBNB 1296
-   #define MBKB 1296
-   #define NBKB 1296
-   #define NB2 72
-   #define NBNB2 2592
-
-   #define ATL_MulByNB(N_) ((N_) * 36)
-   #define ATL_DivByNB(N_) ((N_) / 36)
-   #define ATL_MulByNBNB(N_) ((N_) * 1296)
-
-#endif
--- a/songparts/build/linux/amd64/atlas/atlas_zdNKB.h	Wed Jun 12 19:23:03 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,4 +0,0 @@
-#ifndef ATLAS_ZDNKB_H
-   #define ATLAS_ZDNKB_H
-   #define ATL_ZDNKB 0
-#endif
--- a/songparts/build/linux/amd64/atlas/atlas_zmv.h	Wed Jun 12 19:23:03 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,9 +0,0 @@
-#ifndef ATLAS_ZMV_H
-#define ATLAS_ZMV_H
-
-#define ATL_L1mvelts 2048
-#include "atlas_zmvN.h"
-#include "atlas_zmvT.h"
-#include "atlas_zmvS.h"
-
-#endif
--- a/songparts/build/linux/amd64/atlas/atlas_zmvN.h	Wed Jun 12 19:23:03 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,21 +0,0 @@
-#ifndef ATLAS_MVN_H
-#define ATLAS_MVN_H
-
-#include "atlas_misc.h"
-
-#define ATL_mvNMU 32
-#define ATL_mvNNU 1
-#ifndef ATL_L1mvelts
-   #define ATL_L1mvelts ((3*ATL_L1elts)>>2)
-#endif
-#define ATL_AXPYMV
-
-#define ATL_GetPartMVN(A_, lda_, mb_, nb_) \
-{ \
-   *(mb_) = (ATL_L1mvelts - (ATL_mvNNU<<1)) / ((ATL_mvNNU<<1)+1); \
-   if (*(mb_) > ATL_mvNMU) *(mb_) = ATL_mvNMU*( *(mb_)/ATL_mvNMU ); \
-   else *(mb_) = ATL_mvNMU; \
-   *(nb_) = ATL_mvNNU; \
-}
-
-#endif
--- a/songparts/build/linux/amd64/atlas/atlas_zmvS.h	Wed Jun 12 19:23:03 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,23 +0,0 @@
-#ifndef ATLAS_MVS_H
-#define ATLAS_MVS_H
-
-#include "atlas_misc.h"
-
-#define ATL_mvSMU 2
-#define ATL_mvSNU 32
-#ifndef ATL_L1mvelts
-   #define ATL_L1mvelts ((3*ATL_L1elts)>>2)
-#endif
-#ifndef ATL_mvNNU
-   #include "atlas_zmvN.h"
-#endif
-#ifndef ATL_mvTNU
-   #include "atlas_zmvT.h"
-#endif
-#define ATL_GetPartSYMV(A_, lda_, mb_, nb_) \
-{ \
-   *(nb_) = ATL_mvSMU; \
-   *(mb_) = 160; \
-}
-
-#endif
--- a/songparts/build/linux/amd64/atlas/atlas_zmvT.h	Wed Jun 12 19:23:03 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,23 +0,0 @@
-#ifndef ATLAS_MVT_H
-#define ATLAS_MVT_H
-
-#include "atlas_misc.h"
-
-#define ATL_mvTMU 2
-#define ATL_mvTNU 8
-#ifndef ATL_L1mvelts
-   #define ATL_L1mvelts ((3*ATL_L1elts)>>2)
-#endif
-#ifndef ATL_mvNNU
-   #include "atlas_zmvN.h"
-#endif
-
-#define ATL_GetPartMVT(A_, lda_, mb_, nb_) \
-{ \
-   *(mb_) = (ATL_L1mvelts - (ATL_mvTMU<<1)) / ((ATL_mvTMU<<1)+1); \
-   if (*(mb_) > ATL_mvTNU) *(mb_) = (*(mb_)/ATL_mvTNU)*ATL_mvTNU; \
-   else (*mb_) = ATL_mvTNU; \
-   *(nb_) = ATL_mvTMU; \
-}
-
-#endif
--- a/songparts/build/linux/amd64/atlas/atlas_zr1.h	Wed Jun 12 19:23:03 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,16 +0,0 @@
-#ifndef ATLAS_ZR1_H
-#define ATLAS_ZR1_H
-
-#define ATL_L1r1elts 2048
-#define ATL_r1MU 16
-#define ATL_r1NU 1
-
-#define ATL_GetPartR1(A_, lda_, mb_, nb_) \
-{ \
-   (mb_) = (ATL_L1r1elts - (ATL_r1NU+ATL_r1NU)) / (ATL_r1NU+ATL_r1NU+1); \
-   if ((mb_) > ATL_r1MU) (mb_) = ATL_r1MU*((mb_)/ATL_r1MU); \
-   else (mb_) = ATL_r1MU; \
-   (nb_) = ATL_r1NU; \
-}
-
-#endif
--- a/songparts/build/linux/amd64/atlas/atlas_zsysinfo.h	Wed Jun 12 19:23:03 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,11 +0,0 @@
-#ifndef ATL_ZSYSINFO_H
-   #define ATL_ZSYSINFO_H
-
-#define ATL_MULADD
-#define ATL_L1elts 4096
-#define ATL_fplat  12
-#define ATL_lbnreg 16
-#define ATL_mmnreg 18
-#define ATL_nkflop 2159859
-
-#endif
--- a/songparts/build/linux/amd64/atlas/cXover.h	Wed Jun 12 19:23:03 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,27 +0,0 @@
-#ifndef CXOVER_H
-#define CXOVER_H
-
-#define ATL_3NB 216
-#define NN_MNK_M 7200
-#define NN_MNK_N 7200
-#define NN_MNK_MN 51840
-#define NN_MNK_K 16200
-#define NN_MNK_GE 1000
-#define NT_MNK_M 7200
-#define NT_MNK_N 7200
-#define NT_MNK_MN 51840
-#define NT_MNK_K 16200
-#define NT_MNK_GE 1000
-#define TN_MNK_M 7200
-#define TN_MNK_N 7200
-#define TN_MNK_MN 51840
-#define TN_MNK_K 41472
-#define TN_MNK_GE 3375
-#define TT_MNK_M 7200
-#define TT_MNK_N 7200
-#define TT_MNK_MN 51840
-#define TT_MNK_K 16200
-#define TT_MNK_GE 1000
-#define C2R_K 278
-
-#endif
--- a/songparts/build/linux/amd64/atlas/cmm.h	Wed Jun 12 19:23:03 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,51 +0,0 @@
-#ifndef CMM_H
-   #define CMM_H
-
-   #define ATL_mmMULADD
-   #define ATL_mmLAT 1
-   #define ATL_mmMU  12
-   #define ATL_mmNU  1
-   #define ATL_mmKU  72
-   #define MB 72
-   #define NB 72
-   #define KB 72
-   #define NBNB 5184
-   #define MBNB 5184
-   #define MBKB 5184
-   #define NBKB 5184
-   #define NB2 144
-   #define NBNB2 10368
-
-   #define ATL_MulByNB(N_) ((N_) * 72)
-   #define ATL_DivByNB(N_) ((N_) / 72)
-   #define ATL_MulByNBNB(N_) ((N_) * 5184)
-void ATL_cJIK72x72x72TN72x72x0_a1_b0(const int M, const int N, const int K, const TYPE alpha, const TYPE *A, const int lda, const TYPE *B, const int ldb, const TYPE beta, TYPE *C, const int ldc);
-void ATL_cJIK72x72x72TN72x72x0_a1_b1(const int M, const int N, const int K, const TYPE alpha, const TYPE *A, const int lda, const TYPE *B, const int ldb, const TYPE beta, TYPE *C, const int ldc);
-void ATL_cJIK72x72x72TN72x72x0_a1_bX(const int M, const int N, const int K, const TYPE alpha, const TYPE *A, const int lda, const TYPE *B, const int ldb, const TYPE beta, TYPE *C, const int ldc);
-
-   #define NBmm_b1(m_, n_, k_, al_, A_, lda_, B_, ldb_, be_, C_, ldc_) \
-{ \
-   ATL_cJIK72x72x72TN72x72x0_a1_bX(m_, n_, k_, al_, (A_), lda_, (B_), ldb_, ATL_rnone, C_, ldc_); \
-   ATL_cJIK72x72x72TN72x72x0_a1_b1(m_, n_, k_, al_, (A_), lda_, (B_)+NBNB, ldb_, ATL_rone, (C_)+1, ldc_); \
-   ATL_cJIK72x72x72TN72x72x0_a1_bX(m_, n_, k_, al_, (A_)+NBNB, lda_, (B_)+NBNB, ldb_, ATL_rnone, C_, ldc_); \
-   ATL_cJIK72x72x72TN72x72x0_a1_b1(m_, n_, k_, al_, (A_)+NBNB, lda_, (B_), ldb_, ATL_rone, (C_)+1, ldc_); \
-   }
-   #define NBmm_b0(m_, n_, k_, al_, A_, lda_, B_, ldb_, be_, C_, ldc_) \
-{ \
-   ATL_cJIK72x72x72TN72x72x0_a1_b0(m_, n_, k_, al_, (A_), lda_, (B_), ldb_, ATL_rzero, C_, ldc_); \
-   ATL_cJIK72x72x72TN72x72x0_a1_b0(m_, n_, k_, al_, (A_), lda_, (B_)+NBNB, ldb_, ATL_rzero, (C_)+1, ldc_); \
-   ATL_cJIK72x72x72TN72x72x0_a1_bX(m_, n_, k_, al_, (A_)+NBNB, lda_, (B_)+NBNB, ldb_, ATL_rnone, C_, ldc_); \
-   ATL_cJIK72x72x72TN72x72x0_a1_b1(m_, n_, k_, al_, (A_)+NBNB, lda_, (B_), ldb_, ATL_rone, (C_)+1, ldc_); \
-   }
-   #define NBmm_bX(m_, n_, k_, al_, A_, lda_, B_, ldb_, be_, C_, ldc_) \
-{ \
-   ATL_cJIK72x72x72TN72x72x0_a1_bX(m_, n_, k_, al_, (A_), lda_, (B_), ldb_, -(be_), C_, ldc_); \
-   ATL_cJIK72x72x72TN72x72x0_a1_bX(m_, n_, k_, al_, (A_), lda_, (B_)+NBNB, ldb_, be_, (C_)+1, ldc_); \
-   ATL_cJIK72x72x72TN72x72x0_a1_bX(m_, n_, k_, al_, (A_)+NBNB, lda_, (B_)+NBNB, ldb_, ATL_rnone, C_, ldc_); \
-   ATL_cJIK72x72x72TN72x72x0_a1_b1(m_, n_, k_, al_, (A_)+NBNB, lda_, (B_), ldb_, ATL_rone, (C_)+1, ldc_); \
-   }
-   #define rNBmm_b1 ATL_sJIK72x72x72TN72x72x0_a1_b1
-   #define rNBmm_b0 ATL_sJIK72x72x72TN72x72x0_a1_b0
-   #define rNBmm_bX ATL_sJIK72x72x72TN72x72x0_a1_bX
-
-#endif
--- a/songparts/build/linux/amd64/atlas/dXover.h	Wed Jun 12 19:23:03 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,26 +0,0 @@
-#ifndef DXOVER_H
-#define DXOVER_H
-
-#define ATL_3NB 168
-#define NN_MNK_M 5600
-#define NN_MNK_N 12600
-#define NN_MNK_MN 31360
-#define NN_MNK_K 80864
-#define NN_MNK_GE 13824
-#define NT_MNK_M 5600
-#define NT_MNK_N 5600
-#define NT_MNK_MN 31360
-#define NT_MNK_K 32256
-#define NT_MNK_GE 3375
-#define TN_MNK_M 5600
-#define TN_MNK_N 5600
-#define TN_MNK_MN 31360
-#define TN_MNK_K 80864
-#define TN_MNK_GE 13824
-#define TT_MNK_M 5600
-#define TT_MNK_N 12600
-#define TT_MNK_MN 31360
-#define TT_MNK_K 32256
-#define TT_MNK_GE 3375
-
-#endif
--- a/songparts/build/linux/amd64/atlas/dmm.h	Wed Jun 12 19:23:03 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,27 +0,0 @@
-#ifndef DMM_H
-   #define DMM_H
-
-   #define ATL_mmNOMULADD
-   #define ATL_mmLAT 1
-   #define ATL_mmMU  12
-   #define ATL_mmNU  1
-   #define ATL_mmKU  56
-   #define MB 56
-   #define NB 56
-   #define KB 56
-   #define NBNB 3136
-   #define MBNB 3136
-   #define MBKB 3136
-   #define NBKB 3136
-   #define NB2 112
-   #define NBNB2 6272
-
-   #define ATL_MulByNB(N_) ((N_) * 56)
-   #define ATL_DivByNB(N_) ((N_) / 56)
-   #define ATL_MulByNBNB(N_) ((N_) * 3136)
-   #define NBmm ATL_dJIK56x56x56TN56x56x0_a1_b1
-   #define NBmm_b1 ATL_dJIK56x56x56TN56x56x0_a1_b1
-   #define NBmm_b0 ATL_dJIK56x56x56TN56x56x0_a1_b0
-   #define NBmm_bX ATL_dJIK56x56x56TN56x56x0_a1_bX
-
-#endif
--- a/songparts/build/linux/amd64/atlas/sXover.h	Wed Jun 12 19:23:03 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,26 +0,0 @@
-#ifndef SXOVER_H
-#define SXOVER_H
-
-#define ATL_3NB 216
-#define NN_MNK_M 7200
-#define NN_MNK_N 16200
-#define NN_MNK_MN 51840
-#define NN_MNK_K 41472
-#define NN_MNK_GE 13824
-#define NT_MNK_M 7200
-#define NT_MNK_N 7200
-#define NT_MNK_MN 51840
-#define NT_MNK_K 16200
-#define NT_MNK_GE 3375
-#define TN_MNK_M 7200
-#define TN_MNK_N 16200
-#define TN_MNK_MN 51840
-#define TN_MNK_K 352800
-#define TN_MNK_GE 27000
-#define TT_MNK_M 7200
-#define TT_MNK_N 7200
-#define TT_MNK_MN 51840
-#define TT_MNK_K 41472
-#define TT_MNK_GE 3375
-
-#endif
--- a/songparts/build/linux/amd64/atlas/smm.h	Wed Jun 12 19:23:03 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,27 +0,0 @@
-#ifndef SMM_H
-   #define SMM_H
-
-   #define ATL_mmMULADD
-   #define ATL_mmLAT 1
-   #define ATL_mmMU  12
-   #define ATL_mmNU  1
-   #define ATL_mmKU  80
-   #define MB 80
-   #define NB 80
-   #define KB 80
-   #define NBNB 6400
-   #define MBNB 6400
-   #define MBKB 6400
-   #define NBKB 6400
-   #define NB2 160
-   #define NBNB2 12800
-
-   #define ATL_MulByNB(N_) ((N_) * 80)
-   #define ATL_DivByNB(N_) ((N_) / 80)
-   #define ATL_MulByNBNB(N_) ((N_) * 6400)
-   #define NBmm ATL_sJIK80x80x80TN80x80x0_a1_b1
-   #define NBmm_b1 ATL_sJIK80x80x80TN80x80x0_a1_b1
-   #define NBmm_b0 ATL_sJIK80x80x80TN80x80x0_a1_b0
-   #define NBmm_bX ATL_sJIK80x80x80TN80x80x0_a1_bX
-
-#endif
--- a/songparts/build/linux/amd64/atlas/zXover.h	Wed Jun 12 19:23:03 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,27 +0,0 @@
-#ifndef ZXOVER_H
-#define ZXOVER_H
-
-#define ATL_3NB 144
-#define NN_MNK_M 4800
-#define NN_MNK_N 4800
-#define NN_MNK_MN 23040
-#define NN_MNK_K 4800
-#define NN_MNK_GE 1000
-#define NT_MNK_M 4800
-#define NT_MNK_N 4800
-#define NT_MNK_MN 23040
-#define NT_MNK_K 4800
-#define NT_MNK_GE 1000
-#define TN_MNK_M 4800
-#define TN_MNK_N 4800
-#define TN_MNK_MN 23040
-#define TN_MNK_K 10800
-#define TN_MNK_GE 1000
-#define TT_MNK_M 4800
-#define TT_MNK_N 4800
-#define TT_MNK_MN 23040
-#define TT_MNK_K 10800
-#define TT_MNK_GE 1000
-#define C2R_K 570
-
-#endif
--- a/songparts/build/linux/amd64/atlas/zmm.h	Wed Jun 12 19:23:03 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,51 +0,0 @@
-#ifndef ZMM_H
-   #define ZMM_H
-
-   #define ATL_mmMULADD
-   #define ATL_mmLAT 1
-   #define ATL_mmMU  12
-   #define ATL_mmNU  1
-   #define ATL_mmKU  48
-   #define MB 48
-   #define NB 48
-   #define KB 48
-   #define NBNB 2304
-   #define MBNB 2304
-   #define MBKB 2304
-   #define NBKB 2304
-   #define NB2 96
-   #define NBNB2 4608
-
-   #define ATL_MulByNB(N_) ((N_) * 48)
-   #define ATL_DivByNB(N_) ((N_) / 48)
-   #define ATL_MulByNBNB(N_) ((N_) * 2304)
-void ATL_zJIK48x48x48TN48x48x0_a1_b0(const int M, const int N, const int K, const TYPE alpha, const TYPE *A, const int lda, const TYPE *B, const int ldb, const TYPE beta, TYPE *C, const int ldc);
-void ATL_zJIK48x48x48TN48x48x0_a1_b1(const int M, const int N, const int K, const TYPE alpha, const TYPE *A, const int lda, const TYPE *B, const int ldb, const TYPE beta, TYPE *C, const int ldc);
-void ATL_zJIK48x48x48TN48x48x0_a1_bX(const int M, const int N, const int K, const TYPE alpha, const TYPE *A, const int lda, const TYPE *B, const int ldb, const TYPE beta, TYPE *C, const int ldc);
-
-   #define NBmm_b1(m_, n_, k_, al_, A_, lda_, B_, ldb_, be_, C_, ldc_) \
-{ \
-   ATL_zJIK48x48x48TN48x48x0_a1_bX(m_, n_, k_, al_, (A_), lda_, (B_), ldb_, ATL_rnone, C_, ldc_); \
-   ATL_zJIK48x48x48TN48x48x0_a1_b1(m_, n_, k_, al_, (A_), lda_, (B_)+NBNB, ldb_, ATL_rone, (C_)+1, ldc_); \
-   ATL_zJIK48x48x48TN48x48x0_a1_bX(m_, n_, k_, al_, (A_)+NBNB, lda_, (B_)+NBNB, ldb_, ATL_rnone, C_, ldc_); \
-   ATL_zJIK48x48x48TN48x48x0_a1_b1(m_, n_, k_, al_, (A_)+NBNB, lda_, (B_), ldb_, ATL_rone, (C_)+1, ldc_); \
-   }
-   #define NBmm_b0(m_, n_, k_, al_, A_, lda_, B_, ldb_, be_, C_, ldc_) \
-{ \
-   ATL_zJIK48x48x48TN48x48x0_a1_b0(m_, n_, k_, al_, (A_), lda_, (B_), ldb_, ATL_rzero, C_, ldc_); \
-   ATL_zJIK48x48x48TN48x48x0_a1_b0(m_, n_, k_, al_, (A_), lda_, (B_)+NBNB, ldb_, ATL_rzero, (C_)+1, ldc_); \
-   ATL_zJIK48x48x48TN48x48x0_a1_bX(m_, n_, k_, al_, (A_)+NBNB, lda_, (B_)+NBNB, ldb_, ATL_rnone, C_, ldc_); \
-   ATL_zJIK48x48x48TN48x48x0_a1_b1(m_, n_, k_, al_, (A_)+NBNB, lda_, (B_), ldb_, ATL_rone, (C_)+1, ldc_); \
-   }
-   #define NBmm_bX(m_, n_, k_, al_, A_, lda_, B_, ldb_, be_, C_, ldc_) \
-{ \
-   ATL_zJIK48x48x48TN48x48x0_a1_bX(m_, n_, k_, al_, (A_), lda_, (B_), ldb_, -(be_), C_, ldc_); \
-   ATL_zJIK48x48x48TN48x48x0_a1_bX(m_, n_, k_, al_, (A_), lda_, (B_)+NBNB, ldb_, be_, (C_)+1, ldc_); \
-   ATL_zJIK48x48x48TN48x48x0_a1_bX(m_, n_, k_, al_, (A_)+NBNB, lda_, (B_)+NBNB, ldb_, ATL_rnone, C_, ldc_); \
-   ATL_zJIK48x48x48TN48x48x0_a1_b1(m_, n_, k_, al_, (A_)+NBNB, lda_, (B_), ldb_, ATL_rone, (C_)+1, ldc_); \
-   }
-   #define rNBmm_b1 ATL_dJIK48x48x48TN48x48x0_a1_b1
-   #define rNBmm_b0 ATL_dJIK48x48x48TN48x48x0_a1_b0
-   #define rNBmm_bX ATL_dJIK48x48x48TN48x48x0_a1_bX
-
-#endif
--- a/songparts/build/linux/amd64/cblas.h	Wed Jun 12 19:23:03 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,596 +0,0 @@
-#ifndef CBLAS_H
-
-#ifndef CBLAS_ENUM_DEFINED_H
-   #define CBLAS_ENUM_DEFINED_H
-   enum CBLAS_ORDER {CblasRowMajor=101, CblasColMajor=102 };
-   enum CBLAS_TRANSPOSE {CblasNoTrans=111, CblasTrans=112, CblasConjTrans=113,
-                         AtlasConj=114};
-   enum CBLAS_UPLO  {CblasUpper=121, CblasLower=122};
-   enum CBLAS_DIAG  {CblasNonUnit=131, CblasUnit=132};
-   enum CBLAS_SIDE  {CblasLeft=141, CblasRight=142};
-#endif
-
-#ifndef CBLAS_ENUM_ONLY
-#define CBLAS_H
-#define CBLAS_INDEX int
-
-int cblas_errprn(int ierr, int info, char *form, ...);
-
-/*
- * ===========================================================================
- * Prototypes for level 1 BLAS functions (complex are recast as routines)
- * ===========================================================================
- */
-float  cblas_sdsdot(const int N, const float alpha, const float *X,
-                    const int incX, const float *Y, const int incY);
-double cblas_dsdot(const int N, const float *X, const int incX, const float *Y,
-                   const int incY);
-float  cblas_sdot(const int N, const float  *X, const int incX,
-                  const float  *Y, const int incY);
-double cblas_ddot(const int N, const double *X, const int incX,
-                  const double *Y, const int incY);
-/*
- * Functions having prefixes Z and C only
- */
-void   cblas_cdotu_sub(const int N, const void *X, const int incX,
-                       const void *Y, const int incY, void *dotu);
-void   cblas_cdotc_sub(const int N, const void *X, const int incX,
-                       const void *Y, const int incY, void *dotc);
-
-void   cblas_zdotu_sub(const int N, const void *X, const int incX,
-                       const void *Y, const int incY, void *dotu);
-void   cblas_zdotc_sub(const int N, const void *X, const int incX,
-                       const void *Y, const int incY, void *dotc);
-
-
-/*
- * Functions having prefixes S D SC DZ
- */
-float  cblas_snrm2(const int N, const float *X, const int incX);
-float  cblas_sasum(const int N, const float *X, const int incX);
-
-double cblas_dnrm2(const int N, const double *X, const int incX);
-double cblas_dasum(const int N, const double *X, const int incX);
-
-float  cblas_scnrm2(const int N, const void *X, const int incX);
-float  cblas_scasum(const int N, const void *X, const int incX);
-
-double cblas_dznrm2(const int N, const void *X, const int incX);
-double cblas_dzasum(const int N, const void *X, const int incX);
-
-
-/*
- * Functions having standard 4 prefixes (S D C Z)
- */
-CBLAS_INDEX cblas_isamax(const int N, const float  *X, const int incX);
-CBLAS_INDEX cblas_idamax(const int N, const double *X, const int incX);
-CBLAS_INDEX cblas_icamax(const int N, const void   *X, const int incX);
-CBLAS_INDEX cblas_izamax(const int N, const void   *X, const int incX);
-
-/*
- * ===========================================================================
- * Prototypes for level 1 BLAS routines
- * ===========================================================================
- */
-
-/*
- * Routines with standard 4 prefixes (s, d, c, z)
- */
-void cblas_sswap(const int N, float *X, const int incX,
-                 float *Y, const int incY);
-void cblas_scopy(const int N, const float *X, const int incX,
-                 float *Y, const int incY);
-void cblas_saxpy(const int N, const float alpha, const float *X,
-                 const int incX, float *Y, const int incY);
-void catlas_saxpby(const int N, const float alpha, const float *X,
-                  const int incX, const float beta, float *Y, const int incY);
-void catlas_sset
-   (const int N, const float alpha, float *X, const int incX);
-
-void cblas_dswap(const int N, double *X, const int incX,
-                 double *Y, const int incY);
-void cblas_dcopy(const int N, const double *X, const int incX,
-                 double *Y, const int incY);
-void cblas_daxpy(const int N, const double alpha, const double *X,
-                 const int incX, double *Y, const int incY);
-void catlas_daxpby(const int N, const double alpha, const double *X,
-                  const int incX, const double beta, double *Y, const int incY);
-void catlas_dset
-   (const int N, const double alpha, double *X, const int incX);
-
-void cblas_cswap(const int N, void *X, const int incX,
-                 void *Y, const int incY);
-void cblas_ccopy(const int N, const void *X, const int incX,
-                 void *Y, const int incY);
-void cblas_caxpy(const int N, const void *alpha, const void *X,
-                 const int incX, void *Y, const int incY);
-void catlas_caxpby(const int N, const void *alpha, const void *X,
-                  const int incX, const void *beta, void *Y, const int incY);
-void catlas_cset
-   (const int N, const void *alpha, void *X, const int incX);
-
-void cblas_zswap(const int N, void *X, const int incX,
-                 void *Y, const int incY);
-void cblas_zcopy(const int N, const void *X, const int incX,
-                 void *Y, const int incY);
-void cblas_zaxpy(const int N, const void *alpha, const void *X,
-                 const int incX, void *Y, const int incY);
-void catlas_zaxpby(const int N, const void *alpha, const void *X,
-                  const int incX, const void *beta, void *Y, const int incY);
-void catlas_zset
-   (const int N, const void *alpha, void *X, const int incX);
-
-
-/*
- * Routines with S and D prefix only
- */
-void cblas_srotg(float *a, float *b, float *c, float *s);
-void cblas_srotmg(float *d1, float *d2, float *b1, const float b2, float *P);
-void cblas_srot(const int N, float *X, const int incX,
-                float *Y, const int incY, const float c, const float s);
-void cblas_srotm(const int N, float *X, const int incX,
-                float *Y, const int incY, const float *P);
-
-void cblas_drotg(double *a, double *b, double *c, double *s);
-void cblas_drotmg(double *d1, double *d2, double *b1, const double b2, double *P);
-void cblas_drot(const int N, double *X, const int incX,
-                double *Y, const int incY, const double c, const double s);
-void cblas_drotm(const int N, double *X, const int incX,
-                double *Y, const int incY, const double *P);
-
-
-/*
- * Routines with S D C Z CS and ZD prefixes
- */
-void cblas_sscal(const int N, const float alpha, float *X, const int incX);
-void cblas_dscal(const int N, const double alpha, double *X, const int incX);
-void cblas_cscal(const int N, const void *alpha, void *X, const int incX);
-void cblas_zscal(const int N, const void *alpha, void *X, const int incX);
-void cblas_csscal(const int N, const float alpha, void *X, const int incX);
-void cblas_zdscal(const int N, const double alpha, void *X, const int incX);
-
-/*
- * Extra reference routines provided by ATLAS, but not mandated by the standard
- */
-void cblas_crotg(void *a, void *b, void *c, void *s);
-void cblas_zrotg(void *a, void *b, void *c, void *s);
-void cblas_csrot(const int N, void *X, const int incX, void *Y, const int incY,
-                 const float c, const float s);
-void cblas_zdrot(const int N, void *X, const int incX, void *Y, const int incY,
-                 const double c, const double s);
-
-/*
- * ===========================================================================
- * Prototypes for level 2 BLAS
- * ===========================================================================
- */
-
-/*
- * Routines with standard 4 prefixes (S, D, C, Z)
- */
-void cblas_sgemv(const enum CBLAS_ORDER Order,
-                 const enum CBLAS_TRANSPOSE TransA, const int M, const int N,
-                 const float alpha, const float *A, const int lda,
-                 const float *X, const int incX, const float beta,
-                 float *Y, const int incY);
-void cblas_sgbmv(const enum CBLAS_ORDER Order,
-                 const enum CBLAS_TRANSPOSE TransA, const int M, const int N,
-                 const int KL, const int KU, const float alpha,
-                 const float *A, const int lda, const float *X,
-                 const int incX, const float beta, float *Y, const int incY);
-void cblas_strmv(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
-                 const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
-                 const int N, const float *A, const int lda,
-                 float *X, const int incX);
-void cblas_stbmv(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
-                 const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
-                 const int N, const int K, const float *A, const int lda,
-                 float *X, const int incX);
-void cblas_stpmv(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
-                 const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
-                 const int N, const float *Ap, float *X, const int incX);
-void cblas_strsv(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
-                 const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
-                 const int N, const float *A, const int lda, float *X,
-                 const int incX);
-void cblas_stbsv(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
-                 const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
-                 const int N, const int K, const float *A, const int lda,
-                 float *X, const int incX);
-void cblas_stpsv(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
-                 const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
-                 const int N, const float *Ap, float *X, const int incX);
-
-void cblas_dgemv(const enum CBLAS_ORDER Order,
-                 const enum CBLAS_TRANSPOSE TransA, const int M, const int N,
-                 const double alpha, const double *A, const int lda,
-                 const double *X, const int incX, const double beta,
-                 double *Y, const int incY);
-void cblas_dgbmv(const enum CBLAS_ORDER Order,
-                 const enum CBLAS_TRANSPOSE TransA, const int M, const int N,
-                 const int KL, const int KU, const double alpha,
-                 const double *A, const int lda, const double *X,
-                 const int incX, const double beta, double *Y, const int incY);
-void cblas_dtrmv(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
-                 const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
-                 const int N, const double *A, const int lda,
-                 double *X, const int incX);
-void cblas_dtbmv(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
-                 const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
-                 const int N, const int K, const double *A, const int lda,
-                 double *X, const int incX);
-void cblas_dtpmv(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
-                 const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
-                 const int N, const double *Ap, double *X, const int incX);
-void cblas_dtrsv(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
-                 const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
-                 const int N, const double *A, const int lda, double *X,
-                 const int incX);
-void cblas_dtbsv(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
-                 const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
-                 const int N, const int K, const double *A, const int lda,
-                 double *X, const int incX);
-void cblas_dtpsv(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
-                 const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
-                 const int N, const double *Ap, double *X, const int incX);
-
-void cblas_cgemv(const enum CBLAS_ORDER Order,
-                 const enum CBLAS_TRANSPOSE TransA, const int M, const int N,
-                 const void *alpha, const void *A, const int lda,
-                 const void *X, const int incX, const void *beta,
-                 void *Y, const int incY);
-void cblas_cgbmv(const enum CBLAS_ORDER Order,
-                 const enum CBLAS_TRANSPOSE TransA, const int M, const int N,
-                 const int KL, const int KU, const void *alpha,
-                 const void *A, const int lda, const void *X,
-                 const int incX, const void *beta, void *Y, const int incY);
-void cblas_ctrmv(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
-                 const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
-                 const int N, const void *A, const int lda,
-                 void *X, const int incX);
-void cblas_ctbmv(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
-                 const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
-                 const int N, const int K, const void *A, const int lda,
-                 void *X, const int incX);
-void cblas_ctpmv(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
-                 const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
-                 const int N, const void *Ap, void *X, const int incX);
-void cblas_ctrsv(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
-                 const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
-                 const int N, const void *A, const int lda, void *X,
-                 const int incX);
-void cblas_ctbsv(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
-                 const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
-                 const int N, const int K, const void *A, const int lda,
-                 void *X, const int incX);
-void cblas_ctpsv(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
-                 const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
-                 const int N, const void *Ap, void *X, const int incX);
-
-void cblas_zgemv(const enum CBLAS_ORDER Order,
-                 const enum CBLAS_TRANSPOSE TransA, const int M, const int N,
-                 const void *alpha, const void *A, const int lda,
-                 const void *X, const int incX, const void *beta,
-                 void *Y, const int incY);
-void cblas_zgbmv(const enum CBLAS_ORDER Order,
-                 const enum CBLAS_TRANSPOSE TransA, const int M, const int N,
-                 const int KL, const int KU, const void *alpha,
-                 const void *A, const int lda, const void *X,
-                 const int incX, const void *beta, void *Y, const int incY);
-void cblas_ztrmv(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
-                 const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
-                 const int N, const void *A, const int lda,
-                 void *X, const int incX);
-void cblas_ztbmv(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
-                 const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
-                 const int N, const int K, const void *A, const int lda,
-                 void *X, const int incX);
-void cblas_ztpmv(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
-                 const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
-                 const int N, const void *Ap, void *X, const int incX);
-void cblas_ztrsv(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
-                 const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
-                 const int N, const void *A, const int lda, void *X,
-                 const int incX);
-void cblas_ztbsv(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
-                 const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
-                 const int N, const int K, const void *A, const int lda,
-                 void *X, const int incX);
-void cblas_ztpsv(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
-                 const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
-                 const int N, const void *Ap, void *X, const int incX);
-
-
-/*
- * Routines with S and D prefixes only
- */
-void cblas_ssymv(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
-                 const int N, const float alpha, const float *A,
-                 const int lda, const float *X, const int incX,
-                 const float beta, float *Y, const int incY);
-void cblas_ssbmv(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
-                 const int N, const int K, const float alpha, const float *A,
-                 const int lda, const float *X, const int incX,
-                 const float beta, float *Y, const int incY);
-void cblas_sspmv(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
-                 const int N, const float alpha, const float *Ap,
-                 const float *X, const int incX,
-                 const float beta, float *Y, const int incY);
-void cblas_sger(const enum CBLAS_ORDER Order, const int M, const int N,
-                const float alpha, const float *X, const int incX,
-                const float *Y, const int incY, float *A, const int lda);
-void cblas_ssyr(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
-                const int N, const float alpha, const float *X,
-                const int incX, float *A, const int lda);
-void cblas_sspr(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
-                const int N, const float alpha, const float *X,
-                const int incX, float *Ap);
-void cblas_ssyr2(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
-                const int N, const float alpha, const float *X,
-                const int incX, const float *Y, const int incY, float *A,
-                const int lda);
-void cblas_sspr2(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
-                const int N, const float alpha, const float *X,
-                const int incX, const float *Y, const int incY, float *A);
-
-void cblas_dsymv(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
-                 const int N, const double alpha, const double *A,
-                 const int lda, const double *X, const int incX,
-                 const double beta, double *Y, const int incY);
-void cblas_dsbmv(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
-                 const int N, const int K, const double alpha, const double *A,
-                 const int lda, const double *X, const int incX,
-                 const double beta, double *Y, const int incY);
-void cblas_dspmv(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
-                 const int N, const double alpha, const double *Ap,
-                 const double *X, const int incX,
-                 const double beta, double *Y, const int incY);
-void cblas_dger(const enum CBLAS_ORDER Order, const int M, const int N,
-                const double alpha, const double *X, const int incX,
-                const double *Y, const int incY, double *A, const int lda);
-void cblas_dsyr(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
-                const int N, const double alpha, const double *X,
-                const int incX, double *A, const int lda);
-void cblas_dspr(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
-                const int N, const double alpha, const double *X,
-                const int incX, double *Ap);
-void cblas_dsyr2(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
-                const int N, const double alpha, const double *X,
-                const int incX, const double *Y, const int incY, double *A,
-                const int lda);
-void cblas_dspr2(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
-                const int N, const double alpha, const double *X,
-                const int incX, const double *Y, const int incY, double *A);
-
-
-/*
- * Routines with C and Z prefixes only
- */
-void cblas_chemv(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
-                 const int N, const void *alpha, const void *A,
-                 const int lda, const void *X, const int incX,
-                 const void *beta, void *Y, const int incY);
-void cblas_chbmv(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
-                 const int N, const int K, const void *alpha, const void *A,
-                 const int lda, const void *X, const int incX,
-                 const void *beta, void *Y, const int incY);
-void cblas_chpmv(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
-                 const int N, const void *alpha, const void *Ap,
-                 const void *X, const int incX,
-                 const void *beta, void *Y, const int incY);
-void cblas_cgeru(const enum CBLAS_ORDER Order, const int M, const int N,
-                 const void *alpha, const void *X, const int incX,
-                 const void *Y, const int incY, void *A, const int lda);
-void cblas_cgerc(const enum CBLAS_ORDER Order, const int M, const int N,
-                 const void *alpha, const void *X, const int incX,
-                 const void *Y, const int incY, void *A, const int lda);
-void cblas_cher(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
-                const int N, const float alpha, const void *X, const int incX,
-                void *A, const int lda);
-void cblas_chpr(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
-                const int N, const float alpha, const void *X,
-                const int incX, void *A);
-void cblas_cher2(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo, const int N,
-                const void *alpha, const void *X, const int incX,
-                const void *Y, const int incY, void *A, const int lda);
-void cblas_chpr2(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo, const int N,
-                const void *alpha, const void *X, const int incX,
-                const void *Y, const int incY, void *Ap);
-
-void cblas_zhemv(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
-                 const int N, const void *alpha, const void *A,
-                 const int lda, const void *X, const int incX,
-                 const void *beta, void *Y, const int incY);
-void cblas_zhbmv(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
-                 const int N, const int K, const void *alpha, const void *A,
-                 const int lda, const void *X, const int incX,
-                 const void *beta, void *Y, const int incY);
-void cblas_zhpmv(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
-                 const int N, const void *alpha, const void *Ap,
-                 const void *X, const int incX,
-                 const void *beta, void *Y, const int incY);
-void cblas_zgeru(const enum CBLAS_ORDER Order, const int M, const int N,
-                 const void *alpha, const void *X, const int incX,
-                 const void *Y, const int incY, void *A, const int lda);
-void cblas_zgerc(const enum CBLAS_ORDER Order, const int M, const int N,
-                 const void *alpha, const void *X, const int incX,
-                 const void *Y, const int incY, void *A, const int lda);
-void cblas_zher(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
-                const int N, const double alpha, const void *X, const int incX,
-                void *A, const int lda);
-void cblas_zhpr(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
-                const int N, const double alpha, const void *X,
-                const int incX, void *A);
-void cblas_zher2(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo, const int N,
-                const void *alpha, const void *X, const int incX,
-                const void *Y, const int incY, void *A, const int lda);
-void cblas_zhpr2(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo, const int N,
-                const void *alpha, const void *X, const int incX,
-                const void *Y, const int incY, void *Ap);
-
-/*
- * ===========================================================================
- * Prototypes for level 3 BLAS
- * ===========================================================================
- */
-
-/*
- * Routines with standard 4 prefixes (S, D, C, Z)
- */
-void cblas_sgemm(const enum CBLAS_ORDER Order, const enum CBLAS_TRANSPOSE TransA,
-                 const enum CBLAS_TRANSPOSE TransB, const int M, const int N,
-                 const int K, const float alpha, const float *A,
-                 const int lda, const float *B, const int ldb,
-                 const float beta, float *C, const int ldc);
-void cblas_ssymm(const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side,
-                 const enum CBLAS_UPLO Uplo, const int M, const int N,
-                 const float alpha, const float *A, const int lda,
-                 const float *B, const int ldb, const float beta,
-                 float *C, const int ldc);
-void cblas_ssyrk(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
-                 const enum CBLAS_TRANSPOSE Trans, const int N, const int K,
-                 const float alpha, const float *A, const int lda,
-                 const float beta, float *C, const int ldc);
-void cblas_ssyr2k(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
-                  const enum CBLAS_TRANSPOSE Trans, const int N, const int K,
-                  const float alpha, const float *A, const int lda,
-                  const float *B, const int ldb, const float beta,
-                  float *C, const int ldc);
-void cblas_strmm(const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side,
-                 const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE TransA,
-                 const enum CBLAS_DIAG Diag, const int M, const int N,
-                 const float alpha, const float *A, const int lda,
-                 float *B, const int ldb);
-void cblas_strsm(const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side,
-                 const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE TransA,
-                 const enum CBLAS_DIAG Diag, const int M, const int N,
-                 const float alpha, const float *A, const int lda,
-                 float *B, const int ldb);
-
-void cblas_dgemm(const enum CBLAS_ORDER Order, const enum CBLAS_TRANSPOSE TransA,
-                 const enum CBLAS_TRANSPOSE TransB, const int M, const int N,
-                 const int K, const double alpha, const double *A,
-                 const int lda, const double *B, const int ldb,
-                 const double beta, double *C, const int ldc);
-void cblas_dsymm(const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side,
-                 const enum CBLAS_UPLO Uplo, const int M, const int N,
-                 const double alpha, const double *A, const int lda,
-                 const double *B, const int ldb, const double beta,
-                 double *C, const int ldc);
-void cblas_dsyrk(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
-                 const enum CBLAS_TRANSPOSE Trans, const int N, const int K,
-                 const double alpha, const double *A, const int lda,
-                 const double beta, double *C, const int ldc);
-void cblas_dsyr2k(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
-                  const enum CBLAS_TRANSPOSE Trans, const int N, const int K,
-                  const double alpha, const double *A, const int lda,
-                  const double *B, const int ldb, const double beta,
-                  double *C, const int ldc);
-void cblas_dtrmm(const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side,
-                 const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE TransA,
-                 const enum CBLAS_DIAG Diag, const int M, const int N,
-                 const double alpha, const double *A, const int lda,
-                 double *B, const int ldb);
-void cblas_dtrsm(const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side,
-                 const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE TransA,
-                 const enum CBLAS_DIAG Diag, const int M, const int N,
-                 const double alpha, const double *A, const int lda,
-                 double *B, const int ldb);
-
-void cblas_cgemm(const enum CBLAS_ORDER Order, const enum CBLAS_TRANSPOSE TransA,
-                 const enum CBLAS_TRANSPOSE TransB, const int M, const int N,
-                 const int K, const void *alpha, const void *A,
-                 const int lda, const void *B, const int ldb,
-                 const void *beta, void *C, const int ldc);
-void cblas_csymm(const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side,
-                 const enum CBLAS_UPLO Uplo, const int M, const int N,
-                 const void *alpha, const void *A, const int lda,
-                 const void *B, const int ldb, const void *beta,
-                 void *C, const int ldc);
-void cblas_csyrk(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
-                 const enum CBLAS_TRANSPOSE Trans, const int N, const int K,
-                 const void *alpha, const void *A, const int lda,
-                 const void *beta, void *C, const int ldc);
-void cblas_csyr2k(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
-                  const enum CBLAS_TRANSPOSE Trans, const int N, const int K,
-                  const void *alpha, const void *A, const int lda,
-                  const void *B, const int ldb, const void *beta,
-                  void *C, const int ldc);
-void cblas_ctrmm(const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side,
-                 const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE TransA,
-                 const enum CBLAS_DIAG Diag, const int M, const int N,
-                 const void *alpha, const void *A, const int lda,
-                 void *B, const int ldb);
-void cblas_ctrsm(const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side,
-                 const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE TransA,
-                 const enum CBLAS_DIAG Diag, const int M, const int N,
-                 const void *alpha, const void *A, const int lda,
-                 void *B, const int ldb);
-
-void cblas_zgemm(const enum CBLAS_ORDER Order, const enum CBLAS_TRANSPOSE TransA,
-                 const enum CBLAS_TRANSPOSE TransB, const int M, const int N,
-                 const int K, const void *alpha, const void *A,
-                 const int lda, const void *B, const int ldb,
-                 const void *beta, void *C, const int ldc);
-void cblas_zsymm(const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side,
-                 const enum CBLAS_UPLO Uplo, const int M, const int N,
-                 const void *alpha, const void *A, const int lda,
-                 const void *B, const int ldb, const void *beta,
-                 void *C, const int ldc);
-void cblas_zsyrk(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
-                 const enum CBLAS_TRANSPOSE Trans, const int N, const int K,
-                 const void *alpha, const void *A, const int lda,
-                 const void *beta, void *C, const int ldc);
-void cblas_zsyr2k(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
-                  const enum CBLAS_TRANSPOSE Trans, const int N, const int K,
-                  const void *alpha, const void *A, const int lda,
-                  const void *B, const int ldb, const void *beta,
-                  void *C, const int ldc);
-void cblas_ztrmm(const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side,
-                 const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE TransA,
-                 const enum CBLAS_DIAG Diag, const int M, const int N,
-                 const void *alpha, const void *A, const int lda,
-                 void *B, const int ldb);
-void cblas_ztrsm(const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side,
-                 const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE TransA,
-                 const enum CBLAS_DIAG Diag, const int M, const int N,
-                 const void *alpha, const void *A, const int lda,
-                 void *B, const int ldb);
-
-
-/*
- * Routines with prefixes C and Z only
- */
-void cblas_chemm(const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side,
-                 const enum CBLAS_UPLO Uplo, const int M, const int N,
-                 const void *alpha, const void *A, const int lda,
-                 const void *B, const int ldb, const void *beta,
-                 void *C, const int ldc);
-void cblas_cherk(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
-                 const enum CBLAS_TRANSPOSE Trans, const int N, const int K,
-                 const float alpha, const void *A, const int lda,
-                 const float beta, void *C, const int ldc);
-void cblas_cher2k(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
-                  const enum CBLAS_TRANSPOSE Trans, const int N, const int K,
-                  const void *alpha, const void *A, const int lda,
-                  const void *B, const int ldb, const float beta,
-                  void *C, const int ldc);
-void cblas_zhemm(const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side,
-                 const enum CBLAS_UPLO Uplo, const int M, const int N,
-                 const void *alpha, const void *A, const int lda,
-                 const void *B, const int ldb, const void *beta,
-                 void *C, const int ldc);
-void cblas_zherk(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
-                 const enum CBLAS_TRANSPOSE Trans, const int N, const int K,
-                 const double alpha, const void *A, const int lda,
-                 const double beta, void *C, const int ldc);
-void cblas_zher2k(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
-                  const enum CBLAS_TRANSPOSE Trans, const int N, const int K,
-                  const void *alpha, const void *A, const int lda,
-                  const void *B, const int ldb, const double beta,
-                  void *C, const int ldc);
-
-int cblas_errprn(int ierr, int info, char *form, ...);
-
-#endif  /* end #ifdef CBLAS_ENUM_ONLY */
-#endif
--- a/songparts/build/linux/amd64/clapack.h	Wed Jun 12 19:23:03 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,149 +0,0 @@
-/*
- *             Automatically Tuned Linear Algebra Software v3.8.0
- *                    (C) Copyright 1999 R. Clint Whaley
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *   1. Redistributions of source code must retain the above copyright
- *      notice, this list of conditions and the following disclaimer.
- *   2. Redistributions in binary form must reproduce the above copyright
- *      notice, this list of conditions, and the following disclaimer in the
- *      documentation and/or other materials provided with the distribution.
- *   3. The name of the ATLAS group or the names of its contributers may
- *      not be used to endorse or promote products derived from this
- *      software without specific written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ATLAS GROUP OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- *
- */
-
-#ifndef CLAPACK_H
-
-#define CLAPACK_H
-#include "cblas.h"
-
-#ifndef ATLAS_ORDER
-   #define ATLAS_ORDER CBLAS_ORDER
-#endif
-#ifndef ATLAS_UPLO
-   #define ATLAS_UPLO CBLAS_UPLO
-#endif
-#ifndef ATLAS_DIAG
-   #define ATLAS_DIAG CBLAS_DIAG
-#endif
-int clapack_sgesv(const enum CBLAS_ORDER Order, const int N, const int NRHS,
-                  float *A, const int lda, int *ipiv,
-                  float *B, const int ldb);
-int clapack_sgetrf(const enum CBLAS_ORDER Order, const int M, const int N,
-                   float *A, const int lda, int *ipiv);
-int clapack_sgetrs
-   (const enum CBLAS_ORDER Order, const enum CBLAS_TRANSPOSE Trans,
-    const int N, const int NRHS, const float *A, const int lda,
-    const int *ipiv, float *B, const int ldb);
-int clapack_sgetri(const enum CBLAS_ORDER Order, const int N, float *A,
-                   const int lda, const int *ipiv);
-int clapack_sposv(const enum ATLAS_ORDER Order, const enum ATLAS_UPLO Uplo,
-                  const int N, const int NRHS, float *A, const int lda,
-                  float *B, const int ldb);
-int clapack_spotrf(const enum ATLAS_ORDER Order, const enum ATLAS_UPLO Uplo,
-                   const int N, float *A, const int lda);
-int clapack_spotrs(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
-                   const int N, const int NRHS, const float *A, const int lda,
-                   float *B, const int ldb);
-int clapack_spotri(const enum ATLAS_ORDER Order, const enum ATLAS_UPLO Uplo,
-                   const int N, float *A, const int lda);
-int clapack_slauum(const enum ATLAS_ORDER Order, const enum ATLAS_UPLO Uplo,
-                   const int N, float *A, const int lda);
-int clapack_strtri(const enum ATLAS_ORDER Order,const enum ATLAS_UPLO Uplo,
-                  const enum ATLAS_DIAG Diag,const int N, float *A, const int lda);
-
-int clapack_dgesv(const enum CBLAS_ORDER Order, const int N, const int NRHS,
-                  double *A, const int lda, int *ipiv,
-                  double *B, const int ldb);
-int clapack_dgetrf(const enum CBLAS_ORDER Order, const int M, const int N,
-                   double *A, const int lda, int *ipiv);
-int clapack_dgetrs
-   (const enum CBLAS_ORDER Order, const enum CBLAS_TRANSPOSE Trans,
-    const int N, const int NRHS, const double *A, const int lda,
-    const int *ipiv, double *B, const int ldb);
-int clapack_dgetri(const enum CBLAS_ORDER Order, const int N, double *A,
-                   const int lda, const int *ipiv);
-int clapack_dposv(const enum ATLAS_ORDER Order, const enum ATLAS_UPLO Uplo,
-                  const int N, const int NRHS, double *A, const int lda,
-                  double *B, const int ldb);
-int clapack_dpotrf(const enum ATLAS_ORDER Order, const enum ATLAS_UPLO Uplo,
-                   const int N, double *A, const int lda);
-int clapack_dpotrs(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
-                   const int N, const int NRHS, const double *A, const int lda,
-                   double *B, const int ldb);
-int clapack_dpotri(const enum ATLAS_ORDER Order, const enum ATLAS_UPLO Uplo,
-                   const int N, double *A, const int lda);
-int clapack_dlauum(const enum ATLAS_ORDER Order, const enum ATLAS_UPLO Uplo,
-                   const int N, double *A, const int lda);
-int clapack_dtrtri(const enum ATLAS_ORDER Order,const enum ATLAS_UPLO Uplo,
-                  const enum ATLAS_DIAG Diag,const int N, double *A, const int lda);
-
-int clapack_cgesv(const enum CBLAS_ORDER Order, const int N, const int NRHS,
-                  void *A, const int lda, int *ipiv,
-                  void *B, const int ldb);
-int clapack_cgetrf(const enum CBLAS_ORDER Order, const int M, const int N,
-                   void *A, const int lda, int *ipiv);
-int clapack_cgetrs
-   (const enum CBLAS_ORDER Order, const enum CBLAS_TRANSPOSE Trans,
-    const int N, const int NRHS, const void *A, const int lda,
-    const int *ipiv, void *B, const int ldb);
-int clapack_cgetri(const enum CBLAS_ORDER Order, const int N, void *A,
-                   const int lda, const int *ipiv);
-int clapack_cposv(const enum ATLAS_ORDER Order, const enum ATLAS_UPLO Uplo,
-                  const int N, const int NRHS, void *A, const int lda,
-                  void *B, const int ldb);
-int clapack_cpotrf(const enum ATLAS_ORDER Order, const enum ATLAS_UPLO Uplo,
-                   const int N, void *A, const int lda);
-int clapack_cpotrs(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
-                   const int N, const int NRHS, const void *A, const int lda,
-                   void *B, const int ldb);
-int clapack_cpotri(const enum ATLAS_ORDER Order, const enum ATLAS_UPLO Uplo,
-                   const int N, void *A, const int lda);
-int clapack_clauum(const enum ATLAS_ORDER Order, const enum ATLAS_UPLO Uplo,
-                   const int N, void *A, const int lda);
-int clapack_ctrtri(const enum ATLAS_ORDER Order,const enum ATLAS_UPLO Uplo,
-                  const enum ATLAS_DIAG Diag,const int N, void *A, const int lda);
-
-int clapack_zgesv(const enum CBLAS_ORDER Order, const int N, const int NRHS,
-                  void *A, const int lda, int *ipiv,
-                  void *B, const int ldb);
-int clapack_zgetrf(const enum CBLAS_ORDER Order, const int M, const int N,
-                   void *A, const int lda, int *ipiv);
-int clapack_zgetrs
-   (const enum CBLAS_ORDER Order, const enum CBLAS_TRANSPOSE Trans,
-    const int N, const int NRHS, const void *A, const int lda,
-    const int *ipiv, void *B, const int ldb);
-int clapack_zgetri(const enum CBLAS_ORDER Order, const int N, void *A,
-                   const int lda, const int *ipiv);
-int clapack_zposv(const enum ATLAS_ORDER Order, const enum ATLAS_UPLO Uplo,
-                  const int N, const int NRHS, void *A, const int lda,
-                  void *B, const int ldb);
-int clapack_zpotrf(const enum ATLAS_ORDER Order, const enum ATLAS_UPLO Uplo,
-                   const int N, void *A, const int lda);
-int clapack_zpotrs(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
-                   const int N, const int NRHS, const void *A, const int lda,
-                   void *B, const int ldb);
-int clapack_zpotri(const enum ATLAS_ORDER Order, const enum ATLAS_UPLO Uplo,
-                   const int N, void *A, const int lda);
-int clapack_zlauum(const enum ATLAS_ORDER Order, const enum ATLAS_UPLO Uplo,
-                   const int N, void *A, const int lda);
-int clapack_ztrtri(const enum ATLAS_ORDER Order,const enum ATLAS_UPLO Uplo,
-                  const enum ATLAS_DIAG Diag,const int N, void *A, const int lda);
-
-#endif
Binary file songparts/build/linux/amd64/libatlas.a has changed
Binary file songparts/build/linux/amd64/libcblas.a has changed
Binary file songparts/build/linux/amd64/libf77blas.a has changed
Binary file songparts/build/linux/amd64/liblapack.a has changed
Binary file songparts/build/mingw32/atlas.lib has changed
Binary file songparts/build/mingw32/cblas.lib has changed
Binary file songparts/build/mingw32/f77blas.lib has changed
--- a/songparts/build/mingw32/g2cstubs.c	Wed Jun 12 19:23:03 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,5 +0,0 @@
-
-void s_wsfe() { }
-void do_fio() { }
-void e_wsfe() { }
-void s_stop() { }
Binary file songparts/build/mingw32/g2cstubs.lib has changed
Binary file songparts/build/mingw32/lapack.lib has changed
--- a/songparts/g2cstubs.c	Wed Jun 12 19:23:03 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,5 +0,0 @@
-
-void s_wsfe() { }
-void do_fio() { }
-void e_wsfe() { }
-void s_stop() { }
--- a/songparts/libmain.cpp	Wed Jun 12 19:23:03 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
-/* -*- c-basic-offset: 4 indent-tabs-mode: nil -*-  vi:set ts=8 sts=4 sw=4: */
-
-/*
-    QM Vamp Plugin Set
-
-    Centre for Digital Music, Queen Mary, University of London.
-
-    This program is free software; you can redistribute it and/or
-    modify it under the terms of the GNU General Public License as
-    published by the Free Software Foundation; either version 2 of the
-    License, or (at your option) any later version.  See the file
-    COPYING included with this distribution for more information.
-*/
-
-#include <vamp/vamp.h>
-#include <vamp-sdk/PluginAdapter.h>
-
-#include "SongParts.h"
-
-static Vamp::PluginAdapter<SongPartitioner> songPartitionerAdapter;
-
-const VampPluginDescriptor *vampGetPluginDescriptor(unsigned int vampApiVersion,
-                                                    unsigned int index)
-{
-    if (vampApiVersion < 1) return 0;
-
-    switch (index) {
-    case 0: return songPartitionerAdapter.getDescriptor();
-    default: return 0;
-    }
-}
-
--- a/songparts/songpartitioner.cat	Wed Jun 12 19:23:03 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-vamp:songpartitioner:qm-songpartitioner::Classification
--- a/songparts/songpartitioner.n3	Wed Jun 12 19:23:03 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,148 +0,0 @@
-@prefix rdfs:     <http://www.w3.org/2000/01/rdf-schema#> .
-@prefix xsd:      <http://www.w3.org/2001/XMLSchema#> .
-@prefix vamp:     <http://purl.org/ontology/vamp/> .
-@prefix plugbase: <http://vamp-plugins.org/rdf/plugins/songpartitioner#> .
-@prefix owl:      <http://www.w3.org/2002/07/owl#> .
-@prefix dc:       <http://purl.org/dc/elements/1.1/> .
-@prefix af:       <http://purl.org/ontology/af/> .
-@prefix foaf:     <http://xmlns.com/foaf/0.1/> .
-@prefix cc:       <http://web.resource.org/cc/> .
-@prefix :         <#> .
-
-<>  a   vamp:PluginDescription ;
-    foaf:maker          <http://www.vamp-plugins.org/doap.rdf#template-generator> ;
-    foaf:primaryTopic   <http://vamp-plugins.org/rdf/plugins/songpartitioner> .
-
-:songpartitioner a  vamp:PluginLibrary ;
-    vamp:identifier "songpartitioner"  ; 
-    vamp:available_plugin plugbase:qm-songpartitioner 
-    .
-
-plugbase:qm-songpartitioner a   vamp:Plugin ;
-    dc:title              "Song Partitioner" ;
-    vamp:name             "Song Partitioner" ;
-    dc:description        """Estimate contiguous segments pertaining to song parts such as verse and chorus.""" ;
-    foaf:maker            [ foaf:name "Queen Mary, University of London" ] ;
-    dc:rights             """Plugin by Matthew Davies, Christian Landone, Chris Cannam, Matthias Mauch and Massimiliano Zanoni  Copyright (c) 2006-2012 QMUL - All Rights Reserved""" ;
-    cc:license            <www.gnu.org/licenses/gpl-2.0.html> ; 
-    vamp:identifier       "qm-songpartitioner" ;
-    vamp:vamp_API_version vamp:api_version_2 ;
-    owl:versionInfo       "2" ;
-    vamp:input_domain     vamp:TimeDomain ;
-
-    vamp:parameter   plugbase:qm-songpartitioner_param_bpb ;
-
-    vamp:output      plugbase:qm-songpartitioner_output_beats ;
-    vamp:output      plugbase:qm-songpartitioner_output_bars ;
-    vamp:output      plugbase:qm-songpartitioner_output_beatcounts ;
-    vamp:output      plugbase:qm-songpartitioner_output_beatsd ;
-    vamp:output      plugbase:qm-songpartitioner_output_logscalespec ;
-    vamp:output      plugbase:qm-songpartitioner_output_bothchroma ;
-    vamp:output      plugbase:qm-songpartitioner_output_qchromafw ;
-    vamp:output      plugbase:qm-songpartitioner_output_qchroma ;
-    vamp:output      plugbase:qm-songpartitioner_output_segmentation ;
-    .
-plugbase:qm-songpartitioner_param_bpb a  vamp:QuantizedParameter ;
-    vamp:identifier     "bpb" ;
-    dc:title            "Beats per Bar" ;
-    dc:format           "" ;
-    vamp:min_value       2 ;
-    vamp:max_value       16 ;
-    vamp:unit           "" ;
-    vamp:quantize_step   1  ;
-    vamp:default_value   4 ;
-    vamp:value_names     ();
-    .
-plugbase:qm-songpartitioner_output_beats a  vamp:SparseOutput ;
-    vamp:identifier       "beats" ;
-    dc:title              "Beats" ;
-    dc:description        """Beat locations labelled with metrical position"""  ;
-    vamp:fixed_bin_count  "true" ;
-    vamp:unit             "" ;
-    vamp:bin_count        0 ;
-    vamp:sample_type      vamp:VariableSampleRate ;
-    vamp:sample_rate      86.1326 ;
-    vamp:computes_event_type   af:Beat
-    .
-plugbase:qm-songpartitioner_output_bars a  vamp:SparseOutput ;
-    vamp:identifier       "bars" ;
-    dc:title              "Bars" ;
-    dc:description        """Bar locations"""  ;
-    vamp:fixed_bin_count  "true" ;
-    vamp:unit             "" ;
-    vamp:bin_count        0 ;
-    vamp:sample_type      vamp:VariableSampleRate ;
-    vamp:sample_rate      86.1326 
-    .
-plugbase:qm-songpartitioner_output_beatcounts a  vamp:SparseOutput ;
-    vamp:identifier       "beatcounts" ;
-    dc:title              "Beat Count" ;
-    dc:description        """Beat counter function"""  ;
-    vamp:fixed_bin_count  "true" ;
-    vamp:unit             "" ;
-    vamp:bin_count        1 ;
-    vamp:sample_type      vamp:VariableSampleRate ;
-    vamp:sample_rate      86.1326 
-    .
-plugbase:qm-songpartitioner_output_beatsd a  vamp:SparseOutput ;
-    vamp:identifier       "beatsd" ;
-    dc:title              "Beat Spectral Difference" ;
-    dc:description        """Beat spectral difference function used for bar-line detection"""  ;
-    vamp:fixed_bin_count  "true" ;
-    vamp:unit             "" ;
-    vamp:bin_count        1 ;
-    vamp:sample_type      vamp:VariableSampleRate ;
-    vamp:sample_rate      86.1326 
-    .
-plugbase:qm-songpartitioner_output_logscalespec a  vamp:DenseOutput ;
-    vamp:identifier       "logscalespec" ;
-    dc:title              "Log-Frequency Spectrum" ;
-    dc:description        """Spectrum with linear frequency on a log scale."""  ;
-    vamp:fixed_bin_count  "true" ;
-    vamp:unit             "" ;
-    vamp:bin_count        256 
-    .
-plugbase:qm-songpartitioner_output_bothchroma a  vamp:DenseOutput ;
-    vamp:identifier       "bothchroma" ;
-    dc:title              "Chromagram and Bass Chromagram" ;
-    dc:description        """Tuning-adjusted chromagram and bass chromagram (stacked on top of each other) from NNLS approximate transcription."""  ;
-    vamp:fixed_bin_count  "true" ;
-    vamp:unit             "" ;
-    vamp:bin_count        24 ;
-    vamp:computes_signal_type  af:Chromagram
-    .
-plugbase:qm-songpartitioner_output_qchromafw a  vamp:DenseOutput ;
-    vamp:identifier       "qchromafw" ;
-    dc:title              "Pseudo-Quantised Chromagram and Bass Chromagram" ;
-    dc:description        """Pseudo-Quantised Chromagram and Bass Chromagram (frames between two beats are identical)."""  ;
-    vamp:fixed_bin_count  "true" ;
-    vamp:unit             "" ;
-    vamp:bin_count        24 ;
-    vamp:computes_signal_type  af:Chromagram
-    .
-plugbase:qm-songpartitioner_output_qchroma a  vamp:DenseOutput ;
-    vamp:identifier       "qchroma" ;
-    dc:title              "Quantised Chromagram and Bass Chromagram" ;
-    dc:description        """Quantised Chromagram and Bass Chromagram."""  ;
-    vamp:fixed_bin_count  "true" ;
-    vamp:unit             "" ;
-    vamp:bin_count        24 ;
-    vamp:computes_signal_type  af:Chromagram
-    .
-plugbase:qm-songpartitioner_output_segmentation a  vamp:SparseOutput ;
-    vamp:identifier       "segmentation" ;
-    dc:title              "Segmentation" ;
-    dc:description        """Segmentation"""  ;
-    vamp:fixed_bin_count  "true" ;
-    vamp:unit             "segment-type" ;
-    a                     vamp:QuantizedOutput ;
-    vamp:quantize_step    1  ;
-    a                 vamp:KnownExtentsOutput ;
-    vamp:min_value    1  ;
-    vamp:max_value    5  ;
-    vamp:bin_count        1 ;
-    vamp:sample_type      vamp:VariableSampleRate ;
-    vamp:sample_rate      86.1326 ;
-    vamp:computes_event_type  af:StructuralSegment
-    .
-
--- a/songparts/vamp-plugin.list	Wed Jun 12 19:23:03 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-_vampGetPluginDescriptor
--- a/songparts/vamp-plugin.map	Wed Jun 12 19:23:03 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,4 +0,0 @@
-{
-	global: vampGetPluginDescriptor;
-	local: *;
-};