cz.cuni.jagrlib.iface
Interface Filter1D

All Superinterfaces:
Property
All Known Implementing Classes:
Filter1DNotch

public interface Filter1D
extends Property

Serial 1D data filter. Used mostly in filtering of audio data (low-pass, high-pass, band, notch filters).

Since:
0.25
See Also:
Filter1D.java

Field Summary
static int IND_BYTES_PER_SAMPLE
          Format-array index: sample size in bytes.
static int IND_FREQUENCY
          Format-array index: sampling frequency in Hz.
static int IND_CHANNELS
          Format-array index: number of audio channels.
static int IND_SAMPLES
          Format-array index: number of samples (time-slots).
 
Fields inherited from interface cz.cuni.jagrlib.iface.Property
LOGGING, STATISTICS, TEXT_DESCRIPTION
 
Method Summary
 int batch(double[] source, int sourceSamples, double[] target)
          Processes one sample batch in double format.
 int batch(int[] source, int sourceSamples, int[] target)
          Processes one sample batch in integer format.
 boolean format(int[] source, int[] target)
          Defines format modifications.
 void reset()
          Starts a new data pass.
 
Methods inherited from interface cz.cuni.jagrlib.iface.Property
commit, get, set
 

Field Detail

IND_CHANNELS

static final int IND_CHANNELS
Format-array index: number of audio channels.

See Also:
Constant Field Values

IND_BYTES_PER_SAMPLE

static final int IND_BYTES_PER_SAMPLE
Format-array index: sample size in bytes.

See Also:
Constant Field Values

IND_SAMPLES

static final int IND_SAMPLES
Format-array index: number of samples (time-slots).

See Also:
Constant Field Values

IND_FREQUENCY

static final int IND_FREQUENCY
Format-array index: sampling frequency in Hz.

See Also:
Constant Field Values
Method Detail

format

boolean format(int[] source,
               int[] target)
Defines format modifications. Sets input sample format for subsequent batch(double[], int, double[]) calls.

Parameters:
source - Source audio format (channels, bytes-per-sample, samples, frequency).
target - Target audio format (channels, bytes-per-sample, samples, frequency).
Returns:
true if any format changes will be made (false => format identity).
See Also:
batch(double[],int,double[]), batch(int[],int,int[])

reset

void reset()
Starts a new data pass.

See Also:
batch(double[],int,double[]), batch(int[],int,int[])

batch

int batch(double[] source,
          int sourceSamples,
          double[] target)
Processes one sample batch in double format. Sample ordering in case of multi-channel data: channel0[0], channel1[0], .. channelN[0], channel0[1], ...

Parameters:
source - Source data array.
sourceSamples - Number of source time-slots.
target - Target data array.
Returns:
Number of target time-slots.
See Also:
format(int[], int[]), batch(int[],int,int[])

batch

int batch(int[] source,
          int sourceSamples,
          int[] target)
Processes one sample batch in integer format. Sample ordering in case of multi-channel data: channel0[0], channel1[0], .. channelN[0], channel0[1], ...

Parameters:
source - Source data array.
sourceSamples - Number of source time-slots.
target - Target data array.
Returns:
Number of target time-slots.
See Also:
format(int[], int[]), batch(double[],int,double[])