annotate dsp/rhythm/BeatSpectrum.h @ 256:43943a4382ef

* Add cosine distance and the self-similarity matrix used for SB rhythmic similarity * Pull out SB timbral similarity KL divergence into its own file
author Chris Cannam <c.cannam@qmul.ac.uk>
date Fri, 18 Jan 2008 14:40:20 +0000
parents
children 8bb764969d50
rev   line source
c@256 1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
c@256 2
c@256 3 /*
c@256 4 QM DSP Library
c@256 5
c@256 6 Centre for Digital Music, Queen Mary, University of London.
c@256 7 This file copyright 2008 Kurt Jacobson and QMUL.
c@256 8 All rights reserved.
c@256 9 */
c@256 10
c@256 11 #ifndef BEATSPECTRUM_H
c@256 12 #define BEATSPECTRUM_H
c@256 13
c@256 14 #include <vector>
c@256 15
c@256 16 /**
c@256 17 * Given a matrix of "feature values", calculate a self-similarity
c@256 18 * vector. The resulting vector will have half as many elements as
c@256 19 * the number of columns in the matrix. This is based on the
c@256 20 * SoundBite rhythmic similarity code.
c@256 21 */
c@256 22
c@256 23 class BeatSpectrum
c@256 24 {
c@256 25 public:
c@256 26 BeatSpectrum();
c@256 27 ~BeatSpectrum();
c@256 28
c@256 29 std::vector<double> process(const std::vector<std::vector<double> > &inmatrix);
c@256 30
c@256 31 };
c@256 32
c@256 33 #endif
c@256 34
c@256 35