Mercurial > hg > piper-vamp-js-builds
comparison 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 |
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 "plugins/BeatTrack.h" | 4 #include "plugins/BeatTrack.h" |
6 #include "plugins/OnsetDetect.h" | 5 #include "plugins/OnsetDetect.h" |
17 #include "plugins/Transcription.h" | 16 #include "plugins/Transcription.h" |
18 | 17 |
19 using piper_vamp_js::PiperAdapter; | 18 using piper_vamp_js::PiperAdapter; |
20 using piper_vamp_js::PiperPluginLibrary; | 19 using piper_vamp_js::PiperPluginLibrary; |
21 | 20 |
22 static std::string soname("qm-vamp-plugins"); | 21 static std::string libname("qm-vamp-plugins"); |
23 | 22 |
24 static PiperAdapter<BeatTracker> beatTrackerAdapter(soname); | 23 static PiperAdapter<BeatTracker> |
25 static PiperAdapter<OnsetDetector> onsetDetectorAdapter(soname); | 24 qmTempoTrackerAdapter( |
26 static PiperAdapter<ChromagramPlugin> chromagramPluginAdapter(soname); | 25 libname, |
27 static PiperAdapter<ConstantQSpectrogram> constantQAdapter(soname); | 26 { "Time", "Tempo" }, |
28 static PiperAdapter<TonalChangeDetect> tonalChangeDetectorAdapter(soname); | 27 { |
29 static PiperAdapter<KeyDetector> keyDetectorAdapter(soname); | 28 { "beats", |
30 static PiperAdapter<MFCCPlugin> mfccPluginAdapter(soname); | 29 { "http://purl.org/ontology/af/Beat" } |
31 static PiperAdapter<SegmenterPlugin> segmenterPluginAdapter(soname); | 30 }, |
32 static PiperAdapter<SimilarityPlugin> similarityPluginAdapter(soname); | 31 { "detection_fn", |
33 static PiperAdapter<BarBeatTracker> barBeatTrackPluginAdapter(soname); | 32 { "http://purl.org/ontology/af/OnsetDetectionFunction" } |
34 //!!!static PiperAdapter<AdaptiveSpectrogram> adaptiveSpectrogramAdapter(soname); | 33 }, |
35 static PiperAdapter<DWT> dwtAdapter(soname); | 34 { "tempo", |
36 static PiperAdapter<Transcription> transcriptionAdapter(soname); | 35 { "http://purl.org/ontology/af/Tempo" } |
36 } | |
37 } | |
38 ); | |
39 | |
40 static PiperAdapter<OnsetDetector> | |
41 qmOnsetDetectorAdapter( | |
42 libname, | |
43 { "Time", "Onsets" }, | |
44 { | |
45 { "onsets", | |
46 { "http://purl.org/ontology/af/Onset" } | |
47 }, | |
48 { "detection_fn", | |
49 { "http://purl.org/ontology/af/OnsetDetectionFunction" } | |
50 }, | |
51 { "smoothed_df", | |
52 { "http://purl.org/ontology/af/OnsetDetectionFunction" } | |
53 } | |
54 } | |
55 ); | |
56 | |
57 static PiperAdapter<ChromagramPlugin> | |
58 qmChromagramAdapter( | |
59 libname, | |
60 { "Visualisation" }, | |
61 { | |
62 { "chromagram", | |
63 { "http://purl.org/ontology/af/Chromagram" } | |
64 }, | |
65 { "chromameans", | |
66 { "" } | |
67 } | |
68 } | |
69 ); | |
70 | |
71 static PiperAdapter<ConstantQSpectrogram> | |
72 qmConstantQAdapter( | |
73 libname, | |
74 { "Visualisation" }, | |
75 { | |
76 { "constantq", | |
77 { "http://purl.org/ontology/af/Spectrogram" } | |
78 } | |
79 } | |
80 ); | |
81 | |
82 static PiperAdapter<TonalChangeDetect> | |
83 qmTonalChangeAdapter( | |
84 libname, | |
85 { "Key and Tonality" }, | |
86 { | |
87 { "tcstransform", | |
88 { "http://purl.org/ontology/af/TonalContentSpace" } | |
89 }, | |
90 { "tcfunction", | |
91 { "http://purl.org/ontology/af/TonalChangeDetectionFunction" } | |
92 }, | |
93 { "changepositions", | |
94 { "http://purl.org/ontology/af/TonalOnset" } | |
95 } | |
96 } | |
97 ); | |
98 | |
99 static PiperAdapter<KeyDetector> | |
100 qmKeyDetectorAdapter( | |
101 libname, | |
102 { "Key and Tonality" }, | |
103 { | |
104 { "tonic", | |
105 { "" } | |
106 }, | |
107 { "mode", | |
108 { "" } | |
109 }, | |
110 { "key", | |
111 { "http://purl.org/ontology/af/KeyChange" } | |
112 }, | |
113 { "keystrength", | |
114 { "" } | |
115 } | |
116 } | |
117 ); | |
118 | |
119 static PiperAdapter<SegmenterPlugin> | |
120 qmSegmenterAdapter( | |
121 libname, | |
122 { "Classification" }, | |
123 { | |
124 { "segmentation", | |
125 { "http://purl.org/ontology/af/StructuralSegment" } | |
126 } | |
127 } | |
128 ); | |
129 | |
130 static PiperAdapter<SimilarityPlugin> | |
131 qmSimilarityAdapter( | |
132 libname, | |
133 { "Classification" }, | |
134 { | |
135 { "distancematrix", | |
136 { "" } | |
137 }, | |
138 { "distancevector", | |
139 { "" } | |
140 }, | |
141 { "sorteddistancevector", | |
142 { "" } | |
143 }, | |
144 { "means", | |
145 { "" } | |
146 }, | |
147 { "variances", | |
148 { "" } | |
149 }, | |
150 { "beatspectrum", | |
151 { "" } | |
152 } | |
153 } | |
154 ); | |
155 | |
156 static PiperAdapter<MFCCPlugin> | |
157 qmMfccAdapter( | |
158 libname, | |
159 { "Low Level Features" }, | |
160 { | |
161 { "coefficients", | |
162 { "" } | |
163 }, | |
164 { "means", | |
165 { "" } | |
166 } | |
167 } | |
168 ); | |
169 | |
170 static PiperAdapter<BarBeatTracker> | |
171 qmBarBeatTrackerAdapter( | |
172 libname, | |
173 { "Time", "Tempo" }, | |
174 { | |
175 { "beats", | |
176 { "http://purl.org/ontology/af/Beat" } | |
177 }, | |
178 { "bars", | |
179 { "" } | |
180 }, | |
181 { "beatcounts", | |
182 { "" } | |
183 }, | |
184 { "beatsd", | |
185 { "" } | |
186 } | |
187 } | |
188 ); | |
189 | |
190 static PiperAdapter<DWT> | |
191 qmDwtAdapter( | |
192 libname, | |
193 { "Visualisation" }, | |
194 { | |
195 { "wcoeff", | |
196 { "" } | |
197 } | |
198 } | |
199 ); | |
200 | |
201 /* | |
202 static PiperAdapter<AdaptiveSpectrogram> | |
203 qmAdaptiveSpectrogramAdapter( | |
204 libname, | |
205 { "Visualisation" }, | |
206 { | |
207 { "output", | |
208 { "http://purl.org/ontology/af/Spectrogram" } | |
209 } | |
210 } | |
211 ); | |
212 */ | |
213 | |
214 static PiperAdapter<Transcription> | |
215 qmTranscriptionAdapter( | |
216 libname, | |
217 { "Notes" }, | |
218 { | |
219 { "transcription", | |
220 { "http://purl.org/ontology/af/Note" } | |
221 } | |
222 } | |
223 ); | |
37 | 224 |
38 static PiperPluginLibrary library({ | 225 static PiperPluginLibrary library({ |
39 &beatTrackerAdapter, | 226 &qmTempoTrackerAdapter, |
40 &onsetDetectorAdapter, | 227 &qmOnsetDetectorAdapter, |
41 &chromagramPluginAdapter, | 228 &qmChromagramAdapter, |
42 &constantQAdapter, | 229 &qmConstantQAdapter, |
43 &tonalChangeDetectorAdapter, | 230 &qmTonalChangeAdapter, |
44 &keyDetectorAdapter, | 231 &qmKeyDetectorAdapter, |
45 &mfccPluginAdapter, | 232 &qmSegmenterAdapter, |
46 &segmenterPluginAdapter, | 233 &qmSimilarityAdapter, |
47 &similarityPluginAdapter, | 234 &qmMfccAdapter, |
48 &barBeatTrackPluginAdapter, | 235 &qmBarBeatTrackerAdapter, |
49 //!!! &adaptiveSpectrogramAdapter, | 236 &qmDwtAdapter, |
50 &dwtAdapter, | 237 // &qmAdaptivespectrogramAdapter, |
51 &transcriptionAdapter | 238 &qmTranscriptionAdapter |
52 }); | 239 }); |
53 | 240 |
54 PIPER_EXPORT_LIBRARY(library); | 241 PIPER_EXPORT_LIBRARY(library); |
55 | 242 |