public final class AudioBufferFunctions extends Object
float[]
functions into AudioBuffer
functions.MapFunction
,
AggregateFunction
,
DistanceFunction
,
StatefulMapFunction
Modifier and Type | Method and Description |
---|---|
static <T extends AudioBuffer> |
createAggregateFunction(AggregateFunction<float[],Float> function)
Creates an
AudioBuffer aggregate function that computes a Float for the
buffers using the provided float[] aggregate function. |
static <T extends AudioBuffer> |
createDistanceFunction(DistanceFunction<float[]> function)
Creates an
AudioBuffer distance function that computes the distance between the data
(as in AudioBuffer.getData() ) of two buffers using the
provided float[] distance function. |
static <T extends AudioBuffer> |
createMagnitudeMapFunction(MapFunction<float[]> function)
Creates an
AudioBuffer map function that maps the magnitudes
of the buffer using the provided float[] map function. |
static <T extends AudioBuffer> |
createMapFunction(MapFunction<float[]> function)
Creates an
AudioBuffer map function that maps both the real and the imaginary part
of the buffer using the provided float[] map function. |
static <T extends AudioBuffer> |
createPowerDistanceFunction(DistanceFunction<float[]> function)
Creates an
AudioBuffer distance function that computes the distance between the data
(as in AudioBuffer.getPowers() ) of two buffers using the
provided float[] distance function. |
static <T extends AudioBuffer> |
createPowerMapFunction(MapFunction<float[]> function)
Creates an
AudioBuffer map function that maps the powers
of the buffer using the provided float[] map function. |
static <T extends AudioBuffer> |
createStatefulMapFunction(StatefulMapFunction<float[]> function)
Creates a
AudioBuffer stateful map function that maps both the real and the imaginary part
of the buffer using the provided float[] map function. |
public static <T extends AudioBuffer> MapFunction<T> createMapFunction(MapFunction<float[]> function)
AudioBuffer
map function that maps both the real and the imaginary part
of the buffer using the provided float[]
map function.T
- actual type of the resulting map functionfunction
- float[]
map functionpublic static <T extends AudioBuffer> MapFunction<T> createMagnitudeMapFunction(MapFunction<float[]> function)
AudioBuffer
map function that maps the magnitudes
of the buffer using the provided float[]
map function.
This implies that the imaginary part of the data becomes null
.T
- actual type of the resulting map functionfunction
- float[]
map functionpublic static <T extends AudioBuffer> MapFunction<T> createPowerMapFunction(MapFunction<float[]> function)
AudioBuffer
map function that maps the powers
of the buffer using the provided float[]
map function.
This implies that the imaginary part of the data becomes null
.
After the given function has been applied to the powers, the square root is
set as the new real part of the data.T
- actual type of the resulting map functionfunction
- float[]
map functionpublic static <T extends AudioBuffer> StatefulMapFunction<T> createStatefulMapFunction(StatefulMapFunction<float[]> function)
AudioBuffer
stateful map function that maps both the real and the imaginary part
of the buffer using the provided float[]
map function.T
- actual type of the resulting map functionfunction
- float[]
map functionpublic static <T extends AudioBuffer> DistanceFunction<T> createDistanceFunction(DistanceFunction<float[]> function)
AudioBuffer
distance function that computes the distance between the data
(as in AudioBuffer.getData()
) of two buffers using the
provided float[]
distance function.T
- actual type of the resulting distance functionfunction
- float[]
distance functionpublic static <T extends AudioBuffer> DistanceFunction<T> createPowerDistanceFunction(DistanceFunction<float[]> function)
AudioBuffer
distance function that computes the distance between the data
(as in AudioBuffer.getPowers()
) of two buffers using the
provided float[]
distance function.T
- actual type of the resulting distance functionfunction
- float[]
distance functionpublic static <T extends AudioBuffer> AggregateFunction<T,Float> createAggregateFunction(AggregateFunction<float[],Float> function)
AudioBuffer
aggregate function that computes a Float
for the
buffers using the provided float[]
aggregate function.T
- actual type of the resulting aggregate functionfunction
- float[]
aggregate functionCopyright © 2011–2020 tagtraum industries incorporated. All rights reserved.