comparison examples/plugins.cpp @ 35:154f86cb8c99

* Add an implementation of Dan Barry's percussion onset detector
author cannam
date Wed, 20 Sep 2006 13:51:22 +0000
parents 83d3eb580731
children 31cd55174467
comparison
equal deleted inserted replaced
34:cfba7059eccf 35:154f86cb8c99
37 #include <vamp/vamp.h> 37 #include <vamp/vamp.h>
38 38
39 #include "PluginAdapter.h" 39 #include "PluginAdapter.h"
40 #include "ZeroCrossing.h" 40 #include "ZeroCrossing.h"
41 #include "SpectralCentroid.h" 41 #include "SpectralCentroid.h"
42 #include "PercussionOnsetDetector.h"
42 43
43 static Vamp::PluginAdapter<ZeroCrossing> zeroCrossingAdapter; 44 static Vamp::PluginAdapter<ZeroCrossing> zeroCrossingAdapter;
44 static Vamp::PluginAdapter<SpectralCentroid> spectralCentroidAdapter; 45 static Vamp::PluginAdapter<SpectralCentroid> spectralCentroidAdapter;
46 static Vamp::PluginAdapter<PercussionOnsetDetector> percussionOnsetAdapter;
45 47
46 const VampPluginDescriptor *vampGetPluginDescriptor(unsigned int index) 48 const VampPluginDescriptor *vampGetPluginDescriptor(unsigned int index)
47 { 49 {
48 switch (index) { 50 switch (index) {
49 case 0: return zeroCrossingAdapter.getDescriptor(); 51 case 0: return zeroCrossingAdapter.getDescriptor();
50 case 1: return spectralCentroidAdapter.getDescriptor(); 52 case 1: return spectralCentroidAdapter.getDescriptor();
53 case 2: return percussionOnsetAdapter.getDescriptor();
51 default: return 0; 54 default: return 0;
52 } 55 }
53 } 56 }
54 57