Mercurial > hg > smallbox
comparison Problems/generateAMT_Learning_Problem.m @ 128:8e660fd14774 ivand_dev
Feature 186
author | Ivan Damnjanovic lnx <ivan.damnjanovic@eecs.qmul.ac.uk> |
---|---|
date | Mon, 13 Jun 2011 14:55:45 +0100 |
parents | 0211faef9add |
children | 9c418bea7f6a |
comparison
equal
deleted
inserted
replaced
126:db5a7fe1a404 | 128:8e660fd14774 |
---|---|
1 function data = generateAMT_Learning_Problem(nfft, windowSize, overlap) | 1 function data = generateAMT_Learning_Problem(nfft, windowSize, overlap) |
2 %%% Generate Automatic Music Transcription Problem | 2 %% Generate Automatic Music Transcription Problem |
3 % | 3 % |
4 % Centre for Digital Music, Queen Mary, University of London. | |
5 % This file copyright 2009 Ivan Damnjanovic. | |
6 % | |
7 % This program is free software; you can redistribute it and/or | |
8 % modify it under the terms of the GNU General Public License as | |
9 % published by the Free Software Foundation; either version 2 of the | |
10 % License, or (at your option) any later version. See the file | |
11 % COPYING included with this distribution for more information. | |
12 % | |
13 % | |
14 % generateAMT_Learning_Problem is a part of the SMALLbox and generates | 4 % generateAMT_Learning_Problem is a part of the SMALLbox and generates |
15 % a problem that can be used for comparison of Dictionary Learning/Sparse | 5 % a problem that can be used for comparison of Dictionary Learning/Sparse |
16 % Representation techniques in automatic music transcription scenario. | 6 % Representation techniques in automatic music transcription scenario. |
17 % The function prompts a user for an audio file (mid, wav, mat) reads it | 7 % The function prompts a user for an audio file (mid, wav, mat) reads it |
18 % and generates a spectrogram given fft size (default nfft=4096), analysis | 8 % and generates a spectrogram given fft size (default nfft=4096), analysis |
29 % n - number of time points in the spectrogram | 19 % n - number of time points in the spectrogram |
30 % p - number of dictionary elements to be learned (eg 88 for piano) | 20 % p - number of dictionary elements to be learned (eg 88 for piano) |
31 % notesOriginal - notes of the original audio to be used for | 21 % notesOriginal - notes of the original audio to be used for |
32 % comparison (if midi of the original exists) | 22 % comparison (if midi of the original exists) |
33 % name - name of the audio file to transcribe | 23 % name - name of the audio file to transcribe |
34 | 24 |
25 % Centre for Digital Music, Queen Mary, University of London. | |
26 % This file copyright 2009 Ivan Damnjanovic. | |
27 % | |
28 % This program is free software; you can redistribute it and/or | |
29 % modify it under the terms of the GNU General Public License as | |
30 % published by the Free Software Foundation; either version 2 of the | |
31 % License, or (at your option) any later version. See the file | |
32 % COPYING included with this distribution for more information. | |
33 % | |
35 %% | 34 %% |
36 FS=filesep; | 35 FS=filesep; |
37 if ~ exist( 'nfft', 'var' ) || isempty(nfft), nfft = 4096; end | 36 if ~ exist( 'nfft', 'var' ) || isempty(nfft), nfft = 4096; end |
38 if ~ exist( 'windowSize', 'var' ) || isempty(windowSize), windowSize = 2822; end | 37 if ~ exist( 'windowSize', 'var' ) || isempty(windowSize), windowSize = 2822; end |
39 if ~ exist( 'overlap', 'var' ) || isempty(overlap), overlap = 0.5; end | 38 if ~ exist( 'overlap', 'var' ) || isempty(overlap), overlap = 0.5; end |