To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.

Statistics Download as Zip
| Branch: | Tag: | Revision:

root / BeatRootVampPlugin.h @ 23:633ec097fa56

History | View | Annotate | Download (1.93 KB)

1
/* -*- c-basic-offset: 4 indent-tabs-mode: nil -*-  vi:set ts=8 sts=4 sw=4: */
2

    
3
/*
4
    Vamp feature extraction plugin for the BeatRoot beat tracker.
5

6
    Centre for Digital Music, Queen Mary, University of London.
7
    This file copyright 2011 Simon Dixon, Chris Cannam and QMUL.
8
    
9
    This program is free software; you can redistribute it and/or
10
    modify it under the terms of the GNU General Public License as
11
    published by the Free Software Foundation; either version 2 of the
12
    License, or (at your option) any later version.  See the file
13
    COPYING included with this distribution for more information.
14
*/
15

    
16
#ifndef _BEATROOT_VAMP_PLUGIN_H_
17
#define _BEATROOT_VAMP_PLUGIN_H_
18

    
19
#include "Agent.h"
20

    
21
#include <vamp-sdk/Plugin.h>
22

    
23
using std::string;
24

    
25
class BeatRootProcessor;
26

    
27
class BeatRootVampPlugin : public Vamp::Plugin
28
{
29
public:
30
    BeatRootVampPlugin(float inputSampleRate);
31
    virtual ~BeatRootVampPlugin();
32

    
33
    string getIdentifier() const;
34
    string getName() const;
35
    string getDescription() const;
36
    string getMaker() const;
37
    int getPluginVersion() const;
38
    string getCopyright() const;
39

    
40
    InputDomain getInputDomain() const;
41
    size_t getPreferredBlockSize() const;
42
    size_t getPreferredStepSize() const;
43
    size_t getMinChannelCount() const;
44
    size_t getMaxChannelCount() const;
45

    
46
    ParameterList getParameterDescriptors() const;
47
    float getParameter(string identifier) const;
48
    void setParameter(string identifier, float value);
49

    
50
    ProgramList getPrograms() const;
51
    string getCurrentProgram() const;
52
    void selectProgram(string name);
53

    
54
    OutputList getOutputDescriptors() const;
55

    
56
    bool initialise(size_t channels, size_t stepSize, size_t blockSize);
57
    void reset();
58

    
59
    FeatureSet process(const float *const *inputBuffers,
60
                       Vamp::RealTime timestamp);
61

    
62
    FeatureSet getRemainingFeatures();
63

    
64
protected:
65
    BeatRootProcessor *m_processor;
66
    AgentParameters m_parameters;
67
};
68

    
69

    
70

    
71
#endif