To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.
root / run_segmentation.m @ 1:d57b71cb7582
History | View | Annotate | Download (1.14 KB)
| 1 |
function run_segmentation(filename,outfilename,chromafilename) |
|---|---|
| 2 |
%% |
| 3 |
warning off |
| 4 |
path(path,genpath('.'));
|
| 5 |
warning on |
| 6 |
|
| 7 |
fprintf(2,'[MATLAB] initialising parameters...'); |
| 8 |
param = param_segmentation(chromafilename); |
| 9 |
song = song_skeleton(filename); |
| 10 |
fprintf(2,'done.\n'); |
| 11 |
|
| 12 |
fprintf(2,'[MATLAB] reading chroma...'); |
| 13 |
song = song_chroma(song, param); |
| 14 |
fprintf(2,'done.\n'); |
| 15 |
|
| 16 |
fprintf(2,'[MATLAB] beat tracking (M Davies)...'); |
| 17 |
song = song_beat(song, param); |
| 18 |
fprintf(2,'done.\n'); |
| 19 |
|
| 20 |
fprintf(2,'[MATLAB] beat-synchronising chroma...'); |
| 21 |
song = song_syncchroma(song,param); |
| 22 |
fprintf(2,'done.\n'); |
| 23 |
|
| 24 |
fprintf(2,'[MATLAB] segmentation...'); |
| 25 |
song = song_segment(song, param); |
| 26 |
song = song_segchroma(song,param); |
| 27 |
fprintf(2,'.\n'); |
| 28 |
|
| 29 |
fprintf(2,'[MATLAB] post-processing segmentation...'); |
| 30 |
song = integratesmallparts(song); |
| 31 |
fprintf(2,'.\n'); |
| 32 |
%% |
| 33 |
fprintf(2,'[MATLAB] writing output file...'); |
| 34 |
% fprintf(1,'writing to %s\n', outfilename) |
| 35 |
% write_song(song, bnet, param, outfilename, 'chordlab', 1); |
| 36 |
% write_song(song, bnet, param, [outfilename(1:end-3) 'keylab'], 'keylab', 1); |
| 37 |
% parts2csv(song, [outfilename(1:end-3) 'csv']); |
| 38 |
parts2mirex(song, outfilename,'integrated'); |
| 39 |
fprintf(2,'done.\n'); |
| 40 |
exit |