Musly
An open-source audio music similarity library
Main Page
Data Structures
Files
File List
Globals
include
musly
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
*
52
musly_version
();
53
54
62
MUSLY_EXPORT
void
63
musly_debug
(
64
int
level);
65
66
75
MUSLY_EXPORT
const
char
*
76
musly_jukebox_listmethods
();
77
78
88
MUSLY_EXPORT
const
char
*
89
musly_jukebox_listdecoders
();
90
91
101
MUSLY_EXPORT
const
char
*
102
musly_jukebox_aboutmethod
(
103
musly_jukebox
* jukebox);
104
105
128
MUSLY_EXPORT
musly_jukebox
*
129
musly_jukebox_poweron
(
130
const
char
* method,
131
const
char
* decoder);
132
133
143
MUSLY_EXPORT
void
144
musly_jukebox_poweroff
(
145
musly_jukebox
* jukebox);
146
147
163
MUSLY_EXPORT
int
164
musly_jukebox_setmusicstyle
(
165
musly_jukebox
* jukebox,
166
musly_track
** tracks,
167
int
num_tracks);
168
169
185
MUSLY_EXPORT
int
186
musly_jukebox_addtracks
(
187
musly_jukebox
* jukebox,
188
musly_track
** tracks,
189
musly_trackid
* trackids,
190
int
num_tracks);
191
192
222
MUSLY_EXPORT
int
223
musly_jukebox_similarity
(
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
259
musly_jukebox_guessneighbors
(
260
musly_jukebox
* jukebox,
261
musly_trackid
seed,
262
musly_trackid
* neighbors,
263
int
num_neighbors);
264
265
276
MUSLY_EXPORT
musly_track
*
277
musly_track_alloc
(
278
musly_jukebox
* jukebox);
279
280
287
MUSLY_EXPORT
void
288
musly_track_free
(
289
musly_track
* track);
290
291
306
MUSLY_EXPORT
int
307
musly_track_size
(
308
musly_jukebox
* jukebox);
309
310
321
MUSLY_EXPORT
int
322
musly_track_binsize
(
323
musly_jukebox
* jukebox);
324
325
340
MUSLY_EXPORT
int
341
musly_track_tobin
(
342
musly_jukebox
* jukebox,
343
musly_track
* from_track,
344
unsigned
char
* to_buffer);
345
346
360
MUSLY_EXPORT
int
361
musly_track_frombin
(
362
musly_jukebox
* jukebox,
363
unsigned
char
* from_buffer,
364
musly_track
* to_track);
365
366
381
const
char
*
382
musly_track_tostr
(
383
musly_jukebox
* jukebox,
384
musly_track
* from_track);
385
386
406
MUSLY_EXPORT
int
407
musly_track_analyze_pcm
(
408
musly_jukebox
* jukebox,
409
float
* mono_22khz_pcm,
410
int
length_pcm,
411
musly_track
* track);
412
413
435
MUSLY_EXPORT
int
436
musly_track_analyze_audiofile
(
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_
Generated on Fri Jan 24 2014 16:47:37 for Musly by
1.8.4