annotate libmain.cpp @ 21:d695fc2baa91

* Turning key-mode plugin into a generic key detection plugin, and attempting to debug it
author Chris Cannam <c.cannam@qmul.ac.uk>
date Mon, 22 Jan 2007 17:32:40 +0000
parents 799b13ab3792
children bec0d544984b
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@3 13 #include "plugins/BeatDetect.h"
c@3 14 #include "plugins/ChromagramPlugin.h"
c@9 15 #include "plugins/ConstantQSpectrogram.h"
c@3 16 #include "plugins/TonalChangeDetect.h"
c@21 17 #include "plugins/KeyDetect.h"
c@3 18
c@3 19 static Vamp::PluginAdapter<BeatDetector> beatDetectorAdapter;
c@3 20 static Vamp::PluginAdapter<ChromagramPlugin> chromagramPluginAdapter;
c@9 21 static Vamp::PluginAdapter<ConstantQSpectrogram> constantQAdapter;
c@3 22 static Vamp::PluginAdapter<TonalChangeDetect> tonalChangeDetectorAdapter;
c@21 23 static Vamp::PluginAdapter<KeyDetector> keyDetectorAdapter;
c@3 24
c@3 25 const VampPluginDescriptor *vampGetPluginDescriptor(unsigned int index)
c@3 26 {
c@3 27 switch (index) {
c@3 28 case 0: return beatDetectorAdapter.getDescriptor();
c@3 29 case 1: return chromagramPluginAdapter.getDescriptor();
c@9 30 case 2: return constantQAdapter.getDescriptor();
c@9 31 case 3: return tonalChangeDetectorAdapter.getDescriptor();
c@21 32 case 4: return keyDetectorAdapter.getDescriptor();
c@3 33 default: return 0;
c@3 34 }
c@3 35 }
c@3 36