annotate constant-q-cpp/cqvamp.cpp @ 42:36f67ba6f29c
Add Constant-Q plugin build
author |
Chris Cannam <c.cannam@qmul.ac.uk> |
date |
Fri, 10 Mar 2017 15:40:40 +0000 |
parents |
|
children |
ac94242cf562 |
rev |
line source |
c@42
|
1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
|
c@42
|
2
|
c@42
|
3 #include "PiperExport.h"
|
c@42
|
4 #include "CQVamp.h"
|
c@42
|
5 #include "CQChromaVamp.h"
|
c@42
|
6
|
c@42
|
7 static std::string soname("cqvamp");
|
c@42
|
8
|
c@42
|
9 class CQVampMIDIParamsAdapter : public piper_vamp_js::PiperAdapterBase<CQVamp>
|
c@42
|
10 {
|
c@42
|
11 public:
|
c@42
|
12 CQVampMIDIParamsAdapter() : PiperAdapterBase<CQVamp>(soname) { }
|
c@42
|
13 virtual Vamp::Plugin *createPlugin(float inputSampleRate) const override {
|
c@42
|
14 return new CQVamp(inputSampleRate, true);
|
c@42
|
15 }
|
c@42
|
16 };
|
c@42
|
17
|
c@42
|
18 class CQVampHzParamsAdapter : public piper_vamp_js::PiperAdapterBase<CQVamp>
|
c@42
|
19 {
|
c@42
|
20 public:
|
c@42
|
21 CQVampHzParamsAdapter() : PiperAdapterBase<CQVamp>(soname) { }
|
c@42
|
22 virtual Vamp::Plugin *createPlugin(float inputSampleRate) const override {
|
c@42
|
23 return new CQVamp(inputSampleRate, false);
|
c@42
|
24 }
|
c@42
|
25 };
|
c@42
|
26
|
c@42
|
27 static CQVampMIDIParamsAdapter cqVampMIDIParamsAdapter;
|
c@42
|
28 static CQVampHzParamsAdapter cqVampHzParamsAdapter;
|
c@42
|
29
|
c@42
|
30 static piper_vamp_js::PiperAdapter<CQChromaVamp> cqChromaVampAdapter(soname);
|
c@42
|
31
|
c@42
|
32 static piper_vamp_js::PiperPluginLibrary library({
|
c@42
|
33 &cqVampMIDIParamsAdapter,
|
c@42
|
34 &cqVampHzParamsAdapter,
|
c@42
|
35 &cqChromaVampAdapter
|
c@42
|
36 });
|
c@42
|
37
|
c@42
|
38 PIPER_EXPORT_LIBRARY(library);
|