javax.microedition.amms.control.audioeffect
Interface ChorusControl

All Superinterfaces:
EffectControl, Control

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: chorus flanger

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

See Also:
EffectControl
Since:
BlackBerry API 5.0.0

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 - @return the value that was actually set the new effect wet level for the effect in percents
Throws:
IllegalArgumentException - if level < 0 or level > 100
Since:
BlackBerry API 5.0.0

getWetLevel

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

Returns:
the effect wet level for the effect in percents
Since:
BlackBerry API 5.0.0

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:
IllegalArgumentException - if the given rate < getMinModulationRate() or the given rate > getMaxModulationRate()
Since:
BlackBerry API 5.0.0

getModulationRate

int getModulationRate()
Gets the delay modulation rate.

Returns:
the current delay modulation rate in mHz
Since:
BlackBerry API 5.0.0

getMinModulationRate

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

Returns:
the minimum supported delay modulation rate in mHz
Since:
BlackBerry API 5.0.0

getMaxModulationRate

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

Returns:
the maximum supported delay modulation rate in mHz
Since:
BlackBerry API 5.0.0

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:
IllegalArgumentException - if the given depth < 0 or the given depth > getMaxModulationDepth()
Since:
BlackBerry API 5.0.0

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
Since:
BlackBerry API 5.0.0

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
Since:
BlackBerry API 5.0.0

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:
IllegalArgumentException - if the given delay < 0 or the given delay > getMaxAverageDelay()
Since:
BlackBerry API 5.0.0

getAverageDelay

int getAverageDelay()
Gets the average delay.

Returns:
the current average delay in microseconds
Since:
BlackBerry API 5.0.0

getMaxAverageDelay

int getMaxAverageDelay()
Gets the maximum supported average delay.

Returns:
the maximum supported average delay in microseconds
Since:
BlackBerry API 5.0.0





Copyright 1999-2010 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Copyright 1993-2003 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. All Rights Reserved.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark of Sun Microsystems, Inc.