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