as.clynx.audio.norm
Class AbstractCompressor

java.lang.Object
  extended by as.clynx.audio.norm.AbstractCompressor
All Implemented Interfaces:
INormalizer, java.lang.Cloneable
Direct Known Subclasses:
Compressor

public abstract class AbstractCompressor
extends java.lang.Object
implements INormalizer

The class AbstractCompressor.java specifies a Compressor as specified in:

http://en.wikipedia.org/wiki/Audio_level_compression

It Reduces th dynamic range of the inputfile. all samples are transformed to UNSIGNED!

Version:
cLynx v.1.2, JDK 6.0: 12.10.2007
Author:
Andreas Senfter - andreas@senfters.com

Constructor Summary
AbstractCompressor(float ratio, int threshold_top, int threshold_bot, int attackInMs, int releaseInMs)
          Constructor
 
Method Summary
 INormalizer clone()
          returns a clone of the current instance.
 int normalizeSample(int sample, AudioFile file, IAudioFileCollection list)
          normalizes the sample using the defined compress and no_compress functions
 void setAudioFormat(javax.sound.sampled.AudioFormat format)
          sets the audioformat
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface as.clynx.audio.norm.INormalizer
update
 

Constructor Detail

AbstractCompressor

public AbstractCompressor(float ratio,
                          int threshold_top,
                          int threshold_bot,
                          int attackInMs,
                          int releaseInMs)
Constructor

Parameters:
ratio -
threshold_top -
threshold_bot -
attackInMs -
releaseInMs -
Method Detail

normalizeSample

public int normalizeSample(int sample,
                           AudioFile file,
                           IAudioFileCollection list)
normalizes the sample using the defined compress and no_compress functions

Specified by:
normalizeSample in interface INormalizer
Returns:
the normalized samplevalue

setAudioFormat

public void setAudioFormat(javax.sound.sampled.AudioFormat format)
Description copied from interface: INormalizer
sets the audioformat

Specified by:
setAudioFormat in interface INormalizer

clone

public INormalizer clone()
Description copied from interface: INormalizer
returns a clone of the current instance.

Specified by:
clone in interface INormalizer
Overrides:
clone in class java.lang.Object
Returns:
a clone of the current instance.