comparison segmentino/Segmentino.h @ 48:69251e11a913

Rename SongParts/songpartitioner to Segmentino throughout
author Chris Cannam
date Thu, 13 Jun 2013 09:43:01 +0100
parents songparts/SongParts.h@4a92113e9798
children 3d5f8e4593ef
comparison
equal deleted inserted replaced
47:5ead8717a618 48:69251e11a913
1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
2
3 /*
4 Segmentino
5
6 Code by Massimiliano Zanoni and Matthias Mauch
7 Centre for Digital Music, Queen Mary, University of London
8
9 Copyright 2009-2013 Queen Mary, University of London.
10
11 This program is free software; you can redistribute it and/or
12 modify it under the terms of the GNU General Public License as
13 published by the Free Software Foundation; either version 2 of the
14 License, or (at your option) any later version. See the file
15 COPYING included with this distribution for more information.
16 */
17
18 #ifndef _SEGMENTINO_PLUGIN_H_
19 #define _SEGMENTINO_PLUGIN_H_
20
21 #include <vamp-sdk/Plugin.h>
22
23 class BeatTrackerData;
24
25 class ChromaData;
26
27 class Segmentino : public Vamp::Plugin
28 {
29 public:
30 Segmentino(float inputSampleRate);
31 virtual ~Segmentino();
32
33 bool initialise(size_t channels, size_t stepSize, size_t blockSize);
34 void reset();
35
36 InputDomain getInputDomain() const { return TimeDomain; }
37
38 std::string getIdentifier() const;
39 std::string getName() const;
40 std::string getDescription() const;
41 std::string getMaker() const;
42 int getPluginVersion() const;
43 std::string getCopyright() const;
44
45 ParameterList getParameterDescriptors() const;
46 float getParameter(std::string) const;
47 void setParameter(std::string, float);
48
49 size_t getPreferredStepSize() const;
50 size_t getPreferredBlockSize() const;
51
52 OutputList getOutputDescriptors() const;
53
54 FeatureSet process(const float *const *inputBuffers, Vamp::RealTime timestamp);
55 FeatureSet getRemainingFeatures();
56
57 protected:
58 BeatTrackerData *m_d;
59 ChromaData *m_chromadata;
60 static float m_stepSecs;
61 static int m_chromaFramesizeFactor;
62 static int m_chromaStepsizeFactor;
63 int m_bpb;
64 int m_pluginFrameCount;
65 FeatureSet beatTrack();
66 FeatureList chromaFeatures();
67 std::vector<FeatureList> beatQuantiser(FeatureList chromagram, FeatureList beats);
68 FeatureList runSegmenter(FeatureList quantisedChromagram);
69
70 mutable int m_beatOutputNumber;
71 mutable int m_barsOutputNumber;
72 mutable int m_beatcountsOutputNumber;
73 mutable int m_beatsdOutputNumber;
74 mutable int m_logscalespecOutputNumber;
75 mutable int m_bothchromaOutputNumber;
76 mutable int m_qchromafwOutputNumber;
77 mutable int m_qchromaOutputNumber;
78 mutable int m_segmOutputNumber;
79
80 };
81
82
83 #endif