mathieu@0
|
1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
|
mathieu@0
|
2
|
mathieu@0
|
3 /*
|
mathieu@2
|
4 Calcium Signal Analyser Vamp Plugin
|
mathieu@0
|
5
|
mathieu@2
|
6 Transient detection and characterisation for calcium signals.
|
mathieu@0
|
7
|
mathieu@2
|
8 Centre for Digital Music, Queen Mary University of London.
|
mathieu@2
|
9 This file copyright 2010-2011 Mathieu Barthet and QMUL.
|
mathieu@0
|
10
|
mathieu@2
|
11 Based on the QM Vamp note onset detector plugin by Christian
|
mathieu@2
|
12 Landone, Chris Duxbury, and Juan Pablo Bello.
|
mathieu@0
|
13
|
mathieu@2
|
14 This program is free software; you can redistribute it and/or
|
mathieu@2
|
15 modify it under the terms of the GNU General Public License as
|
mathieu@2
|
16 published by the Free Software Foundation; either version 2 of the
|
mathieu@2
|
17 License, or (at your option) any later version. See the file
|
mathieu@2
|
18 COPYING included with this distribution for more information.
|
mathieu@0
|
19
|
mathieu@2
|
20 Version: 2
|
mathieu@2
|
21 */
|
mathieu@0
|
22
|
mathieu@0
|
23 #ifndef _CALCIUM_SIGNAL_ANALSYER_PLUGIN_H_
|
mathieu@0
|
24 #define _CALCIUM_SIGNAL_ANALSYER_PLUGIN_H_
|
mathieu@0
|
25
|
mathieu@0
|
26 #include <vamp-sdk/Plugin.h>
|
mathieu@0
|
27
|
mathieu@0
|
28 using std::vector;
|
mathieu@0
|
29
|
mathieu@0
|
30 class CalciumSignalAnalyser : public Vamp::Plugin
|
mathieu@0
|
31 {
|
mathieu@0
|
32 public:
|
mathieu@0
|
33 CalciumSignalAnalyser(float inputSampleRate);
|
mathieu@0
|
34 virtual ~CalciumSignalAnalyser();
|
mathieu@0
|
35
|
mathieu@0
|
36 bool initialise(size_t channels, size_t stepSize, size_t blockSize);
|
mathieu@0
|
37 void reset();
|
mathieu@0
|
38
|
mathieu@0
|
39 InputDomain getInputDomain() const { return TimeDomain; } //input data are passed to the plugin in the time domain
|
mathieu@0
|
40
|
mathieu@0
|
41 std::string getIdentifier() const;
|
mathieu@0
|
42 std::string getName() const;
|
mathieu@0
|
43 std::string getDescription() const;
|
mathieu@0
|
44 std::string getMaker() const;
|
mathieu@0
|
45 int getPluginVersion() const;
|
mathieu@0
|
46 std::string getCopyright() const;
|
mathieu@0
|
47
|
mathieu@0
|
48 ParameterList getParameterDescriptors() const;
|
mathieu@0
|
49 float getParameter(std::string) const;
|
mathieu@0
|
50 void setParameter(std::string, float);
|
mathieu@0
|
51
|
mathieu@0
|
52 ProgramList getPrograms() const;
|
mathieu@0
|
53 std::string getCurrentProgram() const;
|
mathieu@0
|
54 void selectProgram(std::string program);
|
mathieu@0
|
55
|
mathieu@0
|
56 size_t getPreferredStepSize() const;
|
mathieu@0
|
57 size_t getPreferredBlockSize() const;
|
mathieu@0
|
58 size_t getMinChannelCount() const;
|
mathieu@0
|
59 size_t getMaxChannelCount() const;
|
mathieu@0
|
60
|
mathieu@0
|
61 OutputList getOutputDescriptors() const;
|
mathieu@0
|
62
|
mathieu@0
|
63 FeatureSet process(const float *const *inputBuffers,
|
mathieu@0
|
64 Vamp::RealTime timestamp);
|
mathieu@0
|
65
|
mathieu@0
|
66 FeatureSet getRemainingFeatures();
|
mathieu@0
|
67
|
mathieu@0
|
68 protected:
|
mathieu@0
|
69
|
mathieu@0
|
70 float m_inputSampleRate;
|
mathieu@0
|
71 size_t m_blockSize;
|
mathieu@0
|
72 size_t m_stepSize;
|
mathieu@0
|
73
|
mathieu@0
|
74 vector<float> data;
|
mathieu@0
|
75 vector<Vamp::RealTime> time;
|
mathieu@0
|
76
|
mathieu@0
|
77 float m_sensitivity;
|
mathieu@0
|
78 float m_delta;
|
mathieu@2
|
79 float m_mfwindur;
|
mathieu@0
|
80
|
mathieu@0
|
81 int processcounter;
|
mathieu@0
|
82 };
|
mathieu@0
|
83
|
mathieu@0
|
84 #endif
|