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