Adjustment method of parameter equalizer and related device
By setting the filter module order and coefficient of the parameter equalizer, the problem of fixed filter order in the prior art is solved according to the passband cutoff frequency and transition bandwidth input by the user, and the problem of fixed filter order in the prior art is achieved, achieving higher adjustment accuracy and flexibility.
Patent Information
- Application Number
- CN202510535205.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-25
- Publication Date
- 2025-07-29
AI Technical Summary
The filter order of the existing parameter equalizer is fixed, which makes its adjustments in different scenarios not flexible and precise enough, making it difficult to meet the diverse needs of users.
Filter processing is realized by setting the filter order of the filter module based on the passband cutoff frequency and transition bandwidth input by the user, and determining the filter coefficients in combination with the ripple parameters.
It improves the accuracy and flexibility of the parameter equalizer in different scenarios, meets the diverse needs of users, and reduces the waste of computing resources.
Smart Images

Figure CN120390182A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of filter design, and in particular to a parameter equalizer adjustment method and related devices. Background Art
[0002] With the rapid development of digital audio technology, the demand for sound quality in digital audio electronics is becoming increasingly stringent. Speaker and sound field defects often occur during sound transmission and playback. Speaker defects are primarily due to performance and functional deficiencies, resulting in poor sound quality and clarity. The sound field refers to the spatial environment in which sound propagates. Sound field defects, such as the concentration of sound waves in certain areas, can cause the sound to be overly strong in those areas and weak in others, leading to uneven sound distribution. Clearly, speaker and sound field defects lead to poor sound transmission quality, which in turn results in a poor listening experience for the user.
[0003] An equalizer is a device that adjusts the signal amplitude at different frequencies to compensate for speaker and sound field defects, thereby improving audio quality and reducing noise. Parametric equalizers can adjust frequency bands, amplitude adjustments, and bandwidth.
[0004] Therefore, in the existing technology, parametric equalizers are often used to adjust audio signals. However, although existing parametric equalizers can adjust frequency, amplitude, and bandwidth, their fixed order makes it difficult to meet user needs in different scenarios, resulting in insufficient flexibility and precision in the adjustment of parametric equalizers.
[0005] Therefore, how to improve the accuracy and flexibility of parametric equalizer adjustment is an urgent problem to be solved in this field. Summary of the Invention
[0006] The present application discloses a method for adjusting a parametric equalizer and a related device, which can improve the accuracy and flexibility of parametric equalizer adjustment.
[0007] In a first aspect, the present application provides an adjustment method for a parametric equalizer, the parametric equalizer including a first filtering module, the method including: first, based on a first passband cutoff frequency and a first transition band width input by a user, setting a first filter order of the first filtering module; the first filter order is the minimum filter order that satisfies the first passband cutoff frequency and the first transition band width; then, based on the first filter order and the ripple parameter, setting a first filter coefficient of the first filtering module; finally, using the first filtering module to perform low-pass or high-pass filtering on the first audio signal to be processed to obtain a second audio signal.
[0008] It can be seen that the present application can set the minimum filter order and the corresponding filter coefficients for the first filtering module of the parametric equalizer to meet the transition bandwidth and the passband cut-off frequency, so that the first filtering module can meet the transition bandwidth requirements in different scenarios, and improve the accuracy and flexibility of the parametric equalizer adjustment.
[0009] In a possible implementation manner, based on the first passband cut-off frequency and the first transition band width input by the user, setting the first filter order of the first filtering module includes: setting the first filter order of the first filtering module based on the first passband cut-off frequency, the first transition band width, and the mapping relationship; wherein, the mapping relationship includes the corresponding relationship between the first passband cut-off frequency, the first transition band width, and the first filter order.
[0010] It can be seen that the present application can set the first filter order of the first filtering module based on the first passband cut-off frequency, the first transition band width, and the mapping relationship, and improve the efficiency of setting the filter order.
[0011] In a possible implementation manner, based on the first passband cut-off frequency and the first transition band width input by the user, setting the first filter order of the first filtering module includes: determining the first stopband cut-off frequency based on the first passband cut-off frequency and the first transition band width input by the user; setting the first filter order of the first filtering module based on the first passband cut-off frequency, the first stopband cut-off frequency, the ripple parameter, and the sampling rate.
[0012] It can be seen that the present application can determine the first stopband cut-off frequency of the first filtering module, and set the first filter order of the first filtering module based on the first passband cut-off frequency, the first stopband cut-off frequency, the ripple parameter, and the sampling rate, and improve the efficiency of setting the filter order.
[0013] In a possible implementation manner, based on the first passband cut-off frequency and the first transition band width input by the user, determining the first stopband cut-off frequency includes: in response to the first filtering module being a high-pass filter, determining the first stopband cut-off frequency based on the difference between the first passband cut-off frequency and the first transition band width input by the user; or, in response to the first filtering module being a low-pass filter, determining the first stopband cut-off frequency based on the sum of the first passband cut-off frequency and the first transition band width input by the user.
[0014] It can be seen that the present application can obtain the stopband cut-off frequency of a high-pass filter or a low-pass filter.
[0015] In a possible implementation, the first filtering module includes a plurality of first filtering units, and the plurality of first filtering units are all second-order filtering units; setting the first filter order of the first filtering module based on the first filter order and the ripple parameter includes: determining at least one set of zeros and poles based on the first filter order and the ripple parameter; the number of sets of at least one set of zeros and poles is determined based on the first filter order; setting the first filter order of the first filtering module based on at least one set of zeros and poles; wherein, the first filter coefficients include at least one set of second filter coefficients; one set of second filter coefficients is the digital filter coefficients corresponding to one set of zeros and poles, and one set of second filter coefficients is used to set the filter coefficients of one first filtering unit.
[0016] It can be seen that the present application can determine at least one set of zeros and poles corresponding to the minimum filter order, and set the filter coefficients of the first filtering module based on at least one set of zeros and poles, improving the accuracy of setting the filter coefficients of the first filtering module, and further improving the accuracy of parameter equalizer adjustment.
[0017] In a possible implementation, the parameter equalizer further includes a second filtering module, and the second filtering module includes a plurality of second filtering units, and the plurality of second filtering units are all second-order filtering units; the method further includes: determining at least one third filtering unit from the plurality of second filtering units based on the filtering configuration information input by the user; setting the filter type and filtering parameters of at least one third filtering unit based on the filtering configuration information; setting the filter coefficients of each third filtering unit based on the filter type and filtering parameters of each third filtering unit in at least one third filtering unit; filtering the second audio signal using at least one third filtering unit to obtain a third audio signal.
[0018] It can be seen that the present application can set the filter type and corresponding parameters of each filtering unit in some or all of the filtering units in the second filtering module based on the filtering configuration information input by the user, and set the filter coefficients of each filtering unit, further improving the accuracy and flexibility of parameter equalizer adjustment.
[0019] In a possible implementation, setting the filter coefficients of each third filtering unit based on the filter type and filtering parameters of each third filtering unit in at least one third filtering unit includes: determining the transfer function corresponding to each third filtering unit based on the filter type of each third filtering unit in at least one third filtering unit; setting the filter coefficients of each third filtering unit based on the filtering parameters of each third filtering unit and the corresponding transfer function.
[0020] In a second aspect, the present application provides an adjustment device for a parameter equalizer, and the parameter equalizer includes a first filtering module; the device includes:
[0021] The first setting unit is configured to set the first filter order of the first filtering module based on the first passband cut-off frequency and the first transition band width input by the user; the first filter order is the minimum filter order that satisfies the first passband cut-off frequency and the first transition band width;
[0022] The second setting unit is configured to set the first filter coefficient of the first filtering module based on the first filter order and the ripple parameter;
[0023] The filtering unit is configured to perform low-pass or high-pass filtering on the first audio signal to be processed using the first filtering module to obtain a second audio signal.
[0024] In a third aspect, the present application provides an electronic device, which includes a processor, a memory, and a computer program or instruction stored on the memory. The processor executes the computer program or instruction to implement the steps of the method in the first aspect or any one of its possible implementation manners described above.
[0025] In a fourth aspect, the present application provides a chip, which includes a processor, and the processor is configured to execute program instructions to perform the steps of the method in the first aspect or any one of its possible implementation manners described above.
[0026] In a fifth aspect, the present application provides a chip module, which includes a communication module, a power module, a storage module, and a chip. Among them: the power module is configured to provide electrical energy for the chip module; the storage module is configured to store data and instructions; the communication module is configured to perform internal communication of the chip module or to communicate with external devices; the chip is configured to perform the steps of the method in the first aspect or any one of its possible implementation manners described above.
[0027] In a sixth aspect, the present application provides a computer-readable storage medium, in which a computer program or instruction is stored, and when the computer program or instruction is executed, the steps of the method in the first aspect or any one of its possible implementation manners described above are implemented. Description of the Drawings
[0028] Figure 1 is a schematic structural diagram of a parameter equalizer involved in an embodiment of the present application;
[0029] Figure 2 is a schematic structural diagram of a filtering module provided by an embodiment of the present application;
[0030] Figure 3 is a schematic flowchart of a first method for adjusting a parameter equalizer provided by an embodiment of the present application;
[0031] Figure 4Schematic flow chart of the second parameter equalizer adjustment method provided by the embodiments of the present application;
[0032] Figure 5 Schematic structural diagram of a parameter equalizer adjustment device provided by the embodiments of the present application. Detailed implementation manners
[0033] The following will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without making creative efforts belong to the scope of protection of the present invention.
[0034] In the present application, terms such as "first" and "second" are used to distinguish identical or similar items with basically the same functions and effects. Those skilled in the art can understand that the terms "first" and "second" do not limit the quantity and execution order, and the terms "first" and "second" do not necessarily mean different. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B may represent: A exists alone, A and B exist simultaneously, and B exists alone. The character " / " generally represents an "or" relationship between the associated objects before and after.
[0035] It should be understood that in the present application, "at least one" means one or more; "a plurality" means two or more. In addition, the term "including" and any deformation thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or server including a series of steps or units does not necessarily limit to those clearly listed steps or units, but may include other steps or units not clearly listed or inherent to these processes, methods, products, or devices.
[0036] First, some terms in the present application are explained to facilitate understanding by those skilled in the art.
[0037] 1) Low-pass filter and high-pass filter
[0038] A high-pass filter is a circuit that allows signal components higher than the passband cut-off frequency to pass through while attenuating signal components lower than the passband cut-off frequency.
[0039] A low-pass filter is a circuit that allows signal components lower than the passband cut-off frequency to pass through while attenuating signal components higher than the passband cut-off frequency.
[0040] 2) Passband, stopband, and transition band
[0041] The passband refers to the frequency range that allows signals to pass through. The filter has a relatively small attenuation within the passband, usually less than 3 dB. That is to say, the audio signals within the passband can pass through the filter with relatively high fidelity.
[0042] The stopband refers to the frequency range where signals are significantly attenuated. The attenuation of the filter within the stopband is usually greater than 30 dB. That is to say, the audio signals within the stopband will be effectively suppressed and will not pass through the filter.
[0043] The transition band refers to the transitional region between the passband and the stopband, where the attenuation of the audio signal gradually increases or decreases. That is to say, within the transition band, the response of the filter gradually changes from the passband to the stopband, or from the stopband to the passband.
[0044] 3) Passband cut-off frequency, stopband cut-off frequency, and transition band width
[0045] The passband cut-off frequency, also known as the passband edge frequency, is the highest frequency at which the filter can pass the signal with basically no attenuation (the highest frequency is for low-pass filters, and for high-pass filters, it is the lowest frequency). More precisely, it is usually defined as the frequency at which the filter gain drops to a specified reference value (e.g., -3 dB, also known as the half-power point).
[0046] The stopband cut-off frequency, also known as the stopband edge frequency, is the highest frequency at which the filter can effectively suppress the signal (the highest frequency is for low-pass filters, and for high-pass filters, it is the lowest frequency). Similar to the passband cut-off frequency, it is also usually defined as the frequency at which the filter gain drops to a specified reference value (e.g., -40 dB or greater). This reference value is usually lower than that of the passband cut-off frequency because a higher attenuation is required in the stopband.
[0047] The transition band width is the frequency width between the passband cut-off frequency and the stopband cut-off frequency. For a high-pass filter, the passband cut-off frequency is greater than the stopband cut-off frequency, and the transition band width is equal to the difference between the passband cut-off frequency and the stopband cut-off frequency. For a low-pass filter, the stopband cut-off frequency is greater than the passband cut-off frequency, and the transition band width is equal to the difference between the stopband cut-off frequency and the passband cut-off frequency.
[0048] 4) Filter order
[0049] The filter order, also simply referred to as the order, is the number of poles in the filter transfer function. The poles are key points in the filter frequency response characteristics and determine the frequency selectivity and filtering effect of the filter. Specifically, the higher the filter order, the steeper the filter frequency response curve will become, and the narrower the transition band will be, which is beneficial for achieving better selectivity within a limited frequency range. However, as the order increases, the design difficulty and complexity of the filter also increase.
[0050] When transmitting and playing sound, defects in speakers and sound fields often occur. Speaker defects are primarily due to insufficient performance and functionality, resulting in poor sound quality and clarity. The sound field refers to the spatial environment in which sound propagates. Sound field defects, such as the concentration of sound waves in certain areas, can cause the sound to be overly strong in those areas and weak in others, leading to uneven sound distribution. Clearly, defects in speakers and sound fields lead to poor sound transmission quality, which in turn results in a poor listening experience for users.
[0051] An equalizer is a device that adjusts the signal amplitude at different frequencies to compensate for speaker and sound field defects, thereby improving audio quality and reducing noise. Parametric equalizers can adjust frequency bands, amplitude adjustments, and bandwidth.
[0052] Therefore, in the existing technology, parametric equalizers are often used to adjust audio signals. However, although existing parametric equalizers can adjust the frequency, amplitude, and bandwidth of the frequency band, their order is fixed. Because the requirements for the filter transition band in different scenarios may vary greatly, simply setting the filter to a fixed order to meet different requirements can easily waste computing resources when the scenario does not require a high transition band. This makes it difficult to meet user needs in different scenarios, and further leads to the lack of flexibility and precision in the adjustment of the parametric equalizer.
[0053] In view of this, an embodiment of the present application provides a method for adjusting a parametric equalizer and a related device, which can effectively improve the accuracy and flexibility of the parametric equalizer adjustment. The method for adjusting a parametric equalizer can be applied to a parametric equalizer, which can be an audio device, or any audio processing device in an audio device, or an audio processing device set independently of the audio device. When the parametric equalizer is an audio processing device set independently of the audio device, the parametric equalizer can be connected to the audio device, and the audio signal processed by the parametric equalizer can be transmitted to the audio device and played through the audio device.
[0054] The structure of the parametric equalizer applicable to the embodiments of the present application is introduced below.
[0055] Figure 1 is a structural diagram of a parametric equalizer applicable to an embodiment of the present application, such as Figure 1 As shown, the parametric equalizer may include a first filtering module, a second filtering module, and a third filtering module. The first filtering module is used to perform high-pass or low-pass filtering on the input signal and transmit the signal output by the first filtering module to the second filtering module. The second filtering module can perform supplementary filtering on the received signal and transmit the signal output by the second filtering module to the third filtering module. The third filtering module is used to increase or suppress the overall signal amplitude based on the filter adjustment.
[0056] Among them, the first filtering module can adjust the transition band width and can meet different cut-off frequency and transition band width requirements by adjusting the filter order of the first filtering module. The second filtering module can flexibly adjust the frequency response curve by first selecting preset filters with different functions, such as peak, high shelf, low shelf, Butterworth high-pass, Butterworth low-pass, and notch filters, and then adjusting the filter parameters.
[0057] Optionally, the parametric equalizer can include some of the first filtering module, the second filtering module, and the third filtering module. For example, the parametric equalizer can only include the first filtering module, the parametric equalizer can only include the second filtering module, the parametric equalizer can only include the first filtering module and the second filtering module, the parametric equalizer can only include the first filtering module and the third filtering module, and so on.
[0058] Next, the structure of the filtering module applicable to the embodiments of the present application will be introduced.
[0059] In the embodiments of the present application, multiple filtering units can be provided in the filtering module, and the multiple filtering units are all second-order digital filters. Among them, the second-order digital filter can be, but is not limited to, a second-order Infinite Impulse Response (IIR) digital filter. The second-order digital filter can adopt a direct form II transposed filter structure. The transfer function of a single second-order IIR digital filter can be:
[0060]
[0061] Among them, a0, a1, a2, b0, and b1 are coefficients. It should be noted that a single second-order IIR filter can be configured as a first-order filter.
[0062] In the embodiments of the present application, the multiple filtering units included in the filtering module are in series. The multiple filtering units in series means that multiple independent filtering units are connected in a certain order, so that the signal can obtain the filtering effects of each filtering unit in turn when passing through these filtering units.
[0063] In the structure where the multiple filtering units are in series, the order of the filtering module can be considered as the result of the accumulation of the orders of the multiple filtering units in series.
[0064] To implement a structure with multiple filter units in series, the filter module may further include: a first switch module, a second switch module, and multiple third switch modules. Among them, one third switch module may be located between two adjacent filter units. The first switch module can be understood as the switch module at the input end of the filter module. The first switch module may be respectively connected to the first filter unit among the multiple filter units and the first third switch module among the multiple third switch modules. The second switch module can be understood as the switch module at the output end of the filter module. The second switch module may be respectively connected to the last filter unit among the multiple filter units and the last third switch module among the multiple third switch modules.
[0065] For example, taking the filter module including k (k is a positive integer) filter units as an example, as Figure 2 shown, Figure 2 is a schematic structural diagram of a filter module provided by an embodiment of the present application. Among them, the first switch module 201 may be responsible for receiving the input signal of the filter unit, such as receiving the first voice signal to be processed. The first switch module 201 may transmit the received input signal to the filter unit 1 or the third switch module 202. Which one of the filter unit 1 and the third switch module 202 the first switch module 201 transmits the received input signal to is achieved by controlling the connection state of the first switch module 201. The connection state of the first switch module 201 can be determined by the connection requirements of the filter unit. If it is necessary to access the filter unit 1, then control the input end of the first switch module 201 that receives the input signal to be connected to the output end connected to the filter unit 1, and then the first switch module 201 transmits the received input signal to the filter unit 1; if it is not necessary to access the filter unit 1, then control the input end of the first switch module 201 that receives the input signal to be connected to the output end connected to the third switch module 202, and then the first switch module 201 transmits the received input signal to the third switch module 202. Similarly, the third switch module 202 may transmit the received input signal to the filter unit 2 or the third switch module 203. The third switch module 204 may transmit the received input signal to the filter unit k or the second switch module 205. The second switch module 205 may receive the output signal of the filter unit k or the output signal of the third switch module 204, and use the received signal as the output signal of the filter unit. In this way, the filter module can achieve multi-stage processing of the input signal through the combination of multiple switch modules and filter units, and the number of connected filter units can be controlled by the connection state of the switch module. The order of the filter module is the sum of the orders of the accessed filter units.
[0066] For example, if the filtering module includes 5 filtering units and 3 filtering units need to be connected, the connection state of the switching module can be used to control the connection of 3 filtering units. At this time, the order of the filtering module is the sum of the orders of the 3 connected filtering units.
[0067] The following introduces the adjustment method of the parameter equalizer provided by the embodiments of the present application.
[0068] Please refer to Figure 3 , Figure 3 which is a schematic flowchart of the first adjustment method of the parameter equalizer provided by the embodiments of the present application. The adjustment method of the parameter equalizer can be applied to but not limited to the parameter equalizer shown in Figure 1 . This method can be executed by the parameter equalizer, or by the first filtering module in the parameter equalizer, or by the processor in the parameter equalizer, or by a chip or chip system with processor functions in the parameter equalizer. The parameter equalizer includes a first filtering module, and the structure of the first filtering module is the filtering module structure shown in Figure 2 . As shown in Figure 3 , the adjustment method of the parameter equalizer may include but is not limited to the following steps S301 - S304:
[0069] S301, obtain the first passband cut-off frequency and the first transition band width input by the user.
[0070] Among them, the first passband cut-off frequency refers to the passband cut-off frequency of the first filtering module, and the first transition band width refers to the transition band width of the first filtering module. The user can set the first passband cut-off frequency and the first transition band width according to the filtering requirements.
[0071] The parameter equalizer can obtain the first passband cut-off frequency and the first transition band width through but not limited to the following two methods.
[0072] The first method is direct acquisition, that is, the first passband cut-off frequency and the first transition band width are collected by the parameter equalizer. The parameter equalizer side can display a first interface through a display screen. The first interface may include a first prompt message, a first input box, a second prompt message, and a second input box. The first prompt message can be used to indicate entering the passband cut-off frequency of the first filtering module in the first input box, and the first input box is used to obtain the passband cut-off frequency of the first filtering module. That is to say, the user can enter the first passband cut-off frequency in the first input box. The second prompt message can be used to indicate entering the transition band width of the first filtering module in the second input box, and the first input box is used to obtain the transition band width of the first filtering module. That is to say, the user can enter the first transition band width in the second input box. There is no specific limitation on the way for the user to enter the first passband cut-off frequency and the first transition band width. For example, the user can enter by text input, or the user can enter by voice input.
[0073] The second method is indirect acquisition. The parameter equalizer can be connected to an electronic device. After the electronic device collects the first passband cut-off frequency and the first transition band width, it sends the collected first passband cut-off frequency and the first transition band width to the parameter equalizer. Correspondingly, the parameter equalizer receives the first passband cut-off frequency and the first transition band width collected by the electronic device. The electronic device can be, for example, a mobile phone, a computer, an operating console, etc. In this application, the methods for the electronic device and the parameter equalizer to collect the first passband cut-off frequency and the first transition band width are the same. Please refer to the foregoing related descriptions and will not be elaborated here.
[0074] S302. Based on the first passband cut-off frequency and the first transition band width, set the first filter order of the first filtering module.
[0075] Among them, the first filter order is the minimum filter order that satisfies the first passband cut-off frequency and the first transition band width.
[0076] The first filtering module can be configured as a high-pass filter or a low-pass filter.
[0077] Optionally, which one of the high-pass filter and the low-pass filter the first filtering module is can be set at the factory. That is to say, the factory setting of the first filtering module can be a high-pass filter or a low-pass filter.
[0078] Optionally, which one of the high-pass filter and the low-pass filter the first filtering module is can also be determined based on the first type of parameter input by the user. The first type of parameter is also the type parameter of the first filtering module. In this case, the foregoing first interface may further include a third prompt message and a third input box. The third prompt message can be used to indicate inputting the type parameter of the first filtering module in the third input box. The third input box is used to obtain the type parameter of the first filtering module. The user can input the first type of parameter in the third input box. The first type of parameter can be the type code, type identifier, etc. of the first filtering module. For example, the type codes of the first filtering module include H1 and H2, where H1 indicates a high-pass filter and H2 indicates a low-pass filter. Then, when the user inputs H1 through the third input box, it means configuring the first filtering module as a high-pass filter. Similarly, when the user inputs H2 through the third input box, it means configuring the first filtering module as a low-pass filter. Optionally, after obtaining the first passband cut-off frequency and the first transition band width, the first stopband cut-off frequency can be determined based on the first passband cut-off frequency and the first transition band width. The first stopband cut-off frequency is also the stopband cut-off frequency of the first filtering module.
[0079] Optionally, in response to the first filtering module being a high-pass filter, the first stopband cut-off frequency can be determined based on the difference between the first passband cut-off frequency and the first transition band width. For example, if the first filtering module is a high-pass filter, the first passband cut-off frequency is 300 Hz, and the first transition band width is 100 Hz, then the first stopband cut-off frequency is the difference obtained by subtracting 100 Hz from 300 Hz, that is, the first stopband cut-off frequency is 200 Hz.
[0080] Optionally, in response to the first filtering module being a low-pass filter, the first stopband cut-off frequency can be determined based on the sum of the first passband cut-off frequency input by the user and the first transition band width. For example, if the first filtering module is a low-pass filter, the first passband cut-off frequency is 17 kHz, and the first transition band width is 2 kHz, then the first stopband cut-off frequency is the sum value obtained by adding 2 kHz to 17 kHz, that is, the first stopband cut-off frequency is 19 kHz.
[0081] Optionally, in the case where the sampling rate, passband ripple, and stopband attenuation are set to non-fixed values, the sampling rate, passband ripple, and stopband attenuation can be obtained. At this time, the sampling rate, passband ripple, and stopband attenuation can be pre-stored in the parametric equalizer or input by the user. After determining the first stopband cut-off frequency, the first filter order can be determined by the first passband cut-off frequency, the first stopband cut-off frequency, the ripple parameter, and the sampling rate.
[0082] Among them, the ripple parameters may include passband ripple (Ap) and stopband attenuation (As). Passband ripple refers to the difference between the maximum amplitude and the minimum amplitude within the passband in the frequency response of the filter, which can be expressed in decibels (dB) and is used to reflect the variation of the signal amplitude within the passband. Stopband attenuation, also known as the stopband rejection ratio, refers to the attenuation of the signal power outside the passband relative to the signal power within the passband in an electronic filter, usually expressed in decibels (dB). In this application, the passband ripple A p and the stopband attenuation A s can be set to fixed values. For example, A p can be set to 0.1 dB and A s can be set to 40 dB. The passband ripple A p and the stopband attenuation A s can also be set to non-fixed values. The sampling rate refers to the sampling frequency of the input audio signal. In this application, the sampling rate can be set to a fixed value for the parametric equalizer to act on a specific usage location. Of course, the sampling rate can also be set to a non-fixed value. In actual applications, the user can set the sampling rate based on the usage location of the parametric equalizer.
[0083] The first filter is a low-pass filter. The method for determining the order of the first filter may include but is not limited to the following steps A1, A2, A5; the first filter is a high-pass filter. The method for determining the order of the first filter may include but is not limited to the following steps A3, A4, A5.
[0084] A1. Perform frequency pre-distortion processing on the first passband cut-off frequency based on the sampling rate to obtain the first frequency. The first frequency can be expressed by the following formula (1):
[0085]
[0086] where ω p is the first frequency, f p is the first passband cut-off frequency, and F s is the sampling rate. Based on formula (1), the non-linear distortion of the first passband cut-off frequency in the design of the low-pass filter module can be compensated.
[0087] A2. Perform frequency pre-distortion processing on the first stopband cut-off frequency based on the sampling rate to obtain the second frequency. The second frequency can be expressed by the following formula (2):
[0088]
[0089] where ω s is the second frequency, f s is the first stopband cut-off frequency, and F sis the sampling rate. Based on formula (2), the non - linear distortion of the first stop - band cut - off frequency in the low - pass filter module design can be compensated.
[0090] This application does not specifically limit the execution order of steps A1 and A2. For example, step A1 can be executed first, step A2 can be executed first, or steps A1 and A2 can be executed simultaneously.
[0091] A3. Perform frequency pre - distortion processing on the first pass - band cut - off frequency based on the sampling rate to obtain a first frequency. The first frequency can be expressed by the following formula (3):
[0092]
[0093] where ω p is the first frequency, f p is the first pass - band cut - off frequency, and F s is the sampling rate. Based on formula (3), the non - linear distortion of the first pass - band cut - off frequency in the high - pass filter module design can be compensated.
[0094] A4. Perform frequency pre - distortion processing on the first stop - band cut - off frequency based on the sampling rate to obtain a second frequency. The second frequency can be expressed by the following formula (4):
[0095]
[0096] where ω s is the second frequency, f s is the first stop - band cut - off frequency, and F s is the sampling rate. Based on formula (4), the non - linear distortion of the first stop - band cut - off frequency in the high - pass filter module design can be compensated.
[0097] This application does not specifically limit the execution order of steps A3 and A4. For example, step A3 can be executed first, step A4 can be executed first, or steps A3 and A4 can be executed simultaneously.
[0098] A5. Set the first filter order of the first filter module based on the pass - band ripple, stop - band attenuation, the first frequency ω p and the second frequency ω s .
[0099] The first filter module can be, but is not limited to, an elliptic filter. When the first filter module is an elliptic filter, the first filter order is the smallest positive integer that satisfies the following conditions and can be even or odd. Specifically, the first filter order can be expressed by the following formula (5):
[0100]
[0101] Wherein, K = F(k), K1 = F(k1), N is the order of the first filter, F(x) is the first kind of complete elliptic integral, and F(x) can be expressed by the following formula (6):
[0102]
[0103] Wherein, N is the order of the first filter, A p is the passband ripple in dB, z s is the stopband attenuation in dB, represents rounding up x.
[0104] Optionally, when the sampling rate, passband ripple, and stopband attenuation are all set to fixed values, the mapping relationship can be determined based on the process of determining the order of the first filter according to the foregoing sampling rate, passband ripple, stopband attenuation, and first stopband cut-off frequency, and the mapping relationship can be set in advance in the parameter equalizer. This mapping relationship is the corresponding relationship among the first passband cut-off frequency, the first transition bandwidth, and the order of the first filter. Further, after obtaining the first passband cut-off frequency and the first transition bandwidth input by the user, the order of the first filter of the first filtering module can be set based on this mapping relationship.
[0105] It can be seen that in this application, by inputting the first passband cut-off frequency and the first transition band width, the order of the first filter of the first filtering module can be set, improving the convenience and accuracy of setting the order of the first filter.
[0106] Furthermore, the number M of the first filtering units to be connected in the first filter can be determined based on the order of the first filter, and the connection of the M first filtering units in the first filter can be controlled by the connection state of the switch module. The number of the first filtering units to be connected can be expressed by the following formula (7):
[0107]
[0108] In formula (7), M is the number of the first filtering units to be connected, N is the order of the first filter. When the order of the first filter is even, half of the order N of the first filter is an integer, and the number M of the first filtering units is N / 2; when the order of the first filter is odd, half of the order N of the first filter is not an integer, and the number M of the first filtering units is the integer part of N / 2 plus 1.
[0109] S303. Set the first filter coefficient of the first filtering module based on the order of the first filter and the ripple parameter.
[0110] The filtering units in the first filtering module are called first filtering units. Since the first filtering module includes multiple first filtering units, and the multiple first filtering units are all second-order filtering units. If z p and z s are fixed values, the zeros and poles of the first filtering module are only related to the order N.
[0111] After determining the order of the first filter, at least one set of zeros and poles can be determined based on the order of the first filter and the ripple parameter; the number of sets of at least one set of zeros and poles is numerically the same as the number of first filtering units connected.
[0112] When the order of the first filter is even, the number of sets of at least one set of zeros and poles is half of the order of the first filter, and each set of zeros and poles includes two zeros and two poles. For example, when the order of the first filter is 10, the number of sets of at least one set of zeros and poles is 5, and each set of zeros and poles in these 5 sets includes two zeros and two poles.
[0113] When the order of the first filter is odd, the number of sets of at least one set of zeros and poles is the integer part of half of the order of the first filter plus 1. If the order of the first filter is 1, the number of sets of at least one set of zeros and poles is 1, and this set of zeros and poles includes one zero and one pole. If the order of the first filter is an odd number greater than 1, the number of sets of at least one set of zeros and poles is at least two sets of zeros and poles, and the at least two sets of zeros and poles include a first set of zeros and poles and at least one second set of zeros and poles, and the number of sets of at least two sets of zeros and poles is the sum of the number of sets of the first set of zeros and poles and the number of sets of the second set of zeros and poles. In this application, the first set of zeros and poles includes one zero and one pole, and the second set of zeros and poles includes two zeros and two poles.
[0114] For example, if the order of the first filter is 13, the corresponding number of sets of at least one set of zeros and poles is 7, and these 7 sets of zeros and poles include zero-pole group 1 (the first set of zeros and poles) and 6 zero-pole groups 2 (the second set of zeros and poles).
[0115] In the case where the ripple parameter is not a fixed value, existing zero-pole calculation tools can be used. The order of the first filter and the ripple parameter are input into the calculation tool to directly obtain the corresponding zeros and poles. For example, in practical applications in Matlab, the function ellipap is directly used to design an elliptical analog low-pass filter, and its call format is: [z,p,k]=ellipap(n,Ap,As), which returns at least one set of zeros and poles and the gain k of the elliptical analog low-pass filter.
[0116] When the ripple parameter is a fixed value, the corresponding relationship between different orders and zeros and poles can be pre-stored, and in subsequent calculations, the corresponding zeros and poles can be directly read according to the first filter order and the corresponding relationship, so as to avoid using complex zero-pole calculation functions in the generation of the first filter coefficients, save computing resources, reduce the calculation error rate, and improve the efficiency of determining the first filter coefficients.
[0117] After determining at least one set of zeros and poles, the first filter order of the first filtering module can be set based on the at least one set of zeros and poles. Among them, the first filter coefficients include at least one set of second filter coefficients. A set of second filter coefficients is the digital filter coefficients corresponding to a set of zeros and poles, and a set of second filter coefficients is used to set the filter coefficients of a first filtering unit. That is, based on each set of zeros and poles in the at least one set of zeros and poles, a set of second filter coefficients corresponding to each set of zeros and poles can be determined.
[0118] In this application, when a set of zeros and poles includes two zeros and two poles, the following operations can be performed on this set of zeros and poles to obtain the digital filter coefficients corresponding to this set of zeros and poles:
[0119] B1, determine the first product between the two zeros in the target zero-pole group being processed currently, and determine the second product between the two poles in the target zero-pole group, and determine the first sum value between the two zeros in the target zero-pole group, and determine the second sum value between the two poles in the target zero-pole group.
[0120] B2, determine the first gain based on the first ratio between the first product and the second product. The first gain can be expressed by the following formula (8):
[0121]
[0122] Among them, z1 and z2 are zeros, the first product is z1z2, p1 and p2 are poles, the second product is p1p2, and k is the first gain.
[0123] B3, determine the target analog filter coefficients corresponding to the target zero-pole group based on the first filtering type, the first gain, the first product, the second product, the first sum value, and the second sum value.
[0124] Among them, the first filtering type refers to the filter type of the first filtering module.
[0125] When the first filtering module is a low-pass filter, the analog filter transfer function corresponding to a set of its zeros and poles can be expressed by the following formula (9):
[0126]
[0127] (9) After polynomial expansion, it gets (10):
[0128]
[0129] When the first filtering module is a high-pass filter, replacing s in (9) with After that, after the polynomial expansion of the analog filter transfer function corresponding to a set of zeros and poles, it can be expressed by the following formula (11):
[0130]
[0131] The above transfer function is in a normalized form, that is, let where F s is the sampling rate, and F p is the passband cut-off frequency.
[0132] After obtaining the target analog filter coefficients, step B4 can be executed. Step B4 is to perform a bilinear transformation on the target analog filter coefficients to obtain the target digital filter coefficients corresponding to the target analog filter coefficients.
[0133] In this application, when a set of zeros and poles includes one zero and one pole, the digital filter coefficients corresponding to this set of zeros and poles can also be determined for this set of zeros and poles, and the determination method is not specifically limited.
[0134] S304. Use the first filtering module to perform low-pass or high-pass filtering on the first audio signal to be processed to obtain a second audio signal.
[0135] Specifically, when the first filtering module is a high-pass filter, perform high-pass filtering on the first audio signal to be processed to obtain a second audio signal; when the first filtering module is a low-pass filter, perform low-pass filtering on the first audio signal to be processed to obtain a second audio signal.
[0136] In this embodiment, the filter with an adjustable transition bandwidth can set the minimum order that meets the conditions according to the user's requirements for the transition band width. This design has the amplitude-frequency response of a high-order filter, is closer to an ideal filter, can accurately filter out unnecessary frequency components, and has the advantage of less attenuation of signals in adjacent frequencies. At the same time, since the minimum order that meets the requirements can be conveniently selected, the over-design problem of a high-order filter with a fixed order is effectively avoided.
[0137] In a possible implementation manner, the parametric equalizer may further include a second filtering module. The second filtering module may be an independent filter or may be set in the same filter as the first filtering module, and the structure of the second filtering module is also as Figure 2 shown in the filtering module structure. The units in the second filtering module are called second filtering units. The method may further include the following steps C1-C4:
[0138] C1. Obtain the filtering configuration information input by the user.
[0139] Optionally, the filtering type of each second filtering unit in the second filtering module can be configured by the user, and the user can directly configure the filtering type and filtering parameters of each third filtering unit in at least one of the multiple second filtering units. In this case, the filtering configuration information may include the filter type and filtering parameters. For example, when there are 8 second filtering units, the user can only configure the filter type and corresponding filtering parameters for 4 of them. It can be seen that in this example, through the flexible switching design of the filter type, while ensuring full-band coverage, the adjustment range of the parameter equalizer with a fixed filter type in the prior art is wider and more flexible, and can match more amplitude-frequency response curve requirements.
[0140] Among them, the filter type includes at least one of a peak filter, a high shelf filter, a low shelf filter, a Butterworth high-pass filter, a Butterworth low-pass filter, and a notch filter.
[0141] When the filter type is a peak filter, the filtering parameters include bandwidth control quality factor, gain, and center frequency. When the filter type is a high shelf filter or a low shelf filter, the filtering parameters include bandwidth control quality factor, gain, and cut-off frequency. When the filter type is a Butterworth high-pass filter or a Butterworth low-pass filter, the filtering parameters include cut-off frequency. When the filter type is a notch filter, the filtering parameters include bandwidth control quality factor and center frequency. Among them, the gain adjustment range of each filter is from -72 dB to 18 dB, the center frequency adjustment range is from 20 Hz to 20 kHz, and the adjustment range of the quality factor Q is from 0.1 to 20.
[0142] Similarly, the filtering configuration information can be collected by the parameter equalizer. The filtering configuration information can also be collected by other electronic devices. The parameter equalizer can be connected to the electronic device. When the electronic device collects the filtering configuration information, it sends the collected filtering configuration information to the parameter equalizer. Correspondingly, the parameter equalizer receives the filtering configuration information collected by the electronic device.
[0143] C2. Based on the filtering configuration information, determine at least one third filtering unit from the multiple second filtering units.
[0144] The filter type of each second filtering unit is configured by the user. Assuming that the filtering configuration information includes the filter type and configuration parameters of 5 filtering units, 5 corresponding third filtering units are determined from the multiple second filtering units.
[0145] In this application, the selections of each third filtering unit are independent of each other, and the selection order does not affect the filtering effect.
[0146] C3. Based on the filtering configuration information, set the filter type and filtering parameters of at least one third filtering unit.
[0147] C4. Based on the filter type and filtering parameters of each third filtering unit in at least one third filtering unit, set the filter coefficients of each third filtering unit.
[0148] Among them, the filter type and filtering parameters of one third filtering unit are used to set the filter coefficients of this third filtering unit, and the filter type and filtering parameters of different third filtering units are used to set the filter coefficients of different third filtering units.
[0149] After determining the filter type and filter coefficients of each third filtering unit, step C5 is executed. Step C5 is to use at least one third filtering unit to filter the second audio signal to obtain a third audio unit.
[0150] The implementation method of setting the filter coefficients of each third filtering unit based on the filter type and filtering parameters of each third filtering unit in at least one third filtering unit may include the following steps: based on the filter type of each third filtering unit, determine the transfer function corresponding to each third filtering unit; based on the filtering parameters of each third filtering unit and the corresponding transfer function, set the filter coefficients of each third filtering unit. The corresponding relationship between the filter type and the transfer function can be stored in the database of the parameter equalizer in advance. When it is necessary to determine the transfer function, the corresponding transfer function can be queried from the database based on the filter type.
[0151] Let where F s is the sampling rate, and F p is the cut-off frequency. Then the expressions of different types of transfer functions can be as follows.
[0152] The transfer function of the Butterworth high-pass filter is:
[0153]
[0154] The transfer function of the Butterworth low-pass filter is:
[0155]
[0156] When the filter type is a Butterworth high-pass filter or a Butterworth low-pass filter, the filtering parameters include the cut-off frequency F p .
[0157] The transfer function of the peak filter is:
[0158]
[0159] where K = 10 gain / 20 The filtering parameters include gain, bandwidth control quality factor Q, and center frequency F p .
[0160] The transfer function of the high-shelf filter is:
[0161]
[0162] The transfer function of the low-shelf filter:
[0163]
[0164] where The filtering parameters of the high-shelf filter and the low-shelf filter include gain, bandwidth control quality factor Q, and cut-off frequency F p .
[0165] The transfer function of the notch filter is:
[0166]
[0167] where the filtering parameters of the notch filter include bandwidth control quality factor Q and center frequency F p .
[0168] Please refer to Figure 4 , Figure 4 which is a schematic flowchart of the adjustment method of the second parameter equalizer provided by an embodiment of this application. The adjustment method of the parameter equalizer can be applied to the parameter equalizer shown in Figure 1 . This method can be executed by the parameter equalizer, or by the second filtering module in the parameter equalizer, or by the processor in the parameter equalizer, or by a chip or chip system with processor functions in the parameter equalizer, etc. The parameter equalizer includes a second filtering module, and the structure of the second filtering module is the filtering module structure shown in Figure 2 . As shown in Figure 4 , the adjustment method of the parameter equalizer may include but is not limited to the following steps:
[0169] S401. Obtain the filtering configuration information input by the user.
[0170] S402. Based on the filtering configuration information, determine at least one third filtering unit from multiple second filtering units.
[0171] S403. Based on the filtering configuration information, set the filter type and filtering parameters of at least one third filtering unit.
[0172] S404. Set the filter coefficients of each third filtering unit based on the filter type and filtering parameters of each third filtering unit in at least one third filtering unit.
[0173] S405. Use at least one third filtering unit to perform filtering processing on the second audio signal to obtain a third audio signal.
[0174] After determining the filter type and filter coefficients of each third filtering unit, step S405 is executed. S405 is to use at least one third filtering unit to perform filtering processing on the second audio signal.
[0175] Specifically, the specific implementation manners of steps S401 - S405 are the same as those of steps C1 - C5, and reference can be made to the descriptions in the foregoing steps C1 - C5, which will not be elaborated here.
[0176] It can be seen that the embodiment of the present application can set the filter type and corresponding parameters of each filtering unit in some or all of the filtering units in the second filtering module based on the filtering configuration information input by the user, and calculate the filter coefficients of each filtering unit, improving the accuracy and flexibility of parameter equalizer adjustment.
[0177] Please refer to Figure 5 , Figure 5 which is a schematic structural diagram of an adjustment device for a parameter equalizer provided by an embodiment of the present invention. The parameter equalizer includes a first filtering module; the adjustment device 500 of the parameter equalizer includes units for executing the above method embodiments. The device includes:
[0178] A first setting unit 501, configured to set the first filter order of the first filtering module based on the first passband cut-off frequency and the first transition band width input by the user; the first filter order is the minimum filter order that satisfies the first passband cut-off frequency and the first transition band width;
[0179] A second setting unit 502, configured to set the first filter coefficients of the first filtering module based on the first filter order and the ripple parameter;
[0180] A filtering unit 503, configured to use the first filtering module to perform low-pass or high-pass filtering processing on the first audio signal to be processed to obtain a second audio signal.
[0181] In a possible implementation manner, in terms of setting the first filter order of the first filtering module based on the first passband cut-off frequency and the first transition band width input by the user, the first setting unit 501 is specifically configured to: determine the first stopband cut-off frequency based on the first passband cut-off frequency and the first transition band width input by the user; set the first filter order of the first filtering module based on the first passband cut-off frequency, the first stopband cut-off frequency, the ripple parameter, and the sampling rate.
[0182] In a possible implementation manner, in terms of determining the first stopband cut-off frequency based on the first passband cut-off frequency and the first transition band width input by the user, the first setting unit 501 is specifically configured to: in response to the first filtering module being a high-pass filter, determine the first stopband cut-off frequency based on the difference between the first passband cut-off frequency and the first transition band width input by the user; or, in response to the first filtering module being a low-pass filter, determine the first stopband cut-off frequency based on the sum of the first passband cut-off frequency and the first transition band width input by the user.
[0183] In a possible implementation manner, the first filtering module includes a plurality of first filtering units, and all the first filtering units are second-order filtering units; in terms of setting the first filter order of the first filtering module based on the first filter order and the ripple parameter, the second setting unit 502 is specifically configured to: determine at least one set of zeros and poles based on the first filter order and the ripple parameter; the number of sets of at least one set of zeros and poles is determined based on the first filter order; set the first filter order of the first filtering module based on at least one set of zeros and poles; wherein, the first filter coefficients include at least one set of second filter coefficients; one set of second filter coefficients is the digital filter coefficients corresponding to one set of zeros and poles, and one set of second filter coefficients is used to set the filter coefficients of one first filtering unit.
[0184] In a possible implementation manner, the parametric equalizer further includes a second filtering module, and the second filtering module includes a plurality of second filtering units, and all the second filtering units are second-order filtering units; the apparatus may further include a determining unit, a third setting unit, and a fourth setting unit ( Figure 5 not shown in the figure); the determining unit is configured to determine at least one third filtering unit from the plurality of second filtering units based on the filtering configuration information input by the user; the third setting unit is configured to set the filter type and the filtering parameters of at least one third filtering unit based on the filtering configuration information; the fourth setting unit is configured to set the filter coefficients of each third filtering unit based on the filter type and the filtering parameters of each third filtering unit in at least one third filtering unit; the filtering unit is further configured to filter the second audio signal using at least one third filtering unit to obtain a third audio signal.
[0185] In a possible implementation manner, in terms of setting the filter coefficients of each third filtering unit based on the filter type and the filtering parameters of each third filtering unit in at least one third filtering unit, the fourth setting unit is specifically configured to: determine the transfer function corresponding to each third filtering unit based on the filter type of each third filtering unit in at least one third filtering unit; set the filter coefficients of each third filtering unit based on the filtering parameters of each third filtering unit and the corresponding transfer function.
[0186] An embodiment of the present application further provides an electronic device, which includes a processor, a memory, and a computer program or instruction stored on the memory. The processor executes the computer program or instruction to implement the steps of the method in the above method embodiment or any possible implementation manner thereof.
[0187] An embodiment of the present application further provides a chip, which includes a processor, and the processor is used to execute program instructions to implement the steps of the method in the above method embodiment or any possible implementation manner thereof.
[0188] An embodiment of the present application further provides a chip module, which includes a communication module, a power supply module, a storage module, and a chip. Among them: the power supply module is used to supply electrical energy to the chip module; the storage module is used to store data and instructions; the communication module is used for internal communication of the chip module or for communication between the chip module and external devices; the chip is used to execute program instructions to implement the steps of the method in the above method embodiment or any possible implementation manner thereof.
[0189] An embodiment of the present application further provides a computer-readable storage medium (Memory). The computer-readable storage medium is a memory device of an electronic device and is used to store programs and data. It can be understood that the computer-readable storage medium here can include both an electronic device or an internal storage medium of the electronic device, and of course can also include an extended storage medium supported by the electronic device or the electronic device. The computer-readable storage medium provides a storage space, and the storage space stores the electronic device or the operating system of the electronic device. And, one or more computer programs suitable for being loaded and executed by the processor or the processor are stored in the storage space. It should be noted that the computer storage medium here can be a high-speed RAM memory or a non-volatile memory, such as at least one disk memory; optionally, it can also be at least one computer-readable storage medium located far from the aforementioned processor.
[0190] Based on the same inventive concept, the principle and beneficial effect of the computer-readable storage medium provided in the embodiment of the present application for solving problems can refer to the principle and beneficial effect of the microcontroller data transmission control method. For the sake of brief description, it will not be repeated here.
[0191] The above computer-readable storage medium may be the electronic device provided in any of the foregoing embodiments or the internal storage unit of the above computer device, such as the hard disk or memory of the computer device. The computer-readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the computer device. Further, the computer-readable storage medium may also include both the internal storage unit and the external storage device of the computer device. The computer-readable storage medium is used to store the computer program and other programs and data required by the computer device. The computer-readable storage medium may also be used to temporarily store the data that has been output or is to be output. The computer-readable storage medium stores a computer program, and the computer program includes program instructions. When the program instructions are executed by a processor, the processor executes the steps of the method in the above method embodiment or any possible implementation manner thereof.
[0192] This application provides a computer program product or a computer program. The computer program product or the computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the Figure 3 description of the above microcontroller data transmission control method in the corresponding embodiment described above. Therefore, it will not be elaborated here. In addition, the description of the beneficial effects of using the same method will not be elaborated either. For the technical details not disclosed in the embodiments of the computer-readable storage medium involved in this application, please refer to the description of the method embodiments of this application.
[0193] Those of ordinary skill in the art can realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of the two. To clearly illustrate the interchangeability of hardware and software, the components and steps of each example have been generally described according to their functions in the above description. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of this application.
[0194] The method and related device provided by the embodiments of the present application are described with reference to the method flowcharts and / or structural schematic diagrams provided by the embodiments of the present application. Specifically, each process and / or block of the method flowchart and / or structural schematic diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general computer, a special computer, an embedded processor, or other programmable electronic devices to generate a machine, so that the instructions executed by the processor of the computer or other programmable electronic devices generate a device for implementing the functions specified in one process Figure 1 one process or multiple processes and / or structural schematic Figure 1 one block or multiple blocks. These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable electronic devices to work in a specific manner, so that the instructions stored in the computer-readable memory generate a manufactured article including an instruction device, and the instruction device implements the functions specified in one process Figure 1 one process or multiple processes and / or structural schematic Figure 1 one block or multiple blocks. These computer program instructions can also be loaded onto a computer or other programmable electronic devices, so that a series of operation steps are executed on the computer or other programmable devices to generate a computer-implemented process. Therefore, the instructions executed on the computer or other programmable devices provide steps for implementing the functions specified in one process Figure 1 one process or multiple processes and / or structural schematic one block or multiple blocks.
[0195] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements for some or all of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for adjusting a parametric equalizer, characterized in that, The parameter equalizer includes a first filtering module; the method includes: Based on a first passband cutoff frequency and a first transition band width input by a user, setting a first filter order of the first filtering module; the first filter order is the minimum filter order that satisfies the first passband cutoff frequency and the first transition band width; Based on the first filter order and a ripple parameter, setting first filter coefficients of the first filtering module; Using the first filtering module to perform low-pass or high-pass filtering on a first audio signal to be processed to obtain a second audio signal.
2. The method according to claim 1, wherein The setting the first filter order of the first filtering module based on the first passband cutoff frequency and the first transition band width input by the user includes: Based on the first passband cutoff frequency, the first transition band width, and a mapping relationship, setting the first filter order of the first filtering module; Wherein, the mapping relationship includes a corresponding relationship among the first passband cutoff frequency, the first transition band width, and the first filter order.
3. The method according to claim 1, wherein The setting the first filter order of the first filtering module based on the first passband cutoff frequency and the first transition band width input by the user includes: Based on the first passband cutoff frequency and the first transition band width input by the user, determining a first stopband cutoff frequency; Based on the first passband cutoff frequency, the first stopband cutoff frequency, the ripple parameter, and a sampling rate, setting the first filter order of the first filtering module.
4. The method according to claim 3, characterized in that, The determining the first stopband cutoff frequency based on the first passband cutoff frequency and the first transition band width input by the user includes: In response to the first filtering module being a high-pass filter, determining the first stopband cutoff frequency based on a difference between the first passband cutoff frequency and the first transition band width input by the user; or, In response to the first filtering module being a low-pass filter, determining the first stopband cutoff frequency based on a sum of the first passband cutoff frequency and the first transition band width input by the user.
5. The method according to any one of claims 1-4, characterized in that, The first filtering module includes a plurality of first filtering units, and the plurality of first filtering units are all second-order filtering units; The setting the first filter coefficients of the first filtering module based on the first filter order and the ripple parameter includes: Based on the first filter order and the ripple parameter, determining at least one set of zeros and poles; the number of sets of the at least one set of zeros and poles is determined based on the first filter order; Based on the at least one set of zeros and poles, setting the first filter coefficients of the first filtering module; wherein, the first filter coefficients include at least one set of second filter coefficients; one set of the second filter coefficients is digital filter coefficients corresponding to one set of the zeros and poles, and one set of the second filter coefficients is used to set the filter coefficients of one of the first filtering units.
6. The method according to any one of claims 1-5, characterized in that, The parameter equalizer further includes a second filtering module, the second filtering module includes a plurality of second filtering units, and the plurality of second filtering units are all second-order filtering units; the method further includes: Based on filtering configuration information input by the user, determining at least one third filtering unit from the plurality of second filtering units; Set the filter type and filter parameters of the at least one third filtering unit based on the filtering configuration information; Set the filter coefficients of the respective third filtering units based on the filter type and filter parameters of the respective third filtering units in the at least one third filtering unit; Filter the second audio signal using the at least one third filtering unit to obtain a third audio signal.
7. The method according to claim 6, characterized in that, The setting the filter coefficients of the respective third filtering units based on the filter type and filter parameters of the respective third filtering units in the at least one third filtering unit includes: Determine the transfer function corresponding to each of the third filtering units based on the filter type of each of the third filtering units in the at least one third filtering unit; Set the filter coefficients of the respective third filtering units based on the filter parameters of the respective third filtering units and the corresponding transfer functions.
8. A setting device for a parametric equalizer, characterized in that, The parametric equalizer includes a first filtering module; the apparatus includes: A first setting unit, configured to set a first filter order of the first filtering module based on a first passband cut-off frequency and a first transition band width input by a user; the first filter order is the minimum filter order that satisfies the first passband cut-off frequency and the first transition band width; A second setting unit, configured to determine a first filter coefficient of the first filtering module based on the first filter order and a ripple parameter; A filtering unit, configured to perform low-pass or high-pass filtering on a first audio signal to be processed using the first filtering module to obtain a second audio signal.
9. An electronic device, comprising a processor, a memory, and a computer program or instructions stored on the memory, characterized in that, The processor executes the computer program or instruction to implement the steps of the method according to any one of claims 1-7.
10. A chip, comprising a processor, characterized in that, The processor is configured to execute program instructions to perform the steps of the method according to any one of claims 1-7.
11. A chip module, characterized in that, The chip module includes a communication module, a power supply module, a storage module, and a chip, wherein: the power supply module is configured to supply electrical energy to the chip module; the storage module is configured to store data and instructions; the communication module is configured to perform internal communication within the chip module or to communicate between the chip module and an external device; the chip is configured to perform the steps of the method according to any one of claims 1-7.
12. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, the computer program includes program instructions, and when the program instructions are executed by a processor, the processor is caused to execute the steps of the method according to any one of claims 1-7.