Polyphonic recognition method and computer readable storage medium

By dividing the time domain of the audio in sound recognition technology and performing Fourier transform, the energy values ​​within the frequency range of multiple tones are identified, which solves the problem that the existing technology cannot identify multiple tones and improves the efficiency of automated musical instrument performance scoring. Accuracy.

CN115240643BActive Publication Date: 2024-10-29FUJIAN STAR NET EVIDEO INFORMATION SYST CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210836124.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-15
Publication Date
2024-10-29
Estimated Expiration
2042-07-15

AI Technical Summary

Technical Problem

Existing sound recognition technology cannot recognize multiple tones in one unit of time, resulting in limited accuracy of the automated musical instrument performance scoring system.

Method used

By determining the frequency range of each sound, dividing the unit time in the audio time domain, performing Fourier transform, obtaining the energy value of each frequency range, combined with the preset frequency domain energy threshold, determining the sound existing in the unit time, Realize multi-sound recognition.

Benefits of technology

The accuracy of automated performance scoring has been improved, and it can accurately identify whether multiple notes are played at the same time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115240643B_ABST
    Figure CN115240643B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for multi-tone recognition and a computer-readable storage medium, the method comprising: determining the frequency range corresponding to each tone according to the frequency of each tone; obtaining audio, and dividing the audio in the time domain of the audio according to a preset unit time; performing Fourier transform on the audio of each unit time respectively to obtain the energy value of each frequency range in each unit time, and determining the tones existing in each unit time respectively according to the energy value of each frequency range, the preset frequency domain energy threshold corresponding to each frequency range and the tone corresponding to each frequency range. The present invention can recognize multiple tones in the same unit time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of sound recognition, and in particular to a polyphonic recognition method and a computer-readable storage medium. Background Art

[0002] The current automated instrument performance scoring system recognizes the notes played by the performer through sound recognition, and determines whether they are consistent with the notes at the corresponding time in the score. However, the current sound recognition can only recognize one fundamental tone in a unit time. If multiple notes are played at the same time in a unit time, only one tone can be recognized, and this recognized tone may not be any of the played notes. Therefore, the existing sound recognition method has limitations and cannot recognize multiple notes in a unit time. Summary of the invention

[0003] The technical problem to be solved by the present invention is to provide a multi-sound recognition method and a computer-readable storage medium, which can recognize multiple sounds within the same unit time.

[0004] In order to solve the above technical problems, the technical solution adopted by the present invention is: a polyphonic recognition method, comprising:

[0005] According to the frequency of each tone, determine the frequency range corresponding to each tone;

[0006] Acquire audio, and divide the audio in the time domain of the audio according to a preset unit time;

[0007] Perform Fourier transform on the audio of each unit time to obtain the energy value of each frequency range in each unit time, and determine the sound existing in each unit time based on the energy value of each frequency range, the preset frequency domain energy threshold corresponding to each frequency range, and the sound corresponding to each frequency range.

[0008] The present invention also provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the method described above is implemented.

[0009] The beneficial effect of the present invention is that by dividing the audio and performing Fourier transform on the audio of each unit time, the energy value of each frequency range can be obtained. When the energy value in a certain frequency range exceeds the preset frequency domain energy threshold, it indicates that there is sound in the frequency range. If there are sounds in multiple frequency ranges in the same unit time, it indicates that there are multiple sounds in the unit time. The present invention can realize multi-tone recognition, determine whether multiple sounds are played at the same time, and improve the accuracy of automated performance scoring. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] Figure 1A flow chart of a polyphonic recognition method of the present invention;

[0011] Figure 2 This is a flow chart of a method according to Embodiment 1 of the present invention;

[0012] Figure 3 This is a diagram showing the frequencies and pitches corresponding to the 88 notes. DETAILED DESCRIPTION

[0013] In order to explain the technical content, achieved objectives and effects of the present invention in detail, the following is a detailed description in conjunction with the implementation methods and the accompanying drawings.

[0014] See also Figure 1 , a polyphonic recognition method, comprising:

[0015] According to the frequency of each tone, determine the frequency range corresponding to each tone;

[0016] Acquire audio, and divide the audio in the time domain of the audio according to a preset unit time;

[0017] Perform Fourier transform on the audio of each unit time to obtain the energy value of each frequency range in each unit time, and determine the sound existing in each unit time based on the energy value of each frequency range, the preset frequency domain energy threshold corresponding to each frequency range, and the sound corresponding to each frequency range.

[0018] From the above description, it can be seen that the beneficial effects of the present invention are: it can realize multi-tone recognition, determine whether multiple notes are played simultaneously at the same time, and improve the accuracy of automated performance scoring.

[0019] Furthermore, the frequency range corresponding to each tone is determined according to the frequency of each tone as follows:

[0020] The frequency resolution of Fourier transform is determined according to the frequency difference of the two tones with the smallest frequency difference among all the tones;

[0021] The frequency range corresponding to each tone is determined according to the frequency of each tone and the frequency resolution.

[0022] Furthermore, the frequency range corresponding to each tone is determined according to the frequency of each tone and the frequency resolution as follows:

[0023] Sort the sounds from small to large according to their frequencies;

[0024] Determine whether a sound is the sound with the smallest frequency;

[0025] If yes, then calculate the average value of the frequency of the tone and the frequency of the next tone to obtain the first maximum frequency value corresponding to the tone, and calculate the first minimum frequency value corresponding to the tone according to the frequency of the tone and the first maximum frequency value corresponding to the tone;

[0026] If not, determining whether the sound is the sound with the highest frequency;

[0027] If yes, then calculate the average of the frequency of the tone and the frequency of the previous tone to obtain the first minimum frequency value corresponding to the tone, and calculate the first maximum frequency value corresponding to the tone according to the frequency of the tone and the first minimum frequency value corresponding to the tone;

[0028] If not, then the frequency of a tone and the average frequency of the previous tone are calculated to obtain a first minimum frequency value corresponding to the tone, and the frequency of the tone and the average frequency of the next tone are calculated to obtain a first maximum frequency value corresponding to the tone;

[0029] A frequency range corresponding to the sound is determined according to a first minimum frequency value, a first maximum frequency value, and the frequency resolution corresponding to the sound.

[0030] From the above description, it can be seen that the frequency ranges corresponding to the various sounds are ensured not to overlap, thereby ensuring the accuracy of sound recognition.

[0031] Further, the determining of the frequency range corresponding to the sound according to the first minimum frequency value, the first maximum frequency value and the frequency resolution corresponding to the sound is specifically:

[0032] Taking the integer multiple value of the frequency resolution which is greater than the first minimum frequency value corresponding to the sound and has the smallest difference with the first minimum frequency value corresponding to the sound as the second minimum frequency value corresponding to the sound;

[0033] Taking the integer multiple value of the frequency resolution which is smaller than the first maximum frequency value corresponding to the sound and has the smallest difference with the first maximum frequency value corresponding to the sound as the second maximum frequency value corresponding to the sound;

[0034] A frequency range corresponding to the sound is determined according to the second minimum frequency value and the second maximum frequency value corresponding to the sound.

[0035] From the above description, it can be seen that the frequency range corresponding to each sound can be appropriately narrowed to further ensure that the frequency ranges of various sounds do not overlap, thereby more accurately distinguishing sounds with adjacent frequencies.

[0036] Furthermore, before determining the frequency range corresponding to the sound according to the second minimum frequency value and the second maximum frequency value corresponding to the sound, the method further includes:

[0037] Determine whether a difference between a second maximum frequency value and a second minimum frequency value corresponding to the sound is greater than a preset range span threshold;

[0038] If not, executing the step of determining the frequency range corresponding to the sound according to the second minimum frequency value and the second maximum frequency value corresponding to the sound;

[0039] If so, the frequency range corresponding to the tone is determined according to the frequency of the tone and a preset range span value.

[0040] From the above description, it can be seen that by properly controlling the span value of the frequency range, the misjudgment of sound recognition caused by sounds that are not sounds can be effectively removed, thereby greatly improving the accuracy of sound recognition.

[0041] Further, the audio is obtained, and the audio is divided in the time domain of the audio according to a preset unit time; the audio of each unit time is Fourier transformed to obtain the energy value of each frequency range in each unit time, and the sound existing in each unit time is determined according to the energy value of each frequency range, the preset frequency domain energy threshold corresponding to each frequency range, and the sound corresponding to each frequency range, specifically:

[0042] Acquire audio, and divide the audio in a time domain of the audio according to a preset first unit time;

[0043] Performing Fourier transform on the audio of each first unit time respectively to obtain energy values ​​of each frequency range in each first unit time, and determining the sound existing in each first unit time respectively according to the energy values ​​of each frequency range, the preset first frequency domain energy threshold corresponding to each frequency range, and the sound corresponding to each frequency range;

[0044] Determine the first minimum unit time corresponding to each first unit time according to the frequency difference between two sounds with the smallest frequency difference in the sounds existing in each first unit time, and determine the second unit time corresponding to each first unit time according to the first minimum unit time corresponding to each first unit time and a preset second minimum unit time, wherein the second unit time is less than the first unit time;

[0045] Dividing the audio of each first unit time according to the second unit time corresponding to each first unit time;

[0046] Perform Fourier transform on the audio of each second unit time to obtain the energy value of each frequency range in each second unit time, and determine the sound existing in each second unit time based on the energy value of each frequency range, the preset second frequency domain energy threshold corresponding to each frequency range, and the sound corresponding to each frequency range.

[0047] From the above description, it can be seen that by first dividing the unit time into larger pieces, it is possible to determine which notes are played in each first unit time, and then the first unit time is divided again to determine the specific playing times of these notes.

[0048] Furthermore, after respectively determining the sounds existing in each second unit time, the method further includes:

[0049] The start and end times of each note are determined based on the notes existing in each second unit time in each first unit time, and the note to be played at each time is determined based on the start and end times of each note.

[0050] It can be seen from the above description that the accuracy of automated performance scoring can be improved by analyzing the start and end times of each note.

[0051] Further, the audio of each first unit time is respectively subjected to Fourier transform to obtain the energy value of each frequency range in each first unit time, and the sound existing in each first unit time is respectively determined according to the energy value of each frequency range, the preset first frequency domain energy threshold corresponding to each frequency range, and the sound corresponding to each frequency range, specifically:

[0052] Performing Fourier transform on the audio of a first unit time to obtain energy values ​​of each frequency range within the first unit time;

[0053] If the energy value of a frequency range within the first unit time is greater than a preset first frequency domain energy threshold corresponding to the frequency range, it is determined that there is sound corresponding to the frequency range within the first unit time.

[0054] Further, the audio of each second unit time is respectively subjected to Fourier transform to obtain the energy value of each frequency range in each second unit time, and the sound existing in each second unit time is respectively determined according to the energy value of each frequency range, the preset second frequency domain energy threshold corresponding to each frequency range, and the sound corresponding to each frequency range, specifically:

[0055] Performing Fourier transform on the audio of a second unit time to obtain energy values ​​of each frequency range within the second unit time;

[0056] If the energy value of a frequency range within the second unit time is greater than a preset second frequency domain energy threshold corresponding to the frequency range, it is determined that there is sound corresponding to the frequency range within the second unit time.

[0057] From the above description, it can be seen that if the energy value of a certain frequency range is greater than the preset frequency domain energy threshold, it is considered that there is energy in the frequency range, that is, it is considered that there is sound corresponding to the frequency range.

[0058] Further, the first minimum unit time corresponding to each first unit time is determined according to the frequency difference between two sounds with the smallest frequency difference in the sounds existing in each first unit time, and the second unit time corresponding to each first unit time is determined according to the first minimum unit time corresponding to each first unit time and the preset second minimum unit time, specifically:

[0059] Determine a unit frequency resolution according to a frequency difference between two sounds with the smallest frequency difference in the sounds existing in a first unit time, and determine a first minimum unit time corresponding to the first unit time according to the unit frequency resolution;

[0060] The second unit time corresponding to the first unit time is determined according to a first minimum unit time corresponding to the first unit time and a preset second minimum unit time.

[0061] It can be seen from the above description that by subdividing the first unit time as much as possible, the specific playing moment of the sound within the first unit time can be accurately identified.

[0062] The present invention also provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the method described above is implemented.

[0063] Embodiment 1

[0064] Please refer to Figure 2-3 , Embodiment 1 of the present invention is: a polyphonic recognition method, which can be applied to an automated performance scoring system.

[0065] The resolution of FFT (Fourier transform) is defined as f_div=fs / N, where fs is the sampling frequency, N is the number of sampling points, N=fs*t, and t is the unit time. According to the above formula, the unit time t division in the time domain is inversely correlated with the range of the unit frequency f_div after the Fourier transform, that is, the smaller the unit time division in the time domain, that is, the fewer the number of sampling points N, the larger the range of the unit frequency after the Fourier transform (that is, the coarser the frequency resolution); the larger the unit time division in the time domain, that is, the larger the number of sampling points N, the smaller the range of the unit frequency after the Fourier transform (that is, the finer the frequency resolution).

[0066] It can be inferred that if you want to determine which notes are played in an audio segment, you need to divide the unit time into larger units to determine which notes are played; and if you want to determine at what time these notes are played, whether there are multiple notes played at the same time, and whether these notes are played multiple times, you need to divide the unit time into smaller units to determine the specific playing time of these notes and the number of times the same note is played, and to determine whether multiple notes are played simultaneously at the same time.

[0067] Therefore, if Figure 2 As shown, the method comprises the following steps:

[0068] S1: Determine the frequency range corresponding to each tone according to the frequency of each tone.

[0069] There are 88 notes in music from "A0" to "C8", and the frequency and pitch of each note are as follows: Figure 3 As shown, it can be seen that the frequency distribution range of these notes is [27.5, 4186]. Since the frequency of each note is fixed, as long as it is analyzed that there is energy in the frequency range where the frequency is located, it can be considered that the note is being played.

[0070] The two notes with the smallest frequency difference among the 88 notes are "A0" and "sharp A0". The frequencies of the two notes are 27.5Hz and 29.135Hz respectively, and the frequency difference is 29.135-27.5=1.635Hz. Therefore, if the frequency resolution of FFT is less than 1.635Hz, the two notes can be separated. At this time, the unit resolution can be taken as 1Hz, which can more accurately distinguish the two notes. According to the definition of FFT resolution above, when the number of sampling points is the same as the sampling frequency, the frequency resolution after Fourier transform is 1, that is, 1 second is divided into a unit time. After Fourier transform, the energy value in each frequency range can be obtained. If the energy value of a certain frequency range exceeds its corresponding frequency domain energy threshold, it can be determined that there is energy in the frequency range, that is, it is considered that the corresponding tone of the frequency range exists. For example, the frequency of the tone "C4" is 261.63Hz. If there is energy in the frequency range [261, 262], it can be considered that the playing tone "C4" is present.

[0071] A certain amount of redundancy may be appropriately given to the frequency range, but the maximum range of the redundancy cannot exceed half of the frequency difference between two adjacent tones in frequency, so that the frequency ranges corresponding to the various tones do not overlap.

[0072] Therefore, specifically, this step includes the following steps:

[0073] S101: Determine the frequency resolution of Fourier transform according to the frequency difference between two tones with the smallest frequency difference among all tones. Preferably, the frequency difference between two tones with the smallest frequency difference may be rounded down to obtain the frequency resolution of Fourier transform.

[0074] S102: Sort the sounds in ascending order according to the frequency of each sound.

[0075] S103: Determine whether a tone is the tone with the smallest frequency. If so, execute step S104; if not, execute step S105.

[0076] S104: Calculate the average value of the frequency of the tone and the frequency of the next tone to obtain the first maximum frequency value corresponding to the tone, and calculate the first minimum frequency value corresponding to the tone according to the frequency of the tone and the first maximum frequency value corresponding to the tone. Then execute step S108.

[0077] Since the sound with the smallest frequency cannot calculate the frequency average value with the previous sound like other sounds, the frequency of the sound is defined as the average value of the first minimum frequency value and the first maximum frequency value corresponding to it, and the corresponding first minimum frequency value is calculated based on this definition.

[0078] Specifically, the difference between twice the frequency of the tone and the first maximum frequency value corresponding to the tone is calculated, and the difference is the first minimum frequency value corresponding to the tone.

[0079] S105: Determine whether the sound is the sound with the highest frequency. If so, execute step S106; if not, execute step S107.

[0080] S106: Calculate the average value of the frequency of the tone and the frequency of the previous tone to obtain the first minimum frequency value corresponding to the tone, and calculate the first maximum frequency value corresponding to the tone according to the frequency of the tone and the first minimum frequency value corresponding to the tone. Then execute step S108.

[0081] Since the sound with the highest frequency cannot calculate the frequency average with the subsequent sound like other sounds, the frequency of the sound is defined as the average of its corresponding first minimum frequency value and first maximum frequency value, and the corresponding first maximum frequency value is calculated based on this definition.

[0082] Specifically, the difference between twice the frequency of the tone and the first minimum frequency value corresponding to the tone is calculated, and the difference is the first maximum frequency value corresponding to the tone.

[0083] S107: Calculate the frequency of a tone and the average value of the frequency of the previous tone to obtain the first minimum frequency value corresponding to the tone, and calculate the frequency of the tone and the average value of the frequency of the next tone to obtain the first maximum frequency value corresponding to the tone. Then execute step S108.

[0084] S108: Determine a frequency range corresponding to the sound according to a first minimum frequency value, a first maximum frequency value, and the frequency resolution corresponding to the sound.

[0085] In an optional embodiment, the frequency range corresponding to the tone can be determined directly according to the first minimum frequency value and the first maximum frequency value corresponding to the tone. For example, the frequency of the tone "C4" is 261.63 Hz, the frequency of the tone "B3" which is smaller than the frequency of the tone "C4" is 246.94 Hz, and the frequency of the tone "sharp C4" which is larger than the frequency of the tone "C4" is 277.18 Hz, then the frequency range corresponding to the tone "C4" is (254.285, 269.405).

[0086] In this embodiment, an integer multiple value of the frequency resolution that is greater than the first minimum frequency value corresponding to the tone and has the smallest difference with the first minimum frequency value corresponding to the tone is used as the second minimum frequency value corresponding to the tone; at the same time, an integer multiple value of the frequency resolution that is less than the first maximum frequency value corresponding to the tone and has the smallest difference with the first maximum frequency value corresponding to the tone is used as the second maximum frequency value corresponding to the tone; then, the frequency range corresponding to the tone is determined based on the second minimum frequency value and the second maximum frequency value corresponding to the tone.

[0087] For example, the first minimum frequency value corresponding to "C4" is 254.285Hz, the first maximum frequency value is 269.4Hz, and the frequency resolution is 1Hz. The first minimum frequency value is rounded up to obtain the second minimum frequency value, and the first maximum frequency value is rounded down to obtain the second maximum frequency value. At this time, the frequency range corresponding to "C4" is [255, 269].

[0088] Furthermore, since the frequencies of some tones differ greatly, the span of the frequency range corresponding to them is also large. For example, the frequency of the tone "F7" is 2793Hz, the frequency of the tone "F#7" is 2960Hz, and the frequency of the tone "G7" is 3136Hz. The second minimum frequency value and the second maximum frequency value corresponding to the tone "F#7" are 2877Hz and 3048Hz, respectively. If the frequency range is determined by this value, the span of the frequency range of the tone "F#7" will reach 171Hz. Therefore, in another optional embodiment, if the span of the frequency range corresponding to a tone is too large, its frequency range is reduced. Specifically, the difference between the second maximum frequency value and the second minimum frequency value corresponding to the tone is greater than the preset range span threshold. Then, according to the frequency of the tone and the preset range span value, the frequency range corresponding to the tone is determined. Preferably, the range span threshold is 50Hz, the range span value is 50Hz, and the frequency of the tone is the median of the corresponding reduced frequency range.

[0089] S2: Acquire audio, that is, acquire performance audio, and divide the audio in the time domain of the audio according to a preset first unit time. Preferably, the first unit time t1 can be 1 second.

[0090] S3: Perform Fourier transform on the audio of each first unit time respectively to obtain the energy value of each frequency range in each first unit time, and determine the sound existing in each first unit time according to the energy value of each frequency range, the preset first frequency domain energy threshold corresponding to each frequency range and the sound corresponding to each frequency range.

[0091] Specifically, a Fourier transform is performed on the audio of a first unit time to obtain the energy value of each frequency range within the first unit time; if the energy value of a frequency range within the first unit time is greater than a preset first frequency domain energy threshold corresponding to the frequency range, it is determined that there is sound corresponding to the frequency range within the first unit time.

[0092] For each frequency range, the same first frequency domain energy threshold may be set, or a corresponding first frequency domain energy threshold may be set for each frequency range.

[0093] S4: Determine the first minimum unit time corresponding to each first unit time based on the frequency difference between two sounds with the smallest frequency difference among the sounds existing in each first unit time, and determine the second unit time corresponding to each first unit time based on the first minimum unit time corresponding to each first unit time and the preset second minimum unit time, wherein the second unit time t2 is less than the first unit time t1.

[0094] Specifically, if the number of sounds present within a first unit of time is greater than or equal to 2, then based on the frequency difference between the two sounds with the smallest frequency difference among the sounds present within the first unit of time, the unit frequency resolution f_div is determined. Then, according to the formula f_div = fs / N = fs / (fs*T1) = 1 / T1, the first minimum unit time T1 is determined. At the same time, due to human physiological limitations, the person with the Guinness World Record can strike the keyboard at most 13 times in 1 second. Therefore, the second minimum unit time T2 = 1 / 13 s is preset.

[0095] If T1 exists and T1 > T2, then T = T1; if T1 < T2, then T = T2; if T1 does not exist, then T = T2. Finally, based on T, the second unit time t2 is determined, where t2 ≥ T.

[0096] S5: Divide the audio of each first unit time according to the corresponding second unit time of each first unit time.

[0097] S6: Perform Fourier transforms on the audio of each second unit time to obtain the energy values of each frequency range within each second unit time, and determine the sounds present within each second unit time based on the energy values of each frequency range, the preset second frequency domain energy thresholds corresponding to each frequency range, and the sounds corresponding to each frequency range.

[0098] Specifically, perform a Fourier transform on the audio of a second unit time to obtain the energy values of each frequency range within the second unit time; if the energy value of a frequency range within the second unit time is greater than the preset second frequency domain energy threshold corresponding to the frequency range, then it is determined that the sound corresponding to the frequency range is present within the second unit time.

[0099] Among them, for each frequency range, the same second frequency domain energy threshold can be set, or each frequency range can be set with a corresponding second frequency domain energy threshold.

[0100] In an alternative embodiment, the first frequency domain energy threshold and the second frequency domain energy threshold corresponding to the same frequency range are equal.

[0101] Furthermore, the sounds present within the first unit time have been determined in step S3. Therefore, in this step, it is only necessary to determine whether the energy values of the frequency ranges corresponding to these sounds are greater than the corresponding second frequency domain energy thresholds.

[0102] S7: Determine the start and end times of each sound based on the sounds present within each second unit time of each first unit time, and determine the sound that starts to be played at each time based on the start and end times of each sound.

[0103] That is, all the notes played in the second unit time obtained by the above steps are summarized and analyzed. For example, assuming that the note "E4" exists in the e-th second unit time (i.e., the e-th moment), and the note "E4" does not exist in the e-1-th second unit time, then the note "E4" is played at the beginning of the e-th second unit time. Assuming that the note "E4" exists in the e+1-th second unit time and the following second unit times, until the note is not detected in the e+f-th (f>1)-th second unit time, it can be considered that the performance start and end times of the note "E4" are [e, e+f-1], that is, the performance start time is the e-th second unit time, and the performance stop time is the e+f-1-th second unit time.

[0104] If the playing start time of multiple notes is all e, it can be considered that multiple notes start to be played at time e (i.e. the e-th second unit time).

[0105] This embodiment can identify multiple notes at the same time, and can also identify the time when these notes start. Compared with the existing solution that can only identify one note per unit time, it can better solve the problem of multiple notes recognition in the same unit time. After recognition, it can be used for scoring and teaching to determine whether the number and pitch value of the notes played by the performer at the current moment are consistent with those in the score, thereby improving the accuracy of automated performance scoring.

[0106] Embodiment 2

[0107] The present embodiment is a computer-readable storage medium corresponding to the above-mentioned embodiment, on which a computer program is stored. When the computer program is executed by the processor, the various processes in the above-mentioned polyphonic recognition method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0108] In summary, the present invention provides a method for identifying multiple sounds and a computer-readable storage medium. By determining the frequency range corresponding to each sound according to the frequency and frequency resolution of each sound, it is ensured that the frequency ranges of each sound will not overlap, thereby more accurately distinguishing sounds with adjacent frequencies; by first dividing the unit time into a larger number and performing Fourier transform on the audio of each first unit time, the energy value in each frequency range can be obtained. When the energy value in a certain frequency range exceeds a preset frequency domain energy threshold, it indicates that there is a sound in the frequency range. If there are multiple frequency ranges with sounds in the same first unit time, it indicates that there are multiple sounds in the first unit time; by dividing the first unit time and detecting the sounds existing in each second unit time, the specific playing time of the sounds existing in the first unit time can be determined, so that it can be judged whether the number and pitch values ​​of the sounds played by the performer at the current moment are consistent with those in the score, thereby improving the accuracy of automated performance scoring.

[0109] The above descriptions are merely embodiments of the present invention and are not intended to limit the patent scope of the present invention. Any equivalent transformations made using the contents of the present invention's specification and drawings, or directly or indirectly applied in related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A polyphonic recognition method, characterized in that: include: According to the frequency of each tone, determine the frequency range corresponding to each tone; Acquire audio, and divide the audio in the time domain of the audio according to a preset unit time; Performing Fourier transform on the audio of each unit time respectively to obtain the energy value of each frequency range in each unit time, and determining the sound existing in each unit time respectively according to the energy value of each frequency range, the preset frequency domain energy threshold corresponding to each frequency range and the sound corresponding to each frequency range; The frequency range corresponding to each tone is determined according to the frequency of each tone: The frequency resolution of Fourier transform is determined according to the frequency difference of the two tones with the smallest frequency difference among all the tones; The frequency range corresponding to each tone is determined according to the frequency of each tone and the frequency resolution.

2. The polyphonic recognition method according to claim 1, characterized in that: The frequency range corresponding to each tone is determined according to the frequency of each tone and the frequency resolution as follows: Sort the sounds from small to large according to their frequencies; Determine whether a sound is the sound with the smallest frequency; If yes, then calculate the average value of the frequency of the tone and the frequency of the next tone to obtain the first maximum frequency value corresponding to the tone, and calculate the first minimum frequency value corresponding to the tone according to the frequency of the tone and the first maximum frequency value corresponding to the tone; If not, determining whether the sound is the sound with the highest frequency; If yes, then calculate the average of the frequency of the tone and the frequency of the previous tone to obtain the first minimum frequency value corresponding to the tone, and calculate the first maximum frequency value corresponding to the tone according to the frequency of the tone and the first minimum frequency value corresponding to the tone; If not, then the frequency of a tone and the average frequency of the previous tone are calculated to obtain a first minimum frequency value corresponding to the tone, and the frequency of the tone and the average frequency of the next tone are calculated to obtain a first maximum frequency value corresponding to the tone; A frequency range corresponding to the sound is determined according to a first minimum frequency value, a first maximum frequency value, and the frequency resolution corresponding to the sound.

3. The polyphonic recognition method according to claim 2, characterized in that: The determining of the frequency range corresponding to the sound according to the first minimum frequency value, the first maximum frequency value and the frequency resolution corresponding to the sound is specifically: Taking the integer multiple value of the frequency resolution which is greater than the first minimum frequency value corresponding to the sound and has the smallest difference with the first minimum frequency value corresponding to the sound as the second minimum frequency value corresponding to the sound; Taking the integer multiple value of the frequency resolution which is smaller than the first maximum frequency value corresponding to the sound and has the smallest difference with the first maximum frequency value corresponding to the sound as the second maximum frequency value corresponding to the sound; A frequency range corresponding to the sound is determined according to the second minimum frequency value and the second maximum frequency value corresponding to the sound.

4. The polyphonic recognition method according to claim 3, characterized in that: Before determining the frequency range corresponding to the sound according to the second minimum frequency value and the second maximum frequency value corresponding to the sound, the method further includes: Determine whether a difference between a second maximum frequency value and a second minimum frequency value corresponding to the sound is greater than a preset range span threshold; If not, executing the step of determining the frequency range corresponding to the sound according to the second minimum frequency value and the second maximum frequency value corresponding to the sound; If so, the frequency range corresponding to the tone is determined according to the frequency of the tone and a preset range span value.

5. The polyphonic recognition method according to claim 1, characterized in that: The audio is obtained, and the audio is divided in the time domain of the audio according to a preset unit time; Fourier transform is performed on the audio of each unit time to obtain the energy value of each frequency range in each unit time, and the sound existing in each unit time is determined according to the energy value of each frequency range, the preset frequency domain energy threshold corresponding to each frequency range, and the sound corresponding to each frequency range, specifically: Acquire audio, and divide the audio in a time domain of the audio according to a preset first unit time; Performing Fourier transform on the audio of each first unit time respectively to obtain energy values ​​of each frequency range in each first unit time, and determining the sound existing in each first unit time respectively according to the energy values ​​of each frequency range, the preset first frequency domain energy threshold corresponding to each frequency range, and the sound corresponding to each frequency range; Determine the first minimum unit time corresponding to each first unit time according to the frequency difference between two sounds with the smallest frequency difference in the sounds existing in each first unit time, and determine the second unit time corresponding to each first unit time according to the first minimum unit time corresponding to each first unit time and a preset second minimum unit time, wherein the second unit time is less than the first unit time; Dividing the audio of each first unit time according to the second unit time corresponding to each first unit time; Perform Fourier transform on the audio of each second unit time to obtain the energy value of each frequency range in each second unit time, and determine the sound existing in each second unit time based on the energy value of each frequency range, the preset second frequency domain energy threshold corresponding to each frequency range, and the sound corresponding to each frequency range.

6. The polyphonic recognition method according to claim 5, characterized in that: After respectively determining the sounds existing in each second unit time, the method further includes: The start and end times of each note are determined based on the notes existing in each second unit time in each first unit time, and the note to be played at each time is determined based on the start and end times of each note.

7. The polyphonic recognition method according to claim 5, characterized in that: The audio of each first unit time is respectively subjected to Fourier transform to obtain the energy value of each frequency range in each first unit time, and the sound existing in each first unit time is respectively determined according to the energy value of each frequency range, the preset first frequency domain energy threshold corresponding to each frequency range, and the sound corresponding to each frequency range, specifically: Performing Fourier transform on the audio of a first unit time to obtain energy values ​​of each frequency range within the first unit time; If the energy value of a frequency range within the first unit time is greater than a preset first frequency domain energy threshold corresponding to the frequency range, it is determined that there is sound corresponding to the frequency range within the first unit time.

8. The polyphonic recognition method according to claim 5, characterized in that: The audio of each second unit time is respectively subjected to Fourier transform to obtain the energy value of each frequency range in each second unit time, and the sound existing in each second unit time is respectively determined according to the energy value of each frequency range, the preset second frequency domain energy threshold corresponding to each frequency range, and the sound corresponding to each frequency range, specifically: Performing Fourier transform on the audio of a second unit time to obtain energy values ​​of each frequency range within the second unit time; If the energy value of a frequency range within the second unit time is greater than a preset second frequency domain energy threshold corresponding to the frequency range, it is determined that there is sound corresponding to the frequency range within the second unit time.

9. The polyphonic recognition method according to claim 5, characterized in that: The first minimum unit time corresponding to each first unit time is determined according to the frequency difference between two sounds with the smallest frequency difference in the sounds existing in each first unit time, and the second unit time corresponding to each first unit time is determined according to the first minimum unit time corresponding to each first unit time and the preset second minimum unit time, specifically: Determine a unit frequency resolution according to a frequency difference between two sounds with the smallest frequency difference in the sounds existing in a first unit time, and determine a first minimum unit time corresponding to the first unit time according to the unit frequency resolution; The second unit time corresponding to the first unit time is determined according to a first minimum unit time corresponding to the first unit time and a preset second minimum unit time.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 9 is implemented.

Citation Information

Patent Citations

  • Audio detection method and device, and storage medium

    CN108470571A

  • Device and program for adaptively converting frequency block length

    JP2003195881A