Mercurial > hg > vamp-plugin-sdk
comparison examples/plugins.cpp @ 198:e3e61b7e9661
* Beginnings of a simple tempo estimator example plugin
author | cannam |
---|---|
date | Wed, 08 Oct 2008 15:26:50 +0000 |
parents | 9d3272c7db60 |
children |
comparison
equal
deleted
inserted
replaced
197:fe30a25ee4f8 | 198:e3e61b7e9661 |
---|---|
38 #include "vamp-sdk/PluginAdapter.h" | 38 #include "vamp-sdk/PluginAdapter.h" |
39 | 39 |
40 #include "ZeroCrossing.h" | 40 #include "ZeroCrossing.h" |
41 #include "SpectralCentroid.h" | 41 #include "SpectralCentroid.h" |
42 #include "PercussionOnsetDetector.h" | 42 #include "PercussionOnsetDetector.h" |
43 #include "FixedTempoEstimator.h" | |
43 #include "AmplitudeFollower.h" | 44 #include "AmplitudeFollower.h" |
44 | 45 |
45 static Vamp::PluginAdapter<ZeroCrossing> zeroCrossingAdapter; | 46 static Vamp::PluginAdapter<ZeroCrossing> zeroCrossingAdapter; |
46 static Vamp::PluginAdapter<SpectralCentroid> spectralCentroidAdapter; | 47 static Vamp::PluginAdapter<SpectralCentroid> spectralCentroidAdapter; |
47 static Vamp::PluginAdapter<PercussionOnsetDetector> percussionOnsetAdapter; | 48 static Vamp::PluginAdapter<PercussionOnsetDetector> percussionOnsetAdapter; |
49 static Vamp::PluginAdapter<FixedTempoEstimator> fixedTempoAdapter; | |
48 static Vamp::PluginAdapter<AmplitudeFollower> amplitudeAdapter; | 50 static Vamp::PluginAdapter<AmplitudeFollower> amplitudeAdapter; |
49 | 51 |
50 const VampPluginDescriptor *vampGetPluginDescriptor(unsigned int version, | 52 const VampPluginDescriptor *vampGetPluginDescriptor(unsigned int version, |
51 unsigned int index) | 53 unsigned int index) |
52 { | 54 { |
55 switch (index) { | 57 switch (index) { |
56 case 0: return zeroCrossingAdapter.getDescriptor(); | 58 case 0: return zeroCrossingAdapter.getDescriptor(); |
57 case 1: return spectralCentroidAdapter.getDescriptor(); | 59 case 1: return spectralCentroidAdapter.getDescriptor(); |
58 case 2: return percussionOnsetAdapter.getDescriptor(); | 60 case 2: return percussionOnsetAdapter.getDescriptor(); |
59 case 3: return amplitudeAdapter.getDescriptor(); | 61 case 3: return amplitudeAdapter.getDescriptor(); |
62 case 4: return fixedTempoAdapter.getDescriptor(); | |
60 default: return 0; | 63 default: return 0; |
61 } | 64 } |
62 } | 65 } |
63 | 66 |