comparison util/SMALL_midiGenerate.m @ 24:fc395272d53e

(none)
author idamnjanovic
date Tue, 27 Apr 2010 13:33:00 +0000
parents 33850553b702
children 8e660fd14774
comparison
equal deleted inserted replaced
23:636a2a3d7302 24:fc395272d53e
1 function reconstructed=SMALL_midiGenerate(V, Problem) 1 function reconstructed=SMALL_midiGenerate(V, Problem)
2 %%% Reconstraction of midi file from representation in the given dictionary 2 %%% Reconstraction of midi file from representation in the given dictionary
3 % Ivan Damnjanovic 2009 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.
4 % 12 %
5 % SMALL_midiGenerate is a part of SMALLbox and can be use to reconstruct 13 % SMALL_midiGenerate is a part of SMALLbox and can be use to reconstruct
6 % a midi file given representation of the training set (V) in the 14 % a midi file given representation of the training set (V) in the
7 % dictionary Problem.A. 15 % dictionary Problem.A.
8 % Output is reconstructed structure with two fields: 16 % Output is reconstructed structure with two fields:
9 % - reconstructed.notes - matrix with transcribed notes 17 % - reconstructed.notes - matrix with transcribed notes
10 % - reconstructed.midi - midi representation of transcription 18 % - reconstructed.midi - midi representation of transcription
11 19
12 20 %%
13 U=Problem.A; % Dictionary used for representation 21 U=Problem.A; % Dictionary used for representation
14 fs=Problem.fs; % Sampling rate 22 fs=Problem.fs; % Sampling rate
15 f=Problem.f; % vector of frequencies at wihch spectrogram is computed 23 f=Problem.f; % vector of frequencies at wihch spectrogram is computed
16 24
17 ts=(Problem.windowSize*Problem.overlap)/fs; %size of an analysis frame in seconds 25 ts=(Problem.windowSize*Problem.overlap)/fs; %size of an analysis frame in seconds