CN116072128A - Dynamic equalization method and circuit - Google Patents

Dynamic equalization method and circuit Download PDF

Info

Publication number
CN116072128A
CN116072128A CN202111276862.3A CN202111276862A CN116072128A CN 116072128 A CN116072128 A CN 116072128A CN 202111276862 A CN202111276862 A CN 202111276862A CN 116072128 A CN116072128 A CN 116072128A
Authority
CN
China
Prior art keywords
gain
input signal
output signal
gain coefficient
coefficient
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111276862.3A
Other languages
Chinese (zh)
Inventor
黄娴
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Awinic Technology Co Ltd
Original Assignee
Shanghai Awinic Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Awinic Technology Co Ltd filed Critical Shanghai Awinic Technology Co Ltd
Priority to CN202111276862.3A priority Critical patent/CN116072128A/en
Publication of CN116072128A publication Critical patent/CN116072128A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS OR SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING; SPEECH OR AUDIO CODING OR DECODING
    • G10L19/00Speech or audio signals analysis-synthesis techniques for redundancy reduction, e.g. in vocoders; Coding or decoding of speech or audio signals, using source filter models or psychoacoustic analysis
    • G10L19/02Speech or audio signals analysis-synthesis techniques for redundancy reduction, e.g. in vocoders; Coding or decoding of speech or audio signals, using source filter models or psychoacoustic analysis using spectral analysis, e.g. transform vocoders or subband vocoders

Abstract

The application provides a dynamic equalization method and a circuit, wherein the method comprises the following steps: calculating a maximum gain coefficient and a minimum gain coefficient according to the input signal and preset processing parameters; taking the product of the filtered input signal and one of the maximum gain coefficient and the minimum gain coefficient as a first output signal; and taking the product of the input signal and the other of the maximum gain coefficient and the minimum gain coefficient as a second output signal directly or after filtering or delaying; taking the superposition result of the first output signal and the second output signal as a final output signal; the aim of adjusting the final output signal in real time is achieved by adjusting the proportion relation of the two paths of input signals; the method simplifies the required calculation amount and storage space of the dynamic filter, and is effective in optimizing the calculation amount because the filter coefficient is obtained without calculating the filter coefficient in real time or looking up a table, and meanwhile, the problem of noise caused by harmonic wave generated by abrupt change of the coefficient of the filter is avoided.

Description

Dynamic equalization method and circuit
Technical Field
The invention belongs to the technical field of electronic circuits, and particularly relates to a dynamic balancing method and a circuit.
Background
Today, where there is an increasing demand for sound processing, conventional static equalizers have failed to meet the demand if it is desired to adjust the music flow to the optimal sound quality at all times. Therefore, in recent years sound manufacturers have introduced dynamic filters to meet this requirement. The dynamic filter combines the frequency domain adjustment of the filter and the dynamic control of the time domain, and realizes the dynamic adjustment of the signal frequency domain. The loudness, noise level, spectral characteristics and the like of the input signals are detected by the detection unit, parameters of the equalization filter bank are calculated in real time, and the input signals pass through the equalization filter bank, so that the dynamic adjustment of loudness equalization, noise control, gain level and tone can be realized.
The dynamic equalization implementation proposed in the prior art is to calculate and modify parameters of an EQ (equalization) filter, such as coefficients of a iir filter, in real time according to the input audio content to perform loudness equalization and DRC (Dynamic Range Control ); the method has higher processing capacity requirement on the DSP (digital signal processing ); further, adjusting the filter coefficients in real time may cause transient instability of the filter, thereby producing noise.
Disclosure of Invention
In view of the above, the present invention aims to provide a dynamic equalization method and circuit, which are effective for achieving real-time adjustment of output signals and optimization of computation by adjusting the proportional relation of two paths of input signals.
The first aspect of the invention discloses a dynamic balancing method, which comprises the following steps:
calculating a maximum gain coefficient and a minimum gain coefficient according to the input signal and preset processing parameters; wherein the sum of the maximum gain coefficient and the minimum gain coefficient is 1;
taking the product of the filtered input signal and one of the maximum gain coefficient and the minimum gain coefficient as a first output signal; and taking the product of the input signal and the other of the maximum gain coefficient and the minimum gain coefficient as a second output signal directly or after filtering and/or delaying;
and taking the superposition result of the first output signal and the second output signal as a final output signal.
Optionally, the calculating the maximum gain coefficient and the minimum gain coefficient according to the input signal and the preset processing parameter includes:
filtering the input signal to filter out preset frequency components, and detecting signal parameters of the filtered input signal;
Obtaining the target gain according to the signal parameters and preset processing parameters;
and performing proportional calculation on the target gain to obtain the maximum gain coefficient and the minimum gain coefficient.
Optionally, before the proportional calculation is performed on the target gain to obtain the maximum gain coefficient and the minimum gain coefficient, the method further includes:
and smoothing the target gain value according to the jump condition of the target gain and preset starting time and releasing time.
Optionally, the detecting mode includes: at least one of mean square value detection or peak detection.
Optionally, the signal parameters include: at least one of amplitude, power and loudness of the input signal;
the processing parameters include: process threshold, process scale, and process compensation gain.
Optionally, the formula adopted for calculating the proportion of the target gain to obtain the maximum gain coefficient and the minimum gain coefficient is as follows:
RatioMax=(TarGain-GainMin)/(GainMax-GainMin);RatioMin=1-RatioMax;
or alternatively, the process may be performed,
RatioMin=(GainMax-TarGain)/(GainMax-GainMin);RatioMax=1-RatioMin;
wherein TarGain is the target gain; gainMax is the maximum gain; gainMin is the minimum gain, and the maximum gain and the minimum gain are obtained through calculation through the preset processing parameters; ratioMax is the maximum gain coefficient; ratioMin is the minimum gain factor.
Optionally, taking the product of the filtered input signal and one of the maximum gain coefficient and the minimum gain coefficient as a first output signal; and taking the product of the input signal and the other of the maximum gain coefficient and the minimum gain coefficient as a second output signal directly or after filtering and/or delaying, comprising:
the product of the filtered input signal and the maximum gain coefficient is used as a first output signal, and the product of the filtered input signal and the minimum gain coefficient is used as a second output signal.
Optionally, before the calculating the proportion of the target gain to obtain the maximum gain coefficient and the minimum gain coefficient, the method further includes:
judging whether the target gain represents the input signal lifting;
if the target gain characterizes the input signal boost, the formulas used by the maximum gain coefficient and the minimum gain coefficient are transformed into: ratio max= (TarGain-1)/(GainMax-1), ratio min = 1-ratio max;
if the target gain characterizes the input signal attenuation, the formulas adopted by the maximum gain coefficient and the minimum gain coefficient are converted into: ratio max= (TarGain-GainMin)/(1-GainMin), ratio min=1-ratio max.
Optionally, the product of the filtered input signal and one of the maximum gain coefficient and the minimum gain coefficient is used as a first output signal; and taking the product of the input signal, either directly or after filtering and/or delay, with the other of the minimum gain coefficient and the minimum gain coefficient as a second output signal, comprising:
if the target gain represents the lifting of the input signal, taking the product of the filtered input signal and the maximum gain coefficient as a first output signal; and taking the product of the delayed input signal and the minimum gain coefficient as a second output signal;
if the target gain represents the attenuation of the input signal, taking the product of the delayed input signal and the maximum gain coefficient as a second output signal; and taking the product of the filtered input signal and the minimum gain coefficient as a first output signal.
Optionally, determining whether the target gain characterizes the input signal boost includes:
judging whether the target gain is greater than or equal to 1;
if the target gain is greater than or equal to 1, judging that the target gain represents the input signal lifting;
And if the target gain is smaller than 1, judging that the target gain represents the attenuation of the input signal.
The second aspect of the present invention discloses a dynamic equalization circuit comprising: the device comprises a detection link, an output signal unit and at least two input signal paths;
a filter arranged on at least one input signal path;
the other input signal path is a through path, or is provided with a filter and/or a delay unit;
the detection link is used for calculating a maximum gain coefficient and a minimum gain coefficient according to the input signal and preset processing parameters; wherein the sum of the maximum gain coefficient and the minimum gain coefficient is 1;
an output signal unit, configured to take, as a first output signal, a product of the input signal after passing through the corresponding filter and one of the maximum gain coefficient and the minimum gain coefficient, and take, as a second output signal, a product of the input signal after passing through the filter and/or the delay unit and one of the maximum gain coefficient and the minimum gain coefficient; and taking the superposition result of the first output signal and the second output signal as a final output signal.
Optionally, the detecting link includes: the device comprises a third filter, a detection unit, a signal processing unit and at least one gain proportion module;
the third filter is used for filtering the input signal to filter out preset frequency components;
the detection unit is used for detecting signal parameters of the input signal filtered by the third filter;
the signal processing unit is used for obtaining target gain according to the signal parameters and preset processing parameters;
the gain proportion module is used for carrying out proportion calculation on the target gain to obtain a maximum gain coefficient and a minimum gain coefficient.
Optionally, the detecting link further includes: a smoothing unit;
the smoothing unit is arranged between the signal processing unit and the gain proportion module; and the smoothing module is used for smoothing the target gain value according to the jump of the target gain and preset starting time and release time.
Optionally, the number of the input signal paths is 2;
and each input signal path is provided with a corresponding filter.
Optionally, the number of the gain proportion modules is 1;
the product of the maximum gain coefficient and the output signal of the first filter is used as a first output signal;
The product of the minimum gain factor and the output signal of the second filter is taken as the second output signal.
Optionally, the detecting link further includes: the judging module is arranged at the front stage of the gain proportion module; the number of the gain proportion modules is 2, and the gain proportion modules are a first gain proportion module and a second gain proportion module respectively;
the judging module is used for judging whether the target gain represents signal lifting or not; if yes, triggering the first gain proportion module to execute proportion calculation on the target gain to obtain a maximum gain coefficient and a minimum gain coefficient;
and if the target gain represents the attenuation of the input signal, triggering the second gain proportion module to execute proportion calculation on the target gain to obtain a maximum gain coefficient and a minimum gain coefficient.
Optionally, a calculation formula adopted by the first proportional gain module for calculating the target gain in proportion is: ratio max= (TarGain-1)/(GainMax-1), ratio min = 1-ratio max;
the calculation formula adopted by the second gain proportion module for carrying out proportion calculation on the target gain is as follows: ratio max= (TarGain-GainMin)/(1-GainMin), ratio min=1-ratio max.
Optionally, the number of the input signal paths is 3;
the 2 input signal paths are respectively provided with a corresponding filter;
and delay units are arranged on the other 1 input signal paths.
Optionally, the product of the maximum gain coefficient output by the first gain proportion module and the output signal of the first filter is used as the first output signal; the product of the minimum gain coefficient output by the first gain proportion module and the output signal of the delay unit is used as the second output signal;
the product of the maximum gain coefficient output by the second gain proportion module and the output signal of the delay unit is used as the second output signal; the product of the minimum gain coefficient output by the second gain proportion module and the output signal of the second filter is taken as the first output signal.
Optionally, each of the filters is at least one of an IIR peak filter, an FIR filter, a low-shelf filter, and an high-shelf filter.
As can be seen from the above technical solution, the dynamic balancing method provided by the present invention includes: calculating a maximum gain coefficient and a minimum gain coefficient according to the input signal and preset processing parameters; taking the product of the filtered input signal and one of the maximum gain coefficient and the minimum gain coefficient as a first output signal; and taking the product of the input signal and the other of the maximum gain coefficient and the minimum gain coefficient as a second output signal directly or after filtering and/or delaying; taking the superposition result of the first output signal and the second output signal as an output signal; the aim of adjusting the final output signal in real time is achieved by adjusting the proportion relation of the two paths of input signals; the method simplifies the required calculation amount and storage space of the dynamic filter, and is effective in optimizing the calculation amount because the filter coefficient is obtained without calculating the filter coefficient in real time or looking up a table, and meanwhile, the problem of noise caused by harmonic wave generated by abrupt change of the coefficient of the filter is avoided.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are required to be used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only embodiments of the present invention, and that other drawings can be obtained according to the provided drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a dynamic balancing method provided by an embodiment of the present invention;
FIG. 2 is a flow chart of another dynamic balancing method provided by an embodiment of the present invention;
FIG. 3 is a schematic diagram of another dynamic balancing circuit according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of another dynamic balancing circuit according to an embodiment of the present invention;
fig. 5 is a timing diagram of a maximum gain factor and a minimum gain factor in another dynamic balancing circuit according to an embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments of the present invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
In this application, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The embodiment of the invention provides a dynamic equalization method which is used for solving the problem that in the prior art, instantaneous instability of a filter is possibly caused by real-time adjustment of the filter coefficient, so that noise is generated.
Referring to fig. 1, the dynamic equalization method includes:
s101, calculating a maximum gain coefficient and a minimum gain coefficient according to an input signal and preset processing parameters.
Wherein the sum of the maximum gain coefficient and the minimum gain coefficient is 1.
The input signal may be an audio signal, etc., and the specific form of the input signal is not limited herein, and may be any specific form as appropriate, which is within the scope of protection of the present application.
The processing parameters may be: threshold, ratio, and compensation gain.
It should be noted that, the processing parameters are preset, and the processing parameters do not need to be calculated in real time, that is, only the input signal is used as a variable, so that the calculation amount for calculating the maximum gain coefficient and the minimum gain coefficient is reduced. Meanwhile, the calculation accuracy can be improved; specifically, because the input signal is introduced to be equivalent to the signal with one path of gain of 0 is introduced to participate in the proportion weighting; the method is more accurate than directly using the EQ with positive gain and the EQ with negative gain to calculate the maximum gain coefficient and the minimum gain coefficient; i.e. the result will be more accurate around a gain of 0.
S102, taking the product of the filtered input signal and one of the maximum gain coefficient and the minimum gain coefficient as a first output signal; and taking the product of the input signal and the other of the maximum gain coefficient and the minimum gain coefficient as a second output signal directly or after filtering and/or delaying.
Specifically, filtering the input signal can filter out some unnecessary frequency bands or frequency content in the input signal, so as to reduce impurities, such as noise, and the like, of the input signal.
One path of input signal is delayed to make the first output signal and the second output signal have the same time sequence, so as to realize subsequent superposition. For the input signal after filtering, if the delay is smaller, the other input signal is not delayed; furthermore, the specific working principle of the branch corresponding to the second output signal is not specifically limited, and the specific working principle is only required to be within the protection scope of the application according to actual conditions.
That is, if the first output signal and the second output signal are both products of the input signal after filtering and the corresponding gain coefficients, the two signals of the input signal after filtering and the corresponding gain coefficients have the same timing, and no delay is required to be performed on any branch separately.
And when one of the first output signal and the second output signal is the product of the input signal and the corresponding gain coefficient after filtering, and the other is not filtered, the input signal of the branch needs to be correspondingly delayed, so that the time sequences of the first output signal and the second output signal are the same, and further the subsequent superposition can be realized.
S103, taking the superposition result of the first output signal and the second output signal as a final output signal.
As is clear from the above description, the first output signal and the second output signal are parameters that have been adjusted, and therefore, the first output signal and the second output signal are superimposed to enable dynamic adjustment of the final output signal.
In the embodiment, the aim of adjusting the final output signal in real time is fulfilled by adjusting the proportional relation of two paths of input signals; the method simplifies the required calculation amount and storage space of the dynamic filter, and avoids the problems of harmonic wave and noise caused by abrupt change of the filter coefficient, because the filter coefficient is obtained without calculating the filter coefficient in real time or looking up a table.
In practical application, referring to fig. 2, the specific process of step S101 includes:
s201, filtering the input signal to filter out preset frequency components, and detecting signal parameters of the filtered input signal.
Specifically, after filtering preset frequency components on an input signal, filtering out content of a preset frequency band or frequency in the input signal; and detecting signal parameters of the filtered input signal.
The signal parameters may include: at least one of the amplitude, power and loudness of the input signal.
In practical application, the detection method includes: at least one of mean square value detection or peak value detection; the detection mode may be other modes, which are not described in detail herein, and are all within the protection scope of the present application.
S202, obtaining target gain according to the signal parameters and preset processing parameters.
It should be noted that the signal parameter may be at least one of amplitude, power and loudness of the input signal; the processing parameters may be a processing threshold, a processing ratio, and a processing compensation gain. That is, the target gain is obtained by calculating according to the amplitude and loudness of the input signal, and the processing threshold, the processing proportion and the processing compensation gain.
It should be noted that, setting the processing threshold mainly uses the processing threshold as a reference line, so as to trigger the first processing action when the corresponding value of the signal parameter is higher than the processing threshold; triggering a second processing action when the value corresponding to the signal parameter is lower than the processing threshold value; of course, the method is not limited thereto, and any descriptions thereof are omitted herein, and are all within the scope of the present application.
S203, proportional calculation is carried out on the target gain, and a maximum gain coefficient and a minimum gain coefficient are obtained.
There are various processes of the maximum gain coefficient and the minimum gain coefficient, and the two cases are respectively described below.
(1) The target gain is subjected to proportional calculation, and the formula adopted for obtaining the maximum gain coefficient and the minimum gain coefficient is as follows:
Figure BDA0003329726380000091
or alternatively, the process may be performed,
Figure BDA0003329726380000092
wherein TarGain is the target gain; gainMax is the maximum gain; gainMin is the minimum gain, and the maximum gain and the minimum gain are obtained through calculation through preset processing parameters; ratioMax is the maximum gain coefficient; ratioMin is the minimum gain factor.
It should be noted that, the formula 1 and the formula 2 are mutually convertible. The specific transformation process is not described in detail here, and is within the protection scope of the application.
The specific process of step S102 is as follows: the product of the filtered input signal and the maximum gain coefficient is used as a first output signal, and the product of the filtered input signal and the minimum gain coefficient is used as a second output signal.
That is, both input signals are filtered and multiplied by the corresponding gain coefficients, and then superimposed as the final output signal.
(2) Prior to step S203, it may further include: and judging whether the target gain represents signal lifting.
If the target gain characterizes the signal boost, the formulas used by the maximum gain factor and the minimum gain factor are transformed into:
Figure BDA0003329726380000093
otherwise, the formulas used for the maximum gain coefficient and the minimum gain coefficient are transformed into:
Figure BDA0003329726380000094
it should be noted that, the formula 3 and the formula 4 are both obtained by converting based on the formula 1, and the formula obtained by converting based on the formula 2 is similar to the formula 3 and the formula 4, which are not described in detail herein, and are all within the protection scope of the present application.
In practical application, the specific process of judging whether the target gain represents the improvement of the input signal is as follows: judging whether the target gain is greater than or equal to 1; if the target gain is greater than or equal to 1, judging that the target gain represents signal improvement; if the target gain is less than 1, the target gain is determined to be indicative of the attenuation of the input signal.
The specific process of step S102 is as follows:
if the target gain represents the improvement of the input signal, taking the product of the filtered input signal and the maximum gain coefficient as a first output signal; and taking the product of the delayed input signal and the minimum gain coefficient as a second output signal.
Meanwhile, the maximum gain coefficient and the minimum gain coefficient are calculated by formula 3.
If the target gain represents the attenuation of the input signal, taking the product of the delayed input signal and the maximum gain coefficient as a second output signal; and taking the product of the filtered input signal and the minimum gain coefficient as a first output signal.
Meanwhile, the maximum gain coefficient and the minimum gain coefficient are calculated by equation 4.
In practical application, before step S203, the method may further include: s204, smoothing the target gain value according to the jump condition of the target gain and preset starting time and release time.
That is, the target gain is smoothed, and the target gain calculated in step S202 is not directly used to calculate the maximum gain coefficient and the minimum gain coefficient, but is smoothed and then used to calculate the maximum gain coefficient and the minimum gain coefficient, so that the gain coefficient calculated after smoothing can stabilize the final output signal.
Another embodiment of the present invention provides a steady-state equalization circuit, see fig. 3, comprising: the detection link (including a third filter, a detection unit, a signal processing unit, at least one gain ratio module as shown in fig. 3), an output signal unit, at least two input signal paths.
At least one of the input signal paths is provided with a filter (e.g., a first filter or a second filter as shown in fig. 3); that is, the input signal path is used for filtering the input signal, such as filtering out the content of the preset frequency band.
A further input signal path through-path, or it is provided with a filter and/or delay unit; i.e. a further input signal path which does not process the input signal or filters and/or delays the input signal.
That is, at least one input signal path is guaranteed to filter the input signal, and the other paths do not process or filter and/or delay the input signal.
The detection link is used for calculating a maximum gain coefficient and a minimum gain coefficient according to the input signal and preset processing parameters; wherein the sum of the maximum gain coefficient and the minimum gain coefficient is 1.
It should be noted that, because the signals multiplied by the maximum gain coefficient and the minimum gain coefficient are calculated according to the preset processing parameters, and thus the coefficients of two paths of filtering devices for filtering the input signal are fixed, the coefficients of the filtering devices are not required to be calculated in real time each time in order to achieve the target gain, and the formula for calculating the coefficients of the filtering devices is far more complex than calculating the maximum gain coefficient and the minimum gain coefficient, so that the calculation amount is reduced.
The input signal may be an audio signal, etc., and the specific form of the input signal is not limited herein, and may be any specific form as the case may be, and is within the scope of protection of the present application.
The processing parameters may be: process threshold, process scale, and process compensation gain.
It should be noted that, the detection link presets processing parameters, and the coefficients of the corresponding filter devices are not required to be calculated in real time, and the coefficients of the two paths of filter devices for filtering the input signal can be fixed only by the preset processing parameters, and only the proportional coefficients of the two paths of filter devices participating in weighting are required to be calculated in real time; in addition, the calculation of the filter coefficients in real time is far more complicated than the calculation of the maximum gain coefficient and the minimum gain coefficient, so that the calculation amount is reduced.
An output signal unit for taking the product of the input signal passing through the corresponding filter and one of the maximum gain coefficient and the minimum gain coefficient as a first output signal, and taking the product of the input signal passing through the filter and/or the delay unit and the other of the maximum gain coefficient and the minimum gain coefficient as a second output signal; and taking the superposition result of the first output signal and the second output signal as a final output signal.
That is, the maximum gain factor and the minimum gain factor of the detection link output are superimposed on the output end of the corresponding input signal path, so as to obtain a first output signal and a second output signal.
When the number of the input signal paths is 2, the 2 gain coefficients correspond to the two corresponding input signal paths one by one. When the number of the input signal paths is multiple, selecting 2 proper input signal paths from the multiple input signal paths according to real-time practical conditions, and enabling the 2 input signal paths to correspond to 2 gain coefficients one by one.
When there are at least two input signal paths with filters, the respective filter types and frequency points may be identical, and the delays in these input signal paths are uniform. When there is at least one input signal path without a filter, the input signal path may be provided with a delay unit to coincide the delay of the input signal path with the delay of the other input signal paths.
Since some frequency bands need to be boosted or attenuated, the filters are typically of a variable gain filter type, such as: IIR Peak, lowshelf, highshelf filters, etc. And setting two paired filters of a first filter and a second filter for each frequency band to be adjusted, wherein the types and the frequency points of the first filter and the second filter are the same.
The gains are set to be maximum gain and minimum gain, respectively, which are obtained by dynamic adjustment calculated according to the setting of the signal processing unit. Since the processing parameters of the signal processing unit are preset, the maximum gain and the minimum gain are known before the algorithm is run. Thus, the final output signal can be dynamically adjusted by adjusting the maximum gain coefficient and the minimum gain coefficient.
As is clear from the above description, the first output signal and the second output signal are parameters that have been adjusted, and therefore, the first output signal and the second output signal are superimposed to enable dynamic adjustment of the final output signal.
In practical application, detecting a link includes: the device comprises a third filter, a detection unit, a signal processing unit and at least one gain proportion module.
And the third filter is used for filtering the input signal to filter out preset frequency components.
The detection unit is used for detecting signal parameters of the input signal filtered by the third filter; the signal parameter may be at least one of the amplitude and the loudness of the input signal. The detection mode adopted by the detection unit can be at least one of mean square value detection and peak value detection; of course, other detection methods may be adopted, and are not described in detail herein, and are all within the protection scope of the present application.
And the signal processing unit is used for obtaining the target gain according to the signal parameters and preset processing parameters.
The target gain is a linear value, and thus the maximum gain coefficient and the minimum gain coefficient can be calculated according to a linear proportional relationship.
It should be noted that, the signal processing unit generally performs dynamic compression or lifting on a signal, and in combination with a filter, the dynamic compression or lifting on a certain frequency band of the signal can be implemented.
It should be noted that the signal parameter may be at least one of amplitude and loudness of the input signal; the processing parameters may be threshold, scale and compensation gain. That is, the target gain is obtained by calculating according to the amplitude and loudness of the input signal, and the threshold value, the proportion and the compensation gain.
And the gain proportion module is used for carrying out proportion calculation on the target gain to obtain a maximum gain coefficient and a minimum gain coefficient.
At least one filter is employed and the filter and/or delay unit is employed to accomplish dynamic adjustment of the final output signal.
When the input signal paths are different, the working processes of the gain proportion module are different, and the details are described below:
(1) As shown in fig. 3, the number of input signal paths is 2.
Each input signal path is provided with a corresponding filter.
The number of gain ratio modules is 1.
The product of the maximum gain coefficient and the output signal of the first filter is taken as a first output signal; the product of the minimum gain factor and the output signal of the second filter is taken as the second output signal.
That is, the input signals are multiplied by the corresponding gain coefficients after passing through the corresponding filters, respectively, and then superimposed as the final output signals.
Each filter is at least one of an IIR peak value filter, an FIR filter, a low-frame filter and an high-frame filter; of course, the filter may be any other type of filter, which is not described herein in detail, and is within the protection scope of the present application.
At this time, the formula adopted when the gain ratio module obtains the maximum gain coefficient and the minimum gain coefficient is:
Figure BDA0003329726380000131
or alternatively, the process may be performed,
Figure BDA0003329726380000132
in this embodiment, the maximum gain and the minimum gain required by the filter are obtained by presetting a processing threshold value, a processing proportion and a processing compensation gain in the signal processing unit; and let the input signal enter these two sets of filters at the same time; according to the content of the current input signal, the target gain is converted into the specific gravity value of the two filters, and the purpose of adjusting the gain of the filters in real time is achieved by adjusting the proportional relation of the two filters. The method is very effective in optimizing the calculated amount when the required adjustment frequency band of the dynamic filter is small, and simultaneously avoids the transient instability phenomenon of the filter caused by the real-time modification of the filter coefficient.
In the prior art, the target gain is calculated in a table look-up mode, so that the storage space of the signal processing unit is wasted, and harmonic waves affecting the purity of the signal are generated due to discontinuous gain; calculating the filter coefficients in real time is relatively large in calculation amount on one hand, and on the other hand, transient instability of the filter is possibly caused, so that noise is generated.
That is, it is not necessary to recalculate the filter coefficients each time based on the target gain, or to acquire the filter coefficients each time based on a look-up table of the target gain. The dynamic change of the filter is equivalent by the sum of the proportional products of the two filter outputs with fixed parameters, the calculation is simple, the instantaneous instability of the filter is not caused, and the harmonic wave generated by discontinuous gain is not generated.
In order to further improve the accuracy of the gain variation and simplify the algorithm, a delay signal of the input signal may also be introduced as a one-way signal and a filter to participate in the ratio calculation, see (2) for details.
(2) As shown in fig. 4, the number of input signal paths is 3.
The 2 input signal paths are respectively provided with a corresponding filter; delay units are arranged on the other 1 input signal path.
Detecting a link, further comprising: and the judging module is arranged at the front stage of the gain proportion module.
The number of gain proportion modules is 2, and the gain proportion modules are a first gain proportion module and a second gain proportion module respectively.
The judging module is used for judging whether the target gain represents signal lifting or not; if yes, triggering a first gain proportion module to execute proportion calculation on the target gain to obtain a maximum gain coefficient and a minimum gain coefficient; otherwise, triggering the second gain proportion module to execute proportion calculation on the target gain to obtain a maximum gain coefficient and a minimum gain coefficient.
The product of the maximum gain coefficient output by the first gain proportion module and the output signal of the first filter is used as a first output signal; the product of the minimum gain coefficient output by the first gain proportion module and the output signal of the delay unit is taken as a second output signal.
The product of the maximum gain coefficient output by the second gain proportion module and the output signal of the delay unit is used as a first output signal; the product of the minimum gain coefficient output by the second gain proportion module and the output signal of the second filter is taken as a second output signal.
Each filter is one of an IIR peak filter, a low-shelf filter and an high-shelf filter.
Specifically, a calculation formula adopted by the first proportional gain module for proportional calculation of the target gain is the following formula; that is, if the target gain characterizes the signal boost, the formulas used for the maximum gain factor and the minimum gain factor are transformed into:
Figure BDA0003329726380000151
the calculation formula adopted by the second proportional gain module for carrying out proportional calculation on the target gain is the following formula; that is, if the target gain characterizes the signal attenuation, the formulas used for the maximum gain coefficient and the minimum gain coefficient are transformed into:
Figure BDA0003329726380000152
it should be noted that, the formula 3 and the formula 4 are both obtained by converting based on the formula 1, and the formula obtained by converting based on the formula 2 is similar to the formula 3 and the formula 4, which are not described in detail herein, and are all within the protection scope of the present application.
If the maximum gain and the minimum gain are both greater than 1, the second filter does not need to participate in calculation, and does not need to judge whether the target gain represents signal lifting or not, and only the first filter and the delay unit are used for proportional calculation and addition. And the same is done; if the maximum gain and the minimum gain of the algorithm are smaller than 1, the first filter does not need to participate in extreme calculation, the target gain does not need to be judged, only the second filter and the delay unit are used for proportional calculation and addition, and the maximum gain and the minimum gain can be determined when the processing parameters are set. If one of the maximum gain and the minimum gain of the algorithm is greater than 1 and the other is less than 1, the algorithm is performed according to the algorithm flow chart.
In practical application, the specific process of judging whether the target gain represents signal lifting by the judging module is as follows: judging whether the target gain is greater than or equal to 1; if the target gain is greater than or equal to 1, judging that the target gain represents signal improvement; if the target gain is less than 1, the target gain characterization is determined to attenuate the input signal.
As shown in fig. 4, the determining module determines the calculated target gain by the smoothing unit, if the target gain is greater than or equal to 1, which indicates that the input signal is lifted, the maximum gain and 1 are used to calculate the maximum gain coefficient ratio max and the minimum gain coefficient ratio min of the first filter and the through delay unit, where 0< = ratio max < = 1; then the output signal of the first filter and the output signal of the delay unit are multiplied by corresponding gain coefficients respectively and then added to output.
If the target gain is less than 1, representing the attenuation of the input signal, calculating a maximum gain coefficient RatioMax and a minimum gain coefficient RatioMin of the through delay unit and the second filter by using the 1 and the minimum gain; and then multiplying the output signal of the second filter and the output signal of the delay unit by corresponding gains respectively and then adding and outputting.
The curve change of the calculated gain factor in the gain ratio module when the maximum gain GainMax is greater than 1 and the minimum gain GainMin is less than 1 is shown in fig. 5. When the maximum gain GainMax and the minimum gain GainMin are other conditions, the curves of the gain coefficients are similar to those of fig. 5, and are not described in detail herein, and are all within the protection scope of the present application.
In practical application, the detection link further comprises: a smoothing unit for smoothing the image data of the object,
the smoothing unit is arranged between the signal processing unit and the gain proportion module; and the method is used for smoothing the target gain value according to the jump condition of the target gain and preset starting time and release time.
That is, the target gain is smoothed, and the target gain calculated in step S202 is not directly used to calculate the maximum gain factor and the minimum gain factor, so that the gain factor calculated after smoothing can stabilize the final output signal.
Features described in the embodiments in this specification may be replaced or combined, and identical and similar parts of the embodiments may be referred to each other, where each embodiment focuses on differences from other embodiments. In particular, for a system or system embodiment, since it is substantially similar to a method embodiment, the description is relatively simple, with reference to the description of the method embodiment being made in part. The systems and system embodiments described above are merely illustrative, wherein the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative elements and steps are described above generally in terms of functionality in order to clearly illustrate the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (20)

1. A method of dynamic equalization comprising:
calculating a maximum gain coefficient and a minimum gain coefficient according to the input signal and preset processing parameters; wherein the sum of the maximum gain coefficient and the minimum gain coefficient is 1;
taking the product of the filtered input signal and one of the maximum gain coefficient and the minimum gain coefficient as a first output signal; and taking the product of the input signal and the other of the maximum gain coefficient and the minimum gain coefficient as a second output signal directly or after filtering and/or delaying;
and taking the superposition result of the first output signal and the second output signal as a final output signal.
2. The dynamic equalization method of claim 1, wherein the calculating the maximum gain factor and the minimum gain factor based on the input signal and the preset processing parameters comprises:
filtering the input signal to filter out preset frequency components, and detecting signal parameters of the filtered input signal;
obtaining the target gain according to the signal parameters and preset processing parameters;
And performing proportional calculation on the target gain to obtain the maximum gain coefficient and the minimum gain coefficient.
3. The dynamic equalization method of claim 2, further comprising, prior to scaling the target gain to obtain a maximum gain factor and a minimum gain factor:
and smoothing the target gain value according to the jump condition of the target gain and preset starting time and releasing time.
4. The dynamic balancing method according to claim 2, wherein the detecting means includes: at least one of mean square value detection or peak detection.
5. The dynamic equalization method of claim 2, wherein the signal parameters include: at least one of amplitude, power and loudness of the input signal;
the processing parameters include: process threshold, process scale, and process compensation gain.
6. The dynamic balancing method according to any one of claims 2 to 5, wherein the formula adopted for calculating the target gain to obtain the maximum gain coefficient and the minimum gain coefficient is:
RatioMax=(TarGain-GainMin)/(GainMax-GainMin);RatioMin=1-RatioMax;
or alternatively, the process may be performed,
RatioMin=(GainMax-TarGain)/(GainMax-GainMin);RatioMax=1-RatioMin;
wherein TarGain is the target gain; gainMax is the maximum gain; gainMin is the minimum gain, and the maximum gain and the minimum gain are obtained through calculation through the preset processing parameters; ratioMax is the maximum gain coefficient; ratioMin is the minimum gain factor.
7. The dynamic equalization method of claim 6, wherein a product of the filtered input signal and one of the maximum gain coefficient and the minimum gain coefficient is taken as a first output signal; and taking the product of the input signal and the other of the maximum gain coefficient and the minimum gain coefficient as a second output signal directly or after filtering and/or delaying, comprising:
the product of the filtered input signal and the maximum gain coefficient is used as a first output signal, and the product of the filtered input signal and the minimum gain coefficient is used as a second output signal.
8. The dynamic equalization method of claim 6, wherein prior to scaling the target gain to obtain the maximum gain factor and the minimum gain factor, further comprising:
judging whether the target gain represents the input signal lifting;
if the target gain characterizes the input signal boost, the formulas used by the maximum gain coefficient and the minimum gain coefficient are transformed into: ratio max= (TarGain-1)/(GainMax-1), ratio min = 1-ratio max;
If the target gain characterizes the input signal attenuation, the formulas adopted by the maximum gain coefficient and the minimum gain coefficient are converted into: ratio max= (TarGain-GainMin)/(1-GainMin), ratio min=1-ratio max.
9. The dynamic equalization method of claim 8, wherein the filtering the input signal is performed with a product of one of the maximum gain coefficient and the minimum gain coefficient as a first output signal; and taking the product of the input signal, either directly or after filtering and/or delay, with the other of the minimum gain coefficient and the minimum gain coefficient as a second output signal, comprising:
if the target gain represents the lifting of the input signal, taking the product of the filtered input signal and the maximum gain coefficient as a first output signal; and taking the product of the delayed input signal and the minimum gain coefficient as a second output signal;
if the target gain represents the attenuation of the input signal, taking the product of the delayed input signal and the maximum gain coefficient as a second output signal; and taking the product of the filtered input signal and the minimum gain coefficient as a first output signal.
10. The dynamic equalization method of claim 8, wherein determining whether the target gain characterizes the input signal boost comprises:
judging whether the target gain is greater than or equal to 1;
if the target gain is greater than or equal to 1, judging that the target gain represents the input signal lifting;
and if the target gain is smaller than 1, judging that the target gain represents the attenuation of the input signal.
11. A dynamic equalization circuit, comprising: the device comprises a detection link, an output signal unit and at least two input signal paths;
a filter arranged on at least one input signal path;
the other input signal path is a through path, or is provided with a filter and/or a delay unit;
the detection link is used for calculating a maximum gain coefficient and a minimum gain coefficient according to the input signal and preset processing parameters; wherein the sum of the maximum gain coefficient and the minimum gain coefficient is 1;
an output signal unit, configured to take, as a first output signal, a product of the input signal after passing through the corresponding filter and one of the maximum gain coefficient and the minimum gain coefficient, and take, as a second output signal, a product of the input signal after passing through the filter and/or the delay unit and one of the maximum gain coefficient and the minimum gain coefficient; and taking the superposition result of the first output signal and the second output signal as a final output signal.
12. The dynamic equalization circuit of claim 11, wherein the detection link comprises: the device comprises a third filter, a detection unit, a signal processing unit and at least one gain proportion module;
the third filter is used for filtering the input signal to filter out preset frequency components;
the detection unit is used for detecting signal parameters of the input signal filtered by the third filter;
the signal processing unit is used for obtaining target gain according to the signal parameters and preset processing parameters;
the gain proportion module is used for carrying out proportion calculation on the target gain to obtain a maximum gain coefficient and a minimum gain coefficient.
13. The dynamic equalization circuit of claim 12, wherein the detection link further comprises: a smoothing unit;
the smoothing unit is arranged between the signal processing unit and the gain proportion module; and the smoothing module is used for smoothing the target gain value according to the jump of the target gain and preset starting time and release time.
14. The dynamic equalization circuit of claim 12, wherein the number of input signal paths is 2;
And each input signal path is provided with a corresponding filter.
15. The dynamic equalization circuit of claim 14, wherein the number of gain scale modules is 1;
the product of the maximum gain coefficient and the output signal of the first filter is used as a first output signal;
the product of the minimum gain factor and the output signal of the second filter is taken as the second output signal.
16. The dynamic equalization circuit of claim 11, wherein the detection link further comprises: the judging module is arranged at the front stage of the gain proportion module; the number of the gain proportion modules is 2, and the gain proportion modules are a first gain proportion module and a second gain proportion module respectively;
the judging module is used for judging whether the target gain represents signal lifting or not; if yes, triggering the first gain proportion module to execute proportion calculation on the target gain to obtain a maximum gain coefficient and a minimum gain coefficient;
and if the target gain represents the attenuation of the input signal, triggering the second gain proportion module to execute proportion calculation on the target gain to obtain a maximum gain coefficient and a minimum gain coefficient.
17. The dynamic equalization circuit of claim 16, wherein the first proportional gain module performs a proportional calculation on the target gain using a calculation formula: ratio max= (TarGain-1)/(GainMax-1), ratio min = 1-ratio max;
the calculation formula adopted by the second gain proportion module for carrying out proportion calculation on the target gain is as follows: ratio max= (TarGain-GainMin)/(1-GainMin), ratio min=1-ratio max.
18. The dynamic equalization circuit of claim 16, wherein the number of input signal paths is 3;
the 2 input signal paths are respectively provided with a corresponding filter;
and delay units are arranged on the other 1 input signal paths.
19. The dynamic equalization circuit of claim 16, wherein if the target gain characterizes the input signal boost, then a product of the maximum gain coefficient output by the first gain scaling module and an output signal of the first filter is taken as the first output signal; the product of the minimum gain coefficient output by the first gain proportion module and the output signal of the delay unit is used as the second output signal;
If the target gain represents the attenuation of the input signal, taking the product of the maximum gain coefficient output by the second gain proportion module and the output signal of the delay unit as the second output signal; the product of the minimum gain coefficient output by the second gain proportion module and the output signal of the second filter is taken as the first output signal.
20. The dynamic equalization circuit of any of claims 11-19, wherein each of the filters is at least one of an IIR peak filter, an FIR filter, a low-pass filter, and an high-pass filter.
CN202111276862.3A 2021-10-29 2021-10-29 Dynamic equalization method and circuit Pending CN116072128A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111276862.3A CN116072128A (en) 2021-10-29 2021-10-29 Dynamic equalization method and circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111276862.3A CN116072128A (en) 2021-10-29 2021-10-29 Dynamic equalization method and circuit

Publications (1)

Publication Number Publication Date
CN116072128A true CN116072128A (en) 2023-05-05

Family

ID=86168512

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111276862.3A Pending CN116072128A (en) 2021-10-29 2021-10-29 Dynamic equalization method and circuit

Country Status (1)

Country Link
CN (1) CN116072128A (en)

Similar Documents

Publication Publication Date Title
TWI429301B (en) Volume control device and method
US8150067B2 (en) Bass enhancing method, signal processing device, and audio reproducing system
JP4177882B2 (en) Hearing aid with adaptive feedback suppression system
US8130126B2 (en) Analog to digital conversion system
GB2545939A (en) Multi-path analog front end and analog-to-digital converter for a signal processing system with low-pass filter between paths
US8351619B2 (en) Auditory sense correction device
JP2773656B2 (en) Howling prevention device
CN1674451B (en) Dynamic equalizing apparatus and method
WO2007098808A1 (en) Hearing aid and method of utilizing gain limitation in a hearing aid
JP2009005363A (en) Feedback limiter using adaptive time control
US9985597B2 (en) Digital compressor for compressing an audio signal
EP4064570A1 (en) Multi-path analog front end with adaptive path
JP5223595B2 (en) Audio processing circuit and audio processing method
CN116072128A (en) Dynamic equalization method and circuit
US9848264B2 (en) Audio signal amplification device
JP4402636B2 (en) Audio equipment
JP3322479B2 (en) Audio equipment
CN115696133A (en) Method for equalizing signal and leveling equalizer
JP4186307B2 (en) Howling prevention device
JP4912335B2 (en) AGC device
TWI778724B (en) Method for equalizing first input signal to generate equalizer output signal and leveling equalizer
JP2003531548A (en) Dynamic sound optimization method and apparatus
JP5012699B2 (en) Frequency characteristic adjusting device, frequency characteristic adjusting method and program
US11032642B1 (en) Combined frequency response and dynamic range correction for loudspeakers
US11757420B2 (en) Method for dynamically adjusting adjustable gain value to equalize input signal to generate equalizer output signal and associated leveling equalizer

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination