c@3
|
1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
|
c@3
|
2
|
c@3
|
3 /*
|
c@3
|
4 QM Vamp Plugin Set
|
c@3
|
5
|
c@3
|
6 Centre for Digital Music, Queen Mary, University of London.
|
c@3
|
7 All rights reserved.
|
c@3
|
8 */
|
c@3
|
9
|
c@3
|
10 #include <vamp/vamp.h>
|
c@3
|
11 #include <vamp-sdk/PluginAdapter.h>
|
c@3
|
12
|
c@27
|
13 #include "plugins/BeatTrack.h"
|
c@27
|
14 #include "plugins/OnsetDetect.h"
|
c@3
|
15 #include "plugins/ChromagramPlugin.h"
|
c@9
|
16 #include "plugins/ConstantQSpectrogram.h"
|
c@3
|
17 #include "plugins/TonalChangeDetect.h"
|
c@21
|
18 #include "plugins/KeyDetect.h"
|
c@37
|
19 #include "plugins/SegmenterPlugin.h"
|
c@3
|
20
|
c@27
|
21 static Vamp::PluginAdapter<BeatTracker> beatTrackerAdapter;
|
c@27
|
22 static Vamp::PluginAdapter<OnsetDetector> onsetDetectorAdapter;
|
c@3
|
23 static Vamp::PluginAdapter<ChromagramPlugin> chromagramPluginAdapter;
|
c@9
|
24 static Vamp::PluginAdapter<ConstantQSpectrogram> constantQAdapter;
|
c@3
|
25 static Vamp::PluginAdapter<TonalChangeDetect> tonalChangeDetectorAdapter;
|
c@21
|
26 static Vamp::PluginAdapter<KeyDetector> keyDetectorAdapter;
|
c@37
|
27 static Vamp::PluginAdapter<SegmenterPlugin> segmenterPluginAdapter;
|
c@3
|
28
|
c@23
|
29 const VampPluginDescriptor *vampGetPluginDescriptor(unsigned int vampApiVersion,
|
c@23
|
30 unsigned int index)
|
c@3
|
31 {
|
c@23
|
32 if (vampApiVersion < 1) return 0;
|
c@23
|
33
|
c@3
|
34 switch (index) {
|
c@27
|
35 case 0: return beatTrackerAdapter.getDescriptor();
|
c@27
|
36 case 1: return onsetDetectorAdapter.getDescriptor();
|
c@27
|
37 case 2: return chromagramPluginAdapter.getDescriptor();
|
c@27
|
38 case 3: return constantQAdapter.getDescriptor();
|
c@27
|
39 case 4: return tonalChangeDetectorAdapter.getDescriptor();
|
c@27
|
40 case 5: return keyDetectorAdapter.getDescriptor();
|
c@37
|
41 case 6: return segmenterPluginAdapter.getDescriptor();
|
c@3
|
42 default: return 0;
|
c@3
|
43 }
|
c@3
|
44 }
|
c@3
|
45
|