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@135
|
7
|
c@135
|
8 This program is free software; you can redistribute it and/or
|
c@135
|
9 modify it under the terms of the GNU General Public License as
|
c@135
|
10 published by the Free Software Foundation; either version 2 of the
|
c@135
|
11 License, or (at your option) any later version. See the file
|
c@135
|
12 COPYING included with this distribution for more information.
|
c@3
|
13 */
|
c@3
|
14
|
c@3
|
15 #include <vamp/vamp.h>
|
c@3
|
16 #include <vamp-sdk/PluginAdapter.h>
|
c@3
|
17
|
c@27
|
18 #include "plugins/BeatTrack.h"
|
c@27
|
19 #include "plugins/OnsetDetect.h"
|
c@3
|
20 #include "plugins/ChromagramPlugin.h"
|
c@9
|
21 #include "plugins/ConstantQSpectrogram.h"
|
c@3
|
22 #include "plugins/TonalChangeDetect.h"
|
c@21
|
23 #include "plugins/KeyDetect.h"
|
c@45
|
24 #include "plugins/MFCCPlugin.h"
|
c@37
|
25 #include "plugins/SegmenterPlugin.h"
|
c@41
|
26 #include "plugins/SimilarityPlugin.h"
|
c@89
|
27 #include "plugins/BarBeatTrack.h"
|
c@92
|
28 #include "plugins/AdaptiveSpectrogram.h"
|
c@97
|
29 #include "plugins/DWT.h"
|
c@120
|
30 #include "plugins/Transcription.h"
|
c@3
|
31
|
c@27
|
32 static Vamp::PluginAdapter<BeatTracker> beatTrackerAdapter;
|
c@27
|
33 static Vamp::PluginAdapter<OnsetDetector> onsetDetectorAdapter;
|
c@3
|
34 static Vamp::PluginAdapter<ChromagramPlugin> chromagramPluginAdapter;
|
c@9
|
35 static Vamp::PluginAdapter<ConstantQSpectrogram> constantQAdapter;
|
c@3
|
36 static Vamp::PluginAdapter<TonalChangeDetect> tonalChangeDetectorAdapter;
|
c@21
|
37 static Vamp::PluginAdapter<KeyDetector> keyDetectorAdapter;
|
c@45
|
38 static Vamp::PluginAdapter<MFCCPlugin> mfccPluginAdapter;
|
c@37
|
39 static Vamp::PluginAdapter<SegmenterPlugin> segmenterPluginAdapter;
|
c@41
|
40 static Vamp::PluginAdapter<SimilarityPlugin> similarityPluginAdapter;
|
c@89
|
41 static Vamp::PluginAdapter<BarBeatTracker> barBeatTrackPluginAdapter;
|
c@92
|
42 static Vamp::PluginAdapter<AdaptiveSpectrogram> adaptiveSpectrogramAdapter;
|
c@97
|
43 static Vamp::PluginAdapter<DWT> dwtAdapter;
|
c@120
|
44 static Vamp::PluginAdapter<Transcription> transcriptionAdapter;
|
c@3
|
45
|
c@23
|
46 const VampPluginDescriptor *vampGetPluginDescriptor(unsigned int vampApiVersion,
|
c@23
|
47 unsigned int index)
|
c@3
|
48 {
|
c@23
|
49 if (vampApiVersion < 1) return 0;
|
c@23
|
50
|
c@3
|
51 switch (index) {
|
c@27
|
52 case 0: return beatTrackerAdapter.getDescriptor();
|
c@27
|
53 case 1: return onsetDetectorAdapter.getDescriptor();
|
c@27
|
54 case 2: return chromagramPluginAdapter.getDescriptor();
|
c@27
|
55 case 3: return constantQAdapter.getDescriptor();
|
c@27
|
56 case 4: return tonalChangeDetectorAdapter.getDescriptor();
|
c@27
|
57 case 5: return keyDetectorAdapter.getDescriptor();
|
c@37
|
58 case 6: return segmenterPluginAdapter.getDescriptor();
|
c@41
|
59 case 7: return similarityPluginAdapter.getDescriptor();
|
c@45
|
60 case 8: return mfccPluginAdapter.getDescriptor();
|
c@89
|
61 case 9: return barBeatTrackPluginAdapter.getDescriptor();
|
c@97
|
62 case 10: return dwtAdapter.getDescriptor();
|
c@99
|
63 case 11: return adaptiveSpectrogramAdapter.getDescriptor();
|
c@120
|
64 case 12: return transcriptionAdapter.getDescriptor();
|
c@3
|
65 default: return 0;
|
c@3
|
66 }
|
c@3
|
67 }
|
c@3
|
68
|