Mercurial > hg > nnls-chroma
annotate Chordino.h @ 89:7af5312e66f8 matthiasm-plugin
new boost N parameter in chordino, chord dictionary loaded on initialisation (not construction) of plugin
author | Matthias Mauch <mail@matthiasmauch.net> |
---|---|
date | Wed, 01 Dec 2010 23:08:55 +0900 |
parents | e5c16976513d |
children | 99b87ce4bb70 |
rev | line source |
---|---|
Chris@23 | 1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ |
matthiasm@0 | 2 |
Chris@35 | 3 /* |
Chris@35 | 4 NNLS-Chroma / Chordino |
matthiasm@0 | 5 |
Chris@35 | 6 Audio feature extraction plugins for chromagram and chord |
Chris@35 | 7 estimation. |
Chris@35 | 8 |
Chris@35 | 9 Centre for Digital Music, Queen Mary University of London. |
Chris@35 | 10 This file copyright 2008-2010 Matthias Mauch and QMUL. |
Chris@35 | 11 |
Chris@35 | 12 This program is free software; you can redistribute it and/or |
Chris@35 | 13 modify it under the terms of the GNU General Public License as |
Chris@35 | 14 published by the Free Software Foundation; either version 2 of the |
Chris@35 | 15 License, or (at your option) any later version. See the file |
Chris@35 | 16 COPYING included with this distribution for more information. |
Chris@35 | 17 */ |
Chris@35 | 18 |
Chris@35 | 19 #ifndef _CHORDINO_ |
Chris@35 | 20 #define _CHORDINO_ |
Chris@35 | 21 |
Chris@35 | 22 #include "NNLSBase.h" |
Chris@35 | 23 |
matthiasm@0 | 24 using namespace std; |
matthiasm@0 | 25 |
matthiasm@0 | 26 |
Chris@35 | 27 class Chordino : public NNLSBase |
matthiasm@0 | 28 { |
matthiasm@0 | 29 public: |
Chris@35 | 30 Chordino(float inputSampleRate); |
Chris@35 | 31 virtual ~Chordino(); |
matthiasm@0 | 32 |
matthiasm@0 | 33 string getIdentifier() const; |
matthiasm@0 | 34 string getName() const; |
matthiasm@0 | 35 string getDescription() const; |
matthiasm@0 | 36 |
matthiasm@50 | 37 ParameterList getParameterDescriptors() const; |
matthiasm@0 | 38 OutputList getOutputDescriptors() const; |
matthiasm@0 | 39 |
Chris@35 | 40 FeatureSet process(const float *const *inputBuffers, |
Chris@35 | 41 Vamp::RealTime timestamp); |
Chris@35 | 42 FeatureSet getRemainingFeatures(); |
Chris@35 | 43 |
matthiasm@0 | 44 bool initialise(size_t channels, size_t stepSize, size_t blockSize); |
matthiasm@0 | 45 void reset(); |
matthiasm@0 | 46 |
matthiasm@0 | 47 protected: |
Chris@35 | 48 mutable int m_outputChords; |
matthiasm@86 | 49 mutable int m_outputChordnotes; |
Chris@35 | 50 mutable int m_outputHarmonicChange; |
matthiasm@86 | 51 vector<float> m_chorddict; |
matthiasm@86 | 52 vector<vector<int> > m_chordnotes; |
matthiasm@86 | 53 vector<string> m_chordnames; |
matthiasm@0 | 54 }; |
matthiasm@0 | 55 |
matthiasm@0 | 56 |
matthiasm@0 | 57 |
matthiasm@0 | 58 #endif |