Mercurial > hg > piper-vamp-js
changeset 158:dcd4bdf095e7
Update example builds with output metadata
author | Chris Cannam <cannam@all-day-breakfast.com> |
---|---|
date | Wed, 14 Jun 2017 11:36:13 +0100 |
parents | d55e8f37eacf |
children | 205f9a6240f5 |
files | examples/vamp-example-plugins/vamp-example-plugins.cpp examples/vamp-test-plugin/vamp-test-plugin.cpp |
diffstat | 2 files changed, 93 insertions(+), 13 deletions(-) [+] |
line wrap: on
line diff
--- a/examples/vamp-example-plugins/vamp-example-plugins.cpp Wed Jun 14 11:36:06 2017 +0100 +++ b/examples/vamp-example-plugins/vamp-example-plugins.cpp Wed Jun 14 11:36:13 2017 +0100 @@ -4,7 +4,7 @@ Piper Centre for Digital Music, Queen Mary, University of London. - Copyright 2015-2016 QMUL. + Copyright 2015-2017 QMUL. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation @@ -44,21 +44,101 @@ using piper_vamp_js::PiperAdapter; using piper_vamp_js::PiperPluginLibrary; -static std::string soname("vamp-example-plugins"); +static std::string libname("vamp-example-plugins"); -static PiperAdapter<ZeroCrossing> zeroCrossingAdapter(soname); -static PiperAdapter<SpectralCentroid> spectralCentroidAdapter(soname); -static PiperAdapter<PercussionOnsetDetector> percussionOnsetAdapter(soname); -static PiperAdapter<FixedTempoEstimator> fixedTempoAdapter(soname); -static PiperAdapter<AmplitudeFollower> amplitudeAdapter(soname); -static PiperAdapter<PowerSpectrum> powerSpectrumAdapter(soname); +static PiperAdapter<ZeroCrossing> +zeroCrossingAdapter( + libname, + { "Low Level Features" }, + { + { "counts", + { "http://purl.org/ontology/af/ZeroCrossingCount" } + }, + { "zerocrossings", + { "http://purl.org/ontology/af/ZeroCrossing" } + } + } + ); + +static PiperAdapter<SpectralCentroid> +spectralCentroidAdapter( + libname, + { "Low Level Features" }, + { + { "logcentroid", + { "http://purl.org/ontology/af/LogFrequencyCentroid" } + }, + { "linearcentroid", + { "http://purl.org/ontology/af/LinearFrequencyCentroid" } + } + } + ); + +static PiperAdapter<PercussionOnsetDetector> +percussionOnsetsAdapter( + libname, + { "Time", "Onsets" }, + { + { "onsets", + { "http://purl.org/ontology/af/Onset" } + }, + { "detectionfunction", + { "http://purl.org/ontology/af/OnsetDetectionFunction" } + } + } + ); + +static PiperAdapter<AmplitudeFollower> +amplitudeFollowerAdapter( + libname, + { "Low Level Features" }, + { + { "amplitude", + { "http://purl.org/ontology/af/Signal" } + } + } + ); + +static PiperAdapter<FixedTempoEstimator> +fixedTempoAdapter( + libname, + { "Time", "Tempo" }, + { + { "tempo", + { "http://purl.org/ontology/af/Tempo" } + }, + { "candidates", + { "http://purl.org/ontology/af/Tempo" } + }, + { "detectionfunction", + { "http://purl.org/ontology/af/OnsetDetectionFunction" } + }, + { "acf", + { "http://purl.org/ontology/af/Signal" } + }, + { "filtered_acf", + { "http://purl.org/ontology/af/Signal" } + } + } + ); + +static PiperAdapter<PowerSpectrum> +powerSpectrumAdapter( + libname, + { "Visualisation" }, + { + { "powerspectrum", + { "http://purl.org/ontology/af/Signal" } + } + } + ); static PiperPluginLibrary library({ &zeroCrossingAdapter, &spectralCentroidAdapter, - &percussionOnsetAdapter, + &percussionOnsetsAdapter, + &litudeFollowerAdapter, &fixedTempoAdapter, - &litudeAdapter, &powerSpectrumAdapter });
--- a/examples/vamp-test-plugin/vamp-test-plugin.cpp Wed Jun 14 11:36:06 2017 +0100 +++ b/examples/vamp-test-plugin/vamp-test-plugin.cpp Wed Jun 14 11:36:13 2017 +0100 @@ -1,7 +1,7 @@ /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ /* Vamp Test Plugin - Copyright (c) 2013-2016 Queen Mary, University of London + Copyright (c) 2013-2017 Queen Mary, University of London Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation @@ -36,7 +36,7 @@ using piper_vamp_js::PiperAdapterBase; using piper_vamp_js::PiperPluginLibrary; -static std::string soname("vamp-test-plugin"); +static std::string libname("vamp-test-plugin"); /* This is an example of a library that exports more than one "plugin" @@ -59,7 +59,7 @@ { public: Adapter(bool freq) : - PiperAdapterBase<VampTestPlugin>(soname), + PiperAdapterBase<VampTestPlugin>(libname, { "Development" }), m_freq(freq) { } protected: