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