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 https://github.com/cannam/constant-q-cpp/ .
This repository is a read-only copy which is updated automatically every hour.

Statistics Download as Zip
| Branch: | Revision:

root / README

History | View | Annotate | Download (2.77 KB)

1 126:b87290781071 c
2
Constant-Q Library
3
==================
4
5 130:1e33f719dde1 c
A C++ library and Vamp plugin implementing the Constant-Q transform
6
of a time-domain signal.
7 126:b87290781071 c
8
https://code.soundsoftware.ac.uk/projects/constant-q-cpp
9
10
The Constant-Q transform is a time-to-frequency-domain transform
11
related to the short-time Fourier transform, but with output bins
12
spaced logarithmically in frequency, rather than linearly. The output
13
bins are therefore linearly spaced in terms of musical pitch.
14
15 193:8b78ce63f0e1 c
This implementation is reasonably fast and is causal, operating
16
block-by-block on the input, though with quite high latency depending
17
on the frequency range specified. By default it produces output at a
18
higher time resolution than some other implementations, using multiple
19
kernel atoms per time block. The inverse transform is approximate
20
rather than exact (see the paper cited below for details).
21
22
23
About this library
24
------------------
25
26 126:b87290781071 c
This library provides:
27
28
 * Forward transform: time-domain to complex Constant-Q bins
29
 * Forward spectrogram: time-domain to interpolated Constant-Q
30
   magnitude spectrogram
31
 * Inverse transform: complex Constant-Q bins to time domain
32
33 163:f21e612f26e8 c
The Vamp plugin provides:
34
35
 * Constant-Q magnitude spectrogram with high and low frequency
36
   extents defined in Hz
37
 * Constant-Q magnitude spectrogram with high and low frequency
38
   extents defined as MIDI pitch values
39
 * Pitch chromagram obtained by folding a Constant-Q spectrogram
40
   around into a single-octave range
41
42 193:8b78ce63f0e1 c
43
Building the library and plugin
44
-------------------------------
45
46
To compile this code, use "make -f <file>" where <file> is one of
47
Makefile.linux, Makefile.osx, Makefile.mingw32 depending on
48
platform. These files set up some flags and include Makefile.inc,
49
which defines the input files and so forth. You could equally write
50
your own Makefile which does the same.
51
52
The Vamp plugin part of the build expects to find a compiled version
53
of the Vamp Plugin SDK in a neighbouring folder (../vamp-plugin-sdk).
54
The unit tests also require Boost headers to be available.
55
56
Note that this code uses the KissFFT library (compiled from source
57
bundled here) in its non-default double-precision mode via the use of
58
the flag -Dkiss_fft_scalar=double in Makefile.inc. If you want to
59
build this code using an external KissFFT library or custom build
60
scripts, you may need to do some work to ensure you have the right
61
configuration.
62
63
64
Credits
65
-------
66
67 126:b87290781071 c
The method is drawn from Christian Schörkhuber and Anssi Klapuri,
68
"Constant-Q transform toolbox for music processing", SMC 2010. See the
69
file CITATION for details. If you use this code in research work,
70
please cite this paper.
71
72 182:8e64d3da52f5 c
The C++ implementation is by Chris Cannam, Copyright 2014-2015 Queen
73
Mary, University of London.
74 126:b87290781071 c
75
The library is provided under a liberal BSD/MIT-style open source
76
licence. See the file COPYING for more information.