Main Page   Class Hierarchy   Compound List   File List   Compound Members  

AudioPreprocessing Class Reference

#include <AudioPreprocessing.h>

List of all members.

Public Member Functions

 AudioPreprocessing (void)
 ~AudioPreprocessing (void)
 AudioPreprocessing (AudioPreprocessing &source)
 AudioPreprocessing (double interleaving, int factor, int noWindows, int noData)
void save (fstream &fs) const
bool load (fstream &fs)
void createData (AUFile *auData)
const vector< double > & getWindows (void) const
const vector< double > & getFFTEnergies (void) const
void setInterleaving (double interleaving)
double getInterleaving (void) const
void setFactor (int factor)
double getFactor (void) const
void setNoWindows (int noWindows)
int getNoWindows (void) const

Private Member Functions

double sum (void)
int sizeOfFirstWindow (void)
void createWindows (void)
void scaleWindows (void)
void createFFTEnergies (void)
int getFactorIndex (double value) const

Private Attributes

double interleaving
double factor
int noWindows
int noData
double * data
vector< double > window
vector< double > energy

Detailed Description

The main audio processing class.

Used to convert raw audio data created by the AUFile class to a small vector. The vector holds multiple doubles that correspond to windowed energy levels in the frequency band of the input sample. The windows the vector elements are created from overlap with each other.

Constructor & Destructor Documentation

AudioPreprocessing::AudioPreprocessing void   

Main constructor.

AudioPreprocessing::~AudioPreprocessing void   

Main destructor.

AudioPreprocessing::AudioPreprocessing AudioPreprocessing &    source

Copy constructor.

source The source object that will be copied.

AudioPreprocessing::AudioPreprocessing double    interleaving,
int    factor,
int    noWindows,
int    noData

Main constructor.

interleaving The percentage of interleaving (a value between zero and one).
factor Factor for multiplication of the predecessor window.
noWindows Number of windows which should be created.
noData Size of the audio data array.

Member Function Documentation

void AudioPreprocessing::createData AUFile   auData

Convert raw audio data to windowed vector.

The conversion is done in multiple steps:

  1. Obtain the raw audio data
  2. Apply fast fourier transformation (FFT)
  3. Create windowed vector
  4. Scale the vector

auData The raw audio data used as input.

void AudioPreprocessing::createFFTEnergies void    [private]

Generate the FFT energy vector.

void AudioPreprocessing::createWindows void    [private]

Compute the windowing of the audio data.

double AudioPreprocessing::getFactor void    const

Getter for the enlargement factor.

The currently used factor.

int AudioPreprocessing::getFactorIndex double    value const [private]

Small value to index conversion function.

value The factor value to be converted.
-1 on failure, factor index on success.

const vector< double > & AudioPreprocessing::getFFTEnergies void    const

Getter for the FFT frequency energy vector.

The FFT energy vector.

double AudioPreprocessing::getInterleaving void    const

Getter for the interleaving factor.

The current interleaving perceptage.

int AudioPreprocessing::getNoWindows void    const

Getter function for the number of windows

noWindows Number of Windows

const vector< double > & AudioPreprocessing::getWindows void    const

Getter for the data array prepared for the neuronal net

The data vector containing the individual windowed values.

bool AudioPreprocessing::load fstream &    fs

Loader for preprocessor settings.

fs Stream the settings will be read from.
True on success, false on failure.

void AudioPreprocessing::save fstream &    fs const

Save method for the preprocessor settings.

fs Stream the settings are saved to.

void AudioPreprocessing::scaleWindows void    [private]

Scale the audio data to values between -1 and 1.

void AudioPreprocessing::setFactor int    factor

Setter function for the factor to enlargement factor.

factor Multiplier of the size of the predecessor window.

void AudioPreprocessing::setInterleaving double    interleaving

Setter function for the interleaving factor.

interleaving The percentage of interleaving (a value between zero and one).

void AudioPreprocessing::setNoWindows int    noWindows

Setter function for the number of windows

noWindows Number of Windows

int AudioPreprocessing::sizeOfFirstWindow void    [private]

Compute the size of the first window.

The size of the first window.

double AudioPreprocessing::sum void    [private]

Compute the sum for the calculation of the first window's size

The sum is defined on page 15 of the project file.

Member Data Documentation

double* AudioPreprocessing::data [private]

Pointer to the beginning of the audio data array.

vector<double> AudioPreprocessing::energy [private]

Frequency based energy levels, as result of the amplitudes of the FFT real and imaginary parts.

double AudioPreprocessing::factor [private]

Factor to be multiplied by the size of the predecessor window in order to enlarge the actual windowsize.

double AudioPreprocessing::interleaving [private]

Percentage of interleaving (a value between zero and one).

int AudioPreprocessing::noData [private]

Size of the double array containing the audio values.

int AudioPreprocessing::noWindows [private]

Overall number of available windows (vector size).

vector<double> AudioPreprocessing::window [private]

Contains the data vector extracted from the audio stream

The documentation for this class was generated from the following files:
Generated on Mon Feb 24 19:37:44 2003 by doxygen1.3-rc3