Before turning to the accompanying figures, it may be helpful to frame the present invention in terms of its limiting or normalization process. The present invention provides a method and apparatus for establishing a maximum audio magnitude level that is responsive to a volume control and limiting a reproduced sound to that maximum allowable magnitude. In certain embodiments, the limiting is responsive to the loudness of the audio signal, which may be processed to determine the peak values. The limiting, including either analog limiters or digital processing, may occur while the sound recordings are being reproduced, such as during an incoming call. The sound limiting may be determined for each such processed sound signal based on the signal's peak values. Consequently, the perceived playback loudness of two different audio signals having significantly different peak levels is made substantially the same by limiting the playback loudness used for each recording according to the maximum magnitude level.
With the above technique in mind,
The audio signal is provided from a source 154 that may include stored audio files, stored voice messages, real-time audio signals, including voice transmissions, and other sources as described herein and as are known in the art. A desired gain is applied at amplifier 156 and the amplified audio signal is limited by the limiter 152. For software implementations, the limited audio signal may be converted by D/A circuits 158. Note that in hardware implementations, the D/A circuits 158 are not applicable. Hence, the D/A circuits 158 are depicted in a dashed line representation. Finally, the limited signal may be further processed, such as by additional amplifier circuits 160 for playback by speakers 162.
The exemplary processing steps shown in
Then, at step 1002, the system can limit the audio reproduction loudness using the maximum magnitude limit as a desirable peak value for the output. As disclosed above, the limiting may be implemented via soft-limiting. This may be accomplished by attempting to amplify an audio signal up to a desired gain in an effort to synchronize a peak in the audio signal with the maximum magnitude limit. In another implementation, the signal may be hard limited to the maximum magnitude limit without any corresponding amplification. In another implementation, the audio signal may be amplified using a desired gain and then hard limited to the extent the amplified signal exceeds the maximum magnitude limit. Further, those skilled in the art will recognize that the various implementations may be executed in either the analog or digital domains or some combination thereof.
In the context of
The gain compensation may be determined with a signal limiter as shown in
The limiter 110 performs signal limiting based on the application of a limiting factor that dependent upon two limiting parameters: Desired Gain Values and Magnitude Limits. These values are generally application specific and depend upon such factors as transducer sensitivity, efficiency, and anticipated distance to a listener's ear. The Magnitude Limit represents the loudest permissible loudness for the given system. Again, this may be based, in part, on such factors as speaker size or safety measures. The Desired Gain Value represents the desired amount of amplification for the system and may be based, in part, on such factors as the volume of loaded sound files and speaker orientation or other speaker characteristics. Thus, the limiter 110 will generally attempt to amplify an input signal by an amount up to the Desired Gain Value to make the output signal equal to the Magnitude Limit. However, if the input signal is relatively loud, the amount of applied gain will be scaled downward appropriately.
To achieve these effects, the illustrated limiter 110 comprises a limiter control circuit 112 for generating actual gain values for the input signal based on the aforementioned limiting factor. The limiter 110 further includes a gain control circuit 114 for applying the actual gain values to the signal. The limiter 110 further includes, or is at least associated with, a peak detection circuit 116 that provides peak detection for the input signal, referred to as the “Signal.” The limiter 110 further may be associated with one or more output circuits that are driven by the (soft) limited version of the signal provided by the limiter 110. In an audio signal context, such circuits may comprise digital-to-analog converters (D/As) 120, amplifier circuits 122, and speakers 124.
For example, in the illustrated context, the limiter 110 dynamically detects peak values, determines whether the detected peak value(s) will violate maximum magnitude limits given current desired gain settings and, if so, makes an appropriate adjustment to the actual gain value to prevent such violations. The limiter 110 thus provides a soft-limited version of the Signal to the D/As 120, which in turn provide the amplifier circuits 122 with corresponding analog signals that are then power-amplified and used to drive the loudspeakers 124.
In more detail, the Signal passes through the peak detection circuit 116, which provides peak detection values to the limiter control circuit 112. The peak detection circuit 116 may also provide a delayed version of the Signal to the gain control circuit 114, though this is not expressly required. In
In an exemplary embodiment, the “look-ahead” time for peak detection may be set to a value at or about one-quarter cycle time of the lowest signal frequency of interest in the Signal. For example, if the Signal is an audio signal, the lowest frequency of interest might be 20 Hz. A 20 Hz signal has a cycle time of 50 ms, and one-quarter of that cycle time is 12.5 ms. Thus, the peak detection circuit 116 can be configured to delay the Signal′ by about 12.5 ms. Of course, advances other than one-quarter cycle time can be used as needed or desired.
In any case, the limiter control circuit 112 receives peak values for the Signal, and additionally receives the Desired Gain and Magnitude Limit parameters. The limiter control circuit 112 determines a limiting factor that is a bounded, unitless multiplier that is applied to the Desired Gain parameter. Specifically, the limiting factor LF for the Signal is determined as:
where Magnitude Limit and Desired Gain are the input parameters described above and Peak Value is the peak value detected by the peak detection circuit 116. Notably, the limiting factor LF is bounded between 0 and 1. Then, the Actual Gain applied to the input Signal (or delayed Signal′) is given by:
ActualGain=LF*Desired Gain (2)
The practical effects of equations (1) and (2) may be understood by recognizing that the denominator (Desired Gain×Peak Value) represents an amplified peak value where the entire Desired Gain is applied to the input Signal. If the amplified peak value is less than the Magnitude Limit, the limiting factor LF is set to 1. This means the entire Desired Gain is actually applied. Otherwise, if the amplified peak value is larger than the Magnitude Limit, then some smaller value should be applied. In fact, the ratio of the Magnitude Limit and the amplified peak value is used as the limiting factor LF. Consequently, the Actual Gain may be applied to the input Signal to produce an output with peak values that equal the Magnitude Limit.
As suggested above, the Magnitude Limit may account for various design constrains such as transducer or speaker size, sensitivity, and anticipated distance to the listener. Such considerations may be considered design-time constraints. In one implementation, the Magnitude Limit may include run-time constraints. One embodiment may account for a volume control that is set by the individual end-user. The volume control may include a master volume control that sets an overall system volume. Different volume controls may exist for different functions, including for example system sounds, loudspeaker playback, or earpiece playback. In any event, the volume may be established as some value that varies between zero and one as determined by the user. This volume may be set using UP-DOWN arrows, a dial, or other menu selection. In any event, the Magnitude Limit may be expressed as:
Magnitude Limit=Peak Acoustic Capacity*User Volume (3)
where the Peak Acoustic Capacity represents design-time constraints such as those described above and the User Volume represents run-time constraints. The Peak Acoustic Capacity may be considered an absolute maximum loudness limit that is scaled by the user volume. Thus, the limiter control circuit 112 may use the Magnitude Limit for calculating the limiting factor and the actual gain in a single process step.
Also as suggested above, the signal limiter 110 may be expanded for use with multi-channel audio signals.
In one embodiment, the limiter 110 performs signal limiting based on the application of a common limiting factor even where the limiter parameters, e.g., the maximum magnitude limit, the desired channel gain, and the current peak value, differ between two or more of the channel signals comprising the MCS. As such, the limiter 110 can be applied advantageously in systems or devices where the channel signals have different magnitude limits, or different desired gains. By way of a non-limiting examples, a mobile communication device having differently sized left and right speakers, or having one speaker naturally closer to a user's ear than the other one, represent circumstances where one might expect the left and right channels of a stereo signal to have different maximum magnitude limits and/or different desired gain values.
By way of additional non-limiting examples, in the audio context, different audio channel signals may have different desired gain values and/or different magnitude limits because of non-centered balance control settings, because the different channel signals are used to drive different sizes of loudspeakers (after amplification), because of the need to tailor the generated sound field to a particular listener's position, or because the listener is presumed to be closer to one speaker than another. That last case may be a particular consideration in cellular telephones, Push-To-Talk handsets, or other types of communication handsets, portable music devices, etc., where the nature of the device generally requires the user to position one loudspeaker closer to his or her ear(s).
In at least one embodiment, the limiter 110 dynamically calculates the common limiting factor (LF) as:
which is similar to Eq. 1, but expanded for multiple channels. One sees that the limiter 110 maintains the limiting factor at whatever value is needed to prevent clipping, saturation, etc., on any of the channel signals within the MCS. More particularly, a “limiting ratio” (LR) is calculated for each channel signal in the MCS as the ratio of the channel signal's maximum magnitude value (limit) to the product of the channel signal's current peak value measurement and the channel signal's current desired gain value. Thus, Eq. 1 can be written as:
LF=min(1,LR(Ch1),LR(Ch2), . . . ,LR(ChN)). (5)
With the simplified notation of Eq. 5, one sees that the limiting factor is set to unity if none of the limiting ratios is less than unity, or is set to a lowest one of the limiting ratios is any of them is less than unity. Those skilled in the art will recognize that a limiting ratio of 1 represents a channel signal that is on the verge of exceeding its defined magnitude limits, i.e., the product of its desired gain and its current peak value exactly equals its maximum allowed magnitude.
Also, the illustrated embodiment of the peak detection circuit 116 comprises delay circuits 130-1 through 130-N for delaying respective ones of the channel signals Ch1 through ChN, to produce the delayed signal, MCS′, for input to the scaling circuits 126 of gain control circuit 114. As indicated above, the delay circuits 130 advantageously provide look-ahead peak detection, but are not expressly required. Peak detection circuit 116 further includes peak detectors 32-1 through 32-N to generate peak value measurements for channel signals Ch1 through ChN.
Processing continues with the evaluation of the limiting ratios for all channel signals to determine whether any of them are less than unity (Step 224). If so, the limiting factor is set to the smallest one of the limiting ratios (Step 226), i.e., to the lowest fractional value, which corresponds to the worst-case one of the channel signals. If none of the limiting ratios is less than unity, then the limiting factor's value is set to unity (Step 228). In either case, the limiting factor is applied to all channel signals, such that any gain scaling needed to prevent clipping on any of the channel signals is commonly applied across all channel signals comprising the MCS (Step 230).
Further, while it should be understood that the playback loudness normalization method of the present invention can be advantageously applied in essentially any kind of device or system that plays back stored sound recordings, or manages the playback of such recordings, the present invention may have particular advantages in certain contexts. For example,
While not every functional element illustrated relates to supporting the particular signal processing comprising the present invention, the exemplary device 60 comprises a transmit/receive antenna assembly 62, a switch/duplexer 64, a radiofrequency (RF) transceiver comprising a receiver 66 and a transmitter 68, a system controller 70, one or more memory circuits 72, a host interface 74 to communicate with a host system 76 (e.g., a PC), and an user interface 77. An exemplary user interface 77 comprises a display interface 78 and a display 80, which may be a graphics-capable color LCD or other screen type, a keypad interface and keypad 82, and an audio input/output subsystem 84. The audio subsystem 84 may be connected to an audio input transducer 86 (e.g., a microphone) and to an audio output transducer 88 (e.g., a speaker).
The present invention, which may comprise hardware, software, or both, may be implemented in system controller 70. An exemplary system controller 70 comprises one or more microprocessors and/or other processing circuits, and supporting circuits, as needed. Thus, system controller 70 may be configured to read a sound recording from memory circuit(s) 72 over a data bus, for example, process the sound recording to determine its peak values and a corresponding gain control, and then write the gain control as a parameter to memory circuit(s) 72 for later use in normalizing the playback loudness of the sound recording responsive to it being selected for playback. Of course, the actual gain control can be determined for selected sound recording on the fly, and held in working memory for immediate loudness normalization of the selected sound recording.
In terms of obtaining sound recordings, device 60 may “download” sound recordings via wireless signaling with a supporting wireless communication network using receiver 66 and transmitter 68, and/or it may download sound recordings from a local host 76 via host interface circuit(s) 74. Host interface circuit(s) 74 may include essentially any type of local communication interface circuit. By way of non-limiting examples, the host interface circuit(s) 74 may comprise one or more of the following: a Universal Serial Bus (USB) interface, an IEEE 1394 (Firewire) interface, an infrared (e.g., IrDA) interface, and a short-range radio interface (e.g., Bluetooth, 802.11, etc.).
Note, too, that the audio subsystem 84 may comprise a microprocessor or other (possibly dedicated) processing circuit that can be configured to carry out exemplary playback loudness normalization in accordance with the present invention. Indeed, the present invention can be implemented using relatively modest processing resources, and is practically implemented using inexpensive programmable or custom logic circuits. Thus, the present invention may be commercially embodied in the form of pre-programmed or pre-configured integrated circuit devices, as software for execution on specified microprocessor/microcontroller cores, and/or as digital synthesis files for use with Electronic Design Automation (EDA) tools of the type used to design integrated circuits.
For digital domain implementations of limiter 110, the magnitude limit for each channel can be expressed as a maximum count value, e.g., a not-to-exceed count value corresponding to the input count range of the D/As being used to generate analog signals from the soft-limited channel signals. Similarly, the desired and actual gain values can be integer or real-valued numbers used to scale the digital values comprising the channel signals of the MCS.
With a full-digital implementation, the limiter 110 may comprise hardware, software, or any combination thereof. For example, the limiter 110 may be implemented in stored program instructions for execution by a microprocessor, DSP, or the like, and it may be integrated with other processing functionality. For example, the limiter 110 may be functionally implemented in a microprocessor or other processing circuit that performs one or more additional functions related to the operation of the device 60. Of course, the limiter 110 is not limited to digital domain processing, and it should be understood that the limiter 110 can be implemented in whole or in part in the analog domain.
Also, regardless of whether the limiter 110 is configured for digital, analog, or mixed digital/analog processing, it should be understood that the processing methods illustrated in
In addition, the limiter 110 may make as-needed recalculations of the limiting factor responsive to changes in the limiter parameters. For example, the desired gain settings or magnitude limits of one or more of the channel signals may change from time to time, such as in audio playback applications where a user may adjust volume and/or balance settings, and the limiter 110 can recalculate the limit factor responsive to such changes. Also, it should be understood that the maximum magnitude limits may be set explicitly for any one or more of the channel signals comprising the multichannel signal, or may be implicit limits, such as full-scale analog and/or digital range limitations, which can be different for individual ones of the channel signals.
Significant flexibility exists regarding the applications in which the present invention may be used. In one exemplary embodiment, a portable communication device, such as a mobile station, pager, Portable Digital Assistant (PDA), or the like, is configured to normalize the playback loudness of stored ring tones. In other words, for a given ringer volume setting, operation of the present invention eliminates (or at least reduces) potentially objectionable variations in the perceived loudness of different ring tones or event alerts. Such operation is particularly beneficial where a user's communication device is configured to use different ring tones for different Caller IDs, etc.
The present invention has broad applicability beyond the ring tone and event alert normalization. Its loudness normalization processing can, for example, be applied to digital music libraries comprising digital audio files potentially obtained from different sources and potentially subject to wide variations in recorded loudness. Thus, music player software on a Personal Computer (PC), or on a digital media server accessible via the Internet, may be configured to limit audio playback in the manner described herein. Playback loudness limiting may be implemented with voice audio signals, real time, such as during a voice call conversation or when retrieving a voice message.
Accordingly, the present invention is not limited to the above features and advantages and may be carried out using different techniques that those explicitly described herein. The present embodiments are, therefore, to be considered in all respects as illustrative and not restrictive, and all changes coming within the meaning and equivalency range of the appended claims are intended to be embraced therein.