annotate libmain.cpp @ 27:3256bfa04ed8
* split out tempo/beat/onset plugin into tempo/beat and onset
author |
Chris Cannam <c.cannam@qmul.ac.uk> |
date |
Mon, 21 May 2007 13:09:12 +0000 |
parents |
bec0d544984b |
children |
9ce0db4770a2 |
rev |
line source |
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@3
|
19
|
c@27
|
20 static Vamp::PluginAdapter<BeatTracker> beatTrackerAdapter;
|
c@27
|
21 static Vamp::PluginAdapter<OnsetDetector> onsetDetectorAdapter;
|
c@3
|
22 static Vamp::PluginAdapter<ChromagramPlugin> chromagramPluginAdapter;
|
c@9
|
23 static Vamp::PluginAdapter<ConstantQSpectrogram> constantQAdapter;
|
c@3
|
24 static Vamp::PluginAdapter<TonalChangeDetect> tonalChangeDetectorAdapter;
|
c@21
|
25 static Vamp::PluginAdapter<KeyDetector> keyDetectorAdapter;
|
c@3
|
26
|
c@23
|
27 const VampPluginDescriptor *vampGetPluginDescriptor(unsigned int vampApiVersion,
|
c@23
|
28 unsigned int index)
|
c@3
|
29 {
|
c@23
|
30 if (vampApiVersion < 1) return 0;
|
c@23
|
31
|
c@3
|
32 switch (index) {
|
c@27
|
33 case 0: return beatTrackerAdapter.getDescriptor();
|
c@27
|
34 case 1: return onsetDetectorAdapter.getDescriptor();
|
c@27
|
35 case 2: return chromagramPluginAdapter.getDescriptor();
|
c@27
|
36 case 3: return constantQAdapter.getDescriptor();
|
c@27
|
37 case 4: return tonalChangeDetectorAdapter.getDescriptor();
|
c@27
|
38 case 5: return keyDetectorAdapter.getDescriptor();
|
c@3
|
39 default: return 0;
|
c@3
|
40 }
|
c@3
|
41 }
|
c@3
|
42
|