c@106: /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ c@106: c@106: /* c@106: VamPipe c@106: c@106: Centre for Digital Music, Queen Mary, University of London. c@106: Copyright 2015-2016 QMUL. c@106: c@106: Permission is hereby granted, free of charge, to any person c@106: obtaining a copy of this software and associated documentation c@106: files (the "Software"), to deal in the Software without c@106: restriction, including without limitation the rights to use, copy, c@106: modify, merge, publish, distribute, sublicense, and/or sell copies c@106: of the Software, and to permit persons to whom the Software is c@106: furnished to do so, subject to the following conditions: c@106: c@106: The above copyright notice and this permission notice shall be c@106: included in all copies or substantial portions of the Software. c@106: c@106: THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, c@106: EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF c@106: MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND c@106: NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR c@106: ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF c@106: CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION c@106: WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. c@106: c@106: Except as contained in this notice, the names of the Centre for c@106: Digital Music; Queen Mary, University of London; and Chris Cannam c@106: shall not be used in advertising or otherwise to promote the sale, c@106: use or other dealings in this Software without prior written c@106: authorization. c@106: */ c@106: c@106: #include "VamPipeAdapter.h" c@106: #include "VamPipePluginLibrary.h" c@106: c@106: #include "plugins/BeatTrack.h" c@106: #include "plugins/OnsetDetect.h" c@106: #include "plugins/ChromagramPlugin.h" c@106: #include "plugins/ConstantQSpectrogram.h" c@106: #include "plugins/TonalChangeDetect.h" c@106: #include "plugins/KeyDetect.h" c@106: #include "plugins/MFCCPlugin.h" c@106: #include "plugins/SegmenterPlugin.h" c@106: #include "plugins/SimilarityPlugin.h" c@106: #include "plugins/BarBeatTrack.h" c@106: //!!!#include "plugins/AdaptiveSpectrogram.h" c@106: #include "plugins/DWT.h" c@106: #include "plugins/Transcription.h" c@106: c@106: using vampipe::VamPipeAdapter; c@106: using vampipe::VamPipePluginLibrary; c@106: c@106: static std::string soname("qm-vamp-plugins"); c@106: c@106: static VamPipeAdapter beatTrackerAdapter(soname); c@106: static VamPipeAdapter onsetDetectorAdapter(soname); c@106: static VamPipeAdapter chromagramPluginAdapter(soname); c@106: static VamPipeAdapter constantQAdapter(soname); c@106: static VamPipeAdapter tonalChangeDetectorAdapter(soname); c@106: static VamPipeAdapter keyDetectorAdapter(soname); c@106: static VamPipeAdapter mfccPluginAdapter(soname); c@106: static VamPipeAdapter segmenterPluginAdapter(soname); c@106: static VamPipeAdapter similarityPluginAdapter(soname); c@106: static VamPipeAdapter barBeatTrackPluginAdapter(soname); c@106: //!!!static VamPipeAdapter adaptiveSpectrogramAdapter(soname); c@106: static VamPipeAdapter dwtAdapter(soname); c@106: static VamPipeAdapter transcriptionAdapter(soname); c@106: c@106: static VamPipePluginLibrary library({ c@106: &beatTrackerAdapter, c@106: &onsetDetectorAdapter, c@106: &chromagramPluginAdapter, c@106: &constantQAdapter, c@106: &tonalChangeDetectorAdapter, c@106: &keyDetectorAdapter, c@106: &mfccPluginAdapter, c@106: &segmenterPluginAdapter, c@106: &similarityPluginAdapter, c@106: &barBeatTrackPluginAdapter, c@106: //!!! &adaptiveSpectrogramAdapter, c@106: &dwtAdapter, c@106: &transcriptionAdapter c@106: }); c@106: c@106: extern "C" { c@106: c@106: const char *vampipeRequestJson(const char *request) { c@106: return library.requestJson(request); c@106: } c@106: c@106: const char *vampipeProcessRaw(int pluginHandle, c@106: const float *const *inputBuffers, c@106: int sec, c@106: int nsec) { c@106: return library.processRaw(pluginHandle, inputBuffers, sec, nsec); c@106: } c@106: c@106: void vampipeFreeJson(const char *json) { c@106: return library.freeJson(json); c@106: } c@106: c@106: } c@106: