Adaptive guitar timbre adjustment method and system based on audio recognition
Through the division and analysis of audio data, the actual adjustment requirements and frequency boundary thresholds of the guitar timbre are determined, and the guitar timbre is adjusted, which solves the timbre imbalance problem caused by inaccurate frequency band settings and achieves more accurate and natural timbre adjustment.
Patent Information
- Application Number
- CN202410924586.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-11
- Publication Date
- 2024-09-20
- Estimated Expiration
- 2044-07-11
AI Technical Summary
When adjusting the guitar timbre in the prior art, inaccurate frequency band settings lead to an imbalance in the phase relationship of the audio signal, affecting the accuracy and naturalness of the timbre.
By collecting the audio data of the guitar, it is divided into several audio sections, audio analysis is performed to determine the actual adjustment requirements and frequency boundary thresholds of each section, the target width parameters are determined based on these data, and the timbre is adjusted to improve the accuracy of the frequency band setting.
It improves the accuracy and naturalness of guitar tone adjustment and avoids unnatural tone problems caused by inaccurate frequency band settings.
Smart Images

Figure CN118486283B
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of electronic digital data processing, and in particular to an adaptive guitar timbre adjustment method and system based on audio recognition. Background Art
[0002] Guitar tone refers to the sound characteristics produced when the guitar is played. The timbre of the guitar is rich and varied, and can express a variety of emotions and atmospheres. Guitars of different types and styles have their own unique timbre characteristics, including the clear sound quality, rich range and bright treble of the classical guitar; the strong bass, crisp treble and rich resonance of the steel-string guitar; the timbre of the electric guitar is diverse, and can be adjusted and enhanced through sound effects and amplifiers. It is suitable for playing various styles of music, including rock, blues, jazz, etc. The characteristics of the electric guitar include strong harmonics, sustain and varied tone tuning effects.
[0003] Nowadays, when adjusting the timbre of a guitar, one can pluck the strings to produce sound, collect the sound, analyze its timbre characteristics and feed it back to the equalizer, and adjust the guitar timbre through the width parameter (Q value) in the equalizer. However, frequent use of the equalizer may cause distortion of the audio signal. For example, when the frequency band is set inaccurately and the frequency band gain is adjusted too large or the width parameter (Q value) is set improperly, phase problems may occur when the frequency of the guitar timbre is adjusted, resulting in an imbalance in the phase relationship of the audio signal, thereby affecting the accuracy and naturalness of the timbre. Summary of the invention
[0004] In order to solve the above technical problems, the purpose of the present invention is to provide an adaptive guitar timbre adjustment method and system based on audio recognition, and the technical solutions adopted are as follows:
[0005] In a first aspect, an embodiment of the present application provides a method for adaptively adjusting guitar timbre based on audio recognition, comprising:
[0006] Collecting first audio data of the guitar, and dividing the first audio data to obtain a plurality of audio segments;
[0007] Performing audio analysis on the plurality of audio segments to determine the actual adjustment requirements of each audio segment and the frequency boundary thresholds between different frequency bands;
[0008] Collecting second audio data of the guitar, and determining a target width parameter according to the second audio data, the frequency boundary threshold and the actual adjustment requirement;
[0009] The second audio data is adjusted by the target width parameter to adjust the guitar timbre.
[0010] In one implementation, collecting the first audio data of the guitar includes:
[0011] Selecting a plurality of width parameter values in sequence according to preset intervals from a preset value range;
[0012] Collecting initial audio of the guitar, processing the initial audio by using different width parameter values respectively, and determining a plurality of adjustment audios corresponding to the different width parameter values;
[0013] According to the plurality of adjusted audios, first audio data of the guitar is obtained.
[0014] In one implementation, the dividing the first audio data to obtain a plurality of audio segments includes:
[0015] Fitting the first audio data to determine a trend item representing an audio curve;
[0016] Deriving the trend term to determine a number of audio points where the derivative is 0;
[0017] An audio segment is determined by every two adjacent audio points, thereby obtaining a plurality of audio segments.
[0018] In one embodiment, performing audio analysis on the plurality of audio segments to determine the actual adjustment requirement of each audio segment and the frequency boundary threshold between different frequency bands includes:
[0019] Determine a monotonic trend line of each of the audio segments, a first frequency, a second frequency, a first deviation value of the signal amplitude corresponding to the first frequency perpendicular to the monotonic trend line, and a second deviation value of the signal amplitude corresponding to the second frequency perpendicular to the monotonic trend line in each of the audio segments;
[0020] Determining a discrete expression capability of each of the audio segments according to the first frequency, the second frequency, the first deviation value, and the second deviation value;
[0021] Determine a first spectrum information entropy corresponding to different frequency bands of any audio segment, a maximum spectrum information entropy, and a second spectrum information entropy corresponding to different frequency bands of an audio segment adjacent to the audio segment;
[0022] Determining actual adjustment requirements of each of the audio segments according to the discrete representation capability, the first spectrum information entropy, the maximum spectrum information entropy, and the second spectrum information entropy;
[0023] The frequency boundary thresholds between different frequency bands are determined based on the actual adjustment requirements of adjacent audio segments.
[0024] In one embodiment, determining the discrete expression capability of each audio segment according to the first frequency, the second frequency, the first deviation value, and the second deviation value includes:
[0025] Determine a first absolute value of a frequency difference between the first frequency and the second frequency and the number of frequencies of the audio segment;
[0026] Determine a sum of the first deviation value and the second deviation value and a second absolute value of a difference between the first deviation value and the second deviation value, and calculate a first ratio of the sum to the second absolute value;
[0027] A first accumulation process is performed based on a first product of the first ratio and the first absolute value and the number of frequencies to obtain a discrete expression capability of each of the audio segments.
[0028] In one implementation, determining the actual adjustment requirement of each audio segment according to the discrete representation capability, the first spectrum information entropy, the maximum spectrum information entropy, and the second spectrum information entropy includes:
[0029] Determine a second ratio of the first spectrum information entropy to the maximum spectrum information entropy, a third ratio of the second spectrum information entropy to the maximum spectrum information entropy, and calculate a second product of the third ratio and the second ratio;
[0030] Calculate the difference in discreteness expression capabilities of adjacent audio segments to obtain the discreteness change difference of adjacent audio segments;
[0031] Determine a difference between a preset value and the second product, perform a second accumulation process according to the difference, a third product of the discrete change difference, and the number of the audio segments, and determine adjustment amplitudes of different frequency bands;
[0032] According to the fourth product of the adjustment amplitude and the discrete expression capability, the actual adjustment requirement of each of the audio segments is determined, and the actual adjustment requirement includes the adjustment requirements corresponding to different frequency bands.
[0033] In one implementation, determining the frequency boundary threshold between different frequency bands according to actual adjustment requirements of adjacent audio segments includes:
[0034] According to a preset first intersection point and a second intersection point for distinguishing different frequency bands, a first frequency range of a high frequency band, a second frequency range of a medium frequency band, and a third frequency range of a low frequency band are determined, wherein the first intersection point is a intersection point between the high frequency band and the medium frequency band, and the second intersection point is a intersection point between the low frequency band and the medium frequency band;
[0035] Determine a first difference result of the adjustment requirements corresponding to the high frequency bands of adjacent audio segments, and perform normalization processing on the first difference result to obtain a first normalized result;
[0036] When the first normalized result is greater than or equal to a preset threshold, the first intersection point is updated using the values in the first frequency range and the second frequency range to update the adjustment requirements corresponding to the high frequency bands of the adjacent audio segments, and according to the updated adjustment requirements corresponding to the high frequency bands, the step of determining the first difference result of the adjustment requirements corresponding to the high frequency bands of the adjacent audio segments is returned until the first normalized result is less than the preset threshold, and the current first intersection point is used as the first intersection threshold;
[0037] When the first normalized result is less than the preset threshold, the current first intersection point is used as the first intersection threshold, a second difference result of the adjustment requirement corresponding to the mid-frequency band of the adjacent audio segments is determined, and the second difference result is normalized to obtain a second normalized result;
[0038] When the second normalized result is greater than or equal to the preset threshold, the second intersection point is updated using the values in the second frequency range and the third frequency range to update the adjustment requirements corresponding to the mid-frequency bands of the adjacent audio segments, and according to the adjustment requirements corresponding to the updated mid-frequency bands, the step of determining the second difference result of the adjustment requirements corresponding to the mid-frequency bands of the adjacent audio segments is returned until the second normalized result is less than the preset threshold, and the current second intersection point is used as the second intersection threshold;
[0039] The frequency boundary thresholds between different frequency bands include a first boundary threshold and a second boundary threshold.
[0040] In one implementation, determining the target width parameter according to the second audio data, the frequency boundary threshold, and the actual adjustment requirement includes:
[0041] The second audio data is adjusted according to the set width parameter value to obtain new audio data;
[0042] Determining new actual adjustment requirements for each target audio segment in the new audio data according to the frequency boundary threshold;
[0043] A difference value between the new audio data and the second audio data is determined, and a set width parameter value is adjusted according to the difference value, the new actual adjustment requirement, and the number of target audio segments to obtain a target width parameter.
[0044] In one implementation, adjusting the set width parameter value according to the difference value, the new actual adjustment requirement, and the number of target audio segments to obtain the target width parameter includes:
[0045] Performing accumulation processing according to the new actual adjustment requirement and the number of the target audio segments to obtain an accumulation processing result;
[0046] Determining an actual value of a width parameter according to the product of the accumulation processing result and the difference value;
[0047] The set width parameter value is adjusted to minimize the actual value, and the set width parameter value corresponding to the minimum actual value is used as the target width parameter.
[0048] In a second aspect, an embodiment of the present application provides an adaptive guitar tone adjustment system based on audio recognition, comprising:
[0049] A collection module, used for collecting first audio data of the guitar, and dividing the first audio data into several audio segments;
[0050] An analysis module, used to perform audio analysis on the plurality of audio segments, and determine the actual adjustment requirements of each audio segment and the frequency boundary thresholds between different frequency bands;
[0051] A determination module, configured to collect second audio data of the guitar, and determine a target width parameter according to the second audio data, the frequency boundary threshold, and the actual adjustment requirement;
[0052] The adjustment module is used to adjust the second audio data to adjust the guitar timbre through the target width parameter.
[0053] The present invention has the following beneficial effects:
[0054] The first audio data of the guitar is collected and divided to obtain a plurality of audio segments, audio analysis is performed on the plurality of audio segments to determine the actual adjustment requirements of each audio segment and the frequency boundary threshold between different frequency bands, the second audio data of the guitar is collected, and the target width parameter is determined according to the second audio data, the frequency boundary threshold and the actual adjustment requirements. The second audio data is adjusted to adjust the guitar timbre according to the target width parameter. The frequency boundary threshold is conducive to improving the accuracy of the settings of different frequency bands. At the same time, the target width parameter is determined in combination with the actual adjustment requirement analysis to improve the accuracy of the target width parameter, thereby ensuring the accuracy and naturalness of the guitar timbre adjustment. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0056] Figure 1 A schematic flow chart of the steps of an adaptive guitar tone adjustment method based on audio recognition provided by one embodiment of the present invention;
[0057] Figure 2 A structural block diagram of an adaptive guitar tone adjustment system based on audio recognition provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0058] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following is a detailed description of the specific implementation, structure, features and effects of an adaptive guitar tone adjustment method and system based on audio recognition proposed by the present invention in combination with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.
[0059] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
[0060] The specific scheme of an adaptive guitar timbre adjustment method and system based on audio recognition provided by the present invention is described in detail below in conjunction with the accompanying drawings.
[0061] See also Figure 1 , which shows a flow chart of an adaptive guitar timbre adjustment method based on audio recognition provided by an embodiment of the present invention. The adaptive guitar timbre adjustment method based on audio recognition may at least include steps S100-S400:
[0062] S100: collecting first audio data of a guitar, and dividing the first audio data to obtain a plurality of audio segments.
[0063] S200: Perform audio analysis on a plurality of audio segments to determine actual adjustment requirements of each audio segment and frequency boundary thresholds between different frequency bands.
[0064] S300, collecting second audio data of the guitar, and determining a target width parameter according to the second audio data, a frequency boundary threshold, and actual adjustment requirements.
[0065] S400: Adjust the second audio data to adjust the guitar timbre by using the target width parameter.
[0066] The technical solution of the embodiment of the present application is to collect first audio data of the guitar and divide the first audio data to obtain several audio segments, perform audio analysis on the several audio segments, determine the actual adjustment requirements of each audio segment and the frequency boundary threshold between different frequency bands, collect second audio data of the guitar, determine the target width parameter according to the second audio data, the frequency boundary threshold and the actual adjustment requirements, adjust the second audio data to adjust the guitar timbre according to the target width parameter, and improve the accuracy of setting different frequency bands based on the frequency boundary threshold, so as to avoid the unnatural actual timbre caused by excessive or insufficient adjustment of the frequency change at the boundary position in the subsequent adjustment process due to inaccurate frequency band setting, and at the same time determine the target width parameter in combination with the actual adjustment requirements analysis, improve the accuracy of the target width parameter, thereby ensuring the accuracy and naturalness of the guitar timbre adjustment.
[0067] In one implementation, collecting the first audio data of the guitar in step S100 includes steps S101-S103:
[0068] S101 . Selecting a plurality of width parameter values in sequence from a preset value range according to preset intervals.
[0069] Optionally, in some equalizers, the width parameter value of the frequency band (i.e., the value of the width parameter Q, referred to as Q value) can be adjusted to control the slope and width of the frequency gain, making the audio processing more refined or broad. Therefore, based on prior knowledge, a preset value range [0.7, 4] is set, and the preset interval is 0.01. In the preset value range [0.7, 4], a width parameter value is selected at every interval of 0.01, thereby determining and storing several width parameter values, and the width parameter value changes linearly from small to large.
[0070] S102, collecting initial audio of the guitar, processing the initial audio using different width parameter values, and determining a number of adjustment audios corresponding to different width parameter values.
[0071] Optionally, an audio collection device can be installed just above the sound hole of the guitar, and the strings can be plucked with appropriate force to make the strings emit sound, and the entire sound gradual change process is ensured to be complete, that is, a sufficiently long collection time is ensured, at which time the audio collection device can collect the initial audio of the guitar. Then, the initial audio is processed by an equalizer using the different width parameter values determined above, thereby determining a number of adjusted audios corresponding to different width parameter values.
[0072] S103: Obtain first audio data of the guitar according to the plurality of adjusted audios.
[0073] Optionally, the first audio data for the guitar is constructed based on a plurality of adjusted audios.
[0074] It should be noted that when the equalizer is adjusting the timbre of the audio, the size of the bandwidth determines the problem to be solved or adjusted. Usually, a bandwidth with a lower value is used to adjust the timbre as a whole, such as overall bass enhancement or treble enhancement, while a higher bandwidth can be used to solve problems with specific frequencies, such as eliminating resonance or reducing noise at specific frequencies. However, in reality, due to the long-term use of different guitars or other damage, it is possible that the guitar's upper nut, lower nut, string cone and other related structures that fix the strings have different degrees of wear, which will cause noise-like interference data of different intensities in the actual monitored timbre-related data. This data affects the subsequent adjustment of the timbre. Therefore, the related technology directly uses the default Q value for audio processing based on experience, which cannot be applied to the actual conditions of different guitars. Among them, the performance of different timbres in the audio is reflected in the changing characteristics of the waveform over a period of time. For the audio in the single timbre test process, its amplitude gradually weakens with the increasing period. For clearer timbre, the data is manifested as different degrees of fluctuation locally in the waveform, while it is relatively smooth as a whole. Since the wear of the upper and lower string nuts may be uneven, the noise-like interference generated in the audio may show the characteristics of uneven frequency distribution. Some frequencies may be more prominent or obvious than other frequencies, and their characteristics are less in line with the above-mentioned local and overall characteristics. Based on this feature, the present application introduces a division processing step.
[0075] In one implementation, the first audio data is divided into several audio segments in step S100, including steps S104-S106:
[0076] S104: Fit the first audio data to determine a trend item representing an audio curve.
[0077] Optionally, when fitting the first audio data, one or more adjusted audios or all adjusted audios can be selected therefrom, and the processing of the adjusted audios is similar. Therefore, the processing of one adjusted audio is described here, and the processing of other adjusted audios is the same and will not be repeated.
[0078] Specifically, each amplitude in the adjusted audio is taken as a different audio point (data point), and then the least squares curve fitting is performed. The fitting curve of the adjusted audio can be regarded as the trend item of the audio curve. The trend item represents the audio curve, and the expression of the trend item is recorded as f(x).
[0079] S105 . Deriving the trend term, and determining a number of audio points whose derivative is 0.
[0080] S106. Determine an audio segment by using every two adjacent audio points to obtain a plurality of audio segments.
[0081] At the same time, the trend term represents the change in the pitch of the sound. The derivative f'(x) is obtained by differentiating the trend term f(x). Where there is an extreme point, the derivative of the curve must be 0. Therefore, several audio points where f'(x)=0 on the trend term f(x) curve can be obtained, and the frequency and amplitude of the audio points can be recorded. Then, every two adjacent audio points determine an independent audio segment, thereby obtaining several audio segments. The number of audio segments is recorded as N, and the number of audio points (number of frequencies) obtained in any audio segment is n. It should be noted that the theoretical number of sampling points for each audio segment is: the total number of sampling points (Length of this audio segment / total audio length).
[0082] In one implementation, step S200 includes steps S201-S205:
[0083] S201, determining a monotonic trend line of each audio segment, a first frequency, a second frequency, a first deviation value of a signal amplitude corresponding to the first frequency perpendicular to the monotonic trend line, and a second deviation value of a signal amplitude corresponding to the second frequency perpendicular to the monotonic trend line in each audio segment.
[0084] Optionally, after being divided into several audio segments, theoretically each audio segment has monotonicity. In order to remove the interference of monotonic growth on prominence acquisition, the embodiment of the present application obtains the corresponding slope mean of the monotonicity of the audio segment, thereby determining the monotonicity trend line of each audio segment.
[0085] Then, the first frequency is randomly determined in each audio segment. , Second Frequency , first frequency The corresponding signal amplitude is the first deviation value perpendicular to the monotonic trend line and the second frequency The corresponding signal amplitude is the second deviation value perpendicular to the monotonic trend line .
[0086] It should be noted that determining the slope to calculate the monotonic trend line and determining the first deviation value of the signal amplitude perpendicular to the monotonic trend line can be calculated using existing mathematical methods and will not be described in detail.
[0087] S202: Determine the discreteness expression capability of each audio segment according to the first frequency, the second frequency, the first deviation value, and the second deviation value.
[0088] Optionally, in order to determine the possible noise interference in each audio segment, the noise interference similar to the wear of the upper and lower string saddles in the audio segment has a certain randomness, which is reflected in the discrete deviation value of the prominence in the audio segment. Therefore, its discrete performance ability can be judged by combining the prominence feature values corresponding to each frequency. Specifically, determine the first frequency With the second frequency The first absolute value of the frequency difference And the frequency count of the audio segment , determine the first deviation value The second deviation The sum of , the first deviation value The second deviation The second absolute value of the difference , and calculate the first ratio of the sum to the second absolute value , and finally according to the first ratio With the first absolute value The first product of Perform the first accumulation process to obtain the discrete performance capability of each audio segment , the specific formula is:
[0089]
[0090] in, Representative The ability to express discrete audio segments; The larger the value of is, the greater its prominence is and the greater its ability to express discreteness is;
[0091] The smaller the value of is, the smaller the difference between the two values in the local audio segment is. The ratio is calculated to show the characteristic performance of the actual deviation value of any two frequencies. The larger the value, the greater the possibility of noise. At the same time, for the distribution of data points showing noise, the frequency difference is obtained, that is, the distance difference within the segment is expressed, that is, The greater the difference, the greater the difference in the distribution distance, and the higher its discrete performance ability; therefore, the first product is calculated by multiplying the two, and all data points in the segment are accumulated to obtain the discrete performance ability This value represents the discreteness of any audio segment. The larger the value, the higher the possibility of local noise.
[0092] It should be noted that guitar timbre usually involves three main frequency bands: low frequency band, mid-frequency band and high frequency band. As for timbre, it is manifested as its unique ripple characteristics in the spectrum. The special changing texture of the ripple determines the effect of the timbre. According to the desired timbre effect, an equalizer needs to be used to adjust the gain of each frequency band. For example, increasing the gain of a certain frequency band will emphasize the timbre characteristics of the frequency band, while reducing the gain will weaken the timbre characteristics of the frequency band. In this application, in order to avoid inaccurate frequency band separation and inaccurate bandwidth parameters, further subsequent processing is performed to determine the frequency boundary threshold and target width parameters between different frequency bands to improve the accuracy and naturalness of timbre adjustment.
[0093] S203: Determine a first spectrum information entropy corresponding to different frequency bands of any audio segment, a maximum spectrum information entropy, and a second spectrum information entropy corresponding to different frequency bands of an audio segment adjacent to the audio segment.
[0094] In the embodiment of the present application, the ripple performance of different frequency bands in the audio segment has a relatively obvious difference. The complexity of its own ripple determines the randomness of the numerical change of the differential value between its various spectrum graphs when it is affected by the width parameter value (Q value), that is, the tendency of random changes in the amplitude difference at the same time sequence position has different degrees of difference. When judging the adjustment amplitude of the ripple change caused by the bandwidth change, the influence of random changes should be removed as much as possible, thereby highlighting the influence of bandwidth changes on the data. Therefore, the first spectrum information entropy corresponding to different frequency bands of any audio segment is calculated and determined by the existing information entropy calculation method. , maximum spectrum information entropy And the second spectrum information entropy of the audio segment adjacent to the audio segment corresponding to the different frequency bands .
[0095] S204: determining actual adjustment requirements of each audio segment according to the discreteness representation capability, the first spectrum information entropy, the maximum spectrum information entropy, and the second spectrum information entropy.
[0096] Optionally, determining the first spectrum information entropy and the maximum spectrum information entropy (in the current frequency band) The second ratio , the second spectrum information entropy and the maximum spectrum information entropy The third ratio , and calculate the second product of the third ratio and the second ratio ; Calculate the difference in discrete performance between adjacent audio segments to obtain the difference in discrete changes between adjacent audio segments .
[0097] Finally, taking the preset value as 1 as an example, determine the difference between the preset value and the second product , according to the difference Difference from discrete changes The third product of the number of audio segments Perform the second accumulation process to determine the adjustment amplitude of different frequency bands. The specific calculation formula is:
[0098] in, For the The adjustment amplitude of each frequency band, that is, the The adjustment amplitude of the ripple change in each frequency band; is the frequency band number, representing any frequency band. For example, the values 1, 2, and 3 correspond to the high frequency band, the middle frequency band, and the low frequency band. Indicates the value of any width parameter value (Q value). Since adjacent audio segments are based on adjacent width parameter values, and width parameter values, so Indicates the difference in discrete changes between adjacent audio segments in the same frequency band, which can also be called the difference in discrete changes between two adjacent width parameter values in the same frequency band; the first spectrum information entropy Indicates In the frequency band The first spectrum information entropy of the audio segment corresponding to the width parameter value, the second spectrum information entropy Indicates In the frequency band The second spectrum information entropy of the audio segment corresponding to the width parameter value; D represents the total number of possible values within the preset value range of the width parameter value.
[0099] It should be noted that The larger the value, the greater the impact of the change in bandwidth (width parameter value) on the ripple characteristics within the current frequency band; It represents the normalized value of the information entropy of the audio segment in the current corresponding frequency band in all bandwidths. The smaller the difference, the lower the complexity of the audio segment in the current frequency band. The smaller the impact of data fluctuations generated in the process of subtracting from adjacent bandwidths, the higher the authenticity of the sum of differences calculated by the former. Indicates; at this time, by gradually traversing all adjacent bandwidths, we can get The larger the value, the The more sensitive a frequency band is to bandwidth changes, the more sensitive the bandwidth changes are to any The greater the adjustment range of the ripple change within a frequency band.
[0100] In the embodiment of the present application, the adjustment amplitude requirement in different audio segments depends on the randomness performance of the data points, that is, the discreteness performance. The greater the randomness performance, the greater the demand for the adjustment amplitude. Therefore, the actual adjustment requirement of each audio segment is determined based on the fourth product of the adjustment amplitude and the discreteness performance. , the specific calculation formula is:
[0101] The actual regulation requirements include the regulation requirements corresponding to different frequency bands, for example, Different values represent different frequency bands, and different calculations are performed accordingly. , representing The adjustment requirements corresponding to different frequency bands of each audio segment.
[0102] It should be noted that, since the aforementioned separation of different frequency bands is carried out by using the preset first intersection point and the second intersection point for distinguishing different frequency bands, it is difficult to reflect the actual adjustment needs by dividing and obtaining the center frequency range in this way. Therefore, it is necessary to determine a more accurate frequency boundary threshold between different frequency bands based on the actual adjustment needs.
[0103] S205: Determine the frequency boundary threshold between different frequency bands according to the actual adjustment requirements of adjacent audio segments.
[0104] Optionally, the frequency boundary thresholds between different frequency bands include a first boundary threshold and a second boundary threshold. In the embodiment of the present application, according to the preset first boundary point (the boundary point between the high frequency band and the medium frequency band) and the second boundary point (the boundary point between the low frequency band and the medium frequency band) for distinguishing different frequency bands, the first frequency range of the high frequency band, the second frequency range of the medium frequency band, and the third frequency range of the low frequency band are determined. Then, the high frequency band of the adjacent audio segment (for example, at this time =1, that is, The first difference result of the adjustment requirement corresponding to the frequency band) , and normalize the first difference result by using the exp function to obtain a first normalized result.
[0105] In the embodiment of the present application, the preset threshold is set to 0.5, and it can be adjusted as needed in other embodiments. Among them, when the first normalized result is greater than or equal to the preset threshold, it indicates that there is an obvious demand difference between adjacent audio segments, and the first intersection point needs to be updated at this time. Specifically: the first intersection point is updated using the values in the first frequency range and the second frequency range. Since the first intersection point is updated, based on the principle of the above-mentioned step S200, the adjustment demand corresponding to the high frequency segment of the adjacent audio segment is updated. According to the adjustment demand corresponding to the updated high frequency segment, the step of determining the first difference result of the adjustment demand corresponding to the high frequency segment of the adjacent audio segment is returned to obtain a new , until the first normalized result is less than the preset threshold, the current first intersection point is used as the first intersection threshold. At this time, the first intersection threshold is the finally determined intersection point for distinguishing the high frequency band from the medium frequency band.
[0106] In addition, when the first normalization result is less than the preset threshold, the current first intersection point is used as the first intersection threshold, and the first intersection threshold is the final intersection point for distinguishing the high frequency band from the mid-frequency band. Then, based on a similar principle, the mid-frequency band of the adjacent audio segment is continued to be determined (for example, at this time =2, i.e. the second difference result of the adjustment requirement corresponding to the second frequency band) , and normalize the second difference result by using the exp function to obtain a second normalized result.
[0107] Then, the second normalized result is compared with the preset threshold value. When the second normalized result is greater than or equal to the preset threshold value, the second intersection point is updated using the values in the second frequency range and the third frequency range. Since the second intersection point is updated, based on the principle of the above-mentioned step S200, the adjustment requirements corresponding to the mid-frequency bands of the adjacent audio segments are updated. According to the adjustment requirements corresponding to the updated mid-frequency bands, the step of determining the second difference result of the adjustment requirements corresponding to the mid-frequency bands of the adjacent audio segments is returned to determine the new , until the second normalization result is less than the preset threshold, the current second intersection point is used as the second intersection threshold, and the second intersection threshold is the final intersection point for distinguishing the mid-frequency band from the low-frequency band. Thus, a more accurate intersection point for distinguishing the high-frequency band, the mid-frequency band, and the low-frequency band is determined.
[0108] In one implementation, in step S300, the second audio data of the guitar is collected. An audio collection device may be installed just above the sound hole of the guitar to collect the audio of the user actually playing the guitar, for example, when playing a song. The collected audio data is the second audio data.
[0109] It should be noted that when using an equalizer to adjust the guitar tone, the entire audio data is usually adjusted with the same width parameter. The adjustment of the width parameter not only needs to take into account the actual needs of the user, that is, through a piece of audio data input by the user, the current guitar tone is adjusted to make it as close to the user's needs as possible, but also the noise must be filtered as much as possible in the process. Therefore, it is necessary to determine a more appropriate and accurate target width parameter.
[0110] In one implementation, the target width parameter is determined according to the second audio data, the frequency boundary threshold and the actual adjustment requirement in step S300, including steps S301-S303:
[0111] S301. Adjust the second audio data by using the set width parameter value to obtain new audio data.
[0112] Optionally, the second audio data is adjusted by setting a width parameter value such as Q' to obtain new audio data.
[0113] S302: Determine new actual adjustment requirements of each target audio segment in the new audio data according to the frequency boundary threshold.
[0114] Optionally, based on the frequency boundary thresholds including the first boundary threshold and the second boundary threshold, based on the principle of steps S100-S200, the new actual adjustment requirements of each target audio segment in the new audio data can be determined. , Indicates that The number of target audio segments.
[0115] S303: Determine a difference between the new audio data and the second audio data, and adjust the set width parameter value according to the difference, the new actual adjustment requirement, and the number of target audio segments to obtain a target width parameter.
[0116] Then, between the same frequencies, the new audio data and the second audio data are differentially operated to determine the differential value between the new audio data and the second audio data. , adjust the demand according to the new reality and the number of target audio segments 'Perform cumulative processing to obtain cumulative processing results ; According to the cumulative processing results and the difference value The actual value of the width parameter is determined by multiplying , represents the actual value of the width parameter calculated based on any one of the frequency bands divided by the first intersection threshold and the second intersection threshold, and the formula is:
[0117]
[0118] Finally, the difference value The smaller the better. The smaller the better, so by adjusting the width parameter value Q' to make the actual value Minimum, the actual value The set width parameter value Q' corresponding to the minimum is used as the target width parameter .
[0119] It should be noted that in some implementations, sub-target width parameters corresponding to different frequency bands may also be determined separately. In this case, the target width parameter It may include a total of three sub-target width parameters corresponding to the high frequency band, the middle frequency band and the low frequency band. When the second audio data is subsequently adjusted, the signals of the corresponding frequency bands in the second audio data are adjusted separately based on the corresponding sub-target width parameters, without specific limitation.
[0120] In one embodiment, in step S400, the target width parameter is set , using the equalizer based on the target width parameter The second audio data is adjusted to adjust the guitar timbre, thereby ultimately achieving the effect of accurately and naturally adjusting the guitar timbre.
[0121] Reference Figure 2 , shows a structural block diagram of an adaptive guitar tone adjustment system based on audio recognition according to an embodiment of the present application, the system may include:
[0122] The acquisition module is used to acquire the first audio data of the guitar and divide the first audio data into several audio segments;
[0123] An analysis module is used to perform audio analysis on a plurality of audio segments to determine the actual adjustment requirements of each audio segment and the frequency boundary thresholds between different frequency bands;
[0124] A determination module, used for collecting second audio data of the guitar, and determining a target width parameter according to the second audio data, a frequency boundary threshold and actual adjustment requirements;
[0125] The adjustment module is used to adjust the second audio data through a target width parameter to adjust the guitar timbre.
[0126] In the embodiment of the present application, the functions of each module in the system can be found in the corresponding description in the above method and will not be repeated here.
[0127] It should be noted that the sequence of the above embodiments of the present invention is only for description and does not represent the advantages and disadvantages of the embodiments. The processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0128] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.
Claims
1. Adaptive guitar tone adjustment method based on audio recognition, It is characterized in that The method comprises: Collecting first audio data of the guitar, and dividing the first audio data to obtain a plurality of audio segments; Performing audio analysis on the plurality of audio segments to determine the actual adjustment requirements of each audio segment and the frequency boundary thresholds between different frequency bands; Collecting second audio data of the guitar, and determining a target width parameter according to the second audio data, the frequency boundary threshold and the actual adjustment requirement; adjusting the second audio data to adjust the guitar timbre by using the target width parameter; The actual adjustment requirements of each audio segment and the method for obtaining the frequency boundary thresholds between different frequency bands are as follows: Determine a monotonic trend line of each of the audio segments, a first frequency, a second frequency, a first deviation value of the signal amplitude corresponding to the first frequency perpendicular to the monotonic trend line, and a second deviation value of the signal amplitude corresponding to the second frequency perpendicular to the monotonic trend line in each of the audio segments; Determining a discrete expression capability of each of the audio segments according to the first frequency, the second frequency, the first deviation value, and the second deviation value; Determine a first spectrum information entropy corresponding to different frequency bands of any audio segment, a maximum spectrum information entropy, and a second spectrum information entropy corresponding to different frequency bands of an audio segment adjacent to the audio segment; Determining actual adjustment requirements of each of the audio segments according to the discrete representation capability, the first spectrum information entropy, the maximum spectrum information entropy, and the second spectrum information entropy; The frequency boundary thresholds between different frequency bands are determined based on the actual adjustment requirements of adjacent audio segments.
2. According to the method for adaptive guitar tone adjustment based on audio recognition according to claim 1, Features: The collecting of the first audio data of the guitar comprises: Selecting a plurality of width parameter values in sequence according to preset intervals from a preset value range; Collecting initial audio of the guitar, processing the initial audio by using different width parameter values respectively, and determining a plurality of adjustment audios corresponding to the different width parameter values; According to the plurality of adjusted audios, first audio data of the guitar is obtained.
3. According to the method for adaptive guitar tone adjustment based on audio recognition according to claim 1, Features: The step of dividing the first audio data to obtain a plurality of audio segments includes: Fitting the first audio data to determine a trend item representing an audio curve; Deriving the trend term to determine a number of audio points where the derivative is 0; An audio segment is determined by every two adjacent audio points, thereby obtaining a plurality of audio segments.
4. The method for adaptively adjusting guitar tone based on audio recognition according to claim 1, Features: The determining of the discrete expression capability of each of the audio segments according to the first frequency, the second frequency, the first deviation value, and the second deviation value comprises: Determine a first absolute value of a frequency difference between the first frequency and the second frequency and the number of frequencies of the audio segment; Determine a sum of the first deviation value and the second deviation value and a second absolute value of a difference between the first deviation value and the second deviation value, and calculate a first ratio of the sum to the second absolute value; A first accumulation process is performed based on a first product of the first ratio and the first absolute value and the number of frequencies to obtain a discrete expression capability of each of the audio segments.
5. The method for adaptively adjusting guitar tone based on audio recognition according to claim 1, Features: The determining, according to the discrete representation capability, the first spectrum information entropy, the maximum spectrum information entropy, and the second spectrum information entropy, of the actual adjustment requirement of each of the audio segments comprises: Determine a second ratio of the first spectrum information entropy to the maximum spectrum information entropy, a third ratio of the second spectrum information entropy to the maximum spectrum information entropy, and calculate a second product of the third ratio and the second ratio; Calculate the difference in discreteness expression capabilities of adjacent audio segments to obtain the discreteness change difference of adjacent audio segments; Determine a difference between a preset value and the second product, perform a second accumulation process according to the difference, a third product of the discrete change difference, and the number of the audio segments, and determine adjustment amplitudes of different frequency bands; According to the fourth product of the adjustment amplitude and the discrete expression capability, the actual adjustment requirement of each of the audio segments is determined, and the actual adjustment requirement includes the adjustment requirements corresponding to different frequency bands.
6. The method for adaptively adjusting guitar tone based on audio recognition according to claim 5, Features: Determining the frequency boundary threshold between different frequency bands according to the actual adjustment requirements of adjacent audio segments includes: According to a preset first intersection point and a second intersection point for distinguishing different frequency bands, a first frequency range of a high frequency band, a second frequency range of a medium frequency band, and a third frequency range of a low frequency band are determined, wherein the first intersection point is a intersection point between the high frequency band and the medium frequency band, and the second intersection point is a intersection point between the low frequency band and the medium frequency band; Determine a first difference result of the adjustment requirements corresponding to the high frequency bands of adjacent audio segments, and perform normalization processing on the first difference result to obtain a first normalized result; When the first normalized result is greater than or equal to a preset threshold, the first intersection point is updated using the values in the first frequency range and the second frequency range to update the adjustment requirements corresponding to the high frequency bands of the adjacent audio segments, and according to the updated adjustment requirements corresponding to the high frequency bands, the step of determining the first difference result of the adjustment requirements corresponding to the high frequency bands of the adjacent audio segments is returned until the first normalized result is less than the preset threshold, and the current first intersection point is used as the first intersection threshold; When the first normalized result is less than the preset threshold, the current first intersection point is used as the first intersection threshold, a second difference result of the adjustment requirement corresponding to the mid-frequency band of the adjacent audio segments is determined, and the second difference result is normalized to obtain a second normalized result; When the second normalized result is greater than or equal to the preset threshold, the second intersection point is updated using the values in the second frequency range and the third frequency range to update the adjustment requirements corresponding to the mid-frequency bands of the adjacent audio segments, and according to the adjustment requirements corresponding to the updated mid-frequency bands, the step of determining the second difference result of the adjustment requirements corresponding to the mid-frequency bands of the adjacent audio segments is returned until the second normalized result is less than the preset threshold, and the current second intersection point is used as the second intersection threshold; The frequency boundary thresholds between different frequency bands include a first boundary threshold and a second boundary threshold.
7. The method for adaptively adjusting guitar tone based on audio recognition according to claim 1, Features: The determining of the target width parameter according to the second audio data, the frequency boundary threshold and the actual adjustment requirement includes: The second audio data is adjusted according to the set width parameter value to obtain new audio data; Determining new actual adjustment requirements for each target audio segment in the new audio data according to the frequency boundary threshold; A difference value between the new audio data and the second audio data is determined, and a set width parameter value is adjusted according to the difference value, the new actual adjustment requirement, and the number of target audio segments to obtain a target width parameter.
8. The method for adaptively adjusting guitar timbre based on audio recognition according to claim 7, Features: The step of adjusting the set width parameter value according to the difference value, the new actual adjustment requirement and the number of target audio segments to obtain the target width parameter includes: Performing accumulation processing according to the new actual adjustment requirement and the number of the target audio segments to obtain an accumulation processing result; Determining an actual value of a width parameter according to the product of the accumulation processing result and the difference value; The set width parameter value is adjusted to minimize the actual value, and the set width parameter value corresponding to the minimum actual value is used as the target width parameter.
9. An adaptive guitar tone adjustment system based on audio recognition, It is characterized in that include: A collection module, used for collecting first audio data of the guitar, and dividing the first audio data into several audio segments; An analysis module, used to perform audio analysis on the plurality of audio segments, and determine the actual adjustment requirements of each audio segment and the frequency boundary thresholds between different frequency bands; A determination module, configured to collect second audio data of the guitar, and determine a target width parameter according to the second audio data, the frequency boundary threshold, and the actual adjustment requirement; An adjustment module, used for adjusting the second audio data to adjust the guitar timbre by using the target width parameter; The actual adjustment requirements of each audio segment and the method for obtaining the frequency boundary thresholds between different frequency bands are as follows: Determine a monotonic trend line of each of the audio segments, a first frequency, a second frequency, a first deviation value of the signal amplitude corresponding to the first frequency perpendicular to the monotonic trend line, and a second deviation value of the signal amplitude corresponding to the second frequency perpendicular to the monotonic trend line in each of the audio segments; Determining a discrete expression capability of each of the audio segments according to the first frequency, the second frequency, the first deviation value, and the second deviation value; Determine a first spectrum information entropy corresponding to different frequency bands of any audio segment, a maximum spectrum information entropy, and a second spectrum information entropy corresponding to different frequency bands of an audio segment adjacent to the audio segment; Determining actual adjustment requirements of each of the audio segments according to the discrete representation capability, the first spectrum information entropy, the maximum spectrum information entropy, and the second spectrum information entropy; The frequency boundary thresholds between different frequency bands are determined based on the actual adjustment requirements of adjacent audio segments.
