Mercurial > hg > vamp-plugin-sdk
comparison examples/plugins.cpp @ 41:31cd55174467
* Add Dan Stowell's simple implementation of the SuperCollider amplitude
follower method
author | cannam |
---|---|
date | Wed, 11 Oct 2006 11:39:02 +0000 |
parents | 154f86cb8c99 |
children | b907557b2fb9 |
comparison
equal
deleted
inserted
replaced
40:ae3e47e76d2d | 41:31cd55174467 |
---|---|
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 #include "PercussionOnsetDetector.h" |
43 #include "AmplitudeFollower.h" | |
43 | 44 |
44 static Vamp::PluginAdapter<ZeroCrossing> zeroCrossingAdapter; | 45 static Vamp::PluginAdapter<ZeroCrossing> zeroCrossingAdapter; |
45 static Vamp::PluginAdapter<SpectralCentroid> spectralCentroidAdapter; | 46 static Vamp::PluginAdapter<SpectralCentroid> spectralCentroidAdapter; |
46 static Vamp::PluginAdapter<PercussionOnsetDetector> percussionOnsetAdapter; | 47 static Vamp::PluginAdapter<PercussionOnsetDetector> percussionOnsetAdapter; |
48 static Vamp::PluginAdapter<AmplitudeFollower> amplitudeAdapter; | |
47 | 49 |
48 const VampPluginDescriptor *vampGetPluginDescriptor(unsigned int index) | 50 const VampPluginDescriptor *vampGetPluginDescriptor(unsigned int index) |
49 { | 51 { |
50 switch (index) { | 52 switch (index) { |
51 case 0: return zeroCrossingAdapter.getDescriptor(); | 53 case 0: return zeroCrossingAdapter.getDescriptor(); |
52 case 1: return spectralCentroidAdapter.getDescriptor(); | 54 case 1: return spectralCentroidAdapter.getDescriptor(); |
53 case 2: return percussionOnsetAdapter.getDescriptor(); | 55 case 2: return percussionOnsetAdapter.getDescriptor(); |
56 case 3: return amplitudeAdapter.getDescriptor(); | |
54 default: return 0; | 57 default: return 0; |
55 } | 58 } |
56 } | 59 } |
57 | 60 |