Mercurial > hg > silvet
comparison notes/transcriptionMultipleTemplates-annotated.m @ 56:4fa3ea96eb65
Merge from branch preshift
author | Chris Cannam |
---|---|
date | Tue, 08 Apr 2014 13:30:43 +0100 |
parents | 1a4cab304d68 |
children |
comparison
equal
deleted
inserted
replaced
53:9e2d1f6cd43a | 56:4fa3ea96eb65 |
---|---|
60 %% X is sampled from intCQT at 7.1128-column intervals, giving | 60 %% X is sampled from intCQT at 7.1128-column intervals, giving |
61 %% 4350x545 in this case, so clearly 100 columns per second; then | 61 %% 4350x545 in this case, so clearly 100 columns per second; then |
62 %% transposed | 62 %% transposed |
63 X = intCQT(:,round(1:7.1128:size(intCQT,2)))'; | 63 X = intCQT(:,round(1:7.1128:size(intCQT,2)))'; |
64 | 64 |
65 %% median filter to reduce noise -- I think this is essentially the | 65 %% median filter to remove broadband noise (i.e we filter across |
66 %% same as Xue's method for devuvuzelation | 66 %% frequency rather than time) |
67 noiseLevel1 = medfilt1(X',40); | 67 noiseLevel1 = medfilt1(X',40); |
68 noiseLevel2 = medfilt1(min(X',noiseLevel1),40); | 68 noiseLevel2 = medfilt1(min(X',noiseLevel1),40); |
69 X = max(X-noiseLevel2',0); | 69 X = max(X-noiseLevel2',0); |
70 | 70 |
71 %% take every 4th row. We had 100 per second (10ms) so this is 40ms as | 71 %% take every 4th row. We had 100 per second (10ms) so this is 40ms as |
72 %% the comment says. I am guessing we denoised at a higher resolution | 72 %% the comment says. It's not clear to me why we denoise before doing |
73 %% for better denoising, though still not at the original resolution, | 73 %% this rather than after? Y is now 1088x545 in our example and looks |
74 %% for speed. Y is now 1088x545 in our example and looks pretty clean | 74 %% pretty clean as a contour plot. |
75 %% as a contour plot. | |
76 Y = X(1:4:size(X,1),:); % 40ms step | 75 Y = X(1:4:size(X,1),:); % 40ms step |
77 | 76 |
78 %% a 1x1088 array containing the sum of each column. Doesn't appear to | 77 %% a 1x1088 array containing the sum of each column. Doesn't appear to |
79 %% be used in here, but it is returned to the caller. | 78 %% be used in here, but it is returned to the caller. |
80 sumY = sum(Y'); | 79 sumY = sum(Y'); |