Class AbstractFluxProcessor<T extends AudioBuffer>
- java.lang.Object
-
- com.tagtraum.jipes.AbstractSignalProcessor<T,Float>
-
- com.tagtraum.audiokern.audioprocessor.AbstractFluxProcessor<T>
-
- All Implemented Interfaces:
SignalProcessor<T,Float>
,SignalPullProcessor<T,Float>
,SignalSource<Float>
- Direct Known Subclasses:
FluxProcessor
,SpectralFluxProcessor
public class AbstractFluxProcessor<T extends AudioBuffer> extends AbstractSignalProcessor<T,Float>
Computes the flux between twoAudioBuffer
s. Flux is defined of some kind of distance between the data of two buffers. To calculate the distance, aDistanceFunction
is used. To create the actualAbstractFluxProcessor.FluxCalculator
- Author:
- Hendrik Schreiber
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
AbstractFluxProcessor.AbstractFluxCalculator<T extends AudioBuffer>
static interface
AbstractFluxProcessor.FluxCalculator<T extends AudioBuffer>
-
Field Summary
Fields Modifier and Type Field Description static AbstractFluxProcessor.FluxCalculator<AudioBuffer>
EUCLIDEAN_DATA_FLUX_CALCULATOR
UsesDistanceFunctions.EUCLIDEAN_DISTANCE
as distance function.-
Fields inherited from class com.tagtraum.jipes.AbstractSignalProcessor
lastOut, signalProcessorSupport
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractFluxProcessor()
protected
AbstractFluxProcessor(AbstractFluxProcessor.FluxCalculator<T> fluxCalculator)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
void
flush()
AbstractFluxProcessor.FluxCalculator<T>
getFluxCalculator()
int
hashCode()
void
process(T in)
protected Float
processNext(T origBuffer)
Float
read()
void
reset()
void
setFluxCalculator(AbstractFluxProcessor.FluxCalculator<T> fluxCalculator)
String
toString()
-
Methods inherited from class com.tagtraum.jipes.AbstractSignalProcessor
connectTo, connectTo, connectTo, disconnectFrom, getConnectedProcessors, getConnectedSource, getId, getOutput, setId
-
-
-
-
Field Detail
-
EUCLIDEAN_DATA_FLUX_CALCULATOR
public static final AbstractFluxProcessor.FluxCalculator<AudioBuffer> EUCLIDEAN_DATA_FLUX_CALCULATOR
UsesDistanceFunctions.EUCLIDEAN_DISTANCE
as distance function.
-
-
Constructor Detail
-
AbstractFluxProcessor
protected AbstractFluxProcessor()
-
AbstractFluxProcessor
protected AbstractFluxProcessor(AbstractFluxProcessor.FluxCalculator<T> fluxCalculator)
-
-
Method Detail
-
getFluxCalculator
public AbstractFluxProcessor.FluxCalculator<T> getFluxCalculator()
-
setFluxCalculator
public void setFluxCalculator(AbstractFluxProcessor.FluxCalculator<T> fluxCalculator)
-
reset
public void reset()
- Specified by:
reset
in interfaceSignalSource<T extends AudioBuffer>
- Overrides:
reset
in classAbstractSignalProcessor<T extends AudioBuffer,Float>
-
processNext
protected Float processNext(T origBuffer) throws IOException
- Specified by:
processNext
in classAbstractSignalProcessor<T extends AudioBuffer,Float>
- Throws:
IOException
-
read
public Float read() throws IOException
- Specified by:
read
in interfaceSignalSource<T extends AudioBuffer>
- Overrides:
read
in classAbstractSignalProcessor<T extends AudioBuffer,Float>
- Throws:
IOException
-
process
public void process(T in) throws IOException
- Specified by:
process
in interfaceSignalProcessor<T extends AudioBuffer,Float>
- Overrides:
process
in classAbstractSignalProcessor<T extends AudioBuffer,Float>
- Throws:
IOException
-
flush
public void flush() throws IOException
- Specified by:
flush
in interfaceSignalProcessor<T extends AudioBuffer,Float>
- Overrides:
flush
in classAbstractSignalProcessor<T extends AudioBuffer,Float>
- Throws:
IOException
-
-