Package com.adonax.audiocue
Enum AudioCueFunctions.PanType
- All Implemented Interfaces:
Serializable
,Comparable<AudioCueFunctions.PanType>
,java.lang.constant.Constable
- Enclosing class:
AudioCueFunctions
The
enum PanType
is a repository of functions
for volume-based panning for stereo media.Each function
takes a linear pan setting as an input, ranging
from -1 (100% left) to 1 (100% right) with 0 being the
center pan setting.- Since:
- 2.0.0
- Version:
- 2.1.0
- Author:
- Philip Freihofner
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionRepresents a panning function that uses linear gradients that taper from edge to edge, and the combined volume is stronger at the edges than at the center.Represents a panning function that uses linear gradients that taper from the center to the edges on the weak side, and the combined volume is stronger at the center than at the edges.Represents a panning function that uses sines to taper the amplitude from edge to edge while maintaining the same total power of the combined tracks across the panning range.Represents a panning function that uses square roots to taper the amplitude from edge to edge, while maintaining the same total power of the combined tracks across the panning range. -
Method Summary
Modifier and TypeMethodDescriptionstatic AudioCueFunctions.PanType
Returns the enum constant of this type with the specified name.static AudioCueFunctions.PanType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.Methods inherited from class java.lang.Enum
compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Enum Constant Details
-
FULL_LINEAR
Represents a panning function that uses linear gradients that taper from edge to edge, and the combined volume is stronger at the edges than at the center. For pan values -1 to 1 the left channel factor is tapered with a linear function from 1 to 0, and the right channel factor is tapered via a linear function from 0 to 1.- See Also:
-
LEFT_RIGHT_CUT_LINEAR
Represents a panning function that uses linear gradients that taper from the center to the edges on the weak side, and the combined volume is stronger at the center than at the edges. For the pan values -1 to 0, the left channel factor is kept at full volume ( = 1) and the right channel factor is tapered via a linear function from 0 to 1. For pan values from 0 to 1, the left channel factor is tapered via a linear function from 0 to 1 and the right channel is kept at full volume ( = 1).- See Also:
-
SQUARE_LAW
Represents a panning function that uses square roots to taper the amplitude from edge to edge, while maintaining the same total power of the combined tracks across the panning range.For inputs -1 (full left) to 1 (full right):
Left vol factor = Math.sqrt(1 - (1 + x) / 2.0)
Right vol factor = Math.sqrt((1 + x) / 2.0)Settings will tend to sound a little more central than with the use of SINE_LAW panning.
- See Also:
-
SINE_LAW
Represents a panning function that uses sines to taper the amplitude from edge to edge while maintaining the same total power of the combined tracks across the panning range.For inputs -1 (full left) to 1 (full right):
Left vol factor = Math.sin((Math.PI / 2 ) * (1 - (1 + x) / 2.0))
Right vol factor = Math.sin((Math.PI / 2 ) * ((1 + x) / 2.0))Settings will tend to sound a little more spread than with the use of SQUARE_LAW panning.
- See Also:
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-