max@1: /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ max@1: max@1: /* Chris@48: Segmentino max@1: Chris@48: Code by Massimiliano Zanoni and Matthias Mauch Chris@48: Centre for Digital Music, Queen Mary, University of London Chris@48: Chris@48: Copyright 2009-2013 Queen Mary, University of London. max@1: Chris@65: This program is free software: you can redistribute it and/or Chris@65: modify it under the terms of the GNU Affero General Public License Chris@65: as published by the Free Software Foundation, either version 3 of Chris@65: the License, or (at your option) any later version. See the file max@1: COPYING included with this distribution for more information. max@1: */ max@1: Chris@48: #ifndef _SEGMENTINO_PLUGIN_H_ Chris@48: #define _SEGMENTINO_PLUGIN_H_ max@1: max@1: #include max@1: max@1: class BeatTrackerData; max@1: max@1: class ChromaData; max@1: Chris@48: class Segmentino : public Vamp::Plugin max@1: { max@1: public: Chris@48: Segmentino(float inputSampleRate); Chris@48: virtual ~Segmentino(); max@1: max@1: bool initialise(size_t channels, size_t stepSize, size_t blockSize); max@1: void reset(); max@1: max@1: InputDomain getInputDomain() const { return TimeDomain; } max@1: max@1: std::string getIdentifier() const; max@1: std::string getName() const; max@1: std::string getDescription() const; max@1: std::string getMaker() const; max@1: int getPluginVersion() const; max@1: std::string getCopyright() const; max@1: max@1: ParameterList getParameterDescriptors() const; max@1: float getParameter(std::string) const; max@1: void setParameter(std::string, float); max@1: max@1: size_t getPreferredStepSize() const; max@1: size_t getPreferredBlockSize() const; max@1: max@1: OutputList getOutputDescriptors() const; max@1: max@1: FeatureSet process(const float *const *inputBuffers, Vamp::RealTime timestamp); max@1: FeatureSet getRemainingFeatures(); max@1: max@1: protected: max@1: BeatTrackerData *m_d; max@1: ChromaData *m_chromadata; max@1: static float m_stepSecs; Chris@37: static int m_chromaFramesizeFactor; Chris@37: static int m_chromaStepsizeFactor; max@1: int m_bpb; max@1: int m_pluginFrameCount; Chris@16: FeatureSet beatTrack(); Chris@16: FeatureList chromaFeatures(); Chris@16: std::vector beatQuantiser(FeatureList chromagram, FeatureList beats); Chris@14: FeatureList runSegmenter(FeatureList quantisedChromagram); max@1: max@1: mutable int m_beatOutputNumber; max@1: mutable int m_barsOutputNumber; max@1: mutable int m_beatcountsOutputNumber; max@1: mutable int m_beatsdOutputNumber; max@1: mutable int m_logscalespecOutputNumber; max@1: mutable int m_bothchromaOutputNumber; max@1: mutable int m_qchromafwOutputNumber; max@1: mutable int m_qchromaOutputNumber; max@1: mutable int m_segmOutputNumber; max@1: max@1: }; max@1: max@1: max@1: #endif