|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ddf.minim.EffectsChain
public class EffectsChain
An EffectsChain
is a list of AudioEffects
that
gives you the ability to enable and disable effects, as you would in a typical
DAW. When you add an effect, it is added to the end of the chain and is enabled.
When you remove an effect, effects further down the chain are moved up a slot.
EffectsChain
is itself an AudioEffect
, so you can
easily create groups of effects that can be enabled/disabled together by
putting them in an EffectsChain
and then adding that chain to
an Effectable
as a single effect. EffectsChain
is
fully synchronized
so that it is not possible to add and remove
effects while processing is taking place.
Constructor Summary | |
---|---|
EffectsChain()
Constructs an empty EffectsChain . |
Method Summary | |
---|---|
void |
add(AudioEffect e)
Adds e to the end of the chain. |
void |
clear()
Removes all effects from the effect chain. |
boolean |
contains(AudioEffect e)
Returns true if e is in this chain |
void |
disable(AudioEffect e)
Disables e if it is in the chain. |
void |
disable(int i)
Disables the i th effect in the chain. |
void |
disableAll()
Disables all effects in the chain. |
void |
enable(AudioEffect e)
Enables e if it is in the chain. |
void |
enable(int i)
Enables the i th effect in the chain. |
void |
enableAll()
Enables all effects in the chain. |
AudioEffect |
get(int i)
Gets the ith effect in the chain. |
boolean |
hasEnabled()
Returns true if at least one effect in the chain is enabled. |
boolean |
isEnabled(AudioEffect e)
Returns true if e is in the chain and is enabled. |
void |
process(float[] samp)
Sends samp to each effect in the chain, in order. |
void |
process(float[] sampL,
float[] sampR)
Sends sampL and sampR to each effect
in the chain, in order. |
void |
remove(AudioEffect e)
Removes e from the chain. |
AudioEffect |
remove(int i)
Removes and returns the i th effect from the chain. |
int |
size()
Returns the number of effects in the chain. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public EffectsChain()
EffectsChain
.
Method Detail |
---|
public void add(AudioEffect e)
e
to the end of the chain.
e
- the AudioEffect
to addpublic void remove(AudioEffect e)
e
from the chain.
e
- the AudioEffect
to removepublic AudioEffect remove(int i)
i
th effect from the chain.
i
- the index of the AudioEffect
to remove
AudioEffect
that was removedpublic AudioEffect get(int i)
ith
effect in the chain.
i
- the index of the AudioEffect
to getpublic boolean contains(AudioEffect e)
e
is in this chain
e
- the AudioEffect
to check for
e
is in this chainpublic void enable(int i)
i
th effect in the chain.
i
- the index of the effect to enablepublic void enable(AudioEffect e)
e
if it is in the chain.
e
- the AudioEffect
to enablepublic void enableAll()
public boolean hasEnabled()
public boolean isEnabled(AudioEffect e)
e
is in the chain and is enabled.
e
- the AudioEffect
to return the status of
e
is enabled and in the chainpublic void disable(int i)
i
th effect in the chain.
i
- the index of the effect to disablepublic void disable(AudioEffect e)
e
if it is in the chain.
e
- the AudioEffect
to disablepublic void disableAll()
public int size()
public void clear()
public void process(float[] samp)
samp
to each effect in the chain, in order.
process
in interface AudioEffect
samp
- the samples to processpublic void process(float[] sampL, float[] sampR)
sampL
and sampR
to each effect
in the chain, in order. The two float arrays should correspond to
the left and right channels of a stereo signal.
process
in interface AudioEffect
sampL
- the left channel of the signal to processsampR
- the right channel of the signal to process
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |