c@42
|
1
|
c@42
|
2 #include "PiperExport.h"
|
c@48
|
3
|
c@42
|
4 #include "CQVamp.h"
|
c@42
|
5 #include "CQChromaVamp.h"
|
c@42
|
6
|
c@48
|
7 using piper_vamp_js::PiperAdapter;
|
c@48
|
8 using piper_vamp_js::PiperAdapterBase;
|
c@48
|
9 using piper_vamp_js::PiperPluginLibrary;
|
c@42
|
10
|
c@48
|
11 static std::string libname("cqvamp");
|
c@48
|
12
|
c@48
|
13 piper_vamp::StaticOutputInfo cqStaticOutputInfo {
|
c@48
|
14 { "constantq",
|
c@48
|
15 { "http://purl.org/ontology/af/Spectrogram" }
|
c@48
|
16 }
|
c@48
|
17 };
|
c@48
|
18
|
c@48
|
19 class CQVampMIDIParamsAdapter : public PiperAdapterBase<CQVamp>
|
c@42
|
20 {
|
c@42
|
21 public:
|
c@48
|
22 CQVampMIDIParamsAdapter() : PiperAdapterBase<CQVamp>(libname,
|
c@48
|
23 { "Visualisation" },
|
c@48
|
24 cqStaticOutputInfo) { }
|
c@42
|
25 virtual Vamp::Plugin *createPlugin(float inputSampleRate) const override {
|
c@42
|
26 return new CQVamp(inputSampleRate, true);
|
c@42
|
27 }
|
c@42
|
28 };
|
c@42
|
29
|
c@48
|
30 class CQVampHzParamsAdapter : public PiperAdapterBase<CQVamp>
|
c@42
|
31 {
|
c@42
|
32 public:
|
c@48
|
33 CQVampHzParamsAdapter() : PiperAdapterBase<CQVamp>(libname,
|
c@48
|
34 { "Visualisation" },
|
c@48
|
35 cqStaticOutputInfo) { }
|
c@42
|
36 virtual Vamp::Plugin *createPlugin(float inputSampleRate) const override {
|
c@42
|
37 return new CQVamp(inputSampleRate, false);
|
c@42
|
38 }
|
c@42
|
39 };
|
c@42
|
40
|
c@42
|
41 static CQVampMIDIParamsAdapter cqVampMIDIParamsAdapter;
|
c@42
|
42 static CQVampHzParamsAdapter cqVampHzParamsAdapter;
|
c@42
|
43
|
c@48
|
44 static PiperAdapter<CQChromaVamp>
|
c@48
|
45 cqChromaVampAdapter(
|
c@48
|
46 libname,
|
c@48
|
47 { "Visualisation" },
|
c@48
|
48 {
|
c@48
|
49 { "chromagram",
|
c@48
|
50 { "http://purl.org/ontology/af/Chromagram" }
|
c@48
|
51 }
|
c@48
|
52 }
|
c@48
|
53 );
|
c@42
|
54
|
c@48
|
55 static PiperPluginLibrary library({
|
c@48
|
56 &cqVampMIDIParamsAdapter,
|
c@48
|
57 &cqVampHzParamsAdapter,
|
c@48
|
58 &cqChromaVampAdapter
|
c@48
|
59 });
|
c@42
|
60
|
c@42
|
61 PIPER_EXPORT_LIBRARY(library);
|
c@48
|
62
|