Movatterモバイル変換


[0]ホーム

URL:


CN117979207B - Frequency response correction method, device, equipment and storage medium - Google Patents

Frequency response correction method, device, equipment and storage medium

Info

Publication number
CN117979207B
CN117979207BCN202311582368.9ACN202311582368ACN117979207BCN 117979207 BCN117979207 BCN 117979207BCN 202311582368 ACN202311582368 ACN 202311582368ACN 117979207 BCN117979207 BCN 117979207B
Authority
CN
China
Prior art keywords
frequency
frequency response
data
spectrum data
equalizer
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202311582368.9A
Other languages
Chinese (zh)
Other versions
CN117979207A (en
Inventor
宋绍钦
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Kugou Computer Technology Co Ltd
Original Assignee
Guangzhou Kugou Computer Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangzhou Kugou Computer Technology Co LtdfiledCriticalGuangzhou Kugou Computer Technology Co Ltd
Priority to CN202311582368.9ApriorityCriticalpatent/CN117979207B/en
Publication of CN117979207ApublicationCriticalpatent/CN117979207A/en
Application grantedgrantedCritical
Publication of CN117979207BpublicationCriticalpatent/CN117979207B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Classifications

Landscapes

Abstract

Translated fromChinese

本申请公开了一种频响校正方法、装置、设备及存储介质,属于音频处理技术领域。所述方法包括:获取第一频响数据,第一频响数据用于表征待校正的频响曲线,频响曲线用于反映响度随着频率变化的趋势;对第一频响数据进行时频转换,得到第一频谱数据,第一频谱数据用于反映待校正的频响曲线在频率方向的属性;根据第一频谱数据和第二频谱数据,确定均衡器的参数,第二频谱数据是对第二频响数据进行时频转换得到的,第二频响数据用于表征频响校正所用的参考频响曲线,均衡器用于基于参数控制待校正的频响曲线接近参考频响曲线。本申请实施例实现了自动确定均衡器的参数,有助于提升校正音响系统的频响曲线的效率,从而改善音响系统的音频播放效果。

The present application discloses a frequency response correction method, apparatus, device, and storage medium, belonging to the field of audio processing technology. The method includes: obtaining first frequency response data, the first frequency response data is used to characterize the frequency response curve to be corrected, and the frequency response curve is used to reflect the trend of loudness changing with frequency; performing time-frequency conversion on the first frequency response data to obtain first spectrum data, and the first spectrum data is used to reflect the properties of the frequency response curve to be corrected in the frequency direction; determining the parameters of an equalizer based on the first spectrum data and second spectrum data, the second spectrum data is obtained by performing time-frequency conversion on the second frequency response data, and the second frequency response data is used to characterize the reference frequency response curve used for frequency response correction, and the equalizer is used to control the frequency response curve to be corrected to be close to the reference frequency response curve based on the parameters. The embodiment of the present application realizes the automatic determination of the parameters of the equalizer, which helps to improve the efficiency of correcting the frequency response curve of the audio system, thereby improving the audio playback effect of the audio system.

Description

Frequency response correction method, device, equipment and storage medium
Technical Field
The present application relates to the field of audio processing technologies, and in particular, to a method, an apparatus, a device, and a storage medium for correcting a frequency response.
Background
The equalizer is able to change the frequency response curve of the sound system. Under the action of the equalizer, the audio playing effect of the sound system can be changed, so that the purpose of tuning is achieved.
The parameter differences of the equalizer may cause the audio playing effect of the sound system to have different stitching. In order for the equalizer to be able to change the audio playback effect of the playback device to the audio playback effect intended by the user, it is necessary to accurately determine the parameters of the equalizer. In the related art, a user manually adjusts parameters of an equalizer. And judging whether the audio playing effect of the playing device reaches the expected value or not by manually and repeatedly debugging parameters of the equalizer and listening to the change of the audio playing effect of the playing device.
However, manually adjusting the equalizer parameters makes the frequency response correction process for the playback device time consuming and inefficient.
Disclosure of Invention
The application provides a frequency response correction method, a device, equipment and a storage medium. The technical scheme is as follows:
according to an aspect of an embodiment of the present application, there is provided a frequency response correction method, the method including:
acquiring first frequency response data, wherein the first frequency response data is used for representing a frequency response curve to be corrected, and the frequency response curve is used for reflecting the trend of loudness along with frequency change;
obtaining first frequency spectrum data according to the first frequency response data, wherein the first frequency spectrum data is used for reflecting the attribute of the frequency response curve to be corrected in the frequency direction;
and determining parameters of an equalizer according to the first frequency spectrum data and the second frequency spectrum data, wherein the second frequency spectrum data is determined according to second frequency response data, the second frequency response data is used for representing a reference frequency response curve used for frequency response correction, and the equalizer is used for controlling the frequency response curve to be corrected to be close to the reference frequency response curve based on the parameters.
According to an aspect of an embodiment of the present application, there is provided a frequency response correction apparatus including:
The data acquisition module is used for acquiring first frequency response data, wherein the first frequency response data is used for representing a frequency response curve to be corrected, and the frequency response curve is used for reflecting the trend of loudness along with frequency change;
The frequency spectrum determining module is used for generating first frequency spectrum data according to the first frequency response data, wherein the first frequency spectrum data is used for reflecting the attribute of the frequency response curve to be corrected in the frequency direction;
And the parameter determining module is used for determining parameters of an equalizer according to the first frequency spectrum data and the second frequency spectrum data, the second frequency spectrum data is determined according to second frequency response data, the second frequency response data is used for representing a reference frequency response curve used for frequency response correction, and the equalizer is used for controlling the frequency response curve to be corrected to be close to the reference frequency response curve based on the parameters.
According to an aspect of an embodiment of the present application, there is provided a computer apparatus including a processor and a memory, the processor loading and executing the computer instructions from the memory to implement the above-mentioned frequency response correction method.
According to an aspect of an embodiment of the present application, there is provided a computer-readable storage medium having stored therein computer instructions that are loaded and executed by a processor from the storage medium to implement the above-described frequency response correction method.
According to an aspect of an embodiment of the present application, there is provided a computer program product including computer instructions stored in a computer-readable storage medium, the computer instructions being loaded and executed by a processor from the computer-readable storage medium to implement the above-described frequency response correction method.
The technical scheme provided by the embodiment of the application has the beneficial effects that at least:
in the implementation process of the embodiment of the application, the parameters of the equalizer can be determined by only providing the source frequency response data and the target frequency response data, and the frequency response data of the playing device when playing the audio is close to the target frequency response data by means of the parameters of the equalizer. By the method, the threshold of the frequency response correction process to the user is reduced, automatic correction of the frequency response is realized, efficiency of frequency response correction is improved, and labor cost is reduced.
Meanwhile, in the process of frequency response correction, frequency response data are converted into frequency spectrum data, and the calculation amount involved in determining parameters of the equalizer according to the frequency spectrum data is small. On the one hand, the method is beneficial to shortening the time consumption for determining equalizer parameters and accelerating the frequency response correction speed, and on the other hand, the smaller calculated amount makes the requirement on the equipment performance of the frequency response correction method lower, is beneficial to improving the application scene of the frequency response correction method, and has better universality.
Drawings
FIG. 1 is a schematic illustration of an implementation environment for an embodiment of the present application;
FIG. 2 is a schematic diagram of the inventive concept;
FIG. 3 is a flow chart of a method of frequency response correction provided by an exemplary embodiment of the present application;
FIG. 4 is a flow chart of a method for frequency response correction provided by another exemplary embodiment of the present application;
FIG. 5 is a schematic diagram of a frequency response correction method according to an exemplary embodiment of the present application;
fig. 6 is a block diagram of a frequency response correction apparatus provided by an exemplary embodiment of the present application;
Fig. 7 is a block diagram of a computer device according to an exemplary embodiment of the present application.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present application more apparent, the embodiments of the present application will be described in further detail with reference to the accompanying drawings.
First, the nouns involved in the embodiments of the present application will be described:
1. The sound system is a system which converts sound wave signals of an original sound field into electric signals by using a microphone, processes the electric signals through some electronic devices according to certain requirements, and finally converts the electric signals into sound wave signals by using playing devices such as a loudspeaker and the like for playback.
In an embodiment of the present application, the sound system includes at least an electronic device for converting an electrical signal into an acoustic signal and playing the acoustic signal. Optionally, the sound system includes a playback device and an equalizer, and the playback device includes a speaker. The equalizer is used for adjusting the frequency response curve of the sound system so as to change the audio playing effect of the sound system and achieve the purpose of tuning.
2. And the equalizer is used for compensating the defect of the playing equipment or carrying out tone according to the preference of the user. The equalizer adjusts the gain of some frequency bands in the audio signal to make the sound of the frequency bands become larger or smaller, thereby adjusting the frequency response curve of the sound system and changing the audio playing effect of the playing device.
According to different action positions, the equalizer comprises at least two types of equalizer at the power amplifier end and equalizer at the sound source end. The equalizer at the sound source end comprises a hardware equalizer and a software equalizer.
Ft (Fourier Transform ) is one method by which a signal in the time domain (i.e., instant domain) can be converted into a signal in the frequency domain (i.e., frequency domain). The conversion of the time domain signal into a frequency domain signal causes some problems in the time domain that are not well handled, which can be handled in a relatively simple manner in the frequency domain.
The FFT fast Fourier transform (Fast Fourier Transform ) is an efficient time-frequency conversion algorithm for fast computation of the Fourier transform and its inverse. The FFT takes advantage of some mathematical properties of the fourier transform, so that its computational efficiency is greatly improved. Although FFT is mathematically equivalent to fourier transform, FFT has become a major tool in actually computing fourier transform due to its computational efficiency advantage.
FIG. 1 is a schematic diagram of an implementation environment for an embodiment of the present application. The solution implementation environment may include a computer device 10 and an audio system 20.
The computer device 10 may be an electronic device such as a PC (Personal Computer ), tablet, cell phone, wearable device, smart home appliance, in-vehicle terminal, aircraft, etc. The computer device 10 has at least arithmetic and memory functions. The computer device 10 is used to implement a frequency response correction function. For example, a target application is running in the computer device 10. The target application is used to complete the frequency response correction for sound system 20. The computer device 10 may also be a server, that is, the frequency response correction procedure provided by the embodiment of the present application is remotely completed by the server.
Sound system 20 is used to convert audio sources in audio files or video files into electrical signals and play corresponding sounds. The sound system includes at least a playing device 22 and an equalizer 24, the equalizer 24 is used to adjust the audio playing effect of the sound system 20, and the playing device 22 is used to play sound. Equalizer 24 may be in software or hardware.
There is a wired or wireless connection between the computer device 10 and the sound system 20. Alternatively, computer device 10 exists independently of sound system 20, or computer device 10 is integrated in sound system 20.
In one example, computer device 10 and sound system 20 are independent of each other. When frequency response correction is required, computer device 10 obtains source frequency response data and target frequency response data of sound system 20, determines equalizer parameters based on the source frequency response data (corresponding to the first frequency response parameter in the claims) and the target frequency response data (corresponding to the second frequency response parameter in the claims), and feeds back the equalizer parameters to equalizer 24 in sound system 20. So that after the frequency response correction, equalizer 24 uses the parameters of the equalizer to adjust the frequency response curve of sound system 20, thereby achieving the purpose of changing the audio playing effect of sound system 20.
In the process of performing the frequency response correction, the sound system 20 may be placed in a recording studio, so as to collect source frequency response data of the sound system under the condition of less interference, reduce environmental errors introduced in the process of performing the frequency response correction, and be helpful to improve the correction effect of the frequency response correction.
Sound system 20 may also be placed in an actual use environment (e.g., outdoors, indoors, at a performance site, etc.) during the frequency response correction process so that the frequency response correction process can determine parameters of the equalizer that are appropriate for the use environment. For specific procedures regarding this method, reference is made to the examples below.
The application scenario of the frequency response correction method provided by the application comprises, but is not limited to, at least one of the following:
(1) Before the sound system leaves the factory, the frequency response curve of the sound system is adjusted.
(2) In the use process of the sound system, the frequency response curve of the sound system is adjusted. For an audio system capable of accessing to the internet of things, the parameters of an equalizer in the audio system can be updated periodically by the frequency response correction method, so that the audio playing effect of the audio system can be optimized periodically. Illustratively, the user determines parameters of an equalizer in the sound system by the present frequency response correction method according to tuning needs.
It should be noted that the application scenario mentioned above represents only an example of the application scenario of the frequency response correction method, and is not limited to the application scenario of the frequency response correction method.
Fig. 2 is a schematic diagram of the inventive concept provided by an exemplary embodiment of the present application.
As shown in fig. 2, the loudness corresponding to different frequency points in a source frequency response curve used for representing source frequency response data is limited by component elements, sounding principles and the like of a playing device in a sound system, which may affect the playing effect of the sound system on audio files in certain styles, and the audio playing effect of the sound system needs to be improved.
The embodiment of the application can automatically determine the parameters of the equalizer according to the source frequency response data and the target frequency response data. The equalizer is used for gaining the source frequency response curve according to the equalizer parameters, and the corrected frequency response curve is close to the target frequency response curve, so that the aim of automatic tuning is fulfilled.
In addition, the frequency response correction method provided by the embodiment of the application has lower requirements on the technical threshold of the user in the tuning process, realizes automatic correction of the frequency response curve, and is beneficial to shortening the period of frequency response correction.
Fig. 3 is a flowchart of a frequency response correction method according to an exemplary embodiment of the present application. By way of example, the subject of execution of the method may be the computer device 10 in the implementation environment of the scheme shown in fig. 1. As shown in fig. 3, the method may include at least one of the following steps (310-330):
in step 310, first frequency response data is obtained, where the first frequency response data is used to represent a frequency response curve to be corrected, and the frequency response curve is used to reflect a trend of loudness along with frequency variation.
In some embodiments, the first frequency response data is used to reflect a frequency response curve of the sound system when playing audio. The frequency response curve is also referred to as a frequency response curve. The frequency response curve is understood to be a curve representation of the energy distribution in space of sound radiated by the sound system at different frequencies. That is, the first frequency response data is used to characterize the performance capabilities of the sound system for sounds of different frequencies.
Alternatively, the frequency response curve is a two-dimensional curve, wherein the positive x-axis direction represents the frequency from low to high and the positive y-axis direction represents the amplitude of the ripple from low to high. Illustratively, the frequency corresponds to the tone in the hearing of the human ear, the higher the frequency the brighter the tone, and the higher the frequency the lower the tone. The amplitude of the fluctuation corresponds to the loudness in the sense of hearing of the human ear, the greater the loudness corresponding to a certain frequency in the frequency response curve, the greater the sound at that frequency. Different frequency response curves can bring different auditory experiences to the user.
Optionally, the frequency response curve to be corrected is used to reflect the playing loudness of the sound system at different frequencies. The loudness corresponding to different frequencies in the frequency response curve to be corrected may be different due to the limitation of elements, structures and other factors of the playing device, and in order to improve the playing effect, tuning needs to be performed on the frequency response curve to be corrected.
In some embodiments, the type of first frequency response data includes, but is not limited to, at least one of a spectrum TXT (Text File), a System Scan test PCM (Pulse Code Modulation, pulse code Adjust) File, and the like. The first frequency response data is also referred to as a first frequency response profile.
In one example, the first frequency response data is a derived frequency spectrum TXT by the electroacoustic device. In another example, the first frequency response data is a PCM file collected by the sound receiving device, and the computing device treats the PCM file as the first frequency response data. For example, in the process of needing to perform frequency response correction, test audio is transmitted into the sound system, the test audio played by the sound system is collected through the radio equipment to obtain a PCM file, and then the PCM file is imported into the computer equipment to enable the computer equipment to obtain first frequency response data. Illustratively, the test audio comprises sine waves of different frequencies.
Step 320, determining first spectrum data according to the first frequency response data, where the first spectrum data is used to reflect the attribute of the frequency response curve to be corrected in the frequency direction.
Optionally, the first spectral data comprises frequency information and amplitude information of the first frequency response data. Illustratively, the first spectral data is a spectrogram (spectrogram) corresponding to the first frequency response data. The spectrogram comprises at least one amplitude spectrum, and the amplitude spectrum is used for representing the mapping relation between the amplitude and the frequency when the sound system plays the audio. The spectrogram may also include a phase spectrum, which is not limited herein.
In some embodiments, the manner in which the computer device determines the first spectral data from the first frequency response data is related to the type of the first frequency response data.
For example, in case the type of the first frequency response data is the frequency spectrum TXT, the computer device reads the first frequency response data from the first frequency response data, since the frequency information and the amplitude information are included in the frequency spectrum TXT. The method can accelerate the speed of acquiring the frequency response data, and is beneficial to shortening the time consumption for performing the frequency response correction process.
In an exemplary case, where the type of the first frequency response data is a PCM file, the computer device performs spectrum extraction on the first frequency response data to obtain first spectrum data. For details of this step, reference is made to the following.
Step 330, determining parameters of the equalizer according to the first frequency spectrum data and the second frequency spectrum data, wherein the second frequency spectrum data is determined according to the second frequency response data, the second frequency response data is used for representing a reference frequency response curve used for frequency response correction, and the equalizer is used for controlling the frequency response curve to be corrected to be close to the reference frequency response curve based on the parameters.
In some embodiments, the second frequency response data is used to represent a target frequency response curve characterizing the frequency response correction. This target frequency response curve is also referred to as a reference frequency response curve. I.e. the second frequency response data is used to provide a correction criterion for the frequency response correction procedure. The aim of the frequency response correction is that after the frequency response correction the frequency response curve of the sound system is close to the target frequency response curve or that the frequency response curve of the sound system coincides with the target frequency response curve.
Optionally, the source of the second frequency response data includes, but is not limited to, at least one of a preset, user-specified. The second frequency response data is illustratively preset. For example, the preset second frequency response data is used to characterize a smooth reference frequency response curve. That is, in the reference frequency response curve, the loudness corresponding to each of the different frequencies is the same, or the difference between the loudness corresponding to each of the different frequencies is less than or corresponds to the first threshold. The first threshold may be a preset positive number.
Illustratively, the second frequency response data is user-specified. That is, the user-specified second frequency response data may be set based on the listening habits of the user. In this case, the loudness corresponding to the different frequency bands in the reference frequency response curve may be the same or different.
In one example, the user may record test audio played by the reference sound system to obtain second frequency response data. And performing frequency response correction through the second frequency response data, so that the audio playing effect of the corrected sound system can be close to that of the reference sound system. In this embodiment, the user is supported to indicate the reference frequency response curve by itself, so that after the source frequency response curve is corrected based on the reference frequency response curve, the audio playing effect of the sound system can conform to the listening habit of the user after the frequency response is corrected, and the user is supported to perform custom setting on the audio playing effect of the sound system, so that the flexibility of the frequency response correction method is improved.
In some embodiments, the type of second frequency response data includes, but is not limited to, at least one of spectrum TXT, PCM file, and the like. For details on the types of the two types of frequency response data, please refer to the above description.
In some embodiments, parameters of the equalizer are used to indicate the frequency response curve of the equalizer. That is, the equalizer generates a frequency response curve of the equalizer according to parameters of the equalizer, and the frequency response curve of the equalizer and the frequency response curve to be corrected are overlapped, so that the frequency response curve of the sound system approaches to the reference frequency response curve, thereby achieving the tuning function. The parameters of the equalizer can be understood as parameters that need to be used in the process of the equalizer performing gain on the source frequency response curve, where gain refers to changing the loudness of at least one frequency band in the source frequency response curve, such as increasing the loudness of frequency band 1, decreasing the loudness of frequency band 2, etc.
Optionally, the parameters of the equalizer include at least one of a center frequency, a gain amount, and a quality factor, wherein the center frequency is also referred to as a center frequency point and the quality factor is also referred to as a Q value. For a detailed description of the equalizer parameters, please refer to the following examples.
Illustratively, the equalizer is configured to gain the loudness of at least one frequency band in the source frequency response curve. In at least one frequency band, equalizer parameters respectively corresponding to different frequency bands can be the same or different. The at least one frequency band is a frequency band with a larger difference between the first frequency response curve and the second frequency response curve.
Optionally, in determining the equalizer parameters, parameters of the equalizer corresponding to the at least one frequency band need to be determined separately. So that the frequency response curve of the sound system can be close to the reference frequency response curve in the at least one frequency band after the frequency response correction, the following examples are given for details of this procedure.
In summary, the embodiment of the application can automatically determine the parameters of the equalizer by only acquiring the source frequency response data and the target frequency response data, and the frequency response data of the audio system when playing the audio is close to the target frequency response data by means of the parameters of the equalizer. Through the mode, the threshold of the tuning process for the user is reduced, the automatic correction of the frequency response curve is realized, the frequency response correction efficiency is improved, and the labor cost is reduced.
Meanwhile, in the process of frequency response correction, frequency response data are converted into frequency spectrum data, and the calculation amount involved in determining parameters of the equalizer according to the frequency spectrum data is small. On one hand, the method is beneficial to shortening the time consumption for determining equalizer parameters, accelerating the frequency response correction speed and shortening the correction period of a frequency response curve, and on the other hand, the smaller calculation amount makes the requirement of the frequency response correction method on the equipment performance lower, is beneficial to improving the application scene of the frequency response correction method, and has better universality.
The method of determining the first spectral data is described in the following by means of several embodiments. The method is performed by a computer device.
In some embodiments, step 320, determining first spectrum data according to first frequency response data, where the first spectrum data is used to reflect an attribute of a frequency response curve to be corrected in a frequency direction, includes the substep 322 of performing fourier transform on the first frequency response data to determine initial spectrum data, the substep 324 of performing smoothing on the initial spectrum data to determine flat spectrum data, and the substep 326 of performing interpolation processing on the flat spectrum data based on second spectrum data to determine the first spectrum data.
In some embodiments, for a first frequency response number belonging to the PCM file type, the computer device performs a spectral data extraction process on the first frequency response data to obtain first spectral data. Illustratively, the computer device performs a fast fourier transform on the first frequency response data to obtain initial spectral data. The computer device performs a spectral data extraction process on the first frequency response data using kissfft to obtain initial spectral data.
Alternatively, the processing of the spectral data mainly involves smoothing of the spectral data, e.g., octive 1/3, octive 1/6, etc. The smoothing process is used for generating k×c frequency points based on c frequency points included in the initial spectrum data, and k is a positive integer.
Optionally, interpolation processing of the frequency spectrum data is used for the frequency values and the points of the frequency response curve to be corrected and the target frequency response curve are consistent. The interpolation processing is used for adding a new frequency point between two adjacent frequency points included in the gentle frequency spectrum data, and determining the amplitude value of the new frequency point according to the amplitude values respectively corresponding to the two adjacent frequency points.
The computer equipment determines the total number of frequency points in the second frequency spectrum data, determines the number of frequency points to be interpolated according to the total number of frequency points in the second frequency spectrum data, determines the amplitude value corresponding to at least one interpolation frequency point and each interpolation frequency point respectively according to the number of frequency points to be interpolated and the flat frequency spectrum data, and adds the amplitude value corresponding to at least one interpolation frequency point and each interpolation frequency point respectively into the flat frequency spectrum data to obtain first frequency spectrum data.
For example, the computer device determines the number of frequency points to be interpolated according to the total number of frequency points in the second frequency spectrum data, including determining the total number of frequency points in the flat frequency spectrum data, and subtracting the total number of frequency points in the flat frequency spectrum data from the total number of frequency points in the second frequency spectrum data to obtain the number of frequency points to be interpolated.
For example, the computer equipment determines at least one interpolation frequency point and the corresponding amplitude value of each interpolation frequency point according to the number of frequency points to be interpolated and the gentle frequency spectrum data, and the method comprises the steps that the computer equipment selects the number of frequency point pairs of the frequency points to be interpolated from the frequency points included in the gentle frequency spectrum data, and the computer equipment determines the amplitude value of the frequency points to be processed according to the amplitude values of two frequency points included in the frequency point pairs, wherein the frequency point pairs comprise two adjacent frequency points, and a frequency interval between the two frequency points in the frequency point pairs to be processed.
For example, the computer equipment determines at least one interpolation frequency point and the amplitude corresponding to each interpolation frequency point according to the number of frequency points to be interpolated and the gentle frequency spectrum data, and comprises determining the number of frequency points to be processed of the frequency points to be interpolated according to the gentle frequency spectrum data and the second frequency spectrum data, wherein the frequency points to be processed are frequency points which are included in the second frequency spectrum data and are not included in the gentle frequency spectrum data, and for each frequency point to be processed in the at least one frequency point to be processed, the two frequency points closest to the frequency point to be processed are found out from the gentle frequency spectrum data, and the amplitude of the frequency point to be processed is determined according to the amplitudes of the two frequency points.
By the method, the total number of frequency points of the first frequency spectrum data and the second frequency spectrum data can be aligned, and accuracy of parameters of the equalizer determined later can be improved.
In some embodiments, the number of points of the spectral data refers to the number of sampling points in a 0-2 pi period during the fast Fourier transform. The number of points of the spectrum data can be understood as the number of sampling points in the spectrum conversion process, that is, the total number of frequency points in the obtained spectrum data after fourier transform. Illustratively, if the number of points of the spectrum data is equal to 64, it means that 64 spectrums are included in the spectrum data, that is, 64 frequency points and magnitudes corresponding to the 64 frequency points are included in the spectrum data.
The method for determining the parameters of the equalizer is described in several embodiments, and the method is implemented by a computer device.
In some embodiments, the first spectral data includes n bins and a first amplitude value for each bin, and the second spectral data includes n bins and a second amplitude value for each bin, n being a positive integer.
Optionally, the first spectrum data includes m frequency points and first amplitude values of the m frequency points, and the second spectrum data includes p frequency points and second amplitude values of each p frequency points, where m and p are positive integers greater than or equal to n.
The frequency point refers to an absolute frequency value. The total number of frequency bins included in the first spectral data and the second spectral data may be related to the number of sampling points in the spectral conversion process. The application does not limit the total number of frequency points respectively included in the first frequency spectrum data and the second frequency spectrum data.
Illustratively, at least n identical frequency points are included between the m frequency points and the p frequency points. E.g. n refers to the smaller of m and p.
In one example, in view of improving the utilization efficiency of each frequency point included in the spectrum data and improving the accuracy of the frequency response correction process, n=m=p, that is, the number of frequency points included in the first spectrum data and the second spectrum data are the same, and all the frequency points participate in the process of determining the parameters of the equalizer.
In another example, in determining parameters of the equalizer, the computer device picks n common frequency points from the first spectral data and the second spectral data and determines parameters of the equalizer based on the n frequency points. Illustratively, the computer device determines, from the frequency bin intervals, n frequency bins that the first spectral data and the second spectral data collectively include. For example, for any two frequency points in the n frequency points, the frequency span between the two frequency points is greater than or equal to the second threshold. The second threshold is used to characterize the minimum frequency span between two frequency bins. Optionally, the second threshold is preset.
By controlling the frequency span among n frequency points, the influence on other frequency bands in the process of gaining the frequency band where a certain frequency point is located can be reduced. The method has the advantages that the gain of the frequency band where a certain frequency point is located is avoided, the loudness of other frequency bands is caused to fluctuate greatly, the gain of other frequency bands is required to be adjusted, the efficiency of frequency response correction is improved, and the degree that the corrected frequency response curve is close to the reference frequency response curve is improved.
In some embodiments, step 330, determining parameters of the equalizer from the first spectral data and the second spectral data, may include the following sub-steps.
In step 332, for each of the n frequency points, a difference between the first amplitude value of the frequency point and the second amplitude value of the frequency point is calculated, so as to obtain an amplitude difference of the frequency point.
In some embodiments, the first spectrum data includes at least one spectrum, each spectrum corresponding to a frequency amplitude, the frequency amplitude being a first amplitude difference of the frequency bin. Illustratively, the amplitude difference of the frequency bins is equal to the second amplitude value minus the first amplitude value. The amplitude difference of the frequency points is used for representing the amplitude difference of the first frequency response curve at the frequency points of the second frequency response curve, and the amplitude difference is a rational number. The computer device can sequentially calculate the amplitude differences of n frequency points, or can calculate the amplitude differences of a plurality of frequency points in parallel at a time.
In step 334, a target frequency point is determined from the n frequency points according to the amplitude differences of the n frequency points, where the target frequency point is a frequency point with the amplitude difference greater than or equal to the correction error.
Optionally, the absolute value of the amplitude difference of the target frequency point is greater than or equal to the amplitude difference of at least one frequency point except the target frequency point in the n frequency points. For example, the absolute value of the amplitude difference of the target frequency point is the largest of the amplitude differences of the n frequency bands. For example, n=4, the amplitude differences of the 4 frequency points are-10, 15, 10 and-20 respectively, and the computer equipment takes the frequency point with the amplitude difference of-20 as the target frequency point.
The amplitude difference of the frequency points has positive and negative, and therefore, the amplitude difference of the target frequency point being greater than or equal to the correction error means that the absolute value of the amplitude difference of the target frequency point is greater than or equal to the correction error. For example, if the difference in amplitude of a certain frequency point is equal to-5 and the correction error is equal to 3, it means that the difference in amplitude of the frequency point is greater than or equal to the correction error, that is, the frequency point may be regarded as the target frequency point.
Optionally, the computer device determines the target frequency point from the n frequency points according to a quantitative relationship between the amplitude difference and the correction error. Illustratively, the computer apparatus selects, as the target frequency point, a frequency point having the largest absolute value of the amplitude difference from the n frequency points.
The correction error may be preset, e.g., the correction error is equal to a decibels (dB), a being a positive number. For example, the correction error is any one value between 1-3 dB. Illustratively, the correction error affects how close the corrected frequency response curve is to the reference frequency response curve. The smaller the correction error, the closer the corrected frequency response curve is to the reference frequency response curve, and the larger the correction error, the larger the difference between the corrected frequency response curve and the reference frequency response curve.
The correction error may be set by the user according to actual needs, for example. For example, when the frequency response correction needs to be completed quickly, the user may set a larger correction error, such as setting the correction error to 3dB. For example, when an accurate frequency response correction is required, the user may set a smaller correction error, such as setting the correction error to 1dB. The correction error is set according to actual needs, and the present application is not limited herein.
In some embodiments, the computer device determines a target frequency point from the n frequency points according to the amplitude differences of the n frequency points, including that the computer device selects an amplitude difference with the largest absolute value from the amplitude differences of the n frequency points, and if the absolute value of the amplitude difference is greater than or equal to the correction error, the frequency point with the amplitude difference in the n frequency points is used as the target frequency point. If the absolute value of the amplitude difference is smaller than the correction error, the absolute values of the amplitude differences of the n frequency points are smaller than the correction error, namely the frequency response curve of the sound system is close to the reference frequency response curve, and correction of the frequency response curve is not needed. In other words, in the case where the target frequency point does not exist among the n frequency points, the frequency response correction process ends. The computer equipment determines the parameters of the equalizer corresponding to each target frequency point determined in the frequency response correction process as the parameters of the equalizer.
In a substep 336, parameters of the equalizer are determined based on the target frequency bin.
Optionally, in the case that one target frequency point exists in the n frequency points, the computer device determines the parameters of the equalizer according to the one target frequency point. And according to the parameters of the equalizer determined by the target frequency point, adjusting the loudness of the corresponding frequency band of the target frequency point in the frequency response curve to be corrected. For example, the computer device determines a frequency point, of the n frequency points, where the absolute value of the amplitude difference is the largest and the absolute value of the amplitude difference is greater than or equal to the correction error, as a target frequency point, and then, the computer device determines a parameter of the equalizer based on the target frequency point.
Optionally, under the condition that a plurality of target frequency points are determined from n frequency points, the computer equipment determines parameters of equalizers corresponding to the f target frequency points respectively at one time, and f is a positive integer smaller than the total number of the target frequency points. Illustratively, the computer device determines f target bins from the plurality of target bins according to a third threshold, in which case the value of f is associated with the third threshold and the value of f is associated with the plurality of target bins. For example, a frequency span between any two of the f target frequency bins is greater than or equal to a third threshold. The computer device then determines parameters of the equalizer based on the f target frequency points. In this case, parameters of the equalizer include parameters corresponding to each of the f target frequency points.
For unselected target frequency points in the plurality of target frequency points, the computer device needs to generate updated first frequency response data according to the equalizer parameters determined at this time, and determine whether the unselected target frequency points can be used as target frequency points according to the updated first frequency response data, and for specific content of the process, please refer to the following embodiments.
Because the equalizer can influence the frequency band including the target frequency point when the equalizer gains the target frequency point, the target frequency point with larger frequency span is selected, on one hand, the method is beneficial to avoiding that the determined equalizer parameter repeatedly gains the frequency band including a certain target frequency point, so that the frequency response curve of the frequency band including the target frequency point cannot be close to the reference curve after the frequency response correction, and the method is beneficial to improving the accuracy of the frequency response correction process. On the other hand, for two target frequency points with smaller frequency span, the parameters of the equalizer are determined according to one frequency point of the two target frequency points, so that the determined parameters of the equalizer can also influence the frequency response curve of the other target frequency point of the two frequency points, and the frequency response curve of the frequency band where the other target frequency point is positioned can be close to the reference frequency response curve, thereby reducing the times of determining the parameters of the equalizer and being beneficial to improving the efficiency of frequency response correction.
Optionally, in the case that a plurality of target frequency points are determined from the n frequency points, the computer device selects one target frequency point from the plurality of target frequency points, and determines the parameters of the equalizer according to the target frequency point. The computer device uses the determined equalizer parameters to adjust the frequency response curve to be corrected to obtain a corrected frequency response curve, and re-executes from step 320 based on the updated first frequency response data corresponding to the corrected frequency response curve until the target frequency point cannot be determined in sub-step 324, for details of this step, please refer to the following embodiments.
According to the method, based on the frequency points with the amplitude difference larger than or equal to the correction error, the parameters of the equalizer are determined, so that the frequency response curve of the frequency band corresponding to the frequency points can be corrected through the equalizer, the corrected frequency response curve of the frequency band is close to the curve part corresponding to the frequency band in the reference frequency response curve, and automatic frequency response correction is realized. No complex calculations are involved in this embodiment, and the determination helps to efficiently accomplish the frequency response correction.
The process of determining parameters of the equalizer based on the target frequency point is described in several embodiments.
In some embodiments, the equalizer parameters include a center frequency, which refers to the frequency center point to be corrected, a gain amount, which refers to the amplitude variation at the center frequency after frequency response correction, and a quality factor, which characterizes the bandwidth of the impact of the gain amount on the surrounding frequencies of the center frequency.
In step 336, parameters of the equalizer are determined according to the target frequency point, including determining a center frequency according to the target frequency point, determining a gain amount according to an amplitude difference of the target frequency point, and determining a quality factor according to the center frequency and a bandwidth of a frequency response curve, wherein the bandwidth of the frequency response curve is used for representing a frequency span in which an amplitude value of the center frequency is attenuated to be half in the frequency response curve to be corrected.
Alternatively, the center frequency is also referred to as a center frequency point. Illustratively, the computer device determines the target frequency point as the center frequency.
Optionally, the gain is used to adjust the amplitude value of the center frequency, and the adjusted amplitude value of the center frequency is equal to the adjusted amplitude value of the center frequency plus the gain. The gain amount and the amplitude difference of the target frequency point are in positive correlation. That is, the larger the amplitude difference of the target frequency point is, the larger the gain amount is, and the smaller the amplitude difference of the target frequency point is, the smaller the gain amount is. Illustratively, the computer device takes the difference in the magnitudes of the target frequency points as the gain amount.
In some embodiments, the bandwidth of the frequency response curve refers to a frequency band of the frequency response curve to be corrected that includes the center frequency. The bandwidth of the frequency response curve corresponds to the passband frequency band of the center frequency in the frequency response curve to be corrected. The passband frequency band of the center frequency refers to the frequency span between a lower cutoff frequency and an upper cutoff frequency, where the cutoff frequency refers to the signal frequency attenuated by half at the loudness of the center frequency in the frequency response curve to be corrected.
In some embodiments, the figure of merit is positively correlated with the center frequency and the figure of merit is negatively correlated with the bandwidth of the frequency response curve. Optionally, the quality factor is equal to the ratio of the center frequency to the bandwidth of the frequency response curve. Illustratively, the larger the value of the figure of merit, the smaller the effect of the gain amount on the frequency band around the center frequency, and the smaller the value of the figure of merit, the larger the effect of the gain amount on the frequency band around the center frequency.
In the embodiment of the application, the parameters of the equalizer of the passband frequency band to which the target frequency belongs can be rapidly determined in a simpler mode, so that the equalizer corrects the frequency response curve of the sound system according to the parameters, and the corrected frequency response curve is beneficial to reducing the difference between the corrected frequency response curve and the partial frequency response curve of the passband frequency band corresponding to the reference frequency response curve.
The method for determining the bandwidth of the frequency response curve is described in the following by means of several embodiments. The method is implemented by computer equipment.
In some embodiments, the frequency response correction method further includes determining a first frequency and a second frequency corresponding to the center frequency, the first frequency being a frequency point corresponding to half of an amplitude value of the center frequency in a decreasing frequency direction, the second frequency being a frequency point corresponding to half of an amplitude value of the center frequency in an increasing frequency direction, calculating a first frequency bandwidth between the center frequency and the first frequency, and calculating a second frequency bandwidth between the second frequency and the center frequency, and determining a bandwidth of the frequency response curve according to a target frequency bandwidth, the target frequency bandwidth being smaller values of the first frequency bandwidth and the second frequency bandwidth.
Optionally, the first frequency refers to a lower cut-off frequency, the second frequency refers to an upper cut-off frequency, the first frequency is less than the center frequency, and the second frequency is greater than the center frequency.
In some embodiments, the computer device determines the bandwidth of the frequency response curve from the first frequency and/or the second frequency. Optionally, the computer device determines the difference between the second frequency and the first frequency as the bandwidth of the frequency response curve. In this case, the bandwidth of the frequency response curve w=fh-fl, where fl represents the first frequency and fh represents the second frequency.
Since the frequency response curve to be corrected may not be symmetrical on both sides of the center frequency, in order to improve accuracy of the bandwidth of the determined frequency response curve, the computer device determines the bandwidth of the frequency response curve according to the frequency bandwidth. The computer device illustratively has a difference between the center frequency and the first frequency as a first frequency bandwidth, a difference between the second frequency and the center frequency as a second frequency bandwidth, the computer device determines a bandwidth of the frequency response curve based on the first frequency bandwidth and the second frequency bandwidth.
Optionally, the computer device selects a target frequency bandwidth from the first frequency bandwidth and the second frequency bandwidth, and calculates the bandwidth of the frequency response curve according to the target frequency. The computer device determines the target frequency bandwidth from a smaller value of the first frequency bandwidth and the second frequency bandwidth, and the computer device determines twice the target frequency bandwidth as the bandwidth of the frequency response curve.
In this case, the bandwidth of the frequency response curve is calculated by the formula w=2×min (fh-fc,fc-fl), where w represents the bandwidth of the frequency response curve, min (fh-fc,fc-fl) represents a smaller value determined from fh-fc,fc-fl, fl represents a first frequency, fh represents a second frequency, and fc represents a center frequency.
The smaller frequency bandwidth of the cut-off frequency and the center frequency is selected as the target bandwidth, so that the frequency band width corresponding to the determined frequency response curve bandwidth is facilitated, and the influence of other frequency bands except the passband frequency band of the center frequency in the frequency response curve to be corrected of the equalizer parameter is facilitated to be reduced. This approach helps to reduce repetitive correction for certain passband bands and helps to speed up the efficiency of frequency response correction.
The following describes, by way of an example, a process of determining parameters of an equalizer corresponding to a target frequency point. The execution main body of the embodiment is a computer device, and the embodiment mainly includes the following steps:
And step A10, acquiring first frequency response data. Optionally, the computer device obtains first frequency response data recorded by the sound system in the process of playing the test audio through the radio device. The radio reception device transmits the first frequency response data to the computer device via a wired or wireless network. The type of the first frequency response data may be a PCM file.
Optionally, after the frequency response correction is started, the computer device also needs to acquire second frequency response data. The second frequency response data may be user-defined or preset. For example, the second frequency response data is used to characterize a smooth frequency response curve. The second frequency response data may be of the same type as the first frequency response data or of a different type from the first frequency response data.
For example, in the case that the type of the second frequency response data is a PCM file, the computer device needs to perform spectrum extraction processing on the second frequency response data to obtain second spectrum data. The processing method in this step is similar to the first spectrum data acquisition method, and will not be described here.
For example, in case the second spectral data is preset, the second spectral data may be stored in the computer device to reduce unnecessary computation.
And step A20, carrying out Fourier transform on the first frequency response data to obtain initial frequency spectrum data.
Optionally, the computer device performs a fast fourier transform on the first frequency response data based on the kissfft open source program to obtain the initial spectrum data. The initial frequency spectrum data comprises at least one frequency point and amplitude values corresponding to the frequency points respectively.
And step A30, performing smoothing processing on the initial spectrum data to obtain gentle spectrum data.
And step A40, carrying out interpolation processing on the gentle spectrum data based on the second spectrum data to obtain the first spectrum data.
It should be noted that, the step a30 and the step a40 are optional execution steps. For example, after the computer device performs step a20, the initial spectrum data may be directly taken as the first spectrum data. For another example, in the case where the number of points of the initial spectrum data and the second spectrum data is the same, the computer device may not perform step a40. I.e. the flat spectral data determined in step a30 is taken as first spectral data.
For another example, the computer device may not perform step a30. That is, after step a20 is performed, step a40 is directly performed, and interpolation processing is performed on the initial spectrum data based on the second spectrum data, to obtain the first spectrum data.
Alternatively, the execution order between the step a30 and the step a40 may be exchanged, and the present application is not limited to the execution order of the step a30 and the step a 40.
And step A50, calculating the difference value between the first amplitude value of the frequency point and the second amplitude value of the frequency point for each frequency point in the n frequency points to obtain the amplitude difference of the frequency point, and determining the target frequency point from the n frequency points according to the amplitude difference of the n frequency points.
Optionally, the n frequency points refer to all frequency points included in the first spectrum data, or the computer device selects n frequency points from m frequency points included in the first spectrum data.
Illustratively, the amplitude difference of the frequency bins is equal to the first amplitude value minus the second amplitude value.
And step A60, determining the center frequency according to the target frequency point, and determining the gain according to the amplitude difference of the target frequency point. The computer device determines the target frequency point as a center frequency, and the amplitude difference of the target frequency point as a gain amount.
Step A70, determining a first frequency and a second frequency corresponding to the center frequency, calculating a first frequency bandwidth between the center frequency and the first frequency, calculating a second frequency bandwidth between the second frequency and the center frequency, and determining the bandwidth of the frequency response curve according to the target frequency bandwidth.
Alternatively, the bandwidth calculation formula of the frequency response curve is w=2×min (fh-fc,fc-fl). For the explanation of each parameter in the formula, please refer to the above embodiment, and the description is omitted here.
Step A80, determining the quality factor according to the center frequency and the bandwidth of the frequency response curve.
Alternatively, the figure of merit is calculated by q=fc/w, where q represents the figure of merit, fc represents the center frequency, and w represents the bandwidth of the frequency response curve.
The embodiment of the application can automatically determine the parameters of the equalizer, even users who do not know tuning can quickly correct the frequency response curve of the sound system, greatly reduce the labor cost and the debugging period, and is beneficial to improving the production efficiency.
Fig. 4 is a schematic diagram of a frequency response correction method according to another embodiment of the application. By way of example, the subject of execution of the method may be the computer device 10 in the implementation environment of the scheme shown in fig. 1. As shown in fig. 4, the method may include at least one of the following steps (310-370):
in step 310, first frequency response data is obtained, where the first frequency response data is used to characterize a frequency response curve to be corrected.
Step 320, performing time-frequency conversion on the first frequency response data to obtain first frequency spectrum data.
Step 330, determining parameters of the equalizer according to the first spectrum data and the second spectrum data.
For details of steps 310, 320 and 330, please refer to the above embodiments, and the details are not described here. In the case of a large difference between the source frequency response curve and the reference frequency response curve, equalizer parameters corresponding to the frequency bands respectively need to be determined so that the corrected frequency response curve can approach the reference frequency response curve in each frequency band. In one possible embodiment, this is achieved by performing at least steps 320 and 330 in a loop.
The execution and stop conditions of the cyclic process are described in the following by several examples.
Step 340, generating third frequency response data according to the parameters of the equalizer, wherein the third frequency response data is used for reflecting the frequency response curve of the equalizer.
In some embodiments, the third frequency response data is generated by a computer device based on a simulation of parameters of the equalizer. Compared with directly acting the parameters of the equalizer on the equalizer in the sound system, re-recording and acquiring updated first audio data, the frequency response curve of the equalizer is simulated in the computer equipment, so that the efficiency of frequency response correction is improved.
Optionally, the frequency response curve of the equalizer is used to adjust the frequency response curve to be corrected. The third frequency response data refers to data for characterizing a frequency response curve of the equalizer, and as can be seen from the above, the type of the third frequency response data includes at least one of a spectrum TXT file, a PCM file, and the like.
For the generation process of generating the third frequency response data, please refer to the following embodiments.
And 350, superposing the third frequency response data and the first frequency response data to generate updated first frequency response data.
Since the third frequency response data is used for characterizing the frequency response curve of the equalizer, and the first frequency response data is used for characterizing the frequency response curve to be corrected, step 350 is used for adding the frequency response curve to be corrected and the frequency response curve of the equalizer, so as to obtain the updated frequency response curve to be corrected.
The computer device superimposes the third frequency response data and the first frequency response data to generate updated first frequency response data, wherein the computer device acquires a first sub-frequency response curve of any frequency band from the first frequency response data, acquires a second sub-frequency response curve of the frequency band from the third frequency response data, and superimposes the first sub-frequency response curve and the second sub-frequency response curve in the loudness direction to obtain an updated sub-frequency response curve of the frequency band. And splicing the sub-frequency response curves according to the frequency direction to obtain an updated frequency response curve to be corrected, namely obtaining updated first frequency response data.
That is, in this step, the computer device superimposes the frequency response curve of the equalizer and the frequency response curve to be corrected, resulting in an updated frequency response curve to be corrected.
Step 360, determining updated first frequency spectrum data according to the updated first frequency spectrum data.
This step is similar to step 320, and please refer to the above embodiment, and detailed description is omitted here.
And step 370, in the case that the amplitude difference between the updated first spectrum data and the second spectrum data satisfies the correction condition, the step of determining the parameters of the equalizer according to the first spectrum data and the second spectrum data is performed again with the updated first spectrum data as the first spectrum data.
The correction condition is used to determine whether to continue the frequency response correction process. Optionally, the correction condition is related to a difference between the updated first spectral data and the second spectral data.
The updated first spectrum data and the second spectrum data each include n frequency points and n frequency points corresponding to amplitude values respectively, and the correction condition is that at least one frequency point to be corrected exists in the n frequency points, and an absolute value of a difference between the first amplitude value and the second amplitude value corresponding to the frequency point to be corrected is greater than or equal to a correction error. For the correction error, the first amplitude value and the second amplitude value, please refer to the above embodiments, and the description thereof is omitted.
After determining the updated first spectral data, the computer device determines parameters of the equalizer based on the updated first spectral data and the second spectral data. Optionally, the equalizer parameters determined in step 330 and step 370 are used to gain different frequency bands.
In some embodiments, the computer device again performs the step of determining parameters of the equalizer based on the first spectral data and the second spectral data, including, for each of the n frequency bins, calculating a difference between a first amplitude value of the frequency bin and a second amplitude value of the frequency bin, resulting in an amplitude difference of the frequency bin, and determining a target frequency bin from the n frequency bins based on the amplitude differences of the n frequency bins. For the specific process of this step, please refer to the above embodiment, and a detailed description is omitted here.
And determining parameters of the equalizer according to the target frequency point. Alternatively, in the case where the target frequency point is not included in the n frequency points, it is indicated that the frequency response correction is not necessary. That is, the current cyclic process has not satisfied the correction condition. In this case, the equalizer parameters determined according to the target frequency point in each cycle completed by the computer device are summarized to obtain the parameters of the total equalizer. The computer device transmits the parameters of the total equalizer to the equalizer, so that the equalizer generates a gain curve of the equalizer according to the parameters of the total equalizer before the parameters are played by the playing device, the frequency response curve of the sound system is changed, and the effect of improving the tone of the sound system is obtained.
Next, description will be made of a method for generating third frequency response data by several embodiments, and an execution subject of this embodiment is a computer device.
In some embodiments, the equalizer parameters include a center frequency, which refers to the frequency center point to be corrected, a gain amount, which refers to the amplitude variation at the center frequency after frequency response correction, and a quality factor, which characterizes the bandwidth of the impact of the gain amount on the surrounding frequencies of the center frequency. For details of the equalizer parameters, please refer to the above embodiments, and detailed descriptions thereof are omitted herein.
In some embodiments, step 340, generating third frequency response data according to parameters of the equalizer, may include the following sub-steps.
In a sub-step 342, ratio processing is performed according to the center frequency and the sampling frequency, and the first parameter is determined, where the sampling frequency is related to the number of frequency points included in the first spectrum data.
In a substep 344, the first constant is exponentially processed according to the gain to determine the second parameter.
In a substep 346, a ratio process is performed based on the first parameter and the figure of merit to determine a third parameter.
In a substep 348, third frequency response data is generated based on the first parameter, the second parameter, and the third parameter.
Optionally, the first parameter has a positive correlation with the center frequency, and the first parameter has a negative correlation with the sampling frequency. The first parameter is calculated by the following formula w0=2.0 pi×fc/fs, where W0 represents the first parameter, fc represents the center frequency, and fs represents the sampling frequency.
Optionally, the second parameter has a positive correlation with the gain amount. The second parameter is illustratively calculated by the formula a=pow (10.0, gain/40.0), where a represents the second parameter, gain represents the gain amount, pow (10.0, gain/40.0) represents gain/40.0 to the power of 10.
Optionally, the third parameter has a positive correlation with the first parameter, and the third parameter has a negative correlation with the quality factor. Illustratively, the first parameter is calculated by the formula alpha=sin (w 0)/(2.0×q), where alpha represents the third parameter, w0 represents the first parameter, and q represents the figure of merit.
In some embodiments, sub-step 348 generates third frequency response data based on the first parameter, the second parameter, and the third parameter, including the computer device generating filter coefficients of the equalizer based on the first parameter, the second parameter, and the third parameter, the filter coefficients being used to control a filter in the equalizer to affect a frequency response curve to be corrected, and the computer device performing frequency response processing based on the filter coefficients to obtain the third frequency response data.
In some embodiments, the equalizer includes a plurality of filters, different filters being used to gain the frequency response curves for different frequency bands. That is, during the actual operation of the equalizer, the filter in the equalizer generates the frequency response curves of the equalizer corresponding to different frequency bands, so as to gain the source frequency response curve of the playback device, thereby changing the audio playback effect of the sound system.
Exemplary types of filters include, but are not limited to, at least one of FIR (Finite Impulse Respond, finite Impulse response) digital filters, IIR (Infinite Impulse Response ) filters, and the like. The type of filter included in the equalizer is related to the actual situation of the sound system, and the present application is not limited herein.
The method of generating the third frequency response data from the parametric simulation of the equalizer is not exactly the same for different types of filters. Next, a method of generating third frequency response data will be described taking as an example an IIR digital filter as an example a filter included in the equalizer.
Optionally, the filter coefficients include a first filter coefficient, a second filter coefficient, a third filter coefficient, a fourth filter coefficient, a fifth filter coefficient, and a sixth filter coefficient.
The first filter coefficient and the first parameter are in positive correlation and negative correlation, the second filter coefficient and the first parameter are in positive correlation and positive correlation, the fifth filter coefficient and the first parameter are in negative correlation and positive correlation, and the sixth filter coefficient and the first parameter are in negative correlation and negative correlation.
The first filter coefficient is illustratively calculated by the following formula a0=1.0+alpha/A, where a0 represents the first filter coefficient, alpha represents the first parameter, and A represents the second parameter.
The calculation formula of the second filter coefficient is shown in the following example, b0=1.0+alpha×a, where b0 represents the second filter coefficient, and other parameters are referred to in the above embodiment.
The third filter coefficient is calculated by a formula of a1= -2.0 x cos (w 0), where a1 represents the third filter coefficient and w0 represents the third parameter.
For example, the fourth filter coefficient is calculated by the following formula b1= -2.0 x cos (w 0), wherein b1 represents the fourth filter coefficient, and other parameters are referred to in the above embodiments.
The calculation formula of the fifth filter coefficient is shown as follows, wherein a2=1.0-alpha/A, a2 represents the fifth filter coefficient, and other parameters are referred to in the above embodiments.
The sixth filter coefficient is calculated by the following formula b2=1.0-alpha, wherein b2 represents the sixth filter coefficient, and other parameters are described in the above embodiments.
Optionally, the transfer function of the filter is calculated by the first filter coefficient, the second filter coefficient, the third filter coefficient, the fourth filter coefficient, the fifth filter coefficient and the sixth filter coefficient. Illustratively, the transfer function H (z) of the filter is calculated as follows:
optionally, the computer device generates the third frequency response data according to a transfer function of the filter.
For example, the computer device generates third frequency response data with reference to the freqz functions of matlab.
Fig. 5 shows a schematic diagram of a frequency response correction procedure provided by an exemplary embodiment of the present application. The frequency response correction process is described below by way of one example in connection with fig. 5. The execution subject of this example is a computer device, and this example may include the following steps.
And step B10, acquiring correction parameters, wherein the correction parameters comprise various parameters required to be used in the correction process. Optionally, the correction parameters include, but are not limited to, at least one of correction errors, number of equalizer segments in the sound system to be corrected, frequency interval to be corrected, reference level. The number of segments of the equalizer is used for characterizing which frequency bands the equalizer can gain, and the interval to be corrected is used for indicating frequency response curves of the sound system to be corrected on which frequency bands. The interval to be corrected may be, for example, 150-5000kHz.
And step B20-a, acquiring first frequency response data. The computer device illustratively imports the first frequency response data from outside. For the description of the first frequency response data, please refer to the above embodiment, and the description is omitted herein.
And step B20-B, obtaining second frequency response data. The present application is not limited to the execution sequence of the steps B20-a and B20-B.
And step B30-a, determining first frequency spectrum data according to the first frequency response data. Optionally, the computer device reads the first spectrum data from the first spectrum data when the first spectrum data is the spectrum TXT, and performs operations such as fast fourier transform on the PCM file when the first spectrum data is the PCM file to obtain the first spectrum data. Please refer to the above embodiments for specific details.
And step B30-B, determining second frequency spectrum data according to the second frequency response data. The method for determining the second spectrum data is similar to the method for determining the first spectrum data, and will not be described here.
And B40, the first frequency spectrum data comprise n frequency points and a first amplitude value of each frequency point, the second frequency spectrum data comprise n frequency points and a second amplitude value of each frequency point, and for each frequency point in the n frequency points, a difference value between the first amplitude value of the frequency point and the second amplitude value of the frequency point is calculated to obtain an amplitude difference of the frequency point.
And step B50, determining a target frequency point from the n frequency points according to the amplitude differences of the n frequency points, wherein the target frequency point refers to the frequency point with the amplitude difference larger than or equal to the correction error. Alternatively, this step may be understood as selecting the amplitude difference having the largest absolute value from among the amplitude differences of the n frequency points, and determining the amplitude difference as the target amplitude difference. The frequency point corresponding to the target amplitude difference is the target frequency point.
And step B60, determining parameters of the equalizer according to the target frequency point. For details of this step, please refer to the above embodiments, and detailed descriptions thereof are omitted herein.
And step B70, generating third frequency response data according to the parameters of the equalizer, wherein the third frequency response data is used for reflecting the frequency response curve of the equalizer.
And step B80, overlapping the third frequency response data and the first frequency response data to generate updated first frequency response data.
And step B90, when the amplitude difference between the updated first spectrum data and the second spectrum data meets the correction condition, taking the updated first spectrum data as the first spectrum data, and executing the step of determining the parameters of the equalizer according to the first spectrum data and the second spectrum data again.
Optionally, after generating the updated first spectrum data, the computer device recalculates the amplitude differences of the n frequency bins and selects the amplitude difference with the largest absolute value from the amplitude differences of the n frequency bins. If the absolute value of the selected amplitude difference is greater than or equal to the correction error, the frequency point corresponding to the selected amplitude difference is determined as the target frequency point, and then the computer device performs step B60 to determine the equalizer parameters related to the target frequency point. The parameters of the equalizer related to the target frequency point are used for gain in the frequency band where the target frequency point is located in the frequency response curve to be corrected.
If the absolute value of the selected amplitude difference is less than the correction error, the frequency response correction process ends. The computer device uses the determined equalizer parameters as the overall equalizer parameters in the process of executing step B60-step B90, and transmits the equalizer parameters to the sound system.
The embodiment of the application automatically realizes the frequency response correction, greatly reduces the labor cost and the debugging period required in the frequency response correction process, and is beneficial to improving the production efficiency.
Fig. 6 shows a block diagram of a frequency response correction apparatus provided by an exemplary embodiment of the present application. The apparatus may be implemented as all or part of a computer device by software, hardware, or a combination of both. The apparatus 600 may include a data acquisition module 610, a spectrum determination module 620, and a parameter determination module 630.
The data acquisition module 610 is configured to acquire first frequency response data, where the first frequency response data is used to characterize a frequency response curve to be corrected, and the frequency response curve is used to reflect a trend of loudness along with frequency variation.
The spectrum determining module 620 is configured to determine first spectrum data according to the first frequency response data, where the first spectrum data is used to reflect an attribute of the frequency response curve to be corrected in a frequency direction.
A parameter determining module 630, configured to determine parameters of an equalizer according to the first spectrum data and second spectrum data, where the second spectrum data is determined according to second frequency response data, the second frequency response data is used to characterize a reference frequency response curve used for frequency response correction, and the equalizer is configured to control the frequency response curve to be corrected to approach the reference frequency response curve based on the parameters.
In some embodiments, the first spectrum data comprises n frequency points and a first amplitude value of each frequency point, the second spectrum data comprises n frequency points and a second amplitude value of each frequency point, n is a positive integer, the parameter determining module 630 comprises an amplitude difference calculating unit, a parameter determining unit and a parameter determining unit, wherein the amplitude difference calculating unit is used for calculating a difference value between the first amplitude value of each frequency point and the second amplitude value of each frequency point to obtain the amplitude difference of the frequency point, the frequency point meter determining unit is used for determining a target frequency point from the n frequency points according to the amplitude difference of the n frequency points, and the target frequency point is a frequency point with the amplitude difference being larger than or equal to a correction error, and the parameter determining unit is used for determining the parameter of the equalizer according to the target frequency point.
In some embodiments, the parameters of the equalizer comprise a center frequency, a gain amount and a quality factor, wherein the center frequency refers to a frequency center point to be corrected, the gain amount refers to amplitude variation at the center frequency after frequency response correction, the quality factor is used for representing the influence bandwidth of the gain amount on surrounding frequencies of the center frequency, the parameter determining unit is used for determining the center frequency according to the target frequency point, the gain amount is determined according to the amplitude difference of the target frequency point, the quality factor is determined according to the center frequency and the bandwidth of the frequency response curve, the bandwidth of the frequency response curve is used for representing the frequency span in which the amplitude value of the center frequency is attenuated to be half.
In some embodiments, the figure of merit is positively correlated with the center frequency and the figure of merit is negatively correlated with the bandwidth of the frequency response curve.
In some embodiments, the apparatus 600 further comprises a bandwidth determining module configured to determine a first frequency and a second frequency corresponding to the center frequency, the first frequency being a frequency bin corresponding to half of an amplitude value of the center frequency in a decreasing frequency direction, the second frequency being a frequency bin corresponding to half of an amplitude value of the center frequency in an increasing frequency direction, calculate a first frequency bandwidth between the center frequency and the first frequency, and calculate a second frequency bandwidth between the second frequency and the center frequency, and determine a bandwidth of the frequency response curve according to a target frequency bandwidth, the target frequency bandwidth being a smaller value of the first frequency bandwidth and the second frequency bandwidth.
In some embodiments, the device further comprises a frequency response generating module, a data superposition module, a spectrum updating module and a circulation executing module, wherein the frequency response generating module is used for generating third frequency response data according to parameters of the equalizer, the third frequency response data is used for reflecting a frequency response curve of the equalizer, the data superposition module is used for superposing the third frequency response data and the first frequency response data to generate updated first frequency response data, the spectrum updating module is used for determining the updated first frequency response data according to the updated first frequency response data, and the circulation executing module is used for executing the steps of determining parameters of the equalizer according to the first frequency response data and the second frequency response data again by taking the updated first frequency response data as the first frequency response data under the condition that an amplitude difference between the updated first frequency response data and the second frequency response data meets a correction condition.
In some embodiments, the equalizer comprises a center frequency, a gain amount and a quality factor, wherein the center frequency refers to a frequency center point to be corrected, the gain amount refers to amplitude change at the center frequency after frequency response correction, the quality factor is used for representing influence bandwidth of the gain amount on surrounding frequencies of the center frequency, the frequency response generation module comprises a parameter determination unit used for carrying out ratio processing according to the center frequency and a sampling frequency, determining a first parameter, wherein the sampling frequency is related to frequency points included in the first frequency spectrum data, carrying out exponential processing according to the gain amount, determining a second parameter, carrying out ratio processing according to the first parameter and the quality factor, and determining a third parameter, and the data calculation unit is used for generating the third frequency response data according to the first parameter, the second parameter and the third parameter.
In some embodiments, the data calculation unit is configured to generate a filter coefficient of the equalizer according to the first parameter, the second parameter, and the third parameter, where the filter coefficient is used to control a filter in the equalizer to affect the frequency response curve to be corrected, and perform frequency response processing based on the filter coefficient to obtain the third frequency response data.
In some embodiments, the spectrum generating module 620 is configured to perform fourier transform on the first frequency response data to determine initial spectrum data, perform smoothing on the initial spectrum data to determine flat spectrum data, and perform interpolation on the flat spectrum data based on the second spectrum data to determine the first spectrum data.
It should be noted that, in the apparatus provided in the foregoing embodiment, when implementing the functions thereof, only the division of the foregoing functional modules is used as an example, in practical application, the foregoing functional allocation may be implemented by different functional modules, that is, the content structure of the device is divided into different functional modules, so as to implement all or part of the functions described above. In addition, the embodiments of the apparatus and the method provided in the foregoing embodiments belong to the same concept, and the specific implementation process is detailed in the method-side embodiment, which is not described herein again. The beneficial effects of the device provided in the foregoing embodiments are described with reference to the method side embodiments, and are not repeated herein.
Fig. 7 shows a block diagram of a computer device according to an exemplary embodiment of the present application.
In general, computer device 700 includes a processor 701 and a memory 702.
Processor 701 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and the like. The processor 701 may be implemented in at least one hardware form of DSP (DIGITAL SIGNAL Processing), FPGA (Field Programmable GATE ARRAY ), PLA (Programmable Logic Array, programmable logic array). The processor 701 may also include a main processor, which is a processor for processing data in a wake-up state, also referred to as a CPU (Central Processing Unit ), and a coprocessor, which is a low-power processor for processing data in a standby state. In some embodiments, the processor 701 may integrate a GPU (Graphics Processing Unit, image processor) for rendering and drawing of content required to be displayed by the display screen. In some embodiments, the processor 701 may also include an AI (ARTIFICIAL INTELLIGENCE ) processor for processing computing operations related to machine learning.
Memory 702 may include one or more computer-readable storage media, which may be tangible and non-transitory. The memory 702 may also include high-speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In some embodiments, a non-transitory computer readable storage medium in memory 702 stores a computer program that is loaded and executed by processor 701 to implement the frequency response correction method provided by the method embodiments described above.
The embodiment of the application also provides a computer readable storage medium, and the storage medium stores a computer program, and the computer program is loaded and executed by a processor to realize the frequency response correction method provided by each method embodiment or realize the training method of the frequency response correction model provided by each method embodiment.
The computer readable medium may include computer storage media and communication media. Computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. Computer storage media includes RAM (Random Access Memory ), ROM (Read-Only Memory), EPROM (Erasable Programmable Read-Only Memory), EEPROM (ELECTRICALLY ERASABLE PROGRAMMABLE READ-Only Memory), flash Memory or other solid state Memory technology, CD-ROM, DVD (Digital Video Disc, high density digital video disc) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices. Of course, those skilled in the art will recognize that the computer storage medium is not limited to the ones described above.
Embodiments of the present application also provide a computer program product, where the computer program product includes computer instructions stored in a computer readable storage medium, and a processor reads and executes the computer instructions from the computer readable storage medium to implement the frequency response correction method provided in the foregoing method embodiments.
It should be understood that references herein to "a plurality" are to two or more. "and/or" describes an association relationship of an association object, and indicates that there may be three relationships, for example, a and/or B, and may indicate that there are three cases of a alone, a and B together, and B alone. The character "/" generally indicates that the context-dependent object is an "or" relationship.
The foregoing description of the preferred embodiments of the application is not intended to limit the application to the precise form disclosed, and any such modifications, equivalents, and alternatives falling within the spirit and principles of the application are intended to be included within the scope of the application.

Claims (12)

Translated fromChinese
1.一种频响校正方法,其特征在于,所述方法包括:1. A frequency response correction method, characterized in that the method comprises:获取第一频响数据,所述第一频响数据用于表征待校正的频响曲线,所述频响曲线用于反映响度随着频率变化的趋势;Acquiring first frequency response data, where the first frequency response data is used to represent a frequency response curve to be corrected, where the frequency response curve is used to reflect a trend of loudness changing with frequency;根据所述第一频响数据,确定第一频谱数据,所述第一频谱数据用于反映所述待校正的频响曲线在频率方向的属性;determining first spectrum data according to the first frequency response data, where the first spectrum data is used to reflect the properties of the frequency response curve to be corrected in the frequency direction;根据所述第一频谱数据和第二频谱数据,确定均衡器的参数,所述第二频谱数据是根据第二频响数据确定的,所述第二频响数据用于表征频响校正所用的参考频响曲线,所述均衡器用于基于所述参数控制所述待校正的频响曲线接近所述参考频响曲线;determining parameters of an equalizer based on the first spectrum data and second spectrum data, wherein the second spectrum data is determined based on second frequency response data, the second frequency response data being used to represent a reference frequency response curve used for frequency response correction, and the equalizer being used to control the frequency response curve to be corrected to approach the reference frequency response curve based on the parameters;其中,所述第一频谱数据包括n个频点和每一个所述频点的第一幅度值,所述第二频谱数据包括所述n个频点和每一个所述频点的第二幅度值,n为正整数;The first spectrum data includes n frequency points and a first amplitude value of each frequency point, and the second spectrum data includes the n frequency points and a second amplitude value of each frequency point, where n is a positive integer;所述根据所述第一频谱数据和第二频谱数据,确定均衡器的参数,包括:Determining parameters of an equalizer according to the first spectrum data and the second spectrum data includes:对于所述n个频点中的每一个频点,计算所述频点的第一幅度值和所述频点的第二幅度值之间的差值,得到所述频点的幅度差;For each of the n frequency points, calculating a difference between a first amplitude value of the frequency point and a second amplitude value of the frequency point to obtain an amplitude difference of the frequency point;根据所述n个频点的幅度差,从所述n个频点中确定目标频点,所述目标频点是指幅度差大于或者等于校正误差的频点;Determining a target frequency point from the n frequency points based on the amplitude difference of the n frequency points, wherein the target frequency point refers to a frequency point whose amplitude difference is greater than or equal to the correction error;根据所述目标频点,确定所述均衡器的参数。Determine the parameters of the equalizer according to the target frequency.2.根据权利要求1所述的方法,其特征在于,所述均衡器的参数包括:中心频率、增益量和品质因数,所述中心频率是指待校正的频率中心点,所述增益量是指频响校正后所述中心频率处的幅度变化,所述品质因数用于表征所述增益量对所述中心频率的周围频率的影响带宽;2. The method according to claim 1, wherein the parameters of the equalizer include: center frequency, gain, and quality factor, wherein the center frequency refers to the center point of the frequency to be corrected, the gain refers to the amplitude change at the center frequency after frequency response correction, and the quality factor is used to characterize the bandwidth of the gain's influence on frequencies surrounding the center frequency;所述根据所述目标频点,确定所述均衡器的参数,包括:The determining the parameters of the equalizer according to the target frequency point includes:根据所述目标频点,确定所述中心频率;Determining the center frequency according to the target frequency point;根据所述目标频点的幅度差,确定所述增益量;Determining the gain according to the amplitude difference of the target frequency point;根据所述中心频率和所述频响曲线的带宽,确定所述品质因数,所述频响曲线的带宽用于表征在所述待校正的频响曲线中,所述中心频率的幅度值衰减为一半的频率跨度。The quality factor is determined according to the center frequency and a bandwidth of the frequency response curve. The bandwidth of the frequency response curve is used to represent a frequency span in which the amplitude value of the center frequency is attenuated to half in the frequency response curve to be corrected.3.根据权利要求2所述的方法,其特征在于,所述品质因数与所述中心频率呈正相关关系,所述品质因数与所述频响曲线的带宽呈负相关关系。3. The method according to claim 2, wherein the quality factor is positively correlated with the center frequency, and the quality factor is negatively correlated with the bandwidth of the frequency response curve.4.根据权利要求2所述的方法,其特征在于,所述方法还包括:4. The method according to claim 2, further comprising:确定所述中心频率对应的第一频率和第二频率,所述第一频率是指在频率递减方向对应于所述中心频率的幅度值的一半的频点,所述第二频率是指在频率递增方向对应于所述中心频率的幅度值的一半的频点;Determine a first frequency and a second frequency corresponding to the center frequency, wherein the first frequency refers to a frequency point corresponding to half of the amplitude value of the center frequency in a decreasing frequency direction, and the second frequency refers to a frequency point corresponding to half of the amplitude value of the center frequency in an increasing frequency direction;计算所述中心频率与所述第一频率之间的第一频率带宽,以及,计算所述第二频率与所述中心频率之间的第二频率带宽;calculating a first frequency bandwidth between the center frequency and the first frequency, and calculating a second frequency bandwidth between the second frequency and the center frequency;根据目标频率带宽,确定所述频响曲线的带宽,所述目标频率带宽是所述第一频率带宽和所述第二频率带宽之中的较小值。The bandwidth of the frequency response curve is determined according to a target frequency bandwidth, where the target frequency bandwidth is a smaller value between the first frequency bandwidth and the second frequency bandwidth.5.根据权利要求1所述的方法,其特征在于,所述根据所述第一频谱数据和第二频谱数据,确定均衡器的参数之后,还包括:5. The method according to claim 1, characterized in that after determining the parameters of the equalizer based on the first spectrum data and the second spectrum data, the method further comprises:根据所述均衡器的参数,生成第三频响数据,所述第三频响数据用于反映所述均衡器的频响曲线;generating third frequency response data according to the parameters of the equalizer, wherein the third frequency response data is used to reflect the frequency response curve of the equalizer;将所述第三频响数据和所述第一频响数据进行叠加,生成更新后的第一频响数据;superimposing the third frequency response data and the first frequency response data to generate updated first frequency response data;根据所述更新后的第一频响数据,确定更新后的第一频谱数据;determining updated first spectrum data according to the updated first frequency response data;在所述更新后的第一频谱数据和所述第二频谱数据之间的幅度差满足校正条件的情况下,将所述更新后的第一频谱数据作为所述第一频谱数据,再次执行所述根据所述第一频谱数据和第二频谱数据,确定均衡器的参数的步骤。When the amplitude difference between the updated first spectrum data and the second spectrum data meets the correction condition, the updated first spectrum data is used as the first spectrum data, and the step of determining the parameters of the equalizer based on the first spectrum data and the second spectrum data is performed again.6.根据权利要求5所述的方法,其特征在于,所述均衡器的参数包括:中心频率、增益量和品质因数,所述中心频率是指待校正的频率中心点,所述增益量是指频响校正后所述中心频率处的幅度变化,所述品质因数用于表征所述增益量对所述中心频率的周围频率的影响带宽;6. The method according to claim 5, wherein the parameters of the equalizer include: center frequency, gain, and quality factor, wherein the center frequency refers to the center point of the frequency to be corrected, the gain refers to the amplitude change at the center frequency after frequency response correction, and the quality factor is used to characterize the bandwidth of the gain's influence on frequencies surrounding the center frequency;所述根据所述均衡器的参数,生成第三频响数据,包括:Generating third frequency response data according to the parameters of the equalizer includes:根据所述中心频率和采样频率进行比值处理,确定第一参数,所述采样频率与所述第一频谱数据中包括的频点数有关;performing ratio processing on the center frequency and the sampling frequency to determine a first parameter, wherein the sampling frequency is related to the number of frequency points included in the first spectrum data;根据所述增益量对第一常量进行指数处理,确定第二参数;Performing exponential processing on the first constant according to the gain to determine a second parameter;根据所述第一参数和所述品质因数进行比值处理,确定第三参数;performing ratio processing on the first parameter and the quality factor to determine a third parameter;根据所述第一参数、所述第二参数和所述第三参数,生成所述第三频响数据。The third frequency response data is generated according to the first parameter, the second parameter, and the third parameter.7.根据权利要求6所述的方法,其特征在于,所述根据所述第一参数、所述第二参数和所述第三参数,生成所述第三频响数据,包括:7. The method according to claim 6, wherein generating the third frequency response data according to the first parameter, the second parameter, and the third parameter comprises:根据所述第一参数、所述第二参数和所述第三参数,生成所述均衡器的滤波器系数,所述滤波器系数用于控制所述均衡器中的滤波器影响所述待校正的频响曲线;generating filter coefficients of the equalizer according to the first parameter, the second parameter, and the third parameter, wherein the filter coefficients are used to control the filter in the equalizer to affect the frequency response curve to be corrected;基于所述滤波器系数进行频响处理,得到所述第三频响数据。Frequency response processing is performed based on the filter coefficient to obtain the third frequency response data.8.根据权利要求1所述的方法,其特征在于,所述根据所述第一频响数据,确定第一频谱数据,包括:8. The method according to claim 1, wherein determining first spectrum data based on the first frequency response data comprises:对所述第一频响数据进行傅里叶变换,确定初始频谱数据;Performing Fourier transform on the first frequency response data to determine initial spectrum data;对所述初始频谱数据进行平滑处理,确定平缓频谱数据;performing smoothing processing on the initial spectrum data to determine smooth spectrum data;基于所述第二频谱数据,对所述平缓频谱数据进行插值处理,确定所述第一频谱数据。Based on the second spectrum data, the flat spectrum data is interpolated to determine the first spectrum data.9.一种频响校正装置,其特征在于,所述装置包括:9. A frequency response correction device, characterized in that the device comprises:数据获取模块,用于获取第一频响数据,所述第一频响数据用于表征待校正的频响曲线,所述频响曲线用于反映响度随着频率变化的趋势;a data acquisition module, configured to acquire first frequency response data, wherein the first frequency response data is used to represent a frequency response curve to be corrected, wherein the frequency response curve is used to reflect a trend of loudness changing with frequency;频谱确定模块,用于根据所述第一频响数据,确定第一频谱数据,所述第一频谱数据用于反映所述待校正的频响曲线在频率方向的属性;a spectrum determination module, configured to determine first spectrum data based on the first frequency response data, wherein the first spectrum data is used to reflect the properties of the frequency response curve to be corrected in the frequency direction;参数确定模块,用于根据所述第一频谱数据和第二频谱数据,确定均衡器的参数,所述第二频谱数据是根据第二频响数据确定的,所述第二频响数据用于表征频响校正所用的参考频响曲线,所述均衡器用于基于所述参数控制所述待校正的频响曲线接近所述参考频响曲线;其中,所述第一频谱数据包括n个频点和每一个所述频点的第一幅度值,所述第二频谱数据包括所述n个频点和每一个所述频点的第二幅度值,n为正整数;a parameter determination module, configured to determine parameters of an equalizer based on the first spectrum data and second spectrum data, wherein the second spectrum data is determined based on second frequency response data, the second frequency response data being used to represent a reference frequency response curve used for frequency response correction, and the equalizer being configured to control the frequency response curve to be corrected to approach the reference frequency response curve based on the parameters; wherein the first spectrum data includes n frequency points and a first amplitude value for each of the frequency points, and the second spectrum data includes the n frequency points and a second amplitude value for each of the frequency points, where n is a positive integer;所述参数确定模块,用于对于所述n个频点中的每一个频点,计算所述频点的第一幅度值和所述频点的第二幅度值之间的差值,得到所述频点的幅度差;根据所述n个频点的幅度差,从所述n个频点中确定目标频点,所述目标频点是指幅度差大于或者等于校正误差的频点;根据所述目标频点,确定所述均衡器的参数。The parameter determination module is used to calculate, for each of the n frequency points, the difference between the first amplitude value of the frequency point and the second amplitude value of the frequency point to obtain the amplitude difference of the frequency point; determine a target frequency point from the n frequency points based on the amplitude differences of the n frequency points, where the target frequency point refers to a frequency point whose amplitude difference is greater than or equal to the correction error; and determine the parameters of the equalizer based on the target frequency point.10.一种计算机设备,其特征在于,所述计算机设备包括处理器和存储器,所述处理器从所述存储器中加载并执行计算机指令,以实现如权利要求1至8任一项所述的频响校正方法。10. A computer device, characterized in that the computer device comprises a processor and a memory, and the processor loads and executes computer instructions from the memory to implement the frequency response correction method according to any one of claims 1 to 8.11.一种计算机可读存储介质,其特征在于,所述存储介质中存储有计算机指令,所述计算机指令由处理器从所述存储介质中加载并执行,以实现如权利要求1至8任一项所述的频响校正方法。11. A computer-readable storage medium, wherein the storage medium stores computer instructions, and the computer instructions are loaded and executed by a processor from the storage medium to implement the frequency response correction method according to any one of claims 1 to 8.12.一种计算机程序产品,其特征在于,所述计算机程序产品包括计算机指令,所述计算机指令存储在计算机可读存储介质中,所述计算机指令由处理器从所述计算机可读存储介质加载并执行,以实现如权利要求1至8任一项所述的频响校正方法。12. A computer program product, characterized in that the computer program product comprises computer instructions, wherein the computer instructions are stored in a computer-readable storage medium, and the computer instructions are loaded and executed by a processor from the computer-readable storage medium to implement the frequency response correction method according to any one of claims 1 to 8.
CN202311582368.9A2023-11-232023-11-23 Frequency response correction method, device, equipment and storage mediumActiveCN117979207B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN202311582368.9ACN117979207B (en)2023-11-232023-11-23 Frequency response correction method, device, equipment and storage medium

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN202311582368.9ACN117979207B (en)2023-11-232023-11-23 Frequency response correction method, device, equipment and storage medium

Publications (2)

Publication NumberPublication Date
CN117979207A CN117979207A (en)2024-05-03
CN117979207Btrue CN117979207B (en)2025-09-23

Family

ID=90865142

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN202311582368.9AActiveCN117979207B (en)2023-11-232023-11-23 Frequency response correction method, device, equipment and storage medium

Country Status (1)

CountryLink
CN (1)CN117979207B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN119545226B (en)*2024-11-222025-08-15江门市超频空间电子科技有限公司Automatic debugging method and device for sound system and computer equipment

Citations (2)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN114302301A (en)*2021-12-102022-04-08腾讯科技(深圳)有限公司Frequency response correction method and related product
CN115840182A (en)*2023-02-212023-03-24成都青翎科技有限公司Frequency response curve correction method and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN110191396B (en)*2019-05-242022-05-27腾讯音乐娱乐科技(深圳)有限公司Audio processing method, device, terminal and computer readable storage medium

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN114302301A (en)*2021-12-102022-04-08腾讯科技(深圳)有限公司Frequency response correction method and related product
CN115840182A (en)*2023-02-212023-03-24成都青翎科技有限公司Frequency response curve correction method and device

Also Published As

Publication numberPublication date
CN117979207A (en)2024-05-03

Similar Documents

PublicationPublication DateTitle
JP6880016B2 (en) Audio signal spectrum correction method
RU2658872C2 (en)Equalisation filter coefficient determinator, apparatus, equalisation filter coefficient processor, system and methods
EP2292144A1 (en)An auditory test and compensation method
CN104811155B (en) Method and device for adjusting an equalizer
CN118338175A (en)Bluetooth headset audio intelligent regulation and control method and system based on environmental noise
CN112562624B (en)Active noise reduction filter design method, noise reduction method, system and electronic equipment
JP2009531899A (en) Audio system calibration method and apparatus
CN104426495A (en)Audio Signal Processing Apparatus, Method, And Program
WO2020083575A1 (en)Tuning method, manufacturing method, computer-readable storage medium and tuning system
CN112565981B (en) Howling suppression method, device, hearing aid and storage medium
CN117979207B (en) Frequency response correction method, device, equipment and storage medium
JP2010157852A (en)Sound corrector, sound measurement device, sound reproducer, sound correction method, and sound measurement method
JP2013516826A (en) Determining the configuration of voice processing operations
CN118824302A (en) Audio signal processing method, audio signal processing device and storage medium
CN110475181B (en)Equipment configuration method, device, equipment and storage medium
JP2023062699A (en) Active noise reduction filter generation method, storage medium and headphones
CN115119110A (en) Sound effect adjustment method, audio playback device, and computer-readable storage medium
CN119229900A (en) Universal audio quality analysis method and system
CN117880702A (en)Method for optimizing audio output device parameters, electronic device and storage medium
CN115835112A (en)Projector-based adaptive sound effect debugging method, system, device and platform
WO2020073564A1 (en)Method and apparatus for detecting loudness of audio signal
CN109995941B (en)Data adjusting method, device and storage medium
JP6304643B2 (en) Nonlinear distortion reduction apparatus, method, and program for speaker
CN108932953B (en) A kind of audio equalization function determination method, audio equalization method and device
CN114067817A (en) Bass enhancement method, device, electronic device and storage medium

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
GR01Patent grant
GR01Patent grant

[8]ページ先頭

©2009-2025 Movatter.jp