Aquila  3.0.0-dev
Classes | Typedefs | Enumerations | Functions | Variables
Aquila Namespace Reference

Main library namespace. More...

Classes

class   AquilaFft
  A custom implementation of FFT radix-2 algorithm. More...
 
class   BarlettWindow
  Barlett (triangular) window. More...
 
class   BlackmanWindow
  Blackman window. More...
 
class   ConfigurationException
  Runtime configuration exception. More...
 
class   Dct
  An implementation of the Discrete Cosine Transform. More...
 
class   Dft
  A straightforward implementation of the Discrete Fourier Transform. More...
 
class   Dtw
  Dynamic Time Warping implementation. More...
 
struct   DtwPoint
  A struct representing a single point in the DTW array. More...
 
class   Exception
  Base exception class of the library. More...
 
class   Fft
  An interface for FFT calculation classes. More...
 
class   FftFactory
  A factory class to manage the creation of FFT calculation objects. More...
 
class   FlattopWindow
  Flat-top window. More...
 
class   FormatException
  Data format-related exception. More...
 
class   Frame
  An ecapsulation of a single frame of the signal. More...
 
class   FramesCollection
  A lightweight wrapper for a vector of Frames. More...
 
class   GaussianWindow
  Creates Gaussian window of given size, with optional sigma parameter. More...
 
class   Generator
  The base interface for signal generators. More...
 
class   HammingWindow
  Hamming window. More...
 
class   HannWindow
  Hann window. More...
 
class   KarplusStrongSynthesizer
  Very simple guitar synthesizer using Karplus-Strong algorithm. More...
 
class   MelFilter
  Encapsulation of a single Mel-frequency filter. More...
 
class   MelFilterBank
  A wrapper class for a vector of triangular filters. More...
 
class   Mfcc
  The Mfcc class implements calculation of MFCC features from input signal. More...
 
class   OouraFft
  A wrapper for the FFT algorithm found in Ooura mathematical packages. More...
 
class   PinkNoiseGenerator
  Pink noise generator using Voss algorithm. More...
 
class   PlainTextFile
  Plain text file, where each sample is in new line. More...
 
class   RawPcmFile
  A class to read raw PCM binary data from file. More...
 
class   RectangularWindow
  Rectangular window. More...
 
class   SignalSource
  An abstraction of any signal source. More...
 
class   SineGenerator
  Sine wave generator. More...
 
class   SineSynthesizer
  Sine wave synthesizer. More...
 
class   SoundBufferAdapter
  A wrapper around SignalSource to use as a sound buffer in SFML. More...
 
class   Spectrogram
  Spectrogram class. More...
 
class   SquareGenerator
  Square wave generator. More...
 
class   Synthesizer
  An abstract class from which sound synthesizers should be derived. More...
 
class   TextPlot
  A utility class to "draw" data plots in the console applications. More...
 
class   TriangleGenerator
  Triangle (and sawtooth) wave generator. More...
 
class   WaveFile
  Wave file data access. More...
 
class   WaveFileHandler
  A utility class to handle loading and saving of .wav files. More...
 
struct   WaveHeader
  .wav file header structure. More...
 
class   WhiteNoiseGenerator
  White noise generator. More...
 

Typedefs

typedef std::function< double(const
std::vector< double > &, const
std::vector< double > &)> 
DistanceFunctionType
  Prototype of distance calculating functions.
 
typedef double  SampleType
  Sample value type.
 
typedef double  FrequencyType
  Sample frequency type.
 
typedef std::complex< double >  ComplexType
  Our standard complex number type, using double precision.
 
typedef std::vector< ComplexType SpectrumType
  Spectrum type - a vector of complex values.
 
typedef std::vector
< std::vector< double > > 
DtwDataType
  Type of compared data - vectors of features, which themselves are vectors of doubles.
 
typedef std::vector
< std::vector< DtwPoint > > 
DtwPointsArrayType
  Type of DTW point array.
 
typedef std::vector< DtwPoint DtwPathType
  Lowest-cost path is a vector of points.
 
typedef std::map< std::string,
FrequencyType
NoteMapType
  Type of the mapping from note names to frequencies.
 

Enumerations

enum   StereoChannel { LEFT, RIGHT }
  Which channel to use when reading stereo recordings.
 

Functions

template<typename Numeric >
AQUILA_EXPORT Numeric  dB (Numeric value)
  Converts the value to decibels (assuming reference value equal to 1). More...
 
AQUILA_EXPORT double  dB (ComplexType value)
  Convert the magnitude of a complex number to decibels. More...
 
template<typename Numeric >
AQUILA_EXPORT Numeric  dB (Numeric value, Numeric refValue)
  Converts the value to decibels, relative to the reference value. More...
 
template<typename Numeric >
AQUILA_EXPORT Numeric  clamp (Numeric min, Numeric value, Numeric max)
  Clamps (limits) the value inside a range. More...
 
AQUILA_EXPORT int  random (int from, int to)
  Returns a pseudorandom value from a range. More...
 
AQUILA_EXPORT double  randomDouble ()
  Returns a pseudorandom double number from 0 to 1.
 
template<typename Integer >
AQUILA_EXPORT bool  isPowerOf2 (Integer n)
  Checks if n is an exact power of 2.
 
template<typename Integer >
AQUILA_EXPORT Integer  nextPowerOf2 (Integer n)
  Returns the smallest power of 2 greater than n.
 
AQUILA_EXPORT double  euclideanDistance (const std::vector< double > &v1, const std::vector< double > &v2)
  Returns Euclidean distance between two vectors. More...
 
AQUILA_EXPORT double  manhattanDistance (const std::vector< double > &v1, const std::vector< double > &v2)
  Returns Manhattan (taxicab) distance between two vectors. More...
 
AQUILA_EXPORT double  chebyshevDistance (const std::vector< double > &v1, const std::vector< double > &v2)
  Returns Chebyshev distance between two vectors. More...
 
SignalSource  operator+ (const SignalSource &lhs, SampleType x)
 
SignalSource  operator+ (SignalSource &&lhs, SampleType x)
 
SignalSource  operator+ (SampleType x, const SignalSource &rhs)
 
SignalSource  operator+ (SampleType x, SignalSource &&rhs)
 
SignalSource  operator+ (const SignalSource &lhs, const SignalSource &rhs)
 
SignalSource  operator+ (SignalSource &&lhs, const SignalSource &rhs)
 
SignalSource  operator+ (const SignalSource &lhs, SignalSource &&rhs)
 
SignalSource  operator* (const SignalSource &lhs, SampleType x)
 
SignalSource  operator* (SignalSource &&lhs, SampleType x)
 
SignalSource  operator* (SampleType x, const SignalSource &rhs)
 
SignalSource  operator* (SampleType x, SignalSource &&rhs)
 
SignalSource  operator* (const SignalSource &lhs, const SignalSource &rhs)
 
SignalSource  operator* (SignalSource &&lhs, const SignalSource &rhs)
 
SignalSource  operator* (const SignalSource &lhs, SignalSource &&rhs)
 
double  mean (const SignalSource &source)
  Calculates mean value of the signal. More...
 
double  energy (const SignalSource &source)
  Calculates energy of the signal. More...
 
double  power (const SignalSource &source)
  Calculates power of the signal. More...
 
double  norm (const SignalSource &source)
  Calculates Euclidean (L2) norm of the signal. More...
 
double  rms (const SignalSource &source)
  Calculates root mean square level of the signal. More...
 
NoteMapType  initNoteMap ()
  Creates the mapping between note names and frequencies. More...
 

Variables

const long  VERSION_NUMBER = 0x300000
  Library version in an easily comparable format.
 
const char *const  VERSION_STRING = "3.0.0-dev"
  Library version as a string.
 
const double  LN_2 = 0.69314718055994530941723212145818
  ln(2) - needed for calculating number of stages in FFT.
 

Detailed Description

Main library namespace.

Version
3.0.0-dev
Author
Zbigniew Siciarz
Date
2007-2014 http://www.opensource.org/licenses/mit-license.php MIT
Since
3.0.0
Version
3.0.0-dev
Author
Zbigniew Siciarz
Date
2007-2014 http://www.opensource.org/licenses/mit-license.php MIT
Since
2.0.0
Version
3.0.0-dev
Author
Zbigniew Siciarz
Date
2007-2014 http://www.opensource.org/licenses/mit-license.php MIT
Since
0.3.3
Version
3.0.0-dev
Author
Zbigniew Siciarz
Date
2007-2014 http://www.opensource.org/licenses/mit-license.php MIT
Since
2.4.1
Version
3.0.0-dev
Author
Zbigniew Siciarz
Date
2007-2014 http://www.opensource.org/licenses/mit-license.php MIT
Since
0.5.7
Version
3.0.0-dev
Author
Zbigniew Siciarz
Date
2007-2014 http://www.opensource.org/licenses/mit-license.php MIT
Since
0.2.2
Version
3.0.0-dev
Author
Zbigniew Siciarz
Date
2007-2014 http://www.opensource.org/licenses/mit-license.php MIT
Since
0.0.7
Version
3.0.0-dev
Author
Chris Vandevelde
Date
2007-2014 http://www.opensource.org/licenses/mit-license.php MIT
Since
3.0.0

Function Documentation

AQUILA_EXPORT double Aquila::chebyshevDistance ( const std::vector< double > &  v1,
const std::vector< double > &  v2 
)
inline

Returns Chebyshev distance between two vectors.

Parameters
v1 first vector
v2 second vector
Returns
Chebyshev distance

Definition at line 183 of file functions.h.

template<typename Numeric >
AQUILA_EXPORT Numeric Aquila::clamp ( Numeric  min,
Numeric  value,
Numeric  max 
)
inline

Clamps (limits) the value inside a range.

Parameters
min lower limit
value numver to clamp
max upper limit
Returns
bounded value

Definition at line 74 of file functions.h.

template<typename Numeric >
AQUILA_EXPORT Numeric Aquila::dB ( Numeric  value )
inline

Converts the value to decibels (assuming reference value equal to 1).

Parameters
value input value
Returns
value in dB

Definition at line 36 of file functions.h.

AQUILA_EXPORT double Aquila::dB ( ComplexType  value )
inline

Convert the magnitude of a complex number to decibels.

Parameters
value input value (complex number)
Returns
magnitude in dB

Definition at line 47 of file functions.h.

template<typename Numeric >
AQUILA_EXPORT Numeric Aquila::dB ( Numeric  value,
Numeric  refValue 
)
inline

Converts the value to decibels, relative to the reference value.

Parameters
value input value
refValue reference value
Returns
value in dB, relative to reference value

Definition at line 60 of file functions.h.

double Aquila::energy ( const SignalSource &  source )

Calculates energy of the signal.

Parameters
source signal source
Returns
signal energy

Definition at line 199 of file SignalSource.cpp.

AQUILA_EXPORT double Aquila::euclideanDistance ( const std::vector< double > &  v1,
const std::vector< double > &  v2 
)
inline

Returns Euclidean distance between two vectors.

Parameters
v1 first vector
v2 second vector
Returns
Euclidean distance

Definition at line 145 of file functions.h.

NoteMapType Aquila::initNoteMap ( )

Creates the mapping between note names and frequencies.

Returns
initialized note map

Definition at line 28 of file Synthesizer.cpp.

AQUILA_EXPORT double Aquila::manhattanDistance ( const std::vector< double > &  v1,
const std::vector< double > &  v2 
)
inline

Returns Manhattan (taxicab) distance between two vectors.

Parameters
v1 first vector
v2 second vector
Returns
Manhattan distance

Definition at line 164 of file functions.h.

double Aquila::mean ( const SignalSource &  source )

Calculates mean value of the signal.

Parameters
source signal source
Returns
signal mean

Definition at line 187 of file SignalSource.cpp.

double Aquila::norm ( const SignalSource &  source )

Calculates Euclidean (L2) norm of the signal.

Parameters
source signal source
Returns
norm

Definition at line 228 of file SignalSource.cpp.

double Aquila::power ( const SignalSource &  source )

Calculates power of the signal.

Parameters
source signal source
Returns
signal power

Definition at line 217 of file SignalSource.cpp.

AQUILA_EXPORT int Aquila::random ( int  from,
int  to 
)
inline

Returns a pseudorandom value from a range.

Parameters
from lower limit
to upper limit
Returns
random number

Definition at line 86 of file functions.h.

double Aquila::rms ( const SignalSource &  source )

Calculates root mean square level of the signal.

Parameters
source signal source
Returns
RMS level

Definition at line 239 of file SignalSource.cpp.