Musly
An open-source audio music similarity library
musly.h
Go to the documentation of this file.
1 /* Copyright 2013-2014, Dominik Schnitzer <dominik@schnitzer.at>
2  *
3  * This file is part of Musly, a program for high performance music
4  * similarity computation: http://www.musly.org/.
5  *
6  * This Source Code Form is subject to the terms of the Mozilla
7  * Public License v. 2.0. If a copy of the MPL was not distributed
8  * with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
9  */
10 
30 #ifndef MUSLY_H_
31 #define MUSLY_H_
32 
33 #include <musly/musly_types.h>
34 
35 #ifdef WIN32
36 
37  #define MUSLY_EXPORT __declspec(dllexport)
38 #else
39 
40  #define MUSLY_EXPORT __attribute__ ((visibility("default")))
41 #endif
42 
43 #ifdef __cplusplus
44 extern "C"
45 {
46 #endif
47 
51 MUSLY_EXPORT const char*
53 
54 
62 MUSLY_EXPORT void
64  int level);
65 
66 
75 MUSLY_EXPORT const char*
77 
78 
88 MUSLY_EXPORT const char*
90 
91 
101 MUSLY_EXPORT const char*
103  musly_jukebox* jukebox);
104 
105 
130  const char* method,
131  const char* decoder);
132 
133 
143 MUSLY_EXPORT void
145  musly_jukebox* jukebox);
146 
147 
163 MUSLY_EXPORT int
165  musly_jukebox* jukebox,
166  musly_track** tracks,
167  int num_tracks);
168 
169 
185 MUSLY_EXPORT int
187  musly_jukebox* jukebox,
188  musly_track** tracks,
189  musly_trackid* trackids,
190  int num_tracks);
191 
192 
222 MUSLY_EXPORT int
224  musly_jukebox* jukebox,
225  musly_track* seed_track,
226  musly_trackid seed_trackid,
227  musly_track** tracks,
228  musly_trackid* trackids,
229  int num_tracks,
230  float* similarities);
231 
232 
258 int
260  musly_jukebox* jukebox,
261  musly_trackid seed,
262  musly_trackid* neighbors,
263  int num_neighbors);
264 
265 
278  musly_jukebox* jukebox);
279 
280 
287 MUSLY_EXPORT void
289  musly_track* track);
290 
291 
306 MUSLY_EXPORT int
308  musly_jukebox* jukebox);
309 
310 
321 MUSLY_EXPORT int
323  musly_jukebox* jukebox);
324 
325 
340 MUSLY_EXPORT int
342  musly_jukebox* jukebox,
343  musly_track* from_track,
344  unsigned char* to_buffer);
345 
346 
360 MUSLY_EXPORT int
362  musly_jukebox* jukebox,
363  unsigned char* from_buffer,
364  musly_track* to_track);
365 
366 
381 const char*
383  musly_jukebox* jukebox,
384  musly_track* from_track);
385 
386 
406 MUSLY_EXPORT int
408  musly_jukebox* jukebox,
409  float* mono_22khz_pcm,
410  int length_pcm,
411  musly_track* track);
412 
413 
435 MUSLY_EXPORT int
437  musly_jukebox* jukebox,
438  const char* audiofile,
439  int max_seconds,
440  musly_track* track);
441 
442 #ifdef __cplusplus
443 }
444 #endif
445 
446 #endif // MUSLY_H_