marf.Preprocessing.FFTFilter
Class HighFrequencyBoost

java.lang.Object
  extended by marf.Storage.StorageManager
      extended by marf.Preprocessing.Preprocessing
          extended by marf.Preprocessing.FFTFilter.FFTFilter
              extended by marf.Preprocessing.FFTFilter.HighFrequencyBoost
All Implemented Interfaces:
java.io.Serializable, IPreprocessing, IStorageManager

public class HighFrequencyBoost
extends FFTFilter

HighFrequencyBoost class implements filtering using high frequency booster on top of the FFTFilter.

$Id: HighFrequencyBoost.java,v 1.16 2005/06/16 19:58:47 mokhov Exp $

Since:
0.0.1
Version:
$Revision: 1.16 $
Author:
Serguei Mokhov
See Also:
Serialized Form

Field Summary
static double BASE_BOOST_COEFFICIENT
          Default boost rate of 5*PI to be applied to apmplitude values.
static int DEFAULT_HIGH_FREQUENCY_CUTOFF
          Create a response that boosts all frequencies above 1000 Hz.
 
Fields inherited from class marf.Preprocessing.FFTFilter.FFTFilter
adFreqResponse, DEFAULT_FREQUENCY_RESPONSE_SIZE
 
Fields inherited from class marf.Preprocessing.Preprocessing
oSample
 
Fields inherited from class marf.Storage.StorageManager
bDumpOnNotFound, iCurrentDumpMode, oObjectToSerialize, strFilename
 
Fields inherited from interface marf.Preprocessing.IPreprocessing
MARF_INTERFACE_CODE_REVISION
 
Fields inherited from interface marf.Storage.IStorageManager
DUMP_BINARY, DUMP_CSV_TEXT, DUMP_GZIP_BINARY, DUMP_HTML, DUMP_SQL, DUMP_XML, MARF_INTERFACE_CODE_REVISION, STORAGE_FILE_EXTENSIONS
 
Constructor Summary
HighFrequencyBoost(Preprocessing poPreprocessing)
          Pipelined preprocessing constructor.
HighFrequencyBoost(Sample poSample)
          HighFrequencyBoost Constructor.
 
Method Summary
 boolean cropAudio(double pdStartingFrequency, double pdEndFrequency)
          Stub implementation of cropAudio().
 void genereateResponseCoefficients()
          Creates high-frequency boost response coefficients and sets applies them to the frequency response vector.
static java.lang.String getMARFSourceCodeRevision()
          Returns source code revision information.
 boolean preprocess()
          Overrides FFTFilter's preprocess() with extra normalization after the boost.
 boolean removeNoise()
          Stub implementation of removeNoise().
 boolean removeSilence()
          Stub implementation of removeSilence().
 
Methods inherited from class marf.Preprocessing.FFTFilter.FFTFilter
filter, setFrequencyResponse
 
Methods inherited from class marf.Preprocessing.Preprocessing
backSynchronizeObject, getSample, normalize, normalize, normalize
 
Methods inherited from class marf.Storage.StorageManager
dump, dumpBinary, dumpCSV, dumpGzipBinary, dumpHTML, dumpSQL, dumpXML, enableDumpOnNotFound, getDefaultExtension, getDefaultExtension, getDumpMode, getFilename, restore, restoreBinary, restoreCSV, restoreGzipBinary, restoreHTML, restoreSQL, restoreXML, setDumpMode, setFilename
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_HIGH_FREQUENCY_CUTOFF

public static final transient int DEFAULT_HIGH_FREQUENCY_CUTOFF
Create a response that boosts all frequencies above 1000 Hz. Note: 1000Hz ~= 25 * 128 / 8000Hz.

Since:
0.3.0
See Also:
Constant Field Values

BASE_BOOST_COEFFICIENT

public static final transient double BASE_BOOST_COEFFICIENT
Default boost rate of 5*PI to be applied to apmplitude values. Made up out of the blue.

Since:
0.3.0
See Also:
Constant Field Values
Constructor Detail

HighFrequencyBoost

public HighFrequencyBoost(Preprocessing poPreprocessing)
                   throws PreprocessingException
Pipelined preprocessing constructor.

Parameters:
poPreprocessing - followup preprocessing module
Throws:
PreprocessingException
Since:
0.3.0

HighFrequencyBoost

public HighFrequencyBoost(Sample poSample)
                   throws PreprocessingException
HighFrequencyBoost Constructor.

Parameters:
poSample - incoming sample
Throws:
PreprocessingException
Method Detail

preprocess

public final boolean preprocess()
                         throws PreprocessingException
Overrides FFTFilter's preprocess() with extra normalization after the boost. TODO: Normalization only applied to the boosted part.

Specified by:
preprocess in interface IPreprocessing
Overrides:
preprocess in class FFTFilter
Returns:
true if there were changes to the sample
Throws:
PreprocessingException - if there were problems during undelying supper.preprocess() or normalize().
Since:
0.2.0
See Also:
IPreprocessing.removeNoise(), IPreprocessing.removeSilence()

removeNoise

public final boolean removeNoise()
                          throws PreprocessingException
Stub implementation of removeNoise().

Specified by:
removeNoise in interface IPreprocessing
Overrides:
removeNoise in class Preprocessing
Returns:
false
Throws:
PreprocessingException - never thrown

removeSilence

public final boolean removeSilence()
                            throws PreprocessingException
Stub implementation of removeSilence().

Specified by:
removeSilence in interface IPreprocessing
Overrides:
removeSilence in class Preprocessing
Returns:
false
Throws:
PreprocessingException - never thrown

cropAudio

public final boolean cropAudio(double pdStartingFrequency,
                               double pdEndFrequency)
                        throws PreprocessingException
Stub implementation of cropAudio().

Specified by:
cropAudio in interface IPreprocessing
Overrides:
cropAudio in class Preprocessing
Parameters:
pdStartingFrequency - unused
pdEndFrequency - unused
Returns:
false
Throws:
PreprocessingException - never thrown

genereateResponseCoefficients

public void genereateResponseCoefficients()
Creates high-frequency boost response coefficients and sets applies them to the frequency response vector.

Specified by:
genereateResponseCoefficients in class FFTFilter
Since:
0.3.0

getMARFSourceCodeRevision

public static java.lang.String getMARFSourceCodeRevision()
Returns source code revision information.

Returns:
revision string
Since:
0.3.0