|
1.0: Final Release | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ReverbControl
is an interface for manipulating
the settings of an audio effect called reverb.
A ReverbControl
can only be fetched from
the GlobalManager
and/or MediaProcessor
(if ReverbControl
is supported at all).
Reverberation is essential in perceiving the properties of the room. Mainly, it tells the size of the room and gives some hints about the wall materials.
In the API, there are several preset modes available for reverberation. A subset of the modes from "IA-SIG Interactive 3D Audio Rendering Guidelines (Level 2)" is used. The modes at least available for the reverb are:
Additionally, there are some presets defined that might be available:
A preset can be chosen using the (inherited) method
EffectControl.setPreset
.
The preset modes are tunable with two parameters, the reverberation time and the reverberation level. The reverberation time controls how long the reverberation appears to last after the sound source becomes silent. The reverberation level controls how loud the reverberation appears to be compared to the direct path signal of the sound source (before obstruction effects are applied).
Both parameters have a default value for every preset
reverberation mode and
then the user can, for example, make the preset room more reverberant
by raising
the values. Methods for setting and getting the reverberation
time are setReverbTime
and getReverbTime
. Similarly, setReverbLevel
and getReverbLevel
are used for the reverberation level.
It is recommended to first get the
value of the preset, then scale it,
and finally set the new, scaled value.
setReverbLevel
and setReverbTime
invalidate the current preset regardless of their arguments.
NOTE: The reverb level and the reverb decay times can only be used to modify existing reverb presets. They cannot be used to morph between reverb presets. This is because reverb presets typically contain additional internal properties.
"smallroom" is the default preset. (The default reverb level and reverb time are implementation-dependent.)
EffectControl
,
ReverbSourceControl
Field Summary |
Fields inherited from interface javax.microedition.amms.control.EffectControl |
SCOPE_LIVE_AND_RECORD, SCOPE_LIVE_ONLY, SCOPE_RECORD_ONLY |
Method Summary | |
int |
getReverbLevel()
Gets the gain level of the reverberation. |
int |
getReverbTime()
Gets the reverberation time, as set either explicitly via setReverbTime or implicitly via
setPreset (whichever was called last). |
int |
setReverbLevel(int level)
Sets the gain level of the reverberation. |
void |
setReverbTime(int time)
Sets the reverberation time of the reverb. |
Methods inherited from interface javax.microedition.amms.control.EffectControl |
getPreset, getPresetNames, getScope, isEnabled, isEnforced, setEnabled, setEnforced, setPreset, setScope |
Method Detail |
public int setReverbLevel(int level) throws java.lang.IllegalArgumentException
level
- the new level of the reverberation in millibels
java.lang.IllegalArgumentException
- if the given value is greater than 0getReverbLevel()
public int getReverbLevel()
setReverbLevel(int)
public void setReverbTime(int time) throws java.lang.IllegalArgumentException, javax.microedition.media.MediaException
Sets the reverberation time of the reverb. The reverberation time is the time taken for the reverberant sound to attenuate by 60 dB from its initial level. Typical values are in the range from 100 to 20000 milliseconds.
The implementation might not support long reverberation times. Therefore, the actual time used might be shorter than the time specified with this method.
time
- new reverberation time in milliseconds
java.lang.IllegalArgumentException
- when the given time is
negative
javax.microedition.media.MediaException
- if
the changing of the reverb time is not supportedpublic int getReverbTime() throws javax.microedition.media.MediaException
setReverbTime
or implicitly via
setPreset
(whichever was called last).
If neither of these methods has been called,
getReverbTime
returns the default
reverberation time (that corresponding to "smallroom").
javax.microedition.media.MediaException
- if
querying the reverb time is not supported
|
1.0: Final Release | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |