Mercurial > hg > qm-vamp-plugins
comparison 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 |
comparison
equal
deleted
inserted
replaced
26:166cc6d39390 | 27:3256bfa04ed8 |
---|---|
8 */ | 8 */ |
9 | 9 |
10 #include <vamp/vamp.h> | 10 #include <vamp/vamp.h> |
11 #include <vamp-sdk/PluginAdapter.h> | 11 #include <vamp-sdk/PluginAdapter.h> |
12 | 12 |
13 #include "plugins/BeatDetect.h" | 13 #include "plugins/BeatTrack.h" |
14 #include "plugins/OnsetDetect.h" | |
14 #include "plugins/ChromagramPlugin.h" | 15 #include "plugins/ChromagramPlugin.h" |
15 #include "plugins/ConstantQSpectrogram.h" | 16 #include "plugins/ConstantQSpectrogram.h" |
16 #include "plugins/TonalChangeDetect.h" | 17 #include "plugins/TonalChangeDetect.h" |
17 #include "plugins/KeyDetect.h" | 18 #include "plugins/KeyDetect.h" |
18 | 19 |
19 static Vamp::PluginAdapter<BeatDetector> beatDetectorAdapter; | 20 static Vamp::PluginAdapter<BeatTracker> beatTrackerAdapter; |
21 static Vamp::PluginAdapter<OnsetDetector> onsetDetectorAdapter; | |
20 static Vamp::PluginAdapter<ChromagramPlugin> chromagramPluginAdapter; | 22 static Vamp::PluginAdapter<ChromagramPlugin> chromagramPluginAdapter; |
21 static Vamp::PluginAdapter<ConstantQSpectrogram> constantQAdapter; | 23 static Vamp::PluginAdapter<ConstantQSpectrogram> constantQAdapter; |
22 static Vamp::PluginAdapter<TonalChangeDetect> tonalChangeDetectorAdapter; | 24 static Vamp::PluginAdapter<TonalChangeDetect> tonalChangeDetectorAdapter; |
23 static Vamp::PluginAdapter<KeyDetector> keyDetectorAdapter; | 25 static Vamp::PluginAdapter<KeyDetector> keyDetectorAdapter; |
24 | 26 |
26 unsigned int index) | 28 unsigned int index) |
27 { | 29 { |
28 if (vampApiVersion < 1) return 0; | 30 if (vampApiVersion < 1) return 0; |
29 | 31 |
30 switch (index) { | 32 switch (index) { |
31 case 0: return beatDetectorAdapter.getDescriptor(); | 33 case 0: return beatTrackerAdapter.getDescriptor(); |
32 case 1: return chromagramPluginAdapter.getDescriptor(); | 34 case 1: return onsetDetectorAdapter.getDescriptor(); |
33 case 2: return constantQAdapter.getDescriptor(); | 35 case 2: return chromagramPluginAdapter.getDescriptor(); |
34 case 3: return tonalChangeDetectorAdapter.getDescriptor(); | 36 case 3: return constantQAdapter.getDescriptor(); |
35 case 4: return keyDetectorAdapter.getDescriptor(); | 37 case 4: return tonalChangeDetectorAdapter.getDescriptor(); |
38 case 5: return keyDetectorAdapter.getDescriptor(); | |
36 default: return 0; | 39 default: return 0; |
37 } | 40 } |
38 } | 41 } |
39 | 42 |