CN117116245B - Method, device, equipment and storage medium for generating harmonic wave of sound signal - Google Patents

Method, device, equipment and storage medium for generating harmonic wave of sound signal Download PDF

Info

Publication number
CN117116245B
CN117116245B CN202311349617.XA CN202311349617A CN117116245B CN 117116245 B CN117116245 B CN 117116245B CN 202311349617 A CN202311349617 A CN 202311349617A CN 117116245 B CN117116245 B CN 117116245B
Authority
CN
China
Prior art keywords
frequency
point
value
amplitude value
frequency point
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
CN202311349617.XA
Other languages
Chinese (zh)
Other versions
CN117116245A (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.)
Wuhan Haiwei Technology Co ltd
Original Assignee
Wuhan Haiwei 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 Wuhan Haiwei Technology Co ltd filed Critical Wuhan Haiwei Technology Co ltd
Priority to CN202311349617.XA priority Critical patent/CN117116245B/en
Publication of CN117116245A publication Critical patent/CN117116245A/en
Application granted granted Critical
Publication of CN117116245B publication Critical patent/CN117116245B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10KSOUND-PRODUCING DEVICES; METHODS OR DEVICES FOR PROTECTING AGAINST, OR FOR DAMPING, NOISE OR OTHER ACOUSTIC WAVES IN GENERAL; ACOUSTICS NOT OTHERWISE PROVIDED FOR
    • G10K15/00Acoustics not otherwise provided for
    • G10K15/02Synthesis of acoustic waves
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L25/00Speech or voice analysis techniques not restricted to a single one of groups G10L15/00 - G10L21/00
    • G10L25/27Speech or voice analysis techniques not restricted to a single one of groups G10L15/00 - G10L21/00 characterised by the analysis technique
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02EREDUCTION OF GREENHOUSE GAS [GHG] EMISSIONS, RELATED TO ENERGY GENERATION, TRANSMISSION OR DISTRIBUTION
    • Y02E40/00Technologies for an efficient electrical power generation, transmission or distribution
    • Y02E40/40Arrangements for reducing harmonics

Landscapes

  • Engineering & Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Physics & Mathematics (AREA)
  • Acoustics & Sound (AREA)
  • Multimedia (AREA)
  • General Health & Medical Sciences (AREA)
  • Computational Linguistics (AREA)
  • Signal Processing (AREA)
  • Human Computer Interaction (AREA)
  • Tone Control, Compression And Expansion, Limiting Amplitude (AREA)

Abstract

The invention discloses a method, a device, equipment and a storage medium for generating harmonic waves of sound signals, and belongs to the technical field of signal processing and waveform generation. The method comprises the steps of obtaining middle-low frequency components in an input signal, carrying out conversion processing on the middle-low frequency components to obtain phases and amplitudes of all frequency points of the middle-low frequency band, obtaining the amplitudes and frequencies of fundamental frequency points based on the amplitudes of all frequency points of the middle-low frequency band, further obtaining the frequencies of frequency doubling points, adjusting the phases and the amplitudes of the frequency doubling points to obtain an initial harmonic signal, carrying out band-pass filtering on the initial harmonic signal to obtain a target harmonic signal, obtaining a characteristic value in the sound signal, determining relevant frequency points according to the characteristic value, and carrying out processing such as adjustment, filtering and the like on the relevant characteristic value to obtain the target harmonic. Only one sampling is needed, so that the calculated amount is reduced, and the instantaneity is improved. The characteristic values participating in calculation are adjusted, so that harmonic distortion control in harmonic generation is realized, and meanwhile, the real-time performance of harmonic generation is improved.

Description

Method, device, equipment and storage medium for generating harmonic wave of sound signal
Technical Field
The present invention relates to the field of signal processing and waveform synthesis technologies, and in particular, to a method, an apparatus, a device, and a storage medium for generating harmonics of a sound signal.
Background
In the existing common harmonic generation methods of sound signals, the main schemes are two main types, namely, a nonlinear method, wherein the nonlinear method utilizes devices such as an amplifier, a multiplier, an adder and the like to form a hardware circuit to generate multi-order harmonic according to input signals, then the multi-order harmonic is selected through a filter, the second type is a time-frequency analysis method, the time-frequency analysis method utilizes a phase vocoder to generate harmonic, the low-frequency component of the input signals is directly used for calculating the needed target order harmonic through a program, and then the target order harmonic is output.
The nonlinear method is characterized in that the nonlinear method depends on the combination of hardware circuits to receive input signals, when the input signals flow through all components of the hardware circuits, the characteristics of the signals such as waveforms, phases and the like of the input signals can be changed, the target order signals can be obtained by directly receiving the input signals from the output terminals, but the real-time performance is good. In the time-frequency analysis method, the input signal is processed by the phase vocoder to generate harmonics, if multiple harmonics are generated, multiple calculations need to be performed in the processing stage and the synthesis stage and in the subsequent overlap-add and resample processes, which increases the complexity and time overhead of the calculations and is not good in real-time performance. In a comprehensive view, the existing harmonic generation method cannot control harmonic distortion and simultaneously consider the real-time performance of harmonic generation.
Disclosure of Invention
The invention mainly aims to provide a method, equipment, a device and a storage medium for generating harmonic waves of sound signals, and aims to solve the problem that the existing harmonic wave generation method cannot control harmonic wave distortion and simultaneously give consideration to real-time performance of harmonic wave generation.
In order to achieve the above object, the present invention provides a harmonic generation method of a sound signal, the harmonic generation method of a sound signal including:
acquiring middle and low frequency components of a sound signal;
performing transformation processing on the middle-low frequency components to obtain phase values and amplitude values of all frequency points of the middle-low frequency band;
obtaining an amplitude value and a frequency value of a base frequency point based on the amplitude value of each frequency point of the medium-low frequency band;
based on the frequency value of the fundamental frequency point, acquiring the position of a frequency multiplication point on a spectrogram, and further determining the phase value and the amplitude value of the frequency multiplication point;
processing the phase value and the amplitude value of the frequency multiplication point to obtain an initial harmonic signal;
and carrying out band-pass filtering on the initial harmonic signal to obtain a target harmonic signal so as to obtain the target harmonic signal in the sound signal in high real-time.
Optionally, the transforming the low-frequency component to obtain a phase value and an amplitude value of each frequency point of the low-frequency band includes:
Performing Fourier transform processing on the middle-low frequency components to obtain frequency domain expressions corresponding to the middle-low frequency components;
obtaining a spectrogram of the middle-low frequency component based on a frequency domain expression corresponding to the middle-low frequency component;
and obtaining the phase value and the amplitude value of each frequency point of the middle and low frequency band based on the spectrogram of the middle and low frequency components.
Optionally, the obtaining the amplitude value and the frequency value of the base frequency point based on the amplitude value of each frequency point of the middle-low frequency band includes:
the amplitude values of all the frequency points of the middle and low frequency bands are arranged in size to obtain an amplitude value sequence;
taking the maximum amplitude value in the amplitude value sequence as the amplitude value of the fundamental frequency point;
and taking the frequency value of the frequency point corresponding to the maximum amplitude value in the spectrogram as the frequency value of the fundamental frequency point based on the amplitude value of the fundamental frequency point.
Optionally, the processing the phase value and the amplitude value of the frequency multiplication point to obtain an initial harmonic signal includes:
the frequency multiplication point and the amplitude value of the frequency point before and after the frequency multiplication point are replaced by the fundamental frequency point and the amplitude value of the frequency point before and after the fundamental frequency point, and the amplitude value of the frequency multiplication point after adjustment, the amplitude value of the frequency point before adjustment and the amplitude value of the frequency point after adjustment are obtained;
Adjusting the phase value of the frequency point before and after the frequency multiplication point to obtain the adjusted phase value of the previous frequency point and the adjusted phase value of the next frequency point;
obtaining a frequency point data sequence according to the amplitude value of the adjusted frequency multiplication point, the amplitude value of the adjusted previous frequency point and the amplitude value of the adjusted next frequency point, the phase value of the adjusted previous frequency point and the phase value of the adjusted next frequency point;
and carrying out inverse Fourier transform on the frequency point data sequence to obtain an initial harmonic signal.
Optionally, replacing the frequency point amplitude value of the frequency multiplication point with the frequency point amplitude value of the fundamental frequency point;
the amplitude value of the previous frequency point of the frequency doubling point is replaced by the amplitude value of the previous frequency point of the fundamental frequency point;
and replacing the amplitude value of the next frequency point of the frequency multiplication point with the amplitude value of the next frequency point of the fundamental frequency point.
Optionally, the adjusting the phase value of the frequency point before and after the frequency point to obtain the adjusted phase value of the previous frequency point and the adjusted phase value of the next frequency point includes: acquiring a phase value of a frequency multiplication point in a previous frame, a phase value of a frequency multiplication point before the frequency multiplication point and a phase value of a frequency multiplication point after the frequency multiplication point;
acquiring a phase value of a frequency multiplication point in a current frame, a phase value of a frequency point before the frequency multiplication point and a phase value of a frequency point after the frequency multiplication point;
Subtracting the phase value of the frequency multiplication point in the current frame from the phase value of the frequency multiplication point in the previous frame to obtain a target phase difference value;
the result of adding the phase value of the frequency point before the frequency point in the previous frame and the target phase difference value is used as the adjusted synthesized phase value of the frequency point before;
and adding the phase value of the frequency point behind the frequency point in the previous frame with the target phase difference value to obtain the adjusted synthesized phase value of the frequency point behind the frequency point.
Optionally, the acquiring the low-frequency component of the sound signal includes:
acquiring an input signal;
and performing low-pass filtering on the input signal to obtain a middle-low frequency component, wherein the middle-low frequency component at least comprises a frequency multiplication point signal component of which the base frequency signal component is adjacent to a base frequency point.
In order to achieve the above object, the present invention also provides a harmonic generation device for an acoustic signal, the harmonic generation device comprising:
the acquisition module is used for acquiring the middle-low frequency components of the sound signal;
the transformation module is used for carrying out transformation processing on the middle-low frequency components to obtain phase values and amplitude values of all frequency points of the middle-low frequency band;
the acquisition module is further used for acquiring an amplitude value and a frequency value of a base frequency point based on the amplitude value of each frequency point of the medium-low frequency band;
The acquisition module is further used for determining the position of the frequency multiplication point on the spectrogram based on the frequency value of the fundamental frequency point, and further determining the phase value and the amplitude value of the frequency multiplication point;
the processing module is used for processing the phase value and the amplitude value of the frequency multiplication point to obtain an initial harmonic signal;
and the band-pass filtering module is used for carrying out band-pass filtering on the initial harmonic signal to obtain a target harmonic signal so as to realize high real-time acquisition of the target harmonic signal in the sound signal.
In addition, in order to achieve the above object, the present invention also proposes a harmonic generation apparatus of an acoustic signal, the apparatus comprising: the device comprises a memory, a processor and a harmonic generation program of the sound signal, wherein the harmonic generation program of the sound signal is stored in the memory and can be operated on the processor, and the harmonic generation program of the sound signal is configured to realize the steps of the harmonic generation method of the sound signal.
In order to achieve the above object, the present invention provides a storage medium having stored thereon a harmonic generation program of an acoustic signal, which when executed by a processor, implements the steps of the harmonic generation method of an acoustic signal.
According to the method, the medium-low frequency components of the sound signal are obtained, then the characteristic value of each frequency point of the medium-low frequency band is extracted, the relevant frequency point is determined through the characteristic value, the characteristic value of the relevant frequency point is adjusted, and the target harmonic is obtained through calculation and filtering. The whole process only needs one sampling, simultaneously reduces the calculated amount and time, and improves the real-time performance. The characteristic values participating in calculation are adjusted, so that harmonic distortion can be effectively controlled, harmonic distortion control in harmonic generation is realized, and meanwhile, the real-time performance of harmonic generation is improved.
Drawings
Fig. 1 is a schematic structural diagram of a harmonic generation device of an acoustic signal of a hardware operation environment according to an embodiment of the present invention;
fig. 2 is a schematic flow chart of an embodiment 1 of a method for generating harmonics of an acoustic signal according to the present invention;
fig. 3 is a schematic flow chart of an embodiment 2 of a method for generating harmonics of an acoustic signal according to the present invention;
fig. 4 is a schematic flow chart of an embodiment 3 of a method for generating harmonics of an acoustic signal according to the present invention;
fig. 5 is a schematic flow chart of an embodiment 4 of a method for generating harmonics of an acoustic signal according to the present invention;
fig. 6 is a schematic functional block diagram of an embodiment 1 of a harmonic generation device for sound signals according to the present invention.
The achievement of the objects, functional features and advantages of the present invention will be further described with reference to the accompanying drawings, in conjunction with the embodiments.
Detailed Description
It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
Referring to fig. 1, fig. 1 is a schematic diagram of a harmonic generation device for sound signals of a hardware operation environment according to an embodiment of the present invention.
As shown in fig. 1, the harmonic generation device of the sound signal may include: a processor 1001, such as a central processing unit (Central Processing Unit, CPU), a communication bus 1002, a user interface 1003, a network interface 1004, a memory 1005. Wherein the communication bus 1002 is used to enable connected communication between these components. The user interface 1003 may include a Display, an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may further include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a WIreless interface (e.g., a WIreless-FIdelity (WI-FI) interface). The Memory 1005 may be a high-speed random access Memory (Random Access Memory, RAM) Memory or a stable nonvolatile Memory (NVM), such as a disk Memory. The memory 1005 may also optionally be a storage device separate from the processor 1001 described above.
It will be appreciated by those skilled in the art that the structure shown in fig. 1 does not constitute a limitation of the harmonic generation apparatus of sound signals, and may include more or fewer components than shown, or may combine certain components, or a different arrangement of components.
As shown in fig. 1, an operating system, a network communication module, a user interface module, and a harmonic generation program of a sound signal may be included in the memory 1005 as one type of storage medium.
In the harmonic generation device of the sound signal shown in fig. 1, the network interface 1004 is mainly used for data communication with a network server; the user interface 1003 is mainly used for data interaction with a user; the processor 1001 and the memory 1005 in the harmonic generation apparatus of the sound signal of the present invention may be provided in the harmonic generation apparatus of the sound signal, which invokes the harmonic generation program of the sound signal stored in the memory 1005 through the processor 1001, and performs the harmonic generation method of the sound signal provided by the embodiment of the present invention.
Example 1:
referring to fig. 2, fig. 2 is a flowchart of an embodiment 1 of a method for generating harmonics of an acoustic signal according to the present invention.
In this embodiment, the method for generating harmonics of a sound signal includes the steps of:
Step S10: the mid-low frequency components of the sound signal are acquired.
In this embodiment, the execution subject may be a harmonic generation device of a sound signal, or may be another device that can achieve the same or similar functions, and this embodiment is not limited thereto.
It is understood that the low-frequency component is a signal generated at the output end of the low-pass filter after the input signal flows into the low-pass filter to filter out the high-frequency signal component.
It should be understood that, since the harmonic generation devices should be equipped with low-pass filters, the input signals can be filtered, and before the input signals flow into the low-pass filters, parameters of the low-pass filters can be modulated according to actual needs, so as to adjust the frequency range of the middle-low frequency components flowing out of the low-pass filters.
Optionally, the step of acquiring the middle-low frequency component of the sound signal specifically includes: acquiring an input signal; and performing low-pass filtering on the input signal to obtain a middle-low frequency component, wherein the middle-low frequency component at least comprises a frequency multiplication point signal component of which the base frequency signal component is adjacent to a base frequency point.
It should be noted that, in the implementation of the method, if the low-pass filtering threshold is set to be lower than the fundamental frequency of the input signal, the filter will filter out all the components with frequencies higher than the threshold, including fundamental frequency and all harmonic multiples, which means that no signal component will be obtained in the signal output from the filter.
It will be appreciated that because the low pass filter is designed to reject signals above a certain frequency by signals below that frequency, if the cut-off frequency of the filter is below the fundamental frequency of the signal, the whole signal will be filtered out, because the frequency spectrum of the whole signal lies above the cut-off frequency of the filter, and therefore, if the threshold of the filter is below the fundamental frequency, no effective signal component will be obtained.
It should be noted that, according to a generally common knowledge, the audible sound signal frequency range of humans is about 20 Hz to 20,000 Hz (or 20 kHz). This means that the normal hearing range is approximately within this frequency range, and that the specific frequency ranges for medium and low frequencies can be briefly divided according to the following example.
The following are examples of some common sound frequencies and corresponding fundamental frequencies:
20 The Hz is as follows: humans are generally unable to perceive these low frequency sounds, but can perceive their vibrations, in which range the fundamental frequency may be several hertz, depending on the nature and source of the sound. For example, the fundamental frequency of a seismic or low musical instrument such as a megabass may be around a few hertz.
20 Hz to 200 Hz: this is the low audio range, such as bass music and heavy machinery sounds, where the fundamental frequency is typically around 20 Hz, corresponding to the lowest frequency that can be perceived by humans. For example, the fundamental frequency of bass drums is typically between about 30-80 Hz.
200 Hz to 2 kHz: this is the mid-audio range, including the speech sounds of most people and the sounds of instruments, where the fundamental frequency is typically around 200 Hz. The fundamental frequency of the speech sounds of most people is approximately between 100-200 and Hz.
2 kHz to 20 kHz: this is the high audio range, including most birds' squeal, metallic impact and sharp whistle, where the fundamental frequency is typically around 2 kHz. For example, the fundamental frequency of the chirp of most birds may be on the order of a few kilohertz.
It should be appreciated that these fundamental frequency ranges are based on the general law of common sounds and are not applicable to all sounds. The range of fundamental frequencies of a particular sound may vary depending on its source, nature, and other factors.
It should be noted that, in the subsequent step of the method, a signal component including a frequency multiplication point where the fundamental frequency signal component is close to a fundamental frequency point is used, so that at least a portion of the signal should be retained in the intermediate and low frequency components obtained after the low-pass filtering, and a certain requirement should be met for a specific parameter of the low-pass filter, for example, a lower limit value should exist for a cut-off frequency of the low-pass filter, so as to ensure that the obtained intermediate and low frequency components include the signal component required in the subsequent step.
It should be appreciated that part of the information of the preset target harmonic signal is known, for example, in an actual scene, a sound signal component with twice the fundamental frequency in a section of sound signal is required, then the frequency of the target harmonic signal is twice the fundamental frequency, according to the existing sound signal, by actual experience when playing, the range of the fundamental frequency of the sound signal can be approximately deduced according to the above example, the range of the target harmonic signal can be indirectly obtained, and the approximate range of the cut-off frequency of the low-pass filter can be determined according to the two ranges, so that the proper cut-off frequency setting of the filter is ensured, and the unnecessary high-frequency component is suppressed while the required signal component is reserved. And correspondingly adjusting relevant parameters of the filter according to requirements to obtain reasonable middle-low frequency components.
Step S20: and carrying out transformation processing on the middle-low frequency components to obtain phase values and amplitude values of all frequency points of the middle-low frequency band.
The transformation process may be a transformation process based on fourier transformation, a transformation process based on laplace transformation, or a transformation process based on other time-frequency analysis of signals that can achieve the same or similar functions, and the present embodiment is not limited thereto.
It will be appreciated that the transformation of the mid-low frequency components results in a set of complex values, each of which represents the amplitude and phase information of the mid-low frequency components at a different frequency. The set of complex values may be represented as a spectrogram or a spectral matrix, wherein the horizontal axis represents frequency values and the vertical axis represents amplitude values, wherein the phase values of the frequency points are angles corresponding to the complex values.
It will be appreciated that the mid-low frequency component is the portion of the sample that has a lower frequency, a longer period of vibration, or a slower change after passing through the low pass filter when the input signal is sampled and converted to discrete samples. The medium and low frequency components may be signals having a larger amplitude or signals having a smaller amplitude. Thus, the amplitude of the mid-low frequency component is not necessarily low, but rather its corresponding frequency is low relative to the frequencies of the other components of the overall input signal.
Step S30: and obtaining the amplitude value and the frequency value of the fundamental frequency point based on the amplitude value of each frequency point of the medium-low frequency band.
It should be noted that, since the fundamental frequency point refers to a fundamental frequency or a lowest frequency component in a signal, the fundamental frequency point generally shows a distinct peak on an energy distribution. On the spectrum or energy spectrum, there is a higher energy concentration at the frequency position corresponding to the fundamental frequency point, forming a prominent peak. Therefore, according to the frequency distribution of the spectrogram, the spectrogram corresponding to each frequency point of the middle-low frequency band can be directly obtained, and according to the amplitude value corresponding to the coordinate axis, the point with the largest amplitude value is the fundamental frequency point.
It will be appreciated that, based on the found position of the fundamental frequency point on the spectrogram, the abscissa of the fundamental frequency point can be determined, where the abscissa corresponds to the frequency value of the fundamental frequency point and the ordinate corresponds to the amplitude value of the fundamental frequency point.
Step S40: and based on the frequency value of the fundamental frequency point, acquiring the position of the frequency multiplication point on a spectrogram, and further determining the phase value and the amplitude value of the frequency multiplication point.
It should be noted that, because the frequency multiplication point and the fundamental frequency point are in integral multiple relation in frequency, when the frequency value of the fundamental frequency point is determined, the frequency value of the frequency multiplication point, the frequency multiplication point or any specific multiple required can be correspondingly determined according to the requirement, and because the frequency spectrogram corresponding to the frequency point, the amplitude value of the ordinate can be determined according to the frequency value corresponding to the abscissa in the coordinate axis, when the frequency value of the frequency multiplication point is known, the amplitude value of the frequency multiplication point can be further determined. Since the phase value and the amplitude value of each frequency point have been determined in advance in the previous step, when the position of the frequency multiplication point on the spectrogram is determined, the phase value of the frequency multiplication point can be directly determined.
Step S50: and processing the phase value and the amplitude value of the frequency multiplication point to obtain an initial harmonic signal.
It should be noted that, based on the frequency value of the fundamental frequency point, the frequency value of the frequency multiplication point is obtained, and the phase value and the amplitude value of the frequency multiplication point are processed, wherein the processed object is the phase value of the frequency multiplication point and the amplitude value of the frequency multiplication point, and the frequency points are adjusted, so that the adjustment of the phase value and the amplitude value is beneficial to the fidelity of the calculation result in the subsequent step and the control of the generated harmonic distortion.
The processing mode of the amplitude value and the phase value of the frequency multiplication point includes operations of replacing, increasing, decreasing, signal transformation and the like of the target value, and the processed data is used as a frequency point characteristic value which participates in calculation subsequently.
It can be understood that the processing manner is replaced data, the physical characteristics of the data are still unchanged, for example, the phase value data of the frequency point is adjusted, the adjustment result is still a phase value, the phase value is used as a new phase value of the frequency point for subsequent calculation and processing, and similarly, the amplitude value of the frequency point is adjusted, and the adjustment result is still an amplitude value.
It should be noted that, the processing result obtained by processing the phase value and the amplitude value of the frequency multiplication point refers to an initial harmonic signal including a fundamental frequency signal, a target harmonic signal and other frequency band signals.
Step S60: and carrying out band-pass filtering on the initial harmonic signal to obtain a target harmonic signal.
It should be noted that, the purpose of the bandpass filtering is to filter out the fundamental frequency signal component and the high frequency signal component that may exist in the initial harmonic signal, and in a specific implementation, according to the characteristic value of the target harmonic signal and the frequency value of the fundamental frequency obtained in the previous step, a device or equipment that performs the bandpass filtering function may be modulated appropriately, so that the harmonic distortion of the target harmonic signal obtained by the bandpass filtering is controlled, so as to improve the quality of the target harmonic signal.
It will be appreciated that the signal type of the target harmonic signal is the same as the signal type of the input signal, for example, when the input signal is an audio signal, the obtained target harmonic signal is still an audio signal after the above steps, that is, the harmonic generation of the method does not change the signal type of the input signal.
In this embodiment, the characteristic value in the sound signal is obtained, the relevant frequency point is determined by the characteristic value, the relevant characteristic value is adjusted, and the target harmonic is obtained through calculation and filtering. The whole process only needs one sampling, simultaneously reduces the calculated amount and time, and improves the real-time performance. The characteristic values participating in calculation are adjusted, so that harmonic distortion can be effectively controlled, harmonic distortion control in harmonic generation is realized, and meanwhile, the real-time performance of harmonic generation is improved.
Example 2:
referring to fig. 3, fig. 3 is a flowchart illustrating an embodiment 2 of a method for generating harmonics of an acoustic signal according to the present invention.
Based on the above embodiment 1, the method for generating harmonics of a sound signal according to the present embodiment, the step S20 includes:
step S201: and carrying out Fourier transform processing on the middle-low frequency components to obtain a frequency domain expression corresponding to the middle-low frequency components.
It should be noted that fourier transform is a mathematical transform that converts a function from the time domain to the frequency domain. By fourier transformation we can decompose a signal into a superposition of sine and cosine functions of a series of different frequencies. Fourier transforms can be used to analyze the spectral characteristics of the signal, from which the frequency components present in the signal and their intensities are derived. This is very useful for many applications such as audio signal processing, image processing, communication systems, etc.
It can be understood that the superposition of a series of sine and cosine functions of different frequencies obtained by fourier transform is the frequency domain expression corresponding to the middle and low frequency components.
Step S202: and obtaining a spectrogram of the middle-low frequency component based on the frequency domain expression corresponding to the middle-low frequency component.
It can be understood that according to the frequency domain expression of the middle-low frequency component, the frequency value is taken as an abscissa axis, the amplitude value is taken as an ordinate, and a spectrogram of the middle-low frequency component can be drawn;
the spectrogram of the middle-low frequency component is represented as a series of discrete points on a coordinate system, and the abscissa value of each point meets the frequency domain expression of the middle-low frequency component.
Step S203: and obtaining the phase value and the amplitude value of each frequency point of the middle and low frequency band based on the spectrogram of the middle and low frequency components.
It should be noted that, each frequency point in the middle-low frequency component includes its own amplitude value and frequency value, the phase value of the frequency point itself is not directly expressed, and can be obtained by a certain calculation, and the following calculation method is given:
let us assume that we have a frequency domain signal X, which consists of N complex values (X0, X1, …, X N-1), where X k represents the amplitude and phase information at the kth frequency point;
first, we can calculate the frequency value of each frequency bin:
frequency value [ k ] =k/n×fs;
wherein k represents an index value (0 < = k < = N-1) of the current frequency point, N represents a total sample number, and Fs represents a sampling rate;
then we can calculate the phase value for each frequency bin:
Phase value [ k ] =atan2 (imag (X [ k ])), real (X [ k ]));
wherein real (Xk) represents the real part of the kth frequency point and imag (Xk) represents the imaginary part of the kth frequency point.
The above exemplary calculation method calculates the phase value of each frequency point in the frequency domain signal, and stores the phase value in the phase value array, where the frequency value of each frequency point corresponds to one phase value.
It can be understood that the ordinate of each frequency point is the amplitude value of the frequency point, and the amplitude value of the frequency point can be directly obtained from the position of the frequency point on the spectrogram.
The process of obtaining the phase value and the amplitude value of the frequency point in the above steps is to obtain the phase value and the amplitude value of each frequency point in the middle and low frequency bands for each frequency point in the middle and low frequency bands.
Example 3:
referring to fig. 4, fig. 4 is a flowchart of an embodiment 3 of a method for generating harmonics of an acoustic signal according to the present invention.
Based on the above embodiment 1, the method for generating harmonics of a sound signal according to the present embodiment, the step S30 includes:
step S301: and arranging the amplitude values of all the frequency points of the middle and low frequency bands to obtain an amplitude value sequence.
It should be noted that, the same amplitude values may appear in the amplitude value sequence to form a parallel arrangement, where the same amplitude values are not in the same order, but are in the same order.
Step S302: and taking the maximum amplitude value in the amplitude value sequence as the amplitude value of the fundamental frequency point.
It should be noted that: this is because the fundamental frequency point is the main component of the periodically repeated signal. For periodic signals, the amplitude of the signal has the greatest shift at the fundamental frequency point and a periodically repeating shape is formed by the superposition of different harmonic components. Therefore, the frequency component corresponding to the fundamental frequency point generally has the highest amplitude.
Step S303: and taking the frequency value of the frequency point corresponding to the maximum amplitude value in the spectrogram as the frequency value of the fundamental frequency point based on the amplitude value of the fundamental frequency point.
It will be appreciated that: in the spectrogram, the amplitude value corresponds to an ordinate, the frequency point corresponding to the maximum amplitude value is the frequency value of the fundamental frequency point, and the corresponding ordinate is the amplitude value of the fundamental frequency point.
Example 4:
referring to fig. 5, fig. 5 is a flowchart of an embodiment 4 of a method for generating harmonics of an acoustic signal according to the present invention.
Based on the above embodiment 1, the method for generating harmonics of a sound signal according to the present embodiment, the step S50 includes:
step S501: and replacing the frequency multiplication point and the amplitude value of the frequency point before and after the frequency multiplication point with the fundamental frequency point and the amplitude value of the frequency point before and after the fundamental frequency point to obtain the amplitude value of the frequency multiplication point after adjustment, the amplitude value of the frequency point before adjustment and the amplitude value of the frequency point after adjustment.
It should be noted that, the previous frequency point amplitude value of the frequency multiplication point is replaced by the previous frequency point amplitude value of the fundamental frequency point, and the next frequency point amplitude value of the frequency multiplication point is replaced by the next frequency point amplitude value of the fundamental frequency point, where the previous frequency point and the next frequency point both refer to a frequency point closest to the corresponding frequency point, for example, no other frequency point exists between the fundamental frequency point and the previous frequency point of the fundamental frequency point.
It should be noted that, the above-mentioned replacement relation of the replacement object is one-to-one correspondence, the amplitude value of the frequency multiplication point is replaced, the result of the replacement is the amplitude value of the fundamental frequency point, the amplitude value of the frequency multiplication point before is replaced, the replacement object is the amplitude value of the frequency multiplication point before is replaced, the amplitude value of the frequency multiplication point after is replaced, and the replacement object is the amplitude value of the frequency multiplication point after is replaced.
Optionally, replacing the frequency point amplitude value of the frequency multiplication point with the frequency point amplitude value of the fundamental frequency point; the amplitude value of the previous frequency point of the frequency doubling point is replaced by the amplitude value of the previous frequency point of the fundamental frequency point; and replacing the amplitude value of the next frequency point of the frequency multiplication point with the amplitude value of the next frequency point of the fundamental frequency point.
Step S502: and adjusting the phase value of the frequency point before and after the frequency multiplication point to obtain the adjusted phase value of the previous frequency point and the adjusted phase value of the next frequency point.
The adjustment of the phase value of the frequency point before and after the frequency point is performed based on the phase change of the frequency point, and the phase values of the frequency point before and after the frequency point are adjusted according to the phase change of the frequency point, so that the phase changes of the frequency point before and after the frequency point are identical to the phase change of the frequency point.
Further, the adjusting the phase value of the frequency point before and after the frequency point to obtain the adjusted phase value of the previous frequency point and the adjusted phase value of the next frequency point includes: acquiring a phase value of a frequency multiplication point in a previous frame, a phase value of a frequency multiplication point before the frequency multiplication point and a phase value of a frequency multiplication point after the frequency multiplication point; acquiring a phase value of a frequency multiplication point in a current frame, a phase value of a frequency point before the frequency multiplication point and a phase value of a frequency point after the frequency multiplication point; subtracting the phase value of the frequency multiplication point in the current frame from the phase value of the frequency multiplication point in the previous frame to obtain a target phase difference value; the result of adding the phase value of the frequency point before the frequency point in the previous frame and the target phase difference value is used as the adjusted synthesized phase value of the frequency point before; and adding the phase value of the frequency point behind the frequency multiplication point in the previous frame and the target phase difference value to obtain a result which is used as the adjusted synthesized phase value of the frequency point behind the frequency multiplication point.
It should be noted that, in the stage of performing fourier transform on the middle-low frequency component, the phase of each frequency point in the middle-low frequency band can be obtained, the obtained phase value can be used as the analysis phase of each frequency point, based on the phase value of each frequency point in the middle-low frequency band, the phase value of the frequency doubling point, the phase value of the frequency point before the frequency doubling point and the phase value of the frequency point after the frequency doubling point in the current frame can be determined, and the expected phase change of each frequency point analysis phase of the current frame signal and each frequency point analysis phase of the previous frame signal at each frequency point is in direct proportion to the index value of the frequency point, that is, the expected phase change is a fixed value; the analysis phase of each frequency point of the current frame signal is correspondingly subtracted from the analysis phase of each frequency point of the previous frame signal, so that the actual phase change of each frequency point can be obtained.
It can be understood that the frequency spectrum leakage causes deviation between the actual phase change and the expected phase change of each frequency point, the actual phase change of each frequency point is subtracted from the expected phase change of each frequency point correspondingly, so that the phase deviation of each frequency point can be obtained, and the phase deviation of each frequency point and the expected phase change of each frequency point are added correspondingly, so that the phase increment of each frequency point can be obtained.
It can be understood that when the signal is restored to the time domain in the synthesis stage, the synthesis phase of each frequency point of the previous frame signal is correspondingly added with the phase increment of each frequency point, so that the synthesis phase of each frequency point of the current frame signal can be obtained, and the analysis phase of the current frame signal at the frequency multiplication point is subtracted from the synthesis phase of the current frame signal at the frequency multiplication point, so that the target phase difference value can be obtained; and respectively adding the analysis phase values of the previous frequency point and the next frequency point of the current frame frequency multiplication point and the target phase difference value to obtain the adjusted synthesis phase value of the previous frequency point and the adjusted synthesis phase value of the next frequency point.
Step S503: and obtaining a frequency point data sequence according to the amplitude value of the adjusted frequency multiplication point, the amplitude value of the adjusted previous frequency point, the amplitude value of the adjusted next frequency point, the phase value of the adjusted previous frequency point and the phase value of the adjusted next frequency point.
The frequency point data is generated according to the amplitude value of the adjusted frequency multiplication point, the amplitude value and the phase value of the adjusted frequency point, the frequency point data comprises the amplitude value and the phase value of the frequency point, and the frequency point data sequences are arranged according to the sequence from low frequency to high frequency, so that the frequency point data sequences are obtained;
it should be understood that the frequency point data sequence at least includes data of the amplitude value of the adjusted frequency doubling point, the amplitude value and the phase value of the frequency point before and after the adjusted frequency doubling point, the phase value of the frequency doubling point, and the phase value and the amplitude value of the base frequency point and the frequency point before and after the base frequency point;
it will be appreciated that the frequency point data sequence has a direct relationship with the number of frequency doubling points, for example, the frequency point data sequence has the following related data for each frequency doubling point: the amplitude value of the adjusted frequency doubling point, the amplitude value of the adjusted previous frequency point, the amplitude value of the adjusted next frequency point, the phase value of the frequency doubling point, the phase value of the adjusted previous frequency point and the phase value of the adjusted next frequency point.
Step S504: and carrying out inverse Fourier transform on the frequency point data sequence to obtain an initial harmonic signal.
It should be noted that, the initial harmonic signal includes a fundamental frequency signal portion, an unnecessary low frequency portion, and a noise signal portion, and may be filtered by signal processing such as filtering, to output a pure target harmonic signal.
In the embodiment, the characteristics of amplitude, phase and the like of the harmonic signals are changed on the signal processing level, so that the sound signals participating in operation are characterized by more balanced frequency spectrum, richer harmonic structures and the like, the quality and the perception effect of the sound signals are improved, and the harmonic distortion is effectively controlled.
Referring to fig. 6, fig. 6 is a block diagram showing the structure of an embodiment 1 of the harmonic generation device for an acoustic signal according to the present invention.
As shown in fig. 6, a harmonic generation device for an acoustic signal according to an embodiment of the present invention includes:
an acquisition module 10 is configured to acquire low-frequency components of the sound signal.
The transformation module 20 is configured to perform a transformation process on the low-frequency component to obtain a phase value and an amplitude value of each frequency point of the low-frequency component.
The obtaining module 10 is further configured to obtain an amplitude value and a frequency value of the base frequency point based on the amplitude value of each frequency point of the middle-low frequency band.
The processing module 30 is configured to obtain a frequency value of a frequency multiplication point based on the frequency value of the fundamental frequency point; and processing the phase value and the amplitude value of the frequency multiplication point to obtain an initial harmonic signal.
The band-pass filtering module 40 is configured to perform band-pass filtering on the initial harmonic signal to obtain a target harmonic signal, so as to obtain a target harmonic signal in the sound signal in high real-time.
In the embodiment, when harmonic generation of a sound signal is performed, middle-low frequency components of the sound signal are acquired; performing transformation processing on the middle-low frequency components to obtain phase values and amplitude values of all frequency points of the middle-low frequency band; obtaining an amplitude value and a frequency value of a base frequency point based on the amplitude value of each frequency point of the medium-low frequency band; obtaining a frequency value of a frequency multiplication point based on the frequency value of the fundamental frequency point; processing the phase value and the amplitude value of the frequency multiplication point to obtain an initial harmonic signal; and carrying out band-pass filtering on the initial harmonic signal to obtain a target harmonic signal so as to obtain the target harmonic signal in the sound signal in high real-time.
In an embodiment, the transforming module 20 is further configured to perform fourier transform processing on the middle-low frequency component to obtain a frequency domain expression corresponding to the middle-low frequency component; obtaining a spectrogram of the middle-low frequency component based on a frequency domain expression corresponding to the middle-low frequency component; and obtaining the phase value and the amplitude value of each frequency point of the middle and low frequency band based on the spectrogram of the middle and low frequency components.
In an embodiment, the obtaining module 10 is further configured to perform size arrangement on the amplitude values of the frequency points of the middle-low frequency band to obtain an amplitude value sequence; taking the maximum amplitude value in the amplitude value sequence as the amplitude value of the fundamental frequency point; and taking the frequency of the frequency point corresponding to the maximum amplitude value as the frequency value of the fundamental frequency point based on the amplitude value of the fundamental frequency point.
In an embodiment, the processing module 30 is further configured to obtain a frequency multiplication point based on the frequency value of the fundamental frequency point; the frequency multiplication point and the amplitude value of the frequency point before and after the frequency multiplication point are replaced by the fundamental frequency point and the amplitude value of the frequency point before and after the fundamental frequency point, and the amplitude value of the frequency multiplication point after adjustment, the amplitude value of the frequency point before adjustment and the amplitude value of the frequency point after adjustment are obtained; adjusting the phase value of the frequency point before and after the frequency multiplication point to obtain the adjusted phase value of the previous frequency point and the adjusted phase value of the next frequency point; obtaining a frequency point data sequence according to the amplitude value of the adjusted frequency multiplication point, the amplitude value of the adjusted previous frequency point and the amplitude value of the adjusted next frequency point, the phase value of the adjusted previous frequency point and the phase value of the adjusted next frequency point; and carrying out inverse Fourier transform on the frequency point data sequence to obtain an initial harmonic signal.
In an embodiment, the processing module 30 is further configured to replace a frequency point amplitude value of the frequency multiplication point with a frequency point amplitude value of the fundamental frequency point; the amplitude value of the previous frequency point of the frequency doubling point is replaced by the amplitude value of the previous frequency point of the fundamental frequency point; and replacing the amplitude value of the next frequency point of the frequency multiplication point with the amplitude value of the next frequency point of the fundamental frequency point.
In an embodiment, the processing module 30 is further configured to obtain a phase value of the frequency multiplication point in the previous frame, a phase value of the frequency multiplication point previous to the frequency multiplication point, and a phase value of the frequency multiplication point next to the frequency multiplication point; acquiring a phase value of a frequency multiplication point in a current frame, a phase value of a frequency point before the frequency multiplication point and a phase value of a frequency point after the frequency multiplication point; subtracting the phase value of the frequency multiplication point in the current frame from the phase value of the frequency multiplication point in the previous frame to obtain a target phase difference value; the result of adding the phase value of the frequency point before the frequency point in the previous frame and the target phase difference value is used as the adjusted synthesized phase value of the frequency point before; and adding the phase value of the frequency point behind the frequency multiplication point in the previous frame and the target phase difference value to obtain a result which is used as the adjusted synthesized phase value of the frequency point behind the frequency multiplication point.
In an embodiment, the acquiring module 10 is further configured to acquire an input signal; and performing low-pass filtering on the input signal to obtain a middle-low frequency component, wherein the middle-low frequency component at least comprises a frequency multiplication point signal component of which the base frequency signal component is adjacent to a base frequency point.
In addition, the embodiment of the present invention also proposes a storage medium having stored thereon a harmonic generation program of a sound signal, which when executed by a processor, implements the steps of the harmonic generation method of a sound signal as described above.
Because the storage medium adopts all the technical schemes of all the embodiments, the storage medium has at least all the beneficial effects brought by the technical schemes of the embodiments, and the description is omitted here.
It should be understood that the foregoing is illustrative only and is not limiting, and that in specific applications, those skilled in the art may set the invention as desired, and the invention is not limited thereto.
It should be noted that the above-described working procedure is merely illustrative, and does not limit the scope of the present invention, and in practical application, a person skilled in the art may select part or all of them according to actual needs to achieve the purpose of the embodiment, which is not limited herein.
In addition, technical details not described in detail in the present embodiment may refer to the method for generating harmonics of a sound signal provided in any embodiment of the present invention, which is not described herein.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The foregoing embodiment numbers of the present invention are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
From the above description of embodiments, it will be clear to a person skilled in the art that the above embodiment method may be implemented by means of software plus a necessary general hardware platform, but may of course also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on this understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) as described above, comprising instructions for causing a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the method according to the embodiments of the present invention.
The foregoing description is only of the preferred embodiments of the present invention, and is not intended to limit the scope of the invention, but rather is intended to cover any equivalents of the structures or equivalent processes disclosed herein or in the alternative, which may be employed directly or indirectly in other related arts.

Claims (8)

1. A method of generating harmonics of an acoustic signal, the method comprising:
acquiring middle and low frequency components of a sound signal;
performing transformation processing on the middle-low frequency components to obtain phase values and amplitude values of all frequency points of the middle-low frequency band;
obtaining an amplitude value and a frequency value of a base frequency point based on the amplitude value of each frequency point of the medium-low frequency band;
based on the frequency value of the fundamental frequency point, acquiring the position of a frequency multiplication point on a spectrogram, and further determining the phase value and the amplitude value of the frequency multiplication point;
processing the phase value and the amplitude value of the frequency multiplication point to obtain an initial harmonic signal;
band-pass filtering is carried out on the initial harmonic signal to obtain a target harmonic signal so as to obtain the target harmonic signal in the sound signal in high real-time;
the processing the phase value and the amplitude value of the frequency multiplication point to obtain an initial harmonic signal comprises the following steps:
The frequency multiplication point and the amplitude value of the frequency point before and after the frequency multiplication point are replaced by the fundamental frequency point and the amplitude value of the frequency point before and after the fundamental frequency point, and the amplitude value of the frequency multiplication point after adjustment, the amplitude value of the frequency point before adjustment and the amplitude value of the frequency point after adjustment are obtained;
adjusting the phase value of the frequency point before and after the frequency multiplication point to obtain the adjusted phase value of the previous frequency point and the adjusted phase value of the next frequency point;
the adjusting the phase value of the frequency point before and after the frequency multiplication point to obtain the adjusted phase value of the previous frequency point and the adjusted phase value of the next frequency point comprises the following steps:
acquiring a phase value of a frequency multiplication point in a previous frame, a phase value of a frequency multiplication point before the frequency multiplication point and a phase value of a frequency multiplication point after the frequency multiplication point;
acquiring a phase value of a frequency multiplication point in a current frame, a phase value of a frequency point before the frequency multiplication point and a phase value of a frequency point after the frequency multiplication point;
subtracting the phase value of the frequency multiplication point in the current frame from the phase value of the frequency multiplication point in the previous frame to obtain a target phase difference value;
the result of adding the phase value of the frequency point before the frequency point in the previous frame and the target phase difference value is used as the adjusted synthesized phase value of the frequency point before;
the phase value of the frequency point behind the frequency doubling point in the previous frame is added with the target phase difference value to be used as the adjusted synthesized phase value of the frequency point behind the frequency doubling point;
Obtaining a frequency point data sequence according to the amplitude value of the adjusted frequency multiplication point, the amplitude value of the adjusted previous frequency point and the amplitude value of the adjusted next frequency point, the phase value of the adjusted previous frequency point and the phase value of the adjusted next frequency point;
and carrying out inverse Fourier transform on the frequency point data sequence to obtain an initial harmonic signal.
2. The method for generating harmonics of a sound signal according to claim 1, wherein said transforming said mid-low frequency components to obtain a phase value and an amplitude value of each frequency point of the mid-low frequency band comprises:
performing Fourier transform processing on the middle-low frequency components to obtain frequency domain expressions corresponding to the middle-low frequency components;
obtaining a spectrogram of the middle-low frequency component based on a frequency domain expression corresponding to the middle-low frequency component;
and obtaining the phase value and the amplitude value of each frequency point of the middle and low frequency band based on the spectrogram of the middle and low frequency components.
3. The method for generating harmonics of a sound signal according to claim 1, wherein said obtaining the amplitude value and the frequency value of the fundamental frequency point based on the amplitude value of each frequency point of the middle-low frequency band comprises:
the amplitude values of all the frequency points of the middle and low frequency bands are arranged in size to obtain an amplitude value sequence;
Taking the maximum amplitude value in the amplitude value sequence as the amplitude value of the fundamental frequency point;
and taking the frequency value of the frequency point corresponding to the maximum amplitude value in the spectrogram as the frequency value of the fundamental frequency point based on the amplitude value of the fundamental frequency point.
4. The method for generating harmonics of a sound signal according to claim 1, wherein said replacing the amplitude value of the frequency multiplication point and the frequency point before and after the frequency multiplication point with the amplitude value of the base frequency point and the frequency point before and after the base frequency point to obtain the amplitude value of the frequency multiplication point after adjustment, the amplitude value of the frequency point before adjustment, and the amplitude value of the frequency point after adjustment includes:
replacing the frequency point amplitude value of the frequency multiplication point with the frequency point amplitude value of the fundamental frequency point;
the amplitude value of the previous frequency point of the frequency doubling point is replaced by the amplitude value of the previous frequency point of the fundamental frequency point;
and replacing the amplitude value of the next frequency point of the frequency multiplication point with the amplitude value of the next frequency point of the fundamental frequency point.
5. The method of generating harmonics of a sound signal according to claim 1, wherein said acquiring medium-low frequency components of the sound signal comprises:
acquiring an input signal;
and performing low-pass filtering on the input signal to obtain a middle-low frequency component, wherein the middle-low frequency component at least comprises a frequency multiplication point signal component of which the base frequency signal component is adjacent to a base frequency point.
6. A harmonic generation device of an acoustic signal, characterized in that the harmonic generation device of an acoustic signal comprises:
the acquisition module is used for acquiring the middle-low frequency components of the sound signal;
the transformation module is used for carrying out transformation processing on the middle-low frequency components to obtain phase values and amplitude values of all frequency points of the middle-low frequency band;
the acquisition module is further used for acquiring an amplitude value and a frequency value of a base frequency point based on the amplitude value of each frequency point of the medium-low frequency band;
the acquisition module is further used for determining the position of the frequency multiplication point on the spectrogram based on the frequency value of the fundamental frequency point, and further determining the phase value and the amplitude value of the frequency multiplication point;
the processing module is used for processing the phase value and the amplitude value of the frequency multiplication point to obtain an initial harmonic signal;
the band-pass filtering module is used for carrying out band-pass filtering on the initial harmonic signal to obtain a target harmonic signal so as to obtain the target harmonic signal in the sound signal in high real-time;
the processing module is further configured to replace the frequency multiplication point and the amplitude value of the frequency multiplication point before and after the frequency multiplication point with the fundamental frequency point and the amplitude value of the frequency multiplication point before and after the fundamental frequency point, so as to obtain an adjusted amplitude value of the frequency multiplication point, an adjusted amplitude value of the frequency multiplication point before and after, and an adjusted amplitude value of the frequency multiplication point after; adjusting the phase value of the frequency point before and after the frequency multiplication point to obtain the adjusted phase value of the previous frequency point and the adjusted phase value of the next frequency point; obtaining a frequency point data sequence according to the amplitude value of the adjusted frequency multiplication point, the amplitude value of the adjusted previous frequency point and the amplitude value of the adjusted next frequency point, the phase value of the adjusted previous frequency point and the phase value of the adjusted next frequency point; performing inverse Fourier transform on the frequency point data sequence to obtain an initial harmonic signal;
The processing module is further used for obtaining the phase value of the frequency multiplication point in the previous frame, the phase value of the frequency multiplication point before the frequency multiplication point and the phase value of the frequency multiplication point after the frequency multiplication point; acquiring a phase value of a frequency multiplication point in a current frame, a phase value of a frequency point before the frequency multiplication point and a phase value of a frequency point after the frequency multiplication point; subtracting the phase value of the frequency multiplication point in the current frame from the phase value of the frequency multiplication point in the previous frame to obtain a target phase difference value; and adding the phase value of the frequency point before the frequency point in the previous frame and the target phase difference value to obtain the adjusted synthesized phase value of the frequency point before.
7. A harmonic generation device for an acoustic signal, the device comprising: a memory, a processor and a harmonic generation program of a sound signal stored on the memory and executable on the processor, the harmonic generation program of a sound signal being configured to implement the steps of the harmonic generation method of a sound signal as claimed in any one of claims 1 to 5.
8. A storage medium, wherein a harmonic generation program of an acoustic signal is stored on the storage medium, which when executed by a processor, implements the steps of the harmonic generation method of an acoustic signal as claimed in any one of claims 1 to 5.
CN202311349617.XA 2023-10-18 2023-10-18 Method, device, equipment and storage medium for generating harmonic wave of sound signal Active CN117116245B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311349617.XA CN117116245B (en) 2023-10-18 2023-10-18 Method, device, equipment and storage medium for generating harmonic wave of sound signal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311349617.XA CN117116245B (en) 2023-10-18 2023-10-18 Method, device, equipment and storage medium for generating harmonic wave of sound signal

Publications (2)

Publication Number Publication Date
CN117116245A CN117116245A (en) 2023-11-24
CN117116245B true CN117116245B (en) 2024-01-30

Family

ID=88805771

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311349617.XA Active CN117116245B (en) 2023-10-18 2023-10-18 Method, device, equipment and storage medium for generating harmonic wave of sound signal

Country Status (1)

Country Link
CN (1) CN117116245B (en)

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001177416A (en) * 1999-12-17 2001-06-29 Yrp Kokino Idotai Tsushin Kenkyusho:Kk Method and device for acquiring voice coded parameter
DE10204325A1 (en) * 2001-02-01 2002-09-12 Aixplain Ag Automatic speech recognition method by comparing identification patterns based on amplitudes and phases determined by spectral analysis of speech signal
JP2003208197A (en) * 2002-01-10 2003-07-25 Mitsubishi Electric Corp Acoustic signal decoder
JP2007249009A (en) * 2006-03-17 2007-09-27 Tohoku Univ Sound signal analysis method and sound signal synthesis method
JP2009159312A (en) * 2007-12-26 2009-07-16 Sharp Corp Sound reproduction apparatus, sound reproduction method, sound reproduction system, control program, and computer readable recording medium
GB201407337D0 (en) * 2014-04-25 2014-06-11 Toshiba Res Europ Ltd A speech processing system
CN104036785A (en) * 2013-03-07 2014-09-10 索尼公司 Speech signal processing method, speech signal processing device and speech signal analyzing system
CN105247608A (en) * 2013-04-09 2016-01-13 斯考缪兹克互动公司 A system and method for generating an audio file
CN105553475A (en) * 2015-12-18 2016-05-04 中国电子科技集团公司第四十一研究所 High frequency point frequency source synthetic circuit based on digital frequency division and harmonic frequency mixing
WO2016078439A1 (en) * 2014-11-18 2016-05-26 华为技术有限公司 Voice processing method and apparatus
CN214014119U (en) * 2020-12-09 2021-08-20 郴州市福瑞康电子有限公司 Anti-harmonic distortion power adapter suitable for voice equipment
CN113496706A (en) * 2020-03-19 2021-10-12 北京字节跳动网络技术有限公司 Audio processing method and device, electronic equipment and storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100446242B1 (en) * 2002-04-30 2004-08-30 엘지전자 주식회사 Apparatus and Method for Estimating Hamonic in Voice-Encoder
KR100653643B1 (en) * 2006-01-26 2006-12-05 삼성전자주식회사 Method and apparatus for detecting pitch by subharmonic-to-harmonic ratio

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001177416A (en) * 1999-12-17 2001-06-29 Yrp Kokino Idotai Tsushin Kenkyusho:Kk Method and device for acquiring voice coded parameter
DE10204325A1 (en) * 2001-02-01 2002-09-12 Aixplain Ag Automatic speech recognition method by comparing identification patterns based on amplitudes and phases determined by spectral analysis of speech signal
JP2003208197A (en) * 2002-01-10 2003-07-25 Mitsubishi Electric Corp Acoustic signal decoder
JP2007249009A (en) * 2006-03-17 2007-09-27 Tohoku Univ Sound signal analysis method and sound signal synthesis method
JP2009159312A (en) * 2007-12-26 2009-07-16 Sharp Corp Sound reproduction apparatus, sound reproduction method, sound reproduction system, control program, and computer readable recording medium
CN104036785A (en) * 2013-03-07 2014-09-10 索尼公司 Speech signal processing method, speech signal processing device and speech signal analyzing system
CN105247608A (en) * 2013-04-09 2016-01-13 斯考缪兹克互动公司 A system and method for generating an audio file
GB201407337D0 (en) * 2014-04-25 2014-06-11 Toshiba Res Europ Ltd A speech processing system
WO2016078439A1 (en) * 2014-11-18 2016-05-26 华为技术有限公司 Voice processing method and apparatus
CN105553475A (en) * 2015-12-18 2016-05-04 中国电子科技集团公司第四十一研究所 High frequency point frequency source synthetic circuit based on digital frequency division and harmonic frequency mixing
CN113496706A (en) * 2020-03-19 2021-10-12 北京字节跳动网络技术有限公司 Audio processing method and device, electronic equipment and storage medium
CN214014119U (en) * 2020-12-09 2021-08-20 郴州市福瑞康电子有限公司 Anti-harmonic distortion power adapter suitable for voice equipment

Also Published As

Publication number Publication date
CN117116245A (en) 2023-11-24

Similar Documents

Publication Publication Date Title
EP2730099B1 (en) Estimating nonlinear distortion and parameter tuning for boosting sound
JP5341128B2 (en) Improved stability in hearing aids
JP5057535B1 (en) Mixing apparatus, mixing signal processing apparatus, mixing program, and mixing method
EP3121608B1 (en) Method of modeling characteristics of a non linear system.
EP3121808B1 (en) System for modeling characteristics of an electronic musical instrument
CN103999487A (en) Stability and speech audibility improvements in hearing devices
CN109920446B (en) Audio data processing method and device and computer storage medium
US9277341B2 (en) System and method for producing a narrow band signal with controllable narrowband statistics for a use in testing a loudspeaker
JP4738213B2 (en) Gain adjusting method and gain adjusting apparatus
JP6482880B2 (en) Mixing apparatus, signal mixing method, and mixing program
Kawahara et al. Simultaneous measurement of time-invariant linear and nonlinear, and random and extra responses using frequency domain variant of velvet noise
JP5454330B2 (en) Sound processor
CN117116245B (en) Method, device, equipment and storage medium for generating harmonic wave of sound signal
Nam et al. Efficient antialiasing oscillator algorithms using low-order fractional delay filters
KR20220091459A (en) Vibration control device, vibration control program and vibration control method
Mu et al. A timbre matching approach to enhance audio quality of psychoacoustic bass enhancement system
Mu Perceptual quality improvement and assessment for virtual bass system
CN110225433B (en) Nonlinear measurement and tone quality tuning method of loudspeaker system
CN110213708B (en) Nonlinear measurement and tone quality tuning system of loudspeaker system
KR102578008B1 (en) Nonlinear adaptive filterbank for psychoacoustic frequency range expansion.
EP3783912B1 (en) Mixing device, mixing method, and mixing program
Tsai et al. Neural Network-Based Low-Frequency Perception Enhancement Used in Biomedical Hearing Applications
CN116092509A (en) Audio signal processing method, device, computer equipment and storage medium
CN117133257A (en) Real-time pitch adjustment method and device and tuning equipment
Necciari et al. Perceptual optimization of audio representations based on time-frequency masking data for maximally-compact stimuli

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP03 Change of name, title or address
CP03 Change of name, title or address

Address after: Room 572, 18th Floor, Building B4, Phase I, Longshan Innovation Park, Wuhan Future Science and Technology City, No. 999 Gaoxin Avenue, Donghu New Technology Development Zone, Wuhan City, Hubei Province, 430000

Patentee after: Wuhan Haiwei Technology Co.,Ltd.

Country or region after: China

Address before: Room 572, 18th Floor, Building B4, Phase I, Longshan Innovation Park, Wuhan Future Science and Technology City, No. 999 Gaoxin Avenue, Donghu New Technology Development Zone, Wuhan, Hubei Province, 430000 (Wuhan Area of Free Trade Zone)

Patentee before: WUHAN HAIWEI TECHNOLOGY Co.,Ltd.

Country or region before: China