ReverbType.java revision 2362
2362N/A * Copyright (c) 1999, 2003, Oracle and/or its affiliates. All rights reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A * This code is free software; you can redistribute it and/or modify it 0N/A * under the terms of the GNU General Public License version 2 only, as 2362N/A * published by the Free Software Foundation. Oracle designates this 0N/A * particular file as subject to the "Classpath" exception as provided 2362N/A * by Oracle in the LICENSE file that accompanied this code. 0N/A * This code is distributed in the hope that it will be useful, but WITHOUT 0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A * version 2 for more details (a copy is included in the LICENSE file that 0N/A * accompanied this code). 0N/A * You should have received a copy of the GNU General Public License version 0N/A * 2 along with this work; if not, write to the Free Software Foundation, 0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 2362N/A * or visit www.oracle.com if you need additional information or have any 0N/A * The <code>ReverbType</code> class provides methods for 0N/A * accessing various reverberation settings to be applied to 0N/A * Reverberation simulates the reflection of sound off of 0N/A * the walls, ceiling, and floor of a room. Depending on 0N/A * the size of the room, and how absorbent or reflective the materials in the 0N/A * room's surfaces are, the sound might bounce around for a 0N/A * long time before dying away. 0N/A * The reverberation parameters provided by <code>ReverbType</code> consist 0N/A * of the delay time and intensity of early reflections, the delay time and 0N/A * intensity of late reflections, and an overall decay time. 0N/A * Early reflections are the initial individual low-order reflections of the 0N/A * direct signal off the surfaces in the room. 0N/A * The late Relections are the dense, high-order reflections that characterize 0N/A * the room's reverberation. 0N/A * The delay times for the start of these two reflection types give the listener 0N/A * a sense of the overall size and complexity of the room's shape and contents. 0N/A * The larger the room, the longer the reflection delay times. 0N/A * The early and late reflections' intensities define the gain (in decibels) of the reflected 0N/A * signals as compared to the direct signal. These intensities give the 0N/A * listener an impression of the absorptive nature of the surfaces and objects 0N/A * The decay time defines how long the reverberation takes to exponentially 0N/A * decay until it is no longer perceptible ("effective zero"). 0N/A * The larger and less absorbent the surfaces, the longer the decay time. 0N/A * The set of parameters defined here may not include all aspects of reverberation 0N/A * as specified by some systems. For example, the Midi Manufacturer's Association 0N/A * (MMA) has an Interactive Audio Special Interest Group (IASIG), which has a 0N/A * 3-D Working Group that has defined a Level 2 Spec (I3DL2). I3DL2 0N/A * supports filtering of reverberation and 0N/A * control of reverb density. These properties are not included in the JavaSound 1.0 0N/A * definition of a reverb control. In such a case, the implementing system 0N/A * should either extend the defined reverb control to include additional 0N/A * parameters, or else interpret the system's additional capabilities in a way that fits 0N/A * the model described here. 0N/A * If implementing JavaSound on a I3DL2-compliant device: 0N/A * <li>Filtering is disabled (high-frequency attenuations are set to 0.0 dB) 0N/A * <li>Density parameters are set to midway between minimum and maximum 0N/A * The following table shows what parameter values an implementation might use for a 0N/A * representative set of reverberation settings. 0N/A * <b>Reverberation Types and Parameters</b> 0N/A * <table border=1 cellpadding=5 summary="reverb types and params: decay time, late intensity, late delay, early intensity, and early delay"> 0N/A * <th>Decay Time (ms)</th> 0N/A * <th>Late Intensity (dB)</th> 0N/A * <th>Late Delay (ms)</th> 0N/A * <th>Early Intensity (dB)</th> 0N/A * <th>Early Delay(ms)</th> 0N/A * <td>Acoustic Lab</td> 0N/A * @author Kara Kytle 0N/A * Descriptive name of the reverb type.. 0N/A * Early reflection delay in microseconds. 0N/A * Early reflection intensity. 0N/A * Late reflection delay in microseconds. 0N/A * Late reflection intensity. 0N/A * Constructs a new reverb type that has the specified reverberation 0N/A * @param name the name of the new reverb type, or a zero-length <code>String</code> 0N/A * @param earlyReflectionDelay the new type's early reflection delay time in microseconds 0N/A * @param earlyReflectionIntensity the new type's early reflection intensity in dB 0N/A * @param lateReflectionDelay the new type's late reflection delay time in microseconds 0N/A * @param lateReflectionIntensity the new type's late reflection intensity in dB 0N/A * @param decayTime the new type's decay time in microseconds 0N/A * Obtains the name of this reverb type. 0N/A * @return the name of this reverb type 0N/A * Returns the early reflection delay time in microseconds. 0N/A * This is the amount of time between when the direct signal is 0N/A * heard and when the first early reflections are heard. 0N/A * @return early reflection delay time for this reverb type, in microseconds 0N/A * Returns the early reflection intensity in decibels. 0N/A * This is the amplitude attenuation of the first early reflections 0N/A * relative to the direct signal. 0N/A * @return early reflection intensity for this reverb type, in dB 0N/A * Returns the late reflection delay time in microseconds. 0N/A * This is the amount of time between when the first early reflections 0N/A * are heard and when the first late reflections are heard. 0N/A * @return late reflection delay time for this reverb type, in microseconds 0N/A * Returns the late reflection intensity in decibels. 0N/A * This is the amplitude attenuation of the first late reflections 0N/A * relative to the direct signal. 0N/A * @return late reflection intensity for this reverb type, in dB 0N/A * Obtains the decay time, which is the amount of time over which the 0N/A * late reflections attenuate to effective zero. The effective zero 0N/A * value is implementation-dependent. 0N/A * @return the decay time of the late reflections, in microseconds 0N/A * Indicates whether the specified object is equal to this reverb type, 0N/A * returning <code>true</code> if the objects are identical. 0N/A * @param obj the reference object with which to compare 0N/A * @return <code>true</code> if this reverb type is the same as 0N/A * <code>obj</code>; <code>false</code> otherwise 0N/A * Finalizes the hashcode method. 0N/A * Provides a <code>String</code> representation of the reverb type, 0N/A * including its name and its parameter settings. 0N/A * The exact contents of the string may vary between implementations of 0N/A * @return reverberation type name and description 0N/A //$$fb2001-07-20: fix for bug 4385060: The "name" attribute of class "ReverbType" is not accessible. 0N/A //return (super.toString() + ", early reflection delay " + earlyReflectionDelay + 0N/A}
// class ReverbType