JSR-234 1.1

javax.microedition.amms.control.audioeffect
Interface ChorusControl

All Superinterfaces:
javax.microedition.media.Control, EffectControl

public interface ChorusControl
extends EffectControl

ChorusControl is an interface for manipulating the settings of an audio effect called chorus and its special case flanger.

Chorus

The chorus makes the sound source sound like a group of similar sound sources playing the same sound. This makes the sound "richer".

Flanger

A special case of a chorus is a flanger: two similar sources are played so close together in time that they sound like one, but instead with a "wooshing" effect or with a sound similar to the sound of a jet plane passing overhead.

Presets and parameters

In the API, there are several preset modes available for the chorus. The modes at least available for the chorus are:

The minimum tunable parameters for the chorus (and the flanger) are average delay and delay modulation rate and depth.

See Also:
EffectControl

Field Summary
 
Fields inherited from interface javax.microedition.amms.control.EffectControl
SCOPE_LIVE_AND_RECORD, SCOPE_LIVE_ONLY, SCOPE_RECORD_ONLY
 
Method Summary
 int getAverageDelay()
          Gets the average delay.
 int getMaxAverageDelay()
          Gets the maximum supported average delay.
 int getMaxModulationDepth()
          Gets the maximum supported delay modulation depth.
 int getMaxModulationRate()
          Gets the maximum supported delay modulation rate.
 int getMinModulationRate()
          Gets the minimum supported delay modulation rate.
 int getModulationDepth()
          Gets the current delay modulation depth.
 int getModulationRate()
          Gets the delay modulation rate.
 int getWetLevel()
          Gets the effect's wet level.
 void setAverageDelay(int delay)
          Sets the average delay.
 void setModulationDepth(int percentage)
          Sets the delay modulation depth as a percentage of the average delay.
 void setModulationRate(int rate)
          Sets the delay modulation rate.
 int setWetLevel(int level)
          Sets the effect's wet level.
 
Methods inherited from interface javax.microedition.amms.control.EffectControl
getPreset, getPresetNames, getScope, isEnabled, isEnforced, setEnabled, setEnforced, setPreset, setScope
 

Method Detail

setWetLevel

int setWetLevel(int level)
Sets the effect's wet level.

The effect wet level affects how much of the media is passed via the effect in percents. 100 means that all the media is processed in the effect and 0 means that no processing is done at all and all the media is bypassed. Values between 0 and 100 affect the wet/dry ratio of the processing in the accuracy that the system supports. The effect is considered to be "wetter" when the effect wet level rises.

Parameters:
level - the new effect wet level for the effect in percents
Returns:
the value that was actually set
Throws:
java.lang.IllegalArgumentException - if level < 0 or level > 100

getWetLevel

int getWetLevel()
Gets the effect's wet level.

Returns:
the effect wet level for the effect in percents

setModulationRate

void setModulationRate(int rate)
Sets the delay modulation rate. A typical rate for a chorus would be 200 mHz and for a flanger 250 mHz.

Parameters:
rate - the new delay modulation rate in mHz
Throws:
java.lang.IllegalArgumentException - if the given rate < getMinModulationRate() or the given rate > getMaxModulationRate()

getModulationRate

int getModulationRate()
Gets the delay modulation rate.

Returns:
the current delay modulation rate in mHz

getMinModulationRate

int getMinModulationRate()
Gets the minimum supported delay modulation rate.

Returns:
the minimum supported delay modulation rate in mHz

getMaxModulationRate

int getMaxModulationRate()
Gets the maximum supported delay modulation rate.

Returns:
the maximum supported delay modulation rate in mHz

setModulationDepth

void setModulationDepth(int percentage)
Sets the delay modulation depth as a percentage of the average delay. For example, if the average delay is 20000 microseconds and the modulation depth is set (with this method) to be 50%, then the absolute value of the modulation amplitude (peak-to-zero depth) will be 10000 microseconds. Then, if the average delay is changed to 15000 microseconds and the modulatation depth is not touched, the absolute value of the modulation amplitude will be 7500 microseconds.

Parameters:
percentage - the new delay modulation amplitude (peak-to-zero depth) in percents of the average delay
Throws:
java.lang.IllegalArgumentException - if the given depth < 0 or the given depth > getMaxModulationDepth()

getModulationDepth

int getModulationDepth()
Gets the current delay modulation depth.

Returns:
the current delay modulation amplitude (peak-to-zero depth) in percents of the current average delay

getMaxModulationDepth

int getMaxModulationDepth()
Gets the maximum supported delay modulation depth.

Returns:
the maximum supported delay modulation amplitude (peak-to-zero depth) in percents of the average delay

setAverageDelay

void setAverageDelay(int delay)
Sets the average delay. A typical average delay for a chorus would be 20000 microseconds and for a flanger 3000 microseconds.

Parameters:
delay - the new average delay in microseconds
Throws:
java.lang.IllegalArgumentException - if the given delay < 0 or the given delay > getMaxAverageDelay()

getAverageDelay

int getAverageDelay()
Gets the average delay.

Returns:
the current average delay in microseconds

getMaxAverageDelay

int getMaxAverageDelay()
Gets the maximum supported average delay.

Returns:
the maximum supported average delay in microseconds

JSR-234 1.1

Copyright © 2004-2007 Nokia Corporation. See the Copyright for details.