Method for generating equalizer filter parameters, audio signal filtering method and equalizer

By allowing users to draw the amplitude curve of any frequency point in the graphic equalizer, and generating frequency response curve information and response values, it solves the problem of fixed frequency bands of the graphic equalizer, improves the accuracy of filter parameters and audio processing effects, and simplifies operations. .

CN111933161BActive Publication Date: 2024-09-03TENCENT MUSIC ENTERTAINMENT TECH (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202010685668.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-07-16
Publication Date
2024-09-03
Estimated Expiration
2040-07-16

AI Technical Summary

Technical Problem

The controllable frequency range of existing graphic equalizers is fixed and limited, which cannot meet the actual needs of users, resulting in the generated filter parameters having unsatisfactory filtering effects on audio.

Method used

Provides an equalizer filter parameter generation method that allows users to draw the amplitude curve of any frequency point in a preset area, generate frequency response curve information including the target frequency point, and obtain the amplitude response value and phase response value, which are used to generate Filter parameters of the audio signal.

Benefits of technology

The accuracy of the frequency response curve is improved, the generated filter parameters are more in line with user needs, achieving more ideal filtering effects, and simplifying user operations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111933161B
    Figure CN111933161B
Patent Text Reader

Abstract

The present invention discloses a method for generating filter parameters of an equalizer, including: receiving an operation of drawing a curve of the amplitude value of a frequency parameter in a preset area of ​​a displayed interface by a user, obtaining the amplitude value of the curve and a target frequency point corresponding to the amplitude value; generating frequency response curve information including the amplitude value of the target frequency point; obtaining the amplitude response value of the frequency response curve represented by the frequency response curve information; determining the phase response value; and using the amplitude response value and the phase response value to generate filter parameters for filtering an audio signal. The application does not limit the frequency at which the user can draw the amplitude, that is, the user can draw the amplitude of any frequency point, which can fully meet the actual needs of the user, so that the accuracy of the obtained frequency response curve is improved, and the filter parameters for audio processing generated based on the frequency response curve are more in line with the user's requirements.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing, and in particular to a method for generating equalizer filter parameters, an audio signal filtering method and an equalizer. Background Art

[0002] When playing music, in order to hear more ideal sound effects, users can use an equalizer to set the music playback effect.

[0003] In the prior art, a graphic equalizer is usually used to set the playing effect of music. A graphic equalizer usually divides the frequency into several controllable frequency bands, each frequency band is set with a center frequency, and the user can set the amplitude of the center frequency of each frequency band. Based on the principle of the graphic equalizer, the inventor found that the graphic equalizer has at least the following technical problems: the controllable frequency band range of the graphic equalizer is relatively fixed, and the number is also relatively limited, so the frequency set by the user is limited. In this case, it cannot meet the actual needs of the user, and the filtering effect of the filtering parameters generated thereby on the audio is not ideal. Summary of the invention

[0004] In view of this, an embodiment of the present invention discloses a method for generating equalizer filter parameters, and a user can draw the amplitude of any frequency point based on demand, which meets the actual needs of the user and improves the accuracy of the frequency response curve. Therefore, the filter parameters obtained from the frequency response curve can obtain a more ideal filtering effect.

[0005] In a first aspect, an embodiment of the present invention provides a method for generating equalizer filter parameters, comprising:

[0006] Receiving an operation of drawing a curve for the amplitude value of the frequency parameter in a preset area of ​​the displayed interface by the user;

[0007] Obtaining the amplitude value of the curve and the target frequency point corresponding to the amplitude value;

[0008] Generate frequency response curve information including the amplitude value of the target frequency point, wherein the frequency response curve information is used to characterize the frequency response curve;

[0009] Obtaining an amplitude response value of a frequency response curve represented by the frequency response curve information;

[0010] determining a phase response value;

[0011] The amplitude response value and the phase response value are used to generate filter parameters for filtering the audio signal.

[0012] Optionally, obtaining the amplitude value of the curve and the target frequency point corresponding to the amplitude value includes:

[0013] Obtaining an amplitude value on the curve;

[0014] Obtain the target frequency point corresponding to each amplitude value on the curve.

[0015] Optionally, generating the frequency response curve information including the amplitude value of the target frequency point includes:

[0016] In a case where the target frequency point covers all frequency points in a preset frequency range, generating frequency response curve information based on a correspondence between the target frequency point and the amplitude value;

[0017] In a case where the target frequency point does not cover all frequency points within a preset frequency range, determining other frequency points within the preset frequency range except the target frequency point;

[0018] Determine the corresponding amplitude values ​​of other frequency points;

[0019] The frequency response curve information is generated by using the corresponding relationship between other frequency points and amplitude values ​​and the corresponding relationship between the target frequency point and amplitude value.

[0020] Optionally, obtaining the amplitude response value of the frequency response curve represented by the frequency response curve information includes:

[0021] Determine the sampling rate and the number of frequency domain control points;

[0022] Set the sampling interval based on the sampling rate and the number of frequency domain control points;

[0023] In the case where the direction indicating the frequency in the frequency response curve is represented by a logarithmic axis, the sampling frequency points are determined by the sampling interval and the marking points of the logarithmic axis;

[0024] Collect the amplitude value of the sampled frequency point on the frequency response curve.

[0025] Optionally, determining the phase response value includes:

[0026] Detect whether there is a linear phase curve set by the user;

[0027] If there is no linear phase curve set by the user, the phase response value is a preset minimum phase value;

[0028] If there is a linear phase curve set by the user, the phase response value is determined based on the linear phase curve set by the user.

[0029] Optionally, the using the amplitude response value and the phase response value to generate a filter parameter for filtering the audio signal includes:

[0030] When it is detected that there is a linear phase curve set by the user, a frequency response vector is calculated based on the amplitude response value and the phase response value;

[0031] A filtering parameter corresponding to the frequency response vector is obtained.

[0032] In a second aspect, an embodiment of the present invention provides an audio signal filtering method, comprising:

[0033] Determine an audio signal to be processed and a filter parameter; the filter parameter is obtained by any one of the above filtering methods; the audio signal to be processed is an audio signal that is in a playing state when the filter parameter is generated or an audio signal obtained after the filter parameter is generated;

[0034] The audio signal to be processed is filtered using the filtering parameters.

[0035] Optionally, also include:

[0036] Performing spectrum calculation on the audio signal to be processed to obtain a first spectrum graph;

[0037] Performing spectrum calculation on the audio signal obtained after filtering to obtain a second spectrum graph;

[0038] The first spectrum graph and the second spectrum graph are displayed separately at the same time.

[0039] In a third aspect, an embodiment of the present invention further provides an equalizer, including:

[0040] An input interface, used to receive a user's operation of drawing a curve for the amplitude value of the frequency parameter in a preset area of ​​the displayed interface;

[0041] A first acquisition unit, used to acquire the amplitude value of the curve and the target frequency point corresponding to the amplitude value;

[0042] A frequency response curve information generating unit, used to generate frequency response curve information including the amplitude value of the target frequency point;

[0043] An amplitude response value acquisition unit, used to acquire an amplitude response value of a frequency response curve represented by the frequency response curve information;

[0044] A phase response value determining unit, used to determine a phase response value;

[0045] A filter parameter generating unit, used to generate filter parameters for filtering the audio signal by using the amplitude response value and the phase response value;

[0046] A filtering unit, used for performing filtering processing on the audio signal to be processed using the filtering parameters;

[0047] The display interface is used to distinguish and simultaneously display a first spectrum and a second spectrum; the first spectrum is a spectrum obtained by performing spectrum calculation on the audio signal to be processed; the second spectrum is a spectrum obtained by performing spectrum calculation on the audio signal obtained after filtering.

[0048] Optionally, the frequency response curve information generating unit is used to generate the frequency response curve information including the amplitude value of the target frequency point, including:

[0049] The frequency response curve information generating unit is specifically configured to generate frequency response curve information based on the correspondence between the target frequency point and the amplitude value when the target frequency point covers all frequency points in the preset frequency range;

[0050] In a case where the target frequency point does not cover all frequency points within a preset frequency range, determining other frequency points within the preset frequency range except the target frequency point;

[0051] Determine the corresponding amplitude values ​​of other frequency points;

[0052] The frequency response curve information is generated by using the corresponding relationship between other frequency points and amplitude values ​​and the corresponding relationship between the target frequency point and amplitude value.

[0053] The embodiment of the present invention discloses a method for generating filter parameters of an equalizer, including: receiving an operation of drawing a curve for the amplitude value of a frequency parameter in a preset area of ​​a displayed interface by a user, obtaining the amplitude value of the curve and a target frequency point corresponding to the amplitude value; generating frequency response curve information including the amplitude value of the target frequency point; obtaining the amplitude response value of the frequency response curve represented by the frequency response curve information; determining the phase response value; and using the amplitude response value and the phase response value to generate filter parameters for filtering an audio signal. It can be seen that in the present application, a user can draw a curve without limiting the frequency points that the curve drawn by the user can include, that is, the user can draw the amplitude of any frequency point, which can fully meet the actual needs of the user, and the frequency response curve information obtained based on this includes more frequency points required by the user, so that the accuracy of the frequency response curve is improved, and the filter parameters for audio processing generated based on the frequency response curve are more in line with the user's requirements.

[0054] Furthermore, in the present application, the user only needs to draw a curve reflecting the relationship between frequency and amplitude. Therefore, while the accuracy of the frequency response curve is improved, the operation is also simple for the user without increasing the complexity of the operation. BRIEF DESCRIPTION OF THE DRAWINGS

[0055] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.

[0056] Figure 1 A schematic flow chart of a method for generating filter parameters of an equalizer provided by an embodiment of the present invention is shown;

[0057] Figure 2 A schematic diagram showing a curve representing amplitude variation drawn by a user within a preset area;

[0058] Figure 3 A schematic diagram showing a flow chart of an audio signal filtering method provided by an embodiment of the present invention;

[0059] Figure 4 A schematic diagram showing the comparison of the frequency spectra of an audio signal before and after processing provided by an embodiment of the present invention is shown;

[0060] Figure 5 A schematic structural diagram of an equalizer provided by an embodiment of the present invention is shown. DETAILED DESCRIPTION

[0061] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0062] The applicant has found that the controllable frequency band range of the commonly used graphic equalizer in the prior art is relatively fixed and the number is relatively limited. In this case, it cannot meet the actual needs of users, and the filtering effect of the audio filtering parameters obtained based on this is also poor.

[0063] In order to obtain filtering parameters with better processing effects, the applicant has found that some parameters that affect the audio processing effect can be provided, such as: center frequency, quality factor, cutoff frequency decrease slope, number of cascade filters, etc. For example, users of existing parameter equalizers can set the provided parameters according to their needs.

[0064] However, the applicant found that the scope of use of parametric equalizers is not wide. Based on this issue, the applicant found through research that the parameters set by the parametric equalizer are very unfamiliar to ordinary users. Without understanding the meaning of these parameters, users cannot effectively control the audio effects by setting parameters. This requires users to fully understand the meaning of each parameter before using the parametric equalizer, and understand the impact of the numerical value corresponding to each parameter on the audio processing effect. This greatly increases the difficulty of user operation, which leads to the parametric equalizer not being widely used.

[0065] Therefore, how to improve the filtering effect of filtering parameters while meeting the actual needs of users and not increasing the complexity of user operations has become a big problem.

[0066] Based on the above problems, the applicant has found that if the frequencies that can be set by the user are no longer limited, that is, if the user can arbitrarily draw a curve reflecting the relationship between amplitude and frequency without considering the frequency limit, this can greatly meet the actual needs of the user. In addition, since the user can draw the amplitude value of any frequency point, the accuracy of the frequency response curve obtained based on the user's curve drawing operation is greatly improved. The filtering effect of the filtering parameters generated by the frequency response curve can better reflect the user's needs and improve the audio processing effect.

[0067] In addition, users only need to draw a curve that reflects the relationship between frequency points and amplitude values, without having to set many unfamiliar parameters. Therefore, compared with the parametric equalizer, the complexity of user operations is simplified.

[0068] In summary, in order to solve the technical problems mentioned above, an embodiment of the present invention discloses a method for generating filter parameters of an equalizer, including: receiving an operation of drawing a curve of the amplitude value of a frequency parameter in a preset area of ​​a displayed interface by a user, obtaining the amplitude value of the curve and the target frequency point corresponding to the amplitude value; generating frequency response curve information including the amplitude value of the target frequency point; obtaining the amplitude response value of the frequency response curve represented by the frequency response curve information; determining the phase response value; and using the amplitude response value and the phase response value to generate a filter parameter for filtering an audio signal. It can be seen that in this application, the frequency at which the user can draw the amplitude is not limited, that is, the user can draw the amplitude of any frequency point, which can fully meet the actual needs of the user, and the frequency response curve obtained based on this contains more frequency points required by the user, so that the accuracy of the frequency response curve is improved, and the filter parameters for audio processing generated based on the frequency response curve are more in line with the user's requirements.

[0069] Furthermore, in the present application, the user only needs to draw a curve for reflecting the relationship between frequency and amplitude. Therefore, while the accuracy of the frequency response curve is improved, the operation is also simple for the user without increasing the complexity of the operation.

[0070] refer to Figure 1 , shows a flow chart of a method for generating filter parameters of an equalizer provided by an embodiment of the present invention. In this embodiment, the method includes:

[0071] S101: receiving an operation of drawing a curve for the amplitude value of a frequency parameter in a preset area of ​​a displayed interface by a user.

[0072] In this embodiment, the preset area can be represented as the area where the user performs a curve drawing operation. The preset area contains an amplitude parameter and a frequency parameter. The amplitude parameter can indicate to the user the direction of the amplitude drawing, and the frequency parameter can indicate to the user the frequency corresponding to the amplitude drawn by the user, that is, the preset area includes an amplitude parameter indicating the direction of change of the amplitude value and a frequency parameter indicating the direction of change of the frequency.

[0073] For example: the preset area can be represented by a coordinate axis, the horizontal axis of the coordinate axis represents the frequency, and the vertical axis represents the amplitude value, wherein the unit of the amplitude value can be dB, the value range can be plus or minus 12dB, and 0dB can represent that the amplitude value of the frequency point is not changed. Among them, in order to better adapt to the auditory characteristics of the human ear, the coordinate axis representing the frequency can be a logarithmic axis, and the interval between each frequency point in the logarithmic axis is a logarithmic interval.

[0074] It should be noted that in this embodiment, the user's operation of drawing the amplitude does not need to consider the frequency limitation. It can be understood that the user can draw the amplitude value of any frequency point in the preset area.

[0075] In this embodiment, the user's operation of drawing the amplitude does not need to consider the frequency limitation. Based on this condition, the embodiment of the present invention provides the following implementation method to implement the user's operation of drawing the amplitude: the user draws a curve representing the amplitude change in a preset area.

[0076] The preset area may be a circled canvas range, on which the user may draw a curve representing amplitude variation to achieve amplitude gain or suppression at any frequency point.

[0077] For example: a user can use a mouse as a brush to draw a curve representing amplitude changes on a PC, or use a finger as a brush to draw a curve representing amplitude changes on a mobile terminal.

[0078] In this embodiment, the preset area for drawing the amplitude change curve includes not only the amplitude parameter but also the frequency parameter. Then the curve drawn by the user for representing the amplitude change can indicate not only the change of the amplitude but also the frequency point corresponding to each amplitude value on the curve. For example, the preset area can be an area including horizontal and vertical axes, wherein the horizontal axis indicates the frequency and the vertical axis indicates the amplitude.

[0079] Example: Reference Figure 2 , a curve representing the amplitude change drawn by the user in a preset area, where the horizontal axis is frequency and the vertical axis is amplitude.

[0080] It should be noted that the curve drawn by the user needs to meet the definition of the function, that is, one frequency point on the curve can only correspond to one amplitude value. For example, if the horizontal axis is frequency and the vertical axis is amplitude, there can only be one point on the curve corresponding to one point on the horizontal axis, and one frequency point cannot correspond to more than two amplitude values.

[0081] S102: Acquire the amplitude value of the curve and the target frequency point corresponding to the amplitude value.

[0082] In this step, the amplitude value on the curve is obtained, and the target frequency corresponding to each amplitude on the curve is obtained.

[0083] S103: Generate frequency response curve information including the amplitude value of the target frequency point.

[0084] In this embodiment, the generated frequency response curve information is used to characterize the frequency response curve, wherein the frequency response curve characterizes the relationship between frequency and amplitude value, including the relationship between frequency points and amplitude values ​​included in a preset frequency range, wherein the preset frequency range is a pre-set frequency range.

[0085] In this embodiment, the preset frequency range can be reflected in a preset area displayed to the user for amplitude curve drawing operation. For example, if the preset area is displayed in the form of a coordinate system, the range of the coordinate axis representing the frequency can be set to the preset frequency range.

[0086] The frequency points in the curve drawn by the user may include some or all of the frequency points within the preset range, that is, the target frequency point may cover some or all of the frequency points within the preset frequency range.

[0087] In this embodiment, a frequency response curve including an amplitude value of a target frequency point may be generated based on a relationship between the target frequency point and the frequency points included in the preset frequency range. Specifically, S103 may include:

[0088] In the case that the target frequency point covers all frequency points in the preset frequency range, frequency response curve information is generated based on the corresponding relationship between the target frequency point and the amplitude.

[0089] In the case that the target frequency point does not cover all the frequency points within the preset frequency range, other frequency points except the target frequency point within the preset frequency range are determined, the amplitude values ​​corresponding to the other frequency points are determined, and the frequency response curve information is generated by using the correspondence between the other frequency points and the amplitude and the correspondence between the target frequency point and the amplitude.

[0090] In this embodiment, for other frequency points that are not covered by the target frequency point, the amplitude values ​​of the other frequency points may adopt default amplitude values, and the default amplitude values ​​are preset by the technicians.

[0091] In this embodiment, it can be seen from the above introduction that the preset area for the user to draw the curve operation can be embodied in the form of a coordinate system, and in order to be more adapted to the auditory characteristics of the human ear, the coordinate axis representing the frequency in the coordinate system can be a logarithmic axis, and the interval between each frequency point in the logarithmic axis is a logarithmic interval. The frequency response curve information is generated based on the user's curve drawing operation result, and the frequency response curve represented by the generated frequency response curve information can also be embodied in the form of a coordinate system, wherein the coordinate axis representing the frequency can be a logarithmic axis.

[0092] S104: Obtaining an amplitude response value of the frequency response curve represented by the frequency response curve information.

[0093] In this embodiment, the amplitude response value represents a one-to-one correspondence between frequency and amplitude, wherein the difference from the frequency response curve is that the frequency response curve is a continuous curve, that is, the frequency of the frequency response curve is continuous, but the amplitude response value is a discrete point.

[0094] For example: the amplitude response value can be expressed as (amplitude value 1, frequency point 1), (amplitude value 2, frequency point 2), ..., (amplitude value n, frequency point n).

[0095] Among them, the amplitude response value can be obtained by sampling the frequency response curve, specifically, including:

[0096] Determine the sampling rate and the number of frequency domain control points;

[0097] Determine the sampling interval corresponding to the sampling rate and the number of frequency domain control points;

[0098] Sampling is performed on the frequency response curve according to the sampling interval.

[0099] For example: Assume the sampling rate is f s , the number of frequency domain control points is N, then the sampling interval of the frequency axis deltaFS = f s / N, the sampling frequency points may include: 0, deltaFS, 2*deltaFS,…, k*deltaFS,…, f s / 2.

[0100] It should be noted that the sampling intervals in this example are equidistant, not logarithmically spaced. According to the sampling intervals and the plotted curve, the amplitude response vector obtained by reading the amplitude response value can be represented by Habs(w), and the length of the amplitude response vector is N / 2+1.

[0101] Wherein, when the coordinate axis of the frequency response curve is a logarithmic axis, it is necessary to determine the sampling frequency point based on the sampling interval and the frequency marking point of the logarithmic axis.

[0102] Specifically, when the coordinate axis of the frequency response curve is a logarithmic axis, obtaining the amplitude response value of the frequency response curve includes:

[0103] Determine the sampling rate and the number of frequency domain control points;

[0104] Set the sampling interval based on the sampling rate and the number of frequency domain control points;

[0105] Determine the sampling frequency points through the sampling interval and the marking points on the logarithmic axis;

[0106] Collect the amplitude value of the sampled frequency point on the frequency response curve.

[0107] S105: Determine a phase response value.

[0108] In this embodiment, since the human ear is not sensitive to the phase response of music, two alternative processes are generally performed on the phase response curve of the equalizer: minimum phase value and drawing a phase curve. Generally, when the user has no requirements on the phase, the phase response value can use the minimum phase value.

[0109] However, in this application, in order to meet the needs of users and to obtain better processing effects, this embodiment takes into account the user's requirements for phase, specifically, also including:

[0110] Accepts the linear phase curve set by the user.

[0111] For example: the user can set a linear phase curve in a coordinate system that includes frequency and phase. Assuming that the horizontal axis of the coordinate system is frequency and the vertical axis is phase angle, the phase can be plotted from the origin toward the vertical axis that represents the change in phase angle. For example, starting from the origin, a straight line is drawn toward the lower right corner.

[0112] Based on this, the process of determining the phase response value may include:

[0113] Detect whether there is a linear phase curve set by the user;

[0114] If there is no linear phase curve set by the user, the phase response value is a preset minimum phase value;

[0115] If there is a linear phase curve set by the user, the phase response value is determined based on the linear phase curve set by the user. The phase response value corresponding to the linear phase curve may be the slope of the linear phase curve.

[0116] Specifically, the phase response value corresponding to the horizontal axis coordinate point can be read with reference to the reading method of the response amplitude value to obtain a phase response vector. The phase response vector can be represented by Hphase(w), and the length of the phase response vector is N / 2+1.

[0117] S106: Generate filtering parameters for filtering the audio signal using the amplitude response value and the phase response value.

[0118] In this embodiment, the parameter generated for filtering the audio signal may be a time domain pulse vector. The calculation of the time domain pulse vector is related to the amplitude response value and the phase response value. As can be seen from the above introduction, the phase response value may be a minimum phase value or may be obtained through a linear phase curve set by a user. Different phase response values ​​correspond to different calculation methods of the time domain pulse vector, specifically, including:

[0119] Method 1:

[0120] When the phase response value is the minimum phase, the time domain pulse vector can be calculated by the following formulas 1)-3):

[0121] 1)hy(n)=real(ifft([Habs(w) / 20,clip(Habs'(w) / 20)]));

[0122] 2) weight=[1; 2*ones(N / 2-1,1); 1; zeros(N / 2-1,1)];

[0123] 3)h(n)=real(ifft(exp(fft(weight.*hy(n)))));

[0124] Among them, h(n) represents the time domain pulse vector, Habs'(w) represents the vector Habs(w) with the first two elements removed, the function ones(m,n) represents the generation of a matrix with m rows and n columns consisting of the element 1, the function zeros(m,n) represents the generation of a matrix with m rows and n columns consisting of the element 0, the function real represents the use of real numbers, and the symbol .* represents the point-by-point multiplication of vectors.

[0125] Method 2:

[0126] In the case where the phase response value is obtained based on a linear phase curve set by a user, the calculation method of the time domain pulse vector may include:

[0127] When it is detected that there is a linear phase curve set by the user, a frequency response vector is calculated based on the amplitude response value and the phase response value; and a time domain pulse vector is calculated using the frequency response vector.

[0128] For example, the frequency response vector can be calculated by the following formula 4):

[0129] 4)H(w)=Habs(w)*exp(jHphase(w));

[0130] Wherein, H(w) represents the frequency response vector, exp represents the natural logarithm, and j is an imaginary number.

[0131] Using the conjugate symmetry of real vectors in the frequency domain, the time domain pulse vector is calculated using the following formula 5):

[0132] 5)h(n)=ifft([H(w),clip(conj(H'(w)))]);

[0133] Where ifft represents inverse Fourier transform, clip represents the reversal of a vector, conj represents the conjugate of a complex number, and H'(w) represents H(w) with the first two elements removed.

[0134] In addition, the applicant found that since the music signal can be regarded as an infinitely long time domain signal, and the length of the equalizer's time domain pulse vector h(n) is N. In principle, time domain filtering requires the music signal and the equalizer's time domain pulse vector to be convolved with each other. However, this approach requires N multiplications and N-1 additions for each output point, making the method too computationally intensive.

[0135] In order to further reduce the amount of filtering operations, the applicant has found that an indirect frequency domain filtering method can be used, that is, the amplitude response value and the phase response value are first used to generate the filtering parameters of the frequency domain filtering, and the audio signal is filtered based on the filtering parameters. Among them, the method of filtering the audio signal by frequency domain filtering can include multiple methods, which are not limited in this embodiment, for example, the overlap-add method or the overlap-retain method can be used.

[0136] This embodiment has the following beneficial effects:

[0137] Beneficial effect 1:

[0138] In this embodiment, the user draws a curve for the amplitude of the frequency vector in a preset area, obtains the amplitude value corresponding to the curve and the target frequency point corresponding to the amplitude value; generates frequency response curve information including the amplitude value of the target frequency point; obtains the amplitude response value of the frequency response curve represented by the frequency response curve information; determines the phase response value; and generates filter parameters for filtering the audio signal using the amplitude response value and the phase response value. It can be seen that in this application, the frequencies that can be included in the curve drawn by the user are not limited, that is, the curve drawn by the user can include any frequency point. The frequency response curve obtained based on this includes more frequency points required by the user, so that the accuracy of the frequency response curve is improved, and the filter parameters for audio processing generated based on the frequency response curve are more in line with the user's requirements. Therefore, compared with the graphic equalizer in the prior art, the present application overcomes the problem that the graphic equalizer parameter setting is simple and the equalization effect is not fine enough.

[0139] Beneficial effect 2:

[0140] Since the user in this application only needs to draw a curve reflecting the relationship between amplitude and frequency, on the one hand, compared with the parametric equalizer in the prior art, it overcomes the problem that the parameter setting of the parametric equalizer is cumbersome and requires the user to have a certain professional background in digital signal processing. That is, while improving the accuracy of the frequency response curve, the application is also simple for the user to operate without increasing the complexity of the operation. On the other hand, it is convenient for users to apply curves with good equalization effects in other scenarios to the required scenarios, thereby obtaining good equalization effects.

[0141] Beneficial effect three:

[0142] This embodiment adopts methods such as minimum phase, frequency domain conjugate symmetry, and inverse Fourier transform to reversely calculate the time domain pulse vector from the frequency domain to the time domain. Therefore, it avoids the problem of cumbersome filtering process caused by the need to cascade multiple filters in traditional graphic equalizers and parametric equalizers.

[0143] refer to Figure 3 , shows a schematic flow chart of an audio signal filtering method provided by an embodiment of the present invention. In this embodiment, the method includes:

[0144] S301: Determine an audio signal to be processed and filter parameters.

[0145] The filtering parameters are obtained by the above-mentioned method of S101-S106. Figure 1 The corresponding embodiments are not limited in this embodiment.

[0146] The audio signal to be processed is an audio signal that is being played when the filter parameters are generated, or an audio signal obtained after the filter parameters are generated.

[0147] In this embodiment, the filtering parameters are obtained after the user adjusts the relevant parameters according to the needs of the user. The user can adjust the relevant parameters to generate the filtering parameters during the audio playback process, and filter the audio signal that is in the playback state after the filtering parameters are generated; or adjust the relevant parameters in advance before the audio signal is played to generate the filtering parameters, and when the audio signal needs to be played, the generated filtering parameters are retrieved and the audio signal is processed based on the filtering parameters.

[0148] S302: Perform filtering processing on the audio signal to be processed using the filtering parameters.

[0149] In this embodiment, it can be known from the above introduction that the audio signal can be processed in the time domain or in the frequency domain.

[0150] In this embodiment, the filter parameters are obtained based on the result of the user's curve drawing operation on the amplitude of the frequency parameter, wherein the curve drawn by the user may include all frequency points or part of the frequency points, and the frequency response curve information obtained based on this includes more frequency points required by the user. Therefore, the accuracy of the frequency response curve represented by the frequency response curve information is improved, and the generated filter parameters for audio processing are more in line with the user's requirements. Then, the audio signal is processed based on the filter parameters, and the effect that is more ideal and more in line with the user's needs can be obtained.

[0151] The applicant also found that after the audio signal is processed by filtering parameters, the user can only perceive whether the audio signal has changed by listening. In addition, to perceive such changes, the user needs to know the playback status of the audio signal before filtering. This does not allow the user to intuitively feel what kind of changes have occurred in the audio signal after filtering. In this case, if the user wants to adjust the audio signal again, it is difficult for the user to adjust the filtering parameters again with reference to the last change.

[0152] In order to solve the above problem, in this embodiment, the changes of the audio signal before and after filtering are distinguished and displayed by means of spectrum. For details, refer to Figure 4 , also includes:

[0153] S401: Perform spectrum calculation on the audio signal to be processed to obtain a first spectrum graph.

[0154] S402: Calculate the frequency spectrum of the audio signal obtained after filtering to obtain a second frequency spectrum graph.

[0155] S403: Displaying the first spectrum graph and the second spectrum graph separately at the same time.

[0156] In this embodiment, the spectrum of the audio signal can be calculated by various methods, which are not limited in this embodiment. For example, the spectrum can be calculated by using the Welch spectrum estimation method.

[0157] In this embodiment, the first spectrum and the second spectrum can be distinguished by different colors. In practice, in addition to using two colors to distinguish the first spectrum and the second frequency, solid lines and dotted lines can also be used to distinguish them. This embodiment does not limit the specific distinction method.

[0158] Since this embodiment simultaneously distinguishes and displays the changes of the audio signal before and after filtering by means of frequency spectrum, the effect of the equalizer can be intuitively felt through the real-time changes in image and sound, and a reference is provided for the user to adjust the relevant parameters for generating the filtering parameters.

[0159] It should be noted that in this embodiment, the user can also use the real-time filtering effect of the equalizer, specifically, can dynamically adjust the desired equalization effect. By drawing a specific pattern and extracting (or removing) a certain frequency range separately, the music signal components contained in the frequency range can be quickly and intuitively felt.

[0160] In this embodiment, the spectrum characteristics of the music signal before and after filtering are displayed at the same time. In the case where the user modifies the equalization effect of the music signal, the present application accurately, timely and intuitively displays it in both image and sound, so that the user can perceive the processing effect of the equalizer from both sound and image perspectives. Through instant effect feedback, the user can easily and quickly understand the music characteristics corresponding to different frequency ranges, and can also quickly adjust the drawn curve.

[0161] refer to Figure 5 , shows a schematic diagram of the structure of an equalizer provided by an embodiment of the present invention. In this embodiment, it may include: an input interface 501, a first acquisition unit 502, a frequency response curve information generation unit 503, an amplitude response value acquisition unit 504, a phase response value determination unit 505, a filtering parameter generation unit 506, a filtering unit 507 and a display interface 508, wherein,

[0162] The input interface 501 is used to receive a user's operation of drawing a curve for the amplitude value of the frequency parameter in a preset area of ​​the displayed interface.

[0163] The first acquisition unit 502 is used to acquire the amplitude value of the curve and the target frequency point corresponding to the amplitude value.

[0164] The frequency response curve information generating unit 503 is used to generate frequency response curve information including the amplitude value of the target frequency point.

[0165] The amplitude response value acquisition unit 504 is used to acquire the amplitude response value of the frequency response curve represented by the frequency response curve information.

[0166] The phase response value determining unit 505 is used to determine the phase response value.

[0167] The filter parameter generating unit 506 is used to generate filter parameters for filtering the audio signal by using the amplitude response value and the phase response value.

[0168] The filtering unit 507 is configured to perform filtering processing on the audio signal to be processed by using the filtering parameters.

[0169] The display interface 508 is used to distinguish and simultaneously display a first spectrum and a second spectrum; the first spectrum is a spectrum obtained by performing spectrum calculation on the audio signal to be processed; the second spectrum is a spectrum obtained by performing spectrum calculation on the audio signal obtained after filtering.

[0170] Optionally, the first acquisition unit 502 is used to acquire the amplitude value of the curve and the target frequency point corresponding to the amplitude value, including:

[0171] The first acquisition unit 502 is specifically configured to acquire the amplitude value on the curve; and acquire the target frequency point corresponding to each amplitude value on the curve.

[0172] Optionally, the frequency response curve information generating unit 503 is used to generate the frequency response curve information including the amplitude value of the target frequency point, including:

[0173] The frequency response curve information generating unit 503 is specifically used to generate frequency response curve information based on the correspondence between the target frequency point and the amplitude value when the target frequency point covers all frequency points in the preset frequency range; determine other frequency points in the preset frequency range except the target frequency point when the target frequency point does not cover all frequency points in the preset frequency range; determine the amplitude values ​​corresponding to other frequency points; and generate frequency response curve information using the correspondence between other frequency points and the amplitude values ​​and the correspondence between the target frequency point and the amplitude value.

[0174] Optionally, the amplitude response value acquisition unit 504 is used to acquire the amplitude response value of the frequency response curve represented by the frequency response curve information, including:

[0175] The amplitude response value acquisition unit 504 is specifically used to determine the sampling rate and the number of frequency domain control points; set the sampling interval based on the sampling rate and the number of frequency domain control points; when the direction of the frequency indicated in the frequency response curve is represented by a logarithmic axis, determine the sampled frequency point through the sampling interval and the marking point of the logarithmic axis; collect the amplitude value of the sampled frequency point on the frequency response curve.

[0176] Optionally, the phase response value determining unit 505 is used to determine the phase response value, including:

[0177] The phase response value determination unit 505 is specifically used to detect whether there is a linear phase curve set by the user; if there is no linear phase curve set by the user, the phase response value is a preset minimum phase value; if there is a linear phase curve set by the user, the phase response value is determined based on the linear phase curve set by the user.

[0178] Optionally, the filtering parameter generating unit 506 is used to generate filtering parameters for filtering the audio signal by using the amplitude response value and the phase response value, including:

[0179] The filtering parameter generating unit 506 is specifically configured to calculate a frequency response vector based on the amplitude response value and the phase response value when a linear phase curve set by a user is detected; and obtain filtering parameters corresponding to the frequency response vector.

[0180] Optionally, the filtering unit 507 is used to perform filtering processing on the audio signal to be processed using the filtering parameters, including:

[0181] The filtering unit 507 is specifically used to determine the audio signal to be processed and the filtering parameters; the filtering parameters are obtained by any of the filtering parameter generation methods described above; the audio signal to be processed is an audio signal that is in a playing state when the filtering parameters are generated or an audio signal obtained after the filtering parameters are generated; and the audio signal to be processed is filtered using the filtering parameters.

[0182] In this embodiment, based on the equalizer, the user can draw the amplitude of any frequency point, which can fully meet the actual needs of the user, and the frequency response curve obtained based on this includes more frequency points required by the user, so that the accuracy of the frequency response curve is improved, and the filtering parameters for audio processing generated based on the frequency response curve are more in line with the user's requirements.

[0183] A person of ordinary skill in the art can understand that all or part of the steps in the method of the above-mentioned embodiment can be completed by instructing the relevant hardware through a program, and the program can be stored in a computer-readable storage medium. When the program is executed, it includes the following steps (method steps): the storage medium, such as ROM / RAM, a disk, an optical disk, etc.

[0184] It should be noted that the various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0185] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for generating equalizer filter parameters, It is characterized in that include: Receiving an operation of drawing a curve for the amplitude value of the frequency parameter in a preset area of ​​the displayed interface by the user; Obtaining the amplitude value of the curve and the target frequency point corresponding to the amplitude value; Generate frequency response curve information including the amplitude value of the target frequency point, wherein the frequency response curve information is used to characterize the frequency response curve; Obtaining an amplitude response value of a frequency response curve represented by the frequency response curve information; determining a phase response value; The amplitude response value and the phase response value are used to perform calculations from the frequency domain to the time domain to generate filter parameters for filtering the audio signal, wherein the filter parameters are time domain pulse vectors.

2. The method according to claim 1, It is characterized in that The obtaining the amplitude value of the curve and the target frequency point corresponding to the amplitude value includes: Obtaining an amplitude value on the curve; Obtain the target frequency point corresponding to each amplitude value on the curve.

3. The method according to claim 1, It is characterized in that The generating of the frequency response curve information including the amplitude value of the target frequency point includes: In a case where the target frequency point covers all frequency points in a preset frequency range, generating frequency response curve information based on a correspondence between the target frequency point and the amplitude value; In a case where the target frequency point does not cover all frequency points within a preset frequency range, determining other frequency points within the preset frequency range except the target frequency point; Determine the corresponding amplitude values ​​of other frequency points; The frequency response curve information is generated by using the corresponding relationship between other frequency points and amplitude values ​​and the corresponding relationship between the target frequency point and amplitude value.

4. The method according to claim 1, It is characterized in that The obtaining of the amplitude response value of the frequency response curve represented by the frequency response curve information includes: Determine the sampling rate and the number of frequency domain control points; Set the sampling interval based on the sampling rate and the number of frequency domain control points; In the case where the direction indicating the frequency in the frequency response curve is represented by a logarithmic axis, the sampling frequency points are determined by the sampling interval and the marking points of the logarithmic axis; Collect the amplitude value of the sampled frequency point on the frequency response curve.

5. The method according to claim 1, It is characterized in that The determining of the phase response value comprises: Detect whether there is a linear phase curve set by the user; If there is no linear phase curve set by the user, the phase response value is a preset minimum phase value; If there is a linear phase curve set by the user, the phase response value is determined based on the linear phase curve set by the user.

6. The method according to claim 1, It is characterized in that The step of generating a filter parameter for filtering the audio signal by using the amplitude response value and the phase response value comprises: When it is detected that there is a linear phase curve set by the user, a frequency response vector is calculated based on the amplitude response value and the phase response value; A filtering parameter corresponding to the frequency response vector is obtained.

7. A method for filtering an audio signal, It is characterized in that include: Determining an audio signal to be processed and filtering parameters; The filtering parameters are obtained by the method described in any one of claims 1 to 6 above; the audio signal to be processed is an audio signal that is being played when the filtering parameters are generated or an audio signal obtained after the filtering parameters are generated; The audio signal to be processed is filtered using the filtering parameters.

8. The method according to claim 7, It is characterized in that Also includes: Performing spectrum calculation on the audio signal to be processed to obtain a first spectrum graph; Performing spectrum calculation on the audio signal obtained after filtering to obtain a second spectrum graph; The first spectrum graph and the second spectrum graph are displayed separately at the same time.

9. An equalizer, It is characterized in that include: An input interface, used to receive a user's operation of drawing a curve for the amplitude value of the frequency parameter in a preset area of ​​the displayed interface; A first acquisition unit, used to acquire the amplitude value of the curve and the target frequency point corresponding to the amplitude value; A frequency response curve information generating unit, used to generate frequency response curve information including the amplitude value of the target frequency point; An amplitude response value acquisition unit, used to acquire an amplitude response value of a frequency response curve represented by the frequency response curve information; A phase response value determining unit, used to determine a phase response value; A filter parameter generating unit, used to calculate from the frequency domain to the time domain using the amplitude response value and the phase response value, and generate a filter parameter for filtering the audio signal, wherein the filter parameter is a time domain pulse vector; A filtering unit, used for performing filtering processing on the audio signal to be processed using the filtering parameters; The display interface is used to distinguish and simultaneously display a first spectrum and a second spectrum; the first spectrum is a spectrum obtained by performing spectrum calculation on the audio signal to be processed; the second spectrum is a spectrum obtained by performing spectrum calculation on the audio signal obtained after filtering.

10. The equalizer according to claim 9, It is characterized in that The frequency response curve information generating unit is used to generate the frequency response curve information including the amplitude value of the target frequency point, including: The frequency response curve information generating unit is specifically configured to generate frequency response curve information based on the correspondence between the target frequency point and the amplitude value when the target frequency point covers all frequency points in the preset frequency range; In a case where the target frequency point does not cover all frequency points within a preset frequency range, determining other frequency points within the preset frequency range except the target frequency point; Determine the corresponding amplitude values ​​of other frequency points; The frequency response curve information is generated by using the corresponding relationship between other frequency points and amplitude values ​​and the corresponding relationship between the target frequency point and amplitude value.