Mercurial > hg > mauch-mirex-2010
changeset 1:d57b71cb7582
Source for the encrypted MATLAB .p files
author | Chris Cannam |
---|---|
date | Tue, 24 Apr 2012 11:53:10 +0100 |
parents | 4182672fd6f8 |
children | 8c2b2c5453a2 |
files | run_mirex.m run_segmentation.m |
diffstat | 2 files changed, 84 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run_mirex.m Tue Apr 24 11:53:10 2012 +0100 @@ -0,0 +1,44 @@ +function run_mirex(filename,outfilename,chromafilename) +%% +warning off +path(path,genpath('.')); +warning on + +fprintf(2,'[MATLAB] initialising parameters...'); +param = param_mirex(chromafilename); +song = song_skeleton(filename); +fprintf(2,'done.\n'); + +fprintf(2,'[MATLAB] building DBN...'); +bnet = dbn_ISMIR2010(param); +fprintf(2,'done.\n'); + +fprintf(2,'[MATLAB] reading chroma...'); +song = song_chroma(song, param); +fprintf(2,'done.\n'); + +fprintf(2,'[MATLAB] beat tracking (M Davies)...'); +song = song_beat(song, param); +fprintf(2,'done.\n'); + +fprintf(2,'[MATLAB] beat-synchronising chroma...'); +song = song_syncchroma(song,param); +fprintf(2,'done.\n'); + +fprintf(2,'[MATLAB] segmentation...'); +song = song_segment(song, param); +song = song_segchroma(song,param); +fprintf(2,'.\n'); + +fprintf(2,'[MATLAB] DBN inference...'); +song = inference(song, bnet, param); +fprintf(2,'.\n'); +%% +fprintf(2,'[MATLAB] writing output files...'); +% fprintf(1,'writing to %s\n', outfilename) +write_song(song, bnet, param, outfilename, 'chordlab', 1); +% write_song(song, bnet, param, [outfilename(1:end-3) 'keylab'], 'keylab', 1); +% parts2csv(song, [outfilename(1:end-3) 'csv']); +% parts2csv(song, [outfilename(1:end-3) 'intcsv'],'integrated'); +fprintf(2,'done.\n'); +exit
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run_segmentation.m Tue Apr 24 11:53:10 2012 +0100 @@ -0,0 +1,40 @@ +function run_segmentation(filename,outfilename,chromafilename) +%% +warning off +path(path,genpath('.')); +warning on + +fprintf(2,'[MATLAB] initialising parameters...'); +param = param_segmentation(chromafilename); +song = song_skeleton(filename); +fprintf(2,'done.\n'); + +fprintf(2,'[MATLAB] reading chroma...'); +song = song_chroma(song, param); +fprintf(2,'done.\n'); + +fprintf(2,'[MATLAB] beat tracking (M Davies)...'); +song = song_beat(song, param); +fprintf(2,'done.\n'); + +fprintf(2,'[MATLAB] beat-synchronising chroma...'); +song = song_syncchroma(song,param); +fprintf(2,'done.\n'); + +fprintf(2,'[MATLAB] segmentation...'); +song = song_segment(song, param); +song = song_segchroma(song,param); +fprintf(2,'.\n'); + +fprintf(2,'[MATLAB] post-processing segmentation...'); +song = integratesmallparts(song); +fprintf(2,'.\n'); +%% +fprintf(2,'[MATLAB] writing output file...'); +% fprintf(1,'writing to %s\n', outfilename) +% write_song(song, bnet, param, outfilename, 'chordlab', 1); +% write_song(song, bnet, param, [outfilename(1:end-3) 'keylab'], 'keylab', 1); +% parts2csv(song, [outfilename(1:end-3) 'csv']); +parts2mirex(song, outfilename,'integrated'); +fprintf(2,'done.\n'); +exit \ No newline at end of file