javax.sound.sampled
Class FloatControl.Type

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by javax.sound.sampled.Control.Type sample code for javax.sound.sampled.Control.Type definition code for javax.sound.sampled.Control.Type 
      extended by javax.sound.sampled.FloatControl.Type
Enclosing class:
FloatControl sample code for javax.sound.sampled.FloatControl definition code for javax.sound.sampled.FloatControl

public static class FloatControl.Type
extends Control.Type sample code for javax.sound.sampled.Control.Type definition code for javax.sound.sampled.Control.Type

An instance of the FloatControl.Type inner class identifies one kind of float control. Static instances are provided for the common types.

Since:
1.3

Field Summary
static FloatControl.Type sample code for javax.sound.sampled.FloatControl.Type definition code for javax.sound.sampled.FloatControl.Type AUX_RETURN sample code for javax.sound.sampled.FloatControl.Type.AUX_RETURN definition code for javax.sound.sampled.FloatControl.Type.AUX_RETURN
          Represents a control for the auxiliary return gain on a line.
static FloatControl.Type sample code for javax.sound.sampled.FloatControl.Type definition code for javax.sound.sampled.FloatControl.Type AUX_SEND sample code for javax.sound.sampled.FloatControl.Type.AUX_SEND definition code for javax.sound.sampled.FloatControl.Type.AUX_SEND
          Represents a control for the auxiliary send gain on a line.
static FloatControl.Type sample code for javax.sound.sampled.FloatControl.Type definition code for javax.sound.sampled.FloatControl.Type BALANCE sample code for javax.sound.sampled.FloatControl.Type.BALANCE definition code for javax.sound.sampled.FloatControl.Type.BALANCE
          Represents a control for the relative balance of a stereo signal between two stereo speakers.
static FloatControl.Type sample code for javax.sound.sampled.FloatControl.Type definition code for javax.sound.sampled.FloatControl.Type MASTER_GAIN sample code for javax.sound.sampled.FloatControl.Type.MASTER_GAIN definition code for javax.sound.sampled.FloatControl.Type.MASTER_GAIN
          Represents a control for the overall gain on a line.
static FloatControl.Type sample code for javax.sound.sampled.FloatControl.Type definition code for javax.sound.sampled.FloatControl.Type PAN sample code for javax.sound.sampled.FloatControl.Type.PAN definition code for javax.sound.sampled.FloatControl.Type.PAN
          Represents a control for the relative pan (left-right positioning) of the signal.
static FloatControl.Type sample code for javax.sound.sampled.FloatControl.Type definition code for javax.sound.sampled.FloatControl.Type REVERB_RETURN sample code for javax.sound.sampled.FloatControl.Type.REVERB_RETURN definition code for javax.sound.sampled.FloatControl.Type.REVERB_RETURN
          Represents a control for the post-reverb gain on a line.
static FloatControl.Type sample code for javax.sound.sampled.FloatControl.Type definition code for javax.sound.sampled.FloatControl.Type REVERB_SEND sample code for javax.sound.sampled.FloatControl.Type.REVERB_SEND definition code for javax.sound.sampled.FloatControl.Type.REVERB_SEND
          Represents a control for the pre-reverb gain on a line.
static FloatControl.Type sample code for javax.sound.sampled.FloatControl.Type definition code for javax.sound.sampled.FloatControl.Type SAMPLE_RATE sample code for javax.sound.sampled.FloatControl.Type.SAMPLE_RATE definition code for javax.sound.sampled.FloatControl.Type.SAMPLE_RATE
          Represents a control that changes the sample rate of audio playback.
static FloatControl.Type sample code for javax.sound.sampled.FloatControl.Type definition code for javax.sound.sampled.FloatControl.Type VOLUME sample code for javax.sound.sampled.FloatControl.Type.VOLUME definition code for javax.sound.sampled.FloatControl.Type.VOLUME
          Represents a control for the volume on a line.
 
Constructor Summary
protected FloatControl.Type sample code for javax.sound.sampled.FloatControl.Type.FloatControl.Type(java.lang.String) definition code for javax.sound.sampled.FloatControl.Type.FloatControl.Type(java.lang.String) (String sample code for java.lang.String definition code for java.lang.String  name)
          Constructs a new float control type.
 
Method Summary
 
Methods inherited from class javax.sound.sampled.Control.Type sample code for javax.sound.sampled.Control.Type definition code for javax.sound.sampled.Control.Type
equals sample code for javax.sound.sampled.Control.Type.equals(java.lang.Object) definition code for javax.sound.sampled.Control.Type.equals(java.lang.Object) , hashCode sample code for javax.sound.sampled.Control.Type.hashCode() definition code for javax.sound.sampled.Control.Type.hashCode() , toString sample code for javax.sound.sampled.Control.Type.toString() definition code for javax.sound.sampled.Control.Type.toString()
 
Methods inherited from class java.lang.Object sample code for java.lang.Object definition code for java.lang.Object
clone sample code for java.lang.Object.clone() definition code for java.lang.Object.clone() , finalize sample code for java.lang.Object.finalize() definition code for java.lang.Object.finalize() , getClass sample code for java.lang.Object.getClass() definition code for java.lang.Object.getClass() , notify sample code for java.lang.Object.notify() definition code for java.lang.Object.notify() , notifyAll sample code for java.lang.Object.notifyAll() definition code for java.lang.Object.notifyAll() , wait sample code for java.lang.Object.wait() definition code for java.lang.Object.wait() , wait sample code for java.lang.Object.wait(long) definition code for java.lang.Object.wait(long) , wait sample code for java.lang.Object.wait(long, int) definition code for java.lang.Object.wait(long, int)
 

Field Detail

MASTER_GAIN sample code for javax.sound.sampled.FloatControl.Type.MASTER_GAIN

public static final FloatControl.Type sample code for javax.sound.sampled.FloatControl.Type definition code for javax.sound.sampled.FloatControl.Type  MASTER_GAIN
Represents a control for the overall gain on a line.

Gain is a quantity in decibels (dB) that is added to the intrinsic decibel level of the audio signal--that is, the level of the signal before it is altered by the gain control. A positive gain amplifies (boosts) the signal's volume, and a negative gain attenuates (cuts) it. The gain setting defaults to a value of 0.0 dB, meaning the signal's loudness is unaffected. Note that gain measures dB, not amplitude. The relationship between a gain in decibels and the corresponding linear amplitude multiplier is:

linearScalar = pow(10.0, gainDB/20.0)

The FloatControl class has methods to impose a maximum and minimum allowable value for gain. However, because an audio signal might already be at a high amplitude, the maximum setting does not guarantee that the signal will be undistorted when the gain is applied to it (unless the maximum is zero or negative). To avoid numeric overflow from excessively large gain settings, a gain control can implement clipping, meaning that the signal's amplitude will be limited to the maximum value representable by its audio format, instead of wrapping around.

These comments apply to gain controls in general, not just master gain controls. A line can have more than one gain control. For example, a mixer (which is itself a line) might have a master gain control, an auxiliary return control, a reverb return control, and, on each of its source lines, an individual aux send and reverb send.

See Also:
AUX_SEND sample code for javax.sound.sampled.FloatControl.Type.AUX_SEND definition code for javax.sound.sampled.FloatControl.Type.AUX_SEND , AUX_RETURN sample code for javax.sound.sampled.FloatControl.Type.AUX_RETURN definition code for javax.sound.sampled.FloatControl.Type.AUX_RETURN , REVERB_SEND sample code for javax.sound.sampled.FloatControl.Type.REVERB_SEND definition code for javax.sound.sampled.FloatControl.Type.REVERB_SEND , REVERB_RETURN sample code for javax.sound.sampled.FloatControl.Type.REVERB_RETURN definition code for javax.sound.sampled.FloatControl.Type.REVERB_RETURN , VOLUME sample code for javax.sound.sampled.FloatControl.Type.VOLUME definition code for javax.sound.sampled.FloatControl.Type.VOLUME

AUX_SEND sample code for javax.sound.sampled.FloatControl.Type.AUX_SEND

public static final FloatControl.Type sample code for javax.sound.sampled.FloatControl.Type definition code for javax.sound.sampled.FloatControl.Type  AUX_SEND
Represents a control for the auxiliary send gain on a line.

See Also:
MASTER_GAIN sample code for javax.sound.sampled.FloatControl.Type.MASTER_GAIN definition code for javax.sound.sampled.FloatControl.Type.MASTER_GAIN , AUX_RETURN sample code for javax.sound.sampled.FloatControl.Type.AUX_RETURN definition code for javax.sound.sampled.FloatControl.Type.AUX_RETURN

AUX_RETURN sample code for javax.sound.sampled.FloatControl.Type.AUX_RETURN

public static final FloatControl.Type sample code for javax.sound.sampled.FloatControl.Type definition code for javax.sound.sampled.FloatControl.Type  AUX_RETURN
Represents a control for the auxiliary return gain on a line.

See Also:
MASTER_GAIN sample code for javax.sound.sampled.FloatControl.Type.MASTER_GAIN definition code for javax.sound.sampled.FloatControl.Type.MASTER_GAIN , AUX_SEND sample code for javax.sound.sampled.FloatControl.Type.AUX_SEND definition code for javax.sound.sampled.FloatControl.Type.AUX_SEND

REVERB_SEND sample code for javax.sound.sampled.FloatControl.Type.REVERB_SEND

public static final FloatControl.Type sample code for javax.sound.sampled.FloatControl.Type definition code for javax.sound.sampled.FloatControl.Type  REVERB_SEND
Represents a control for the pre-reverb gain on a line. This control may be used to affect how much of a line's signal is directed to a mixer's internal reverberation unit.

See Also:
MASTER_GAIN sample code for javax.sound.sampled.FloatControl.Type.MASTER_GAIN definition code for javax.sound.sampled.FloatControl.Type.MASTER_GAIN , REVERB_RETURN sample code for javax.sound.sampled.FloatControl.Type.REVERB_RETURN definition code for javax.sound.sampled.FloatControl.Type.REVERB_RETURN , EnumControl.Type.REVERB sample code for javax.sound.sampled.EnumControl.Type.REVERB definition code for javax.sound.sampled.EnumControl.Type.REVERB

REVERB_RETURN sample code for javax.sound.sampled.FloatControl.Type.REVERB_RETURN

public static final FloatControl.Type sample code for javax.sound.sampled.FloatControl.Type definition code for javax.sound.sampled.FloatControl.Type  REVERB_RETURN
Represents a control for the post-reverb gain on a line. This control may be used to control the relative amplitude of the signal returned from an internal reverberation unit.

See Also:
MASTER_GAIN sample code for javax.sound.sampled.FloatControl.Type.MASTER_GAIN definition code for javax.sound.sampled.FloatControl.Type.MASTER_GAIN , REVERB_SEND sample code for javax.sound.sampled.FloatControl.Type.REVERB_SEND definition code for javax.sound.sampled.FloatControl.Type.REVERB_SEND

VOLUME sample code for javax.sound.sampled.FloatControl.Type.VOLUME

public static final FloatControl.Type sample code for javax.sound.sampled.FloatControl.Type definition code for javax.sound.sampled.FloatControl.Type  VOLUME
Represents a control for the volume on a line.


PAN sample code for javax.sound.sampled.FloatControl.Type.PAN

public static final FloatControl.Type sample code for javax.sound.sampled.FloatControl.Type definition code for javax.sound.sampled.FloatControl.Type  PAN
Represents a control for the relative pan (left-right positioning) of the signal. The signal may be mono; the pan setting affects how it is distributed by the mixer in a stereo mix. The valid range of values is -1.0 (left channel only) to 1.0 (right channel only). The default is 0.0 (centered).

See Also:
BALANCE sample code for javax.sound.sampled.FloatControl.Type.BALANCE definition code for javax.sound.sampled.FloatControl.Type.BALANCE

BALANCE sample code for javax.sound.sampled.FloatControl.Type.BALANCE

public static final FloatControl.Type sample code for javax.sound.sampled.FloatControl.Type definition code for javax.sound.sampled.FloatControl.Type  BALANCE
Represents a control for the relative balance of a stereo signal between two stereo speakers. The valid range of values is -1.0 (left channel only) to 1.0 (right channel only). The default is 0.0 (centered).

See Also:
PAN sample code for javax.sound.sampled.FloatControl.Type.PAN definition code for javax.sound.sampled.FloatControl.Type.PAN

SAMPLE_RATE sample code for javax.sound.sampled.FloatControl.Type.SAMPLE_RATE

public static final FloatControl.Type sample code for javax.sound.sampled.FloatControl.Type definition code for javax.sound.sampled.FloatControl.Type  SAMPLE_RATE
Represents a control that changes the sample rate of audio playback. The net effect of changing the sample rate depends on the relationship between the media's natural rate and the rate that is set via this control. The natural rate is the sample rate that is specified in the data line's AudioFormat object. For example, if the natural rate of the media is 11025 samples per second and the sample rate is set to 22050 samples per second, the media will play back at twice the normal speed.

Changing the sample rate with this control does not affect the data line's audio format. Also note that whenever you change a sound's sample rate, a change in the sound's pitch results. For example, doubling the sample rate has the effect of doubling the frequencies in the sound's spectrum, which raises the pitch by an octave.

Constructor Detail

FloatControl.Type sample code for javax.sound.sampled.FloatControl.Type(java.lang.String) definition code for javax.sound.sampled.FloatControl.Type(java.lang.String)

protected FloatControl.Type(String sample code for java.lang.String definition code for java.lang.String  name)
Constructs a new float control type.

Parameters:
name - the name of the new float control type