Mercurial > hg > piper-vamp-js-builds
diff qm-vamp-plugins/qm-vamp-plugins.cpp @ 48:4d450d496793
Update .cpp main files with metadata from generator
author | Chris Cannam <c.cannam@qmul.ac.uk> |
---|---|
date | Wed, 14 Jun 2017 13:58:45 +0100 |
parents | 4b7e9d3a2528 |
children |
line wrap: on
line diff
--- a/qm-vamp-plugins/qm-vamp-plugins.cpp Thu Mar 30 16:30:04 2017 +0100 +++ b/qm-vamp-plugins/qm-vamp-plugins.cpp Wed Jun 14 13:58:45 2017 +0100 @@ -1,4 +1,3 @@ -/* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ #include "PiperExport.h" @@ -19,36 +18,224 @@ using piper_vamp_js::PiperAdapter; using piper_vamp_js::PiperPluginLibrary; -static std::string soname("qm-vamp-plugins"); +static std::string libname("qm-vamp-plugins"); -static PiperAdapter<BeatTracker> beatTrackerAdapter(soname); -static PiperAdapter<OnsetDetector> onsetDetectorAdapter(soname); -static PiperAdapter<ChromagramPlugin> chromagramPluginAdapter(soname); -static PiperAdapter<ConstantQSpectrogram> constantQAdapter(soname); -static PiperAdapter<TonalChangeDetect> tonalChangeDetectorAdapter(soname); -static PiperAdapter<KeyDetector> keyDetectorAdapter(soname); -static PiperAdapter<MFCCPlugin> mfccPluginAdapter(soname); -static PiperAdapter<SegmenterPlugin> segmenterPluginAdapter(soname); -static PiperAdapter<SimilarityPlugin> similarityPluginAdapter(soname); -static PiperAdapter<BarBeatTracker> barBeatTrackPluginAdapter(soname); -//!!!static PiperAdapter<AdaptiveSpectrogram> adaptiveSpectrogramAdapter(soname); -static PiperAdapter<DWT> dwtAdapter(soname); -static PiperAdapter<Transcription> transcriptionAdapter(soname); +static PiperAdapter<BeatTracker> +qmTempoTrackerAdapter( + libname, + { "Time", "Tempo" }, + { + { "beats", + { "http://purl.org/ontology/af/Beat" } + }, + { "detection_fn", + { "http://purl.org/ontology/af/OnsetDetectionFunction" } + }, + { "tempo", + { "http://purl.org/ontology/af/Tempo" } + } + } + ); + +static PiperAdapter<OnsetDetector> +qmOnsetDetectorAdapter( + libname, + { "Time", "Onsets" }, + { + { "onsets", + { "http://purl.org/ontology/af/Onset" } + }, + { "detection_fn", + { "http://purl.org/ontology/af/OnsetDetectionFunction" } + }, + { "smoothed_df", + { "http://purl.org/ontology/af/OnsetDetectionFunction" } + } + } + ); + +static PiperAdapter<ChromagramPlugin> +qmChromagramAdapter( + libname, + { "Visualisation" }, + { + { "chromagram", + { "http://purl.org/ontology/af/Chromagram" } + }, + { "chromameans", + { "" } + } + } + ); + +static PiperAdapter<ConstantQSpectrogram> +qmConstantQAdapter( + libname, + { "Visualisation" }, + { + { "constantq", + { "http://purl.org/ontology/af/Spectrogram" } + } + } + ); + +static PiperAdapter<TonalChangeDetect> +qmTonalChangeAdapter( + libname, + { "Key and Tonality" }, + { + { "tcstransform", + { "http://purl.org/ontology/af/TonalContentSpace" } + }, + { "tcfunction", + { "http://purl.org/ontology/af/TonalChangeDetectionFunction" } + }, + { "changepositions", + { "http://purl.org/ontology/af/TonalOnset" } + } + } + ); + +static PiperAdapter<KeyDetector> +qmKeyDetectorAdapter( + libname, + { "Key and Tonality" }, + { + { "tonic", + { "" } + }, + { "mode", + { "" } + }, + { "key", + { "http://purl.org/ontology/af/KeyChange" } + }, + { "keystrength", + { "" } + } + } + ); + +static PiperAdapter<SegmenterPlugin> +qmSegmenterAdapter( + libname, + { "Classification" }, + { + { "segmentation", + { "http://purl.org/ontology/af/StructuralSegment" } + } + } + ); + +static PiperAdapter<SimilarityPlugin> +qmSimilarityAdapter( + libname, + { "Classification" }, + { + { "distancematrix", + { "" } + }, + { "distancevector", + { "" } + }, + { "sorteddistancevector", + { "" } + }, + { "means", + { "" } + }, + { "variances", + { "" } + }, + { "beatspectrum", + { "" } + } + } + ); + +static PiperAdapter<MFCCPlugin> +qmMfccAdapter( + libname, + { "Low Level Features" }, + { + { "coefficients", + { "" } + }, + { "means", + { "" } + } + } + ); + +static PiperAdapter<BarBeatTracker> +qmBarBeatTrackerAdapter( + libname, + { "Time", "Tempo" }, + { + { "beats", + { "http://purl.org/ontology/af/Beat" } + }, + { "bars", + { "" } + }, + { "beatcounts", + { "" } + }, + { "beatsd", + { "" } + } + } + ); + +static PiperAdapter<DWT> +qmDwtAdapter( + libname, + { "Visualisation" }, + { + { "wcoeff", + { "" } + } + } + ); + +/* +static PiperAdapter<AdaptiveSpectrogram> +qmAdaptiveSpectrogramAdapter( + libname, + { "Visualisation" }, + { + { "output", + { "http://purl.org/ontology/af/Spectrogram" } + } + } + ); +*/ + +static PiperAdapter<Transcription> +qmTranscriptionAdapter( + libname, + { "Notes" }, + { + { "transcription", + { "http://purl.org/ontology/af/Note" } + } + } + ); static PiperPluginLibrary library({ - &beatTrackerAdapter, - &onsetDetectorAdapter, - &chromagramPluginAdapter, - &constantQAdapter, - &tonalChangeDetectorAdapter, - &keyDetectorAdapter, - &mfccPluginAdapter, - &segmenterPluginAdapter, - &similarityPluginAdapter, - &barBeatTrackPluginAdapter, -//!!! &adaptiveSpectrogramAdapter, - &dwtAdapter, - &transcriptionAdapter + &qmTempoTrackerAdapter, + &qmOnsetDetectorAdapter, + &qmChromagramAdapter, + &qmConstantQAdapter, + &qmTonalChangeAdapter, + &qmKeyDetectorAdapter, + &qmSegmenterAdapter, + &qmSimilarityAdapter, + &qmMfccAdapter, + &qmBarBeatTrackerAdapter, + &qmDwtAdapter, +// &qmAdaptivespectrogramAdapter, + &qmTranscriptionAdapter }); PIPER_EXPORT_LIBRARY(library);