c@40: /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ c@40: c@40: /* c@40: Piper c@40: c@40: Centre for Digital Music, Queen Mary, University of London. c@48: Copyright 2015-2017 QMUL. c@40: c@40: Permission is hereby granted, free of charge, to any person c@40: obtaining a copy of this software and associated documentation c@40: files (the "Software"), to deal in the Software without c@40: restriction, including without limitation the rights to use, copy, c@40: modify, merge, publish, distribute, sublicense, and/or sell copies c@40: of the Software, and to permit persons to whom the Software is c@40: furnished to do so, subject to the following conditions: c@40: c@40: The above copyright notice and this permission notice shall be c@40: included in all copies or substantial portions of the Software. c@40: c@40: THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, c@40: EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF c@40: MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND c@40: NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR c@40: ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF c@40: CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION c@40: WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. c@40: c@40: Except as contained in this notice, the names of the Centre for c@40: Digital Music; Queen Mary, University of London; and Chris Cannam c@40: shall not be used in advertising or otherwise to promote the sale, c@40: use or other dealings in this Software without prior written c@40: authorization. c@40: */ c@40: c@40: #include "PiperExport.h" c@40: c@40: #include "ZeroCrossing.h" c@40: #include "SpectralCentroid.h" c@40: #include "PercussionOnsetDetector.h" c@40: #include "FixedTempoEstimator.h" c@40: #include "AmplitudeFollower.h" c@40: #include "PowerSpectrum.h" c@40: c@40: using piper_vamp_js::PiperAdapter; c@40: using piper_vamp_js::PiperPluginLibrary; c@40: c@48: static std::string libname("vamp-example-plugins"); c@40: c@48: static PiperAdapter c@48: zeroCrossingAdapter( c@48: libname, c@48: { "Low Level Features" }, c@48: { c@48: { "counts", c@48: { "http://purl.org/ontology/af/ZeroCrossingCount" } c@48: }, c@48: { "zerocrossings", c@48: { "http://purl.org/ontology/af/ZeroCrossing" } c@48: } c@48: } c@48: ); c@48: c@48: static PiperAdapter c@48: spectralCentroidAdapter( c@48: libname, c@48: { "Low Level Features" }, c@48: { c@48: { "logcentroid", c@48: { "http://purl.org/ontology/af/LogFrequencyCentroid" } c@48: }, c@48: { "linearcentroid", c@48: { "http://purl.org/ontology/af/LinearFrequencyCentroid" } c@48: } c@48: } c@48: ); c@48: c@48: static PiperAdapter c@48: percussionOnsetsAdapter( c@48: libname, c@48: { "Time", "Onsets" }, c@48: { c@48: { "onsets", c@48: { "http://purl.org/ontology/af/Onset" } c@48: }, c@48: { "detectionfunction", c@48: { "http://purl.org/ontology/af/OnsetDetectionFunction" } c@48: } c@48: } c@48: ); c@48: c@48: static PiperAdapter c@48: amplitudeFollowerAdapter( c@48: libname, c@48: { "Low Level Features" }, c@48: { c@48: { "amplitude", c@48: { "http://purl.org/ontology/af/Signal" } c@48: } c@48: } c@48: ); c@48: c@48: static PiperAdapter c@48: fixedTempoAdapter( c@48: libname, c@48: { "Time", "Tempo" }, c@48: { c@48: { "tempo", c@48: { "http://purl.org/ontology/af/Tempo" } c@48: }, c@48: { "candidates", c@48: { "http://purl.org/ontology/af/Tempo" } c@48: }, c@48: { "detectionfunction", c@48: { "http://purl.org/ontology/af/OnsetDetectionFunction" } c@48: }, c@48: { "acf", c@48: { "http://purl.org/ontology/af/Signal" } c@48: }, c@48: { "filtered_acf", c@48: { "http://purl.org/ontology/af/Signal" } c@48: } c@48: } c@48: ); c@48: c@48: static PiperAdapter c@48: powerSpectrumAdapter( c@48: libname, c@48: { "Visualisation" }, c@48: { c@48: { "powerspectrum", c@48: { "http://purl.org/ontology/af/Signal" } c@48: } c@48: } c@48: ); c@40: c@40: static PiperPluginLibrary library({ c@40: &zeroCrossingAdapter, c@40: &spectralCentroidAdapter, c@48: &percussionOnsetsAdapter, c@48: &litudeFollowerAdapter, c@40: &fixedTempoAdapter, c@40: &powerSpectrumAdapter c@40: }); c@40: c@40: PIPER_EXPORT_LIBRARY(library); c@40: