class AuCut

This class implements a tool to perform cut detection on audio files

Public Classes

enum Similarity
similarity type

Public Fields

typedef vector <CutData> CutList
list of cuts
typedef double Deviation
deviation type
typedef double Float
single value in the acoustic spectrum
typedef LinearFFT <Float> PerformFFT
class to perform linear FFT on Floats
typedef PerformFFT::Spectrum Spectrum
vector of Floats

Public Methods

AuCut(size_t winSize = 512, size_t overlap = 0, PerformFFT::WindowFunc winFunc = PerformFFT::NONE, PerformFFT::ConvMethod convMethod = PerformFFT::AMP, Float weight = 0.5, Float dequality = 1.0, Float dsimilarity = 2.0, int count = 2)
creates new object
CutList calcCuts(const AudioData& audata)
performs cut detection on the given audio data object
Float equalityDeviation()
return diameter of equality shell
PerformFFT::ConvMethod method()
return convert fft values to feature vector elements
size_t overlap()
return overlap of FFT windows in samples
int similarityCount()
return number similarities for cut decision
Float similarityDeviation()
return diameter of similarity shell
Float weight()
return weighting of equalitySpectrum
PerformFFT::WindowFunc windowFunc()
return FFT windowing function
size_t windowSize()
return FFT window size in samples

Public

enum Similarity
similarity type

Protected Fields

Float _equalityDeviation
diameter of equality shell
PerformFFT::ConvMethod _method
convert fft values to feature vector elements
size_t _overlap
overlap of FFT windows in samples
int _similarityCount
number similarities for cut decision
Float _similarityDeviation
diameter of similarity shell
Float _weight
weighting of equalitySpectrum
PerformFFT::WindowFunc _windowFunc
FFT windowing function
size_t _windowSize
FFT window size in samples
PerformFFT* fftTool
int similarParts
number of consecutive similarities

Protected Methods

void adjustVector(Spectrum& vectorA, const Spectrum& vectorB, bool cut)
Adjusts a given vector a according to another vector b and a weight
Similarity compareVector(const Spectrum& equalitySpectrum, const Spectrum& newSpectrum)
compares two given vectors and returns a similarity estimate according to the deviation form an equality and similarity level
bool decide(const Similarity& similarity)
decides if the vector comparison result (EQUAL, SIMILAR, UNEQUAL) makes a cut
Deviation euclVecDist(const Spectrum& vectorA, const Spectrum& vectorB)
computes the EuclVecDist of two given vectors

Documentation

This class implements a tool to perform cut detection on audio files.
typedef double Float
single value in the acoustic spectrum

typedef LinearFFT <Float> PerformFFT
class to perform linear FFT on Floats

typedef PerformFFT::Spectrum Spectrum
vector of Floats

typedef vector <CutData> CutList
list of cuts

typedef double Deviation
deviation type

enum Similarity
similarity type

AuCut(size_t winSize = 512, size_t overlap = 0, PerformFFT::WindowFunc winFunc = PerformFFT::NONE, PerformFFT::ConvMethod convMethod = PerformFFT::AMP, Float weight = 0.5, Float dequality = 1.0, Float dsimilarity = 2.0, int count = 2)
creates new object. Detection parameters can be given as arguments. Conside following rules:
- overlap must be smaller than window size
- weight must be one between 0 - 1
- similarity shell must be bigger then equality shell
- if similarity count is less than 2, 2 will be used
Throws:
Exception if some arguments are out of range.
Parameters:
s - FFT window size in samples
o - overlap of FFT windows in samples
f - FFT windowing function
m - convert fft values to feature vector elements
w - weighting of equalitySpectrum
deq - diameter of equality shell
dsim - diameter of similarity shell
sc - number similarities for cut decision

size_t windowSize()
return FFT window size in samples

size_t overlap()
return overlap of FFT windows in samples

PerformFFT::WindowFunc windowFunc()
return FFT windowing function

PerformFFT::ConvMethod method()
return convert fft values to feature vector elements

Float weight()
return weighting of equalitySpectrum

Float equalityDeviation()
return diameter of equality shell

Float similarityDeviation()
return diameter of similarity shell

int similarityCount()
return number similarities for cut decision

CutList calcCuts(const AudioData& audata)
performs cut detection on the given audio data object

Similarity compareVector(const Spectrum& equalitySpectrum, const Spectrum& newSpectrum)
compares two given vectors and returns a similarity estimate according to the deviation form an equality and similarity level. This is usefull in connection with Cut-Detection to make up whether an audiopart is similar to its predecessors.
Returns:
value that represent the distance
Parameters:
equalitySpectrum - vector containing spectrum to compare with
newSpectrum - vector containing another spectrum
See Also:
euclVecDist

Deviation euclVecDist(const Spectrum& vectorA, const Spectrum& vectorB)
computes the EuclVecDist of two given vectors:
sqroot( sum( sqare(a[i]-b[i]) ) )
Returns:
result is deviation between both vectors
Parameters:
vectorA - vector
vectorB - another vector
See Also:
compareVector

bool decide(const Similarity& similarity)
decides if the vector comparison result (EQUAL, SIMILAR, UNEQUAL) makes a cut.
EQUAL -> no cut; set similarParts = 0
SIMILAR -> set similarParts += 1
if similarParts above threshold => CUT
UNEQUAL -> CUT; set similarParts = 0
Returns:
Cut or noCUT
Parameters:
similarity - result of the vector comparision

void adjustVector(Spectrum& vectorA, const Spectrum& vectorB, bool cut)
adjusts a given vector a according to another vector b and a weight (between 0-1):
a = (weight * a) + ((1-weight) * b).
The cut flag decides, whether b will be the new adjustment vector. This is usefull in connection with Cut-Detection to adjust the equalityVector with the newly analyzed feature vector.
Parameters:
vectorA - vector to adjust
vectorB - adjustment vector
cut -

PerformFFT* fftTool

size_t _windowSize
FFT window size in samples

size_t _overlap
overlap of FFT windows in samples

PerformFFT::WindowFunc _windowFunc
FFT windowing function

PerformFFT::ConvMethod _method
convert fft values to feature vector elements

Float _weight
weighting of equalitySpectrum

Float _equalityDeviation
diameter of equality shell

Float _similarityDeviation
diameter of similarity shell

int _similarityCount
number similarities for cut decision

int similarParts
number of consecutive similarities


This class has no child classes.
Author:
Christoph Gerum, Silvia Pfeiffer, Niels Thorwirth, Peter Tomczyk
Version:
$Id: aucut.h,v 1.5 1998/04/14 10:26:27 tomczyk Exp $

alphabetic index hierarchy of classes


this page has been generated automatically by doc++

(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de