To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.

The primary repository for this project is hosted at svn://svn.code.sf.net/p/onsetsds/code/ .
This repository is a read-only copy which is updated automatically every hour.

Statistics Download as Zip
| Branch: | Revision:

root / mat_oct / onsetsds.m @ 4:747075e72e54

History | View | Annotate | Download (1.44 KB)

1
function onsets = onsetsds(fftdata, odftype, medspan, srate)
2
% function onsets = onsetsds(fftdata)
3
% function onsets = onsetsds(fftdata, odftype)
4
% function onsets = onsetsds(fftdata, odftype, medspan)
5
% function onsets = onsetsds(fftdata, odftype, medspan, srate)
6
%
7
% Musical onset detector using adaptive whitening 
8
%     -- see http://onsetsds.sourceforge.net/
9
%
10
%  "fftdata": a matrix of FFT frames (1 per column) derived from an audio 
11
%             file. The common case (used for testing the code) is 44.1 kHz 
12
%             audio with 50% overlap and Hann windowing.
13
%
14
%  "odftype": integer specifying onset detection function to use:
15
%              0 'power', 
16
%              1 'magsum', 
17
%              2 'complex',
18
%              3 'rcomplex',  <-- default
19
%              4 'phase', 
20
%              5 'wphase', 
21
%              6 'mkl'.
22
%  "medspan": length of median-filter in frames, default is 11.
23
%  "srate": sampling rate of audio, default is 44100.
24
%
25
% For more info see D. Stowell and M. D. Plumbley, 
26
%         "Adaptive whitening for improved real-time audio onset detection", 
27
%         Proceedings of the International Computer Music Conference (ICMC'07), 
28
%         Copenhagen, Denmark, August 2007.
29
%
30
%   onsetsds is free software: you can redistribute it and/or modify
31
%   it under the terms of the GNU General Public License as published by
32
%   the Free Software Foundation, either version 2 of the License, or
33
%   (at your option) any later version.