annotate vamp-example-plugins/vamp-example-plugins.cpp @ 13:d81d02140d43

Bring in example plugins and test plugin. It's not very DRY but it is quite useful
author Chris Cannam
date Fri, 11 Nov 2016 17:37:38 +0000
parents
children ac94242cf562
rev   line source
Chris@13 1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
Chris@13 2
Chris@13 3 /*
Chris@13 4 Piper
Chris@13 5
Chris@13 6 Centre for Digital Music, Queen Mary, University of London.
Chris@13 7 Copyright 2015-2016 QMUL.
Chris@13 8
Chris@13 9 Permission is hereby granted, free of charge, to any person
Chris@13 10 obtaining a copy of this software and associated documentation
Chris@13 11 files (the "Software"), to deal in the Software without
Chris@13 12 restriction, including without limitation the rights to use, copy,
Chris@13 13 modify, merge, publish, distribute, sublicense, and/or sell copies
Chris@13 14 of the Software, and to permit persons to whom the Software is
Chris@13 15 furnished to do so, subject to the following conditions:
Chris@13 16
Chris@13 17 The above copyright notice and this permission notice shall be
Chris@13 18 included in all copies or substantial portions of the Software.
Chris@13 19
Chris@13 20 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
Chris@13 21 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
Chris@13 22 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
Chris@13 23 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR
Chris@13 24 ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
Chris@13 25 CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
Chris@13 26 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Chris@13 27
Chris@13 28 Except as contained in this notice, the names of the Centre for
Chris@13 29 Digital Music; Queen Mary, University of London; and Chris Cannam
Chris@13 30 shall not be used in advertising or otherwise to promote the sale,
Chris@13 31 use or other dealings in this Software without prior written
Chris@13 32 authorization.
Chris@13 33 */
Chris@13 34
Chris@13 35 #include "PiperExport.h"
Chris@13 36
Chris@13 37 #include "ZeroCrossing.h"
Chris@13 38 #include "SpectralCentroid.h"
Chris@13 39 #include "PercussionOnsetDetector.h"
Chris@13 40 #include "FixedTempoEstimator.h"
Chris@13 41 #include "AmplitudeFollower.h"
Chris@13 42 #include "PowerSpectrum.h"
Chris@13 43
Chris@13 44 using piper_vamp_js::PiperAdapter;
Chris@13 45 using piper_vamp_js::PiperPluginLibrary;
Chris@13 46
Chris@13 47 static std::string soname("vamp-example-plugins");
Chris@13 48
Chris@13 49 static PiperAdapter<ZeroCrossing> zeroCrossingAdapter(soname);
Chris@13 50 static PiperAdapter<SpectralCentroid> spectralCentroidAdapter(soname);
Chris@13 51 static PiperAdapter<PercussionOnsetDetector> percussionOnsetAdapter(soname);
Chris@13 52 static PiperAdapter<FixedTempoEstimator> fixedTempoAdapter(soname);
Chris@13 53 static PiperAdapter<AmplitudeFollower> amplitudeAdapter(soname);
Chris@13 54 static PiperAdapter<PowerSpectrum> powerSpectrumAdapter(soname);
Chris@13 55
Chris@13 56 static PiperPluginLibrary library({
Chris@13 57 &zeroCrossingAdapter,
Chris@13 58 &spectralCentroidAdapter,
Chris@13 59 &percussionOnsetAdapter,
Chris@13 60 &fixedTempoAdapter,
Chris@13 61 &amplitudeAdapter,
Chris@13 62 &powerSpectrumAdapter
Chris@13 63 });
Chris@13 64
Chris@13 65 PIPER_EXPORT_LIBRARY(library);
Chris@13 66