comparison nnls-chroma/nnls-chroma.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 e9246f5afbf3
children
comparison
equal deleted inserted replaced
47:1c1bad814d02 48:4d450d496793
1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
2 1
3 #include "PiperExport.h" 2 #include "PiperExport.h"
4 3
5 #include "NNLSChroma.h" 4 #include "NNLSChroma.h"
6 #include "Chordino.h" 5 #include "Chordino.h"
7 #include "Tuning.h" 6 #include "Tuning.h"
8 7
9 std::string soname("nnls-chroma"); 8 using piper_vamp_js::PiperAdapter;
9 using piper_vamp_js::PiperPluginLibrary;
10 10
11 piper_vamp_js::PiperAdapter<NNLSChroma> chromaAdapter(soname); 11 static std::string libname("nnls-chroma");
12 piper_vamp_js::PiperAdapter<Chordino> chordinoAdapter(soname);
13 piper_vamp_js::PiperAdapter<Tuning> tuningAdapter(soname);
14 12
15 piper_vamp_js::PiperPluginLibrary library({ 13 static PiperAdapter<NNLSChroma>
16 &chromaAdapter, &chordinoAdapter, &tuningAdapter 14 nnlsChromaAdapter(
15 libname,
16 { "Visualisation" },
17 {
18 { "logfreqspec",
19 { "http://purl.org/ontology/af/Spectrogram" }
20 },
21 { "tunedlogfreqspec",
22 { "http://purl.org/ontology/af/Spectrogram" }
23 },
24 { "semitonespectrum",
25 { "http://purl.org/ontology/af/Spectrogram" }
26 },
27 { "chroma",
28 { "http://purl.org/ontology/af/Chromagram" }
29 },
30 { "basschroma",
31 { "http://purl.org/ontology/af/Chromagram" }
32 },
33 { "bothchroma",
34 { "http://purl.org/ontology/af/Chromagram" }
35 }
36 }
37 );
38
39 static PiperAdapter<Chordino>
40 chordinoAdapter(
41 libname,
42 { "Notes" },
43 {
44 { "simplechord",
45 { "http://purl.org/ontology/af/ChordSegment" }
46 },
47 { "chordnotes",
48 { "" }
49 },
50 { "harmonicchange",
51 { "http://purl.org/ontology/af/TonalChangeDetectionFunction" }
52 },
53 { "loglikelihood",
54 { "" }
55 }
56 }
57 );
58
59 static PiperAdapter<Tuning>
60 tuningAdapter(
61 libname,
62 { "Key and Tonality" },
63 {
64 { "tuning",
65 { "http://purl.org/ontology/af/MusicSegment" }
66 },
67 { "localtuning",
68 { "" }
69 }
70 }
71 );
72
73 static PiperPluginLibrary library({
74 &nnlsChromaAdapter,
75 &chordinoAdapter,
76 &tuningAdapter
17 }); 77 });
18 78
19 PIPER_EXPORT_LIBRARY(library); 79 PIPER_EXPORT_LIBRARY(library);
20 80