mathieu@0: /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ mathieu@0: mathieu@0: /* mathieu@2: Calcium Signal Analyser Vamp Plugin mathieu@0: mathieu@2: Transient detection and characterisation for calcium signals. mathieu@0: mathieu@2: Centre for Digital Music, Queen Mary University of London. mathieu@2: This file copyright 2010-2011 Mathieu Barthet and QMUL. mathieu@0: mathieu@2: Based on the QM Vamp note onset detector plugin by Christian mathieu@2: Landone, Chris Duxbury, and Juan Pablo Bello. mathieu@0: mathieu@2: This program is free software; you can redistribute it and/or mathieu@2: modify it under the terms of the GNU General Public License as mathieu@2: published by the Free Software Foundation; either version 2 of the mathieu@2: License, or (at your option) any later version. See the file mathieu@2: COPYING included with this distribution for more information. mathieu@0: mathieu@2: Version: 2 mathieu@2: */ mathieu@0: mathieu@0: #ifndef _CALCIUM_SIGNAL_ANALSYER_PLUGIN_H_ mathieu@0: #define _CALCIUM_SIGNAL_ANALSYER_PLUGIN_H_ mathieu@0: mathieu@0: #include mathieu@0: mathieu@0: using std::vector; mathieu@0: mathieu@0: class CalciumSignalAnalyser : public Vamp::Plugin mathieu@0: { mathieu@0: public: mathieu@0: CalciumSignalAnalyser(float inputSampleRate); mathieu@0: virtual ~CalciumSignalAnalyser(); mathieu@0: mathieu@0: bool initialise(size_t channels, size_t stepSize, size_t blockSize); mathieu@0: void reset(); mathieu@0: mathieu@0: InputDomain getInputDomain() const { return TimeDomain; } //input data are passed to the plugin in the time domain mathieu@0: mathieu@0: std::string getIdentifier() const; mathieu@0: std::string getName() const; mathieu@0: std::string getDescription() const; mathieu@0: std::string getMaker() const; mathieu@0: int getPluginVersion() const; mathieu@0: std::string getCopyright() const; mathieu@0: mathieu@0: ParameterList getParameterDescriptors() const; mathieu@0: float getParameter(std::string) const; mathieu@0: void setParameter(std::string, float); mathieu@0: mathieu@0: ProgramList getPrograms() const; mathieu@0: std::string getCurrentProgram() const; mathieu@0: void selectProgram(std::string program); mathieu@0: mathieu@0: size_t getPreferredStepSize() const; mathieu@0: size_t getPreferredBlockSize() const; mathieu@0: size_t getMinChannelCount() const; mathieu@0: size_t getMaxChannelCount() const; mathieu@0: mathieu@0: OutputList getOutputDescriptors() const; mathieu@0: mathieu@0: FeatureSet process(const float *const *inputBuffers, mathieu@0: Vamp::RealTime timestamp); mathieu@0: mathieu@0: FeatureSet getRemainingFeatures(); mathieu@0: mathieu@0: protected: mathieu@0: mathieu@0: float m_inputSampleRate; mathieu@0: size_t m_blockSize; mathieu@0: size_t m_stepSize; mathieu@0: mathieu@0: vector data; mathieu@0: vector time; mathieu@0: mathieu@0: float m_sensitivity; mathieu@0: float m_delta; mathieu@2: float m_mfwindur; mathieu@0: mathieu@0: int processcounter; mathieu@0: }; mathieu@0: mathieu@0: #endif