Music rhythm enhancement method, computer equipment and computer storage medium

Through the automated music rhythm enhancement method, the processing of percussion spectrum and harmonic spectrum is used to solve the problem of low efficiency of music rhythm enhancement in the existing technology, realize the instant enhancement of music rhythm and improve the sense of rhythm, and is suitable for hearing-impaired people. Crowds and other people who are sensitive to rhythm.

CN118588047APending Publication Date: 2024-09-03TENCENT MUSIC ENTERTAINMENT TECH (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410633011.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-21
Publication Date
2024-09-03

AI Technical Summary

Technical Problem

Existing music rhythm enhancement methods mainly rely on manual operations, which are inefficient and cannot respond to user needs in a timely manner. In particular, there is no solution for instant rhythm enhancement for the hearing-impaired.

Method used

By obtaining the percussion spectrum and harmonic spectrum of the music, converting it into a time domain signal, reconstructing the percussion section, assigning different identification values ​​according to the strong beat and weak beat positions, calculating the loudness weighting coefficient, enhancing the percussion section, and then using it with Harmonious sections are mixed to achieve automatic enhancement of music rhythm.

Benefits of technology

It realizes the automatic enhancement of music rhythm, reduces the consumption of manual processing time, improves processing efficiency, can respond to user needs in a timely manner, and enhances the rhythm of the music with different weights according to the positions of strong beats and weak beats, further improving the rhythm of the music.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118588047A
    Figure CN118588047A
Patent Text Reader

Abstract

The embodiment of the invention discloses a music rhythm enhancement method, computer equipment and a computer storage medium. The method comprises the following steps: converting a percussion music spectrum of original music into a time domain signal, reconstructing a percussion music segment of the original music according to the time domain signal, and in a sampling point sequence of the original music, assigning a first identification value to a sampling point in a strong beat and assigning a second identification value to a sampling point in a weak beat, and calculating a weighting coefficient according to the first identification values and the second identification values of the plurality of sample points, enhancing the loudness of the percussion music segment according to the weighting coefficient to obtain a target percussion music segment, and carrying out sound mixing processing on the target percussion music segment and a harmonious music segment of the original music to obtain rhythm-enhanced original music. According to the technical scheme, the music rhythm can be automatically enhanced, the time consumption of manual processing is greatly reduced, the processing efficiency is improved, the requirement of a user for enhancing the music rhythm sensation is timely responded, enhancement of different weights can be carried out according to the positions of the strong beat and the weak beat, and the music rhythm sensation is further improved and enhanced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of audio processing, and specifically to a music rhythm enhancement method, a computer device, and a computer storage medium. Background Art

[0002] The rhythm of music is composed of the strength, length, and repetition of notes, which is similar to the ups and downs of emotions. When the rhythm of music is strong, people tend to feel a strong passion and pleasure, because the rhythm can trigger people's inner resonance and emotional upsurge. For example, fast and brisk rhythms often make people energetic and cheerful, while slow and soft music rhythms give people a sense of tranquility and warmth.

[0003] Therefore, enhancing the rhythm of music can improve the listener's sense of hearing and change the listener's mood to a certain extent. In addition, some people who are sensitive to the rhythm of music, such as the hearing-impaired, need to enhance the rhythm of the music they listen to so that they can feel the rhythm of music like normal hearing people.

[0004] However, currently, the rhythm of music is mainly enhanced by mixers using audio workstation software, which takes a lot of time and energy and is inefficient. It is unable to respond to users' needs for enhanced music rhythm in a timely manner when users listen to music online. Summary of the invention

[0005] The embodiments of the present application provide a music rhythm enhancement method, a computer device, and a computer storage medium for realizing automatic enhancement of music rhythm to reduce the time consumption of manual processing and improve processing efficiency.

[0006] A first aspect of an embodiment of the present application provides a method for enhancing music rhythm, the method comprising:

[0007] Acquire the original music to be processed, and generate a percussion spectrum and a harmony spectrum of the original music;

[0008] Converting the percussion spectrum into a time domain signal, and reconstructing the percussion segment of the original music according to the time domain signal;

[0009] Determine a sample point sequence in which a plurality of sample points of the original music are distributed over time, and in the sample point sequence, assign a first identification value to a sample point at a strong beat, and assign a second identification value to a sample point at a weak beat;

[0010] Calculating a weighting coefficient for loudness enhancement of the percussion section according to the first identification value and the second identification value of a plurality of sample points of the original music;

[0011] enhancing the loudness of the percussion section according to the weighting coefficient to obtain a target percussion section;

[0012] A harmonious music segment corresponding to the harmonious music spectrum is obtained, and the target percussion music segment is mixed with the harmonious music segment to obtain the original music with enhanced rhythm.

[0013] A second aspect of an embodiment of the present application provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the method of the first aspect when executing the computer program.

[0014] A third aspect of an embodiment of the present application provides a computer storage medium, in which instructions are stored. When the instructions are executed on a computer, the computer executes the method of the first aspect.

[0015] A fourth aspect of the embodiments of the present application provides a computer program product. When the computer program product is run on a computer device, the computer device executes the method of the first aspect.

[0016] It can be seen from the above technical solutions that the embodiments of the present application have the following advantages:

[0017] The percussion spectrum of the original music is converted into a time domain signal, and the percussion segment of the original music is reconstructed according to the time domain signal. In the sample sequence of the original music, a first identification value is assigned to the sample at the strong beat, and a second identification value is assigned to the sample at the weak beat. The weighted coefficient for loudness enhancement of the percussion segment is calculated according to the first identification value and the second identification value of multiple sample points of the original music, and the loudness of the percussion segment is enhanced according to the weighted coefficient to obtain a target percussion segment, and the target percussion segment is mixed with the harmonious segment of the original music to obtain the original music with enhanced rhythm. The automatic enhancement of the rhythm of the music can be realized, which greatly reduces the time consumption of manual processing, improves the processing efficiency, ensures timely response to the user's demand for enhanced music rhythm, and can perform different weights of enhancement according to the positions of strong beats and weak beats, so as to further enhance and strengthen the rhythm of the music. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] Figure 1 This is a schematic diagram of the network framework in the embodiment of the present application;

[0019] Figure 2 A schematic diagram of a process flow of a music rhythm enhancement method in an embodiment of the present application;

[0020] Figure 3 This is another schematic diagram of the process of the music rhythm enhancement method in the embodiment of the present application;

[0021] Figure 4This is an exemplary schematic diagram of a timing signal of a certain music segment and its corresponding time positions of light and heavy beats (strong and weak beats) in an embodiment of the present application;

[0022] Figure 5 Schematic diagram of the distribution of sample points corresponding to strong beats and sample points corresponding to weak beats in a sample point sequence of original music in an embodiment of the present application;

[0023] Figure 6 For Figure 5 An exemplary schematic diagram of a loudness increment curve of multiple discrete points obtained by calculating the loudness increment of each sample point based on the above;

[0024] Figure 7 For Figure 6 A weighted coefficient curve obtained by fitting the loudness increment curves of multiple discrete points based on the above;

[0025] Figure 8 It is a structural schematic diagram of a computer device in an embodiment of the present application. DETAILED DESCRIPTION

[0026] The embodiments of the present application provide a music rhythm enhancement method, a computer device, and a computer storage medium for realizing automatic enhancement of music rhythm to reduce the time consumption of manual processing and improve processing efficiency.

[0027] See also Figure 1 In the embodiment of the present application, the network framework includes:

[0028] The service server 100 and the terminal cluster; the terminal cluster may include: terminal device 200a, terminal device 200b, terminal device 200c, ..., terminal device 200n and other terminal devices.

[0029] The business server 100 may be an independent physical server, a server cluster or a distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud database, cloud service, cloud computing, cloud function, cloud storage, network service, cloud communication, middleware service, domain name service, security service, CDN, and big data and artificial intelligence platform. The terminal device (including terminal device 200a, terminal device 200b, terminal device 200c, ..., terminal device 200n) may be a smart phone, tablet computer, laptop computer, desktop computer, PDA, mobile internet device (MID), wearable device (such as smart watch, smart bracelet, etc.), smart computer, smart car and other smart terminals.

[0030] Among them, the business server 100 can establish a communication connection with each terminal device in the terminal cluster, and a communication connection can also be established between each terminal device in the terminal cluster. In other words, the business server 100 can establish a communication connection with each terminal device in the terminal device 200a, terminal device 200b, terminal device 200c, ..., terminal device 200n. For example, a communication connection can be established between the terminal device 200a and the business server 100. A communication connection can be established between the terminal device 200a and the terminal device 200b, and a communication connection can also be established between the terminal device 200a and the terminal device 200c. Among them, the above-mentioned communication connection does not limit the connection method, and can be directly or indirectly connected through a wired communication method, or can be directly or indirectly connected through a wireless communication method, etc., which can be determined according to the actual application scenario, and this application is not limited here.

[0031] It should be understood that Figure 1 Each terminal device in the terminal cluster shown can be installed with an application client. When the application client runs in each terminal device, it can interact with the business server 100 respectively, so that the business server 100 can receive business data from each terminal device (such as user identity data uploaded by the user through the terminal device). Among them, the application client can be a music playback application, a karaoke software application, a browser application, a social application, an instant messaging application, a live broadcast application, a game application, a short video application, a video application, a shopping application, a novel application, a payment application, etc., which has the function of displaying text, images, audio, and video and other data information. The specific application can be determined according to the actual application scenario requirements, and no limitation is made here. Among them, the application client can be an independent client or an embedded sub-client integrated in a client (such as a music application, a karaoke software application, etc.). The specific application can be determined according to the actual application scenario, and no limitation is made here.

[0032] The following will be combined Figure 1 The music rhythm enhancement method in the embodiment of the present application is described in the network framework of:

[0033] See also Figure 2 In the embodiment of the present application, one embodiment of the music rhythm enhancement method includes:

[0034] 201. Acquire original music to be processed, and generate a percussion spectrum and a harmony spectrum of the original music;

[0035] The method of this embodiment can be applied to a computer device, which can be Figure 1The service server 100 or each terminal device in the network framework shown. The original music can be pure music or music waiting to be processed as an accompaniment of a song. For example, when the computer device is a terminal such as a smart phone or a tablet, the user can input a processing instruction for the original music to the terminal to instruct the terminal to enhance the rhythm of the original music. The terminal then enhances and outputs the rhythm of the original music based on the method of this embodiment, so that the user can listen to the original music with enhanced rhythm.

[0036] After obtaining the original music, the computer device can generate a percussion spectrum and a harmonious music spectrum of the original music. The percussion spectrum is the spectrum of the percussion component in the original music. Percussion is mainly percussion music, such as music played by instruments that make sounds by hitting or striking, such as drums, cymbals, triangles, gongs, cymbals, etc.; the harmonious music spectrum is the spectrum of the harmonious music component in the original music. Harmonious music is music played by instruments that make sounds by blowing, pulling, plucking, etc., such as music played by instruments such as pianos, wind instruments, and strings, including all string instruments, most piano sounds, various wind instruments, etc.

[0037] 202. Convert the percussion music spectrum into a time domain signal, and reconstruct the percussion music segment of the original music according to the time domain signal;

[0038] After obtaining the percussion spectrum, the percussion spectrum can be converted from the frequency domain to the time domain, and the percussion spectrum can be converted into a time domain signal, and the percussion segment of the original music can be reconstructed based on the time domain signal, so as to enhance the audio energy of the percussion segment.

[0039] 203. Determine a sample point sequence in which a plurality of sample points of the original music are distributed over time, and in the sample point sequence, assign a first identification value to a sample point at a strong beat, and assign a second identification value to a sample point at a weak beat;

[0040] When enhancing the percussion segment, the percussion segment can be enhanced in various degrees according to the positions of the strong beats and weak beats of the original music. Therefore, multiple sample points of the original music can be analyzed, and the sample points are sampling points, which are the targets of the analysis. The computer device can determine the sample point sequence of the multiple sample points of the original music distributed over time, and in the sample point sequence, a first identification value is assigned to the sample points at the strong beat, and a second identification value is assigned to the sample points at the weak beat. The first identification value is different from the second identification value, that is, the sample points at the strong beat and the sample points at the weak beat in the multiple sample points are identified by different identification values, so as to enhance different positions of the percussion segment to different degrees according to the positions of the strong beat and the weak beat.

[0041] 204. Calculate a weighting coefficient for loudness enhancement of the percussion music segment according to the first identification value and the second identification value of a plurality of sample points of the original music;

[0042] The computer device can calculate a weighted coefficient for loudness enhancement of the percussion segment based on the first identification value and the second identification value of multiple sample points of the original music. The weighted coefficient represents the weight of the loudness enhancement of the segment at the strong beat position in the percussion segment and the weight of the loudness enhancement of the segment at the weak beat position in the percussion segment. Therefore, the loudness of the percussion segment can be enhanced according to the weighted coefficient.

[0043] 205. Enhance the loudness of the percussion music segment according to the weighted coefficient to obtain a target percussion music segment;

[0044] After determining the weighted coefficient for loudness enhancement of the percussion segment, the loudness of each segment of the percussion segment at the strong beat or weak beat position can be enhanced according to the weight represented by the weighted coefficient to obtain the target percussion segment, that is, the percussion segment with enhanced loudness.

[0045] 206. Obtain a harmonious music segment corresponding to the harmonious music spectrum, and mix the target percussion music segment with the harmonious music segment to obtain the original music with enhanced rhythm;

[0046] The computer device can convert the harmonious music spectrum from the frequency domain to the time domain, convert the harmonious music spectrum into a time domain signal, and reconstruct the harmonious music segment of the original music based on the time domain signal. Of course, this operation can also be performed by other devices, and the other devices can send the reconstructed harmonious music segment to the computer device, which is not limited in this embodiment.

[0047] Furthermore, the computer device can mix the target percussion section with the harmony section to obtain the original music with enhanced rhythm.

[0048] In this embodiment, the percussion spectrum of the original music is converted into a time domain signal, and the percussion section of the original music is reconstructed according to the time domain signal. In the sample sequence of the original music, a first identification value is assigned to the sample in the strong beat, and a second identification value is assigned to the sample in the weak beat. The weighted coefficient for enhancing the loudness of the percussion section is calculated according to the first identification value and the second identification value of multiple sample points of the original music, and the loudness of the percussion section is enhanced according to the weighted coefficient to obtain a target percussion section, and the target percussion section is mixed with the harmonious section of the original music to obtain the original music with enhanced rhythm. The automatic enhancement of the rhythm of the music can be achieved, which greatly reduces the time consumption of manual processing, improves the processing efficiency, ensures timely response to the user's demand for enhanced music rhythm, and can perform different weights of enhancement according to the positions of the strong beat and the weak beat, so as to further enhance and strengthen the rhythm of the music.

[0049] The following will be Figure 2 Based on the embodiment shown, the embodiment of the present application is further described in detail. Figure 3Another embodiment of the music rhythm enhancement method in the embodiment of the present application includes:

[0050] 301. Acquire original music to be processed, and generate a percussion spectrum and a harmony spectrum of the original music;

[0051] Since music signals can be mainly divided into two parts: harmonic and percussion, these two types of music have relatively obvious spectrum distribution, such as: harmonic has horizontal stability on the spectrum graph, and percussion has more obvious vertical energy on the spectrum graph. Therefore, the original music can be processed by HPS (Harmonic and Percussion Separation). When performing HPS processing, the percussion section and the harmonic section can be reconstructed based on the spectrum of various music signals, thereby achieving HPS separation.

[0052] Therefore, the percussion spectrum and the harmony spectrum of the original music can be obtained first. In this embodiment, the percussion spectrum and the harmony spectrum of the original music can be generated based on Fourier transform. Specifically, the original music can be framed according to the preset frame shift to obtain a frame result, and a window function can be added to the frame result to obtain a windowing result. According to the windowing result, Fourier transform is performed on each frame signal of the original music to obtain the spectrum corresponding to each frame signal of the original music, and the percussion spectrum and the harmony spectrum are generated according to the spectrum of the multi-frame signal of the original music.

[0053] The window function can be a hanning window, a hamming window, a triangular window, or other window functions. Adding a window function is to multiply a window function. The purpose of adding a window is to perform Fourier expansion, make the whole image more continuous, and avoid the Gibbs effect. When adding a window, the audio signal that was originally non-periodic exhibits some characteristics of a periodic function, which facilitates Fourier transform.

[0054] For example, the preset frame shift is 10ms and the frame length is 30ms. The original music can be divided into several frames (i.e., each frame length is 30ms) through this frame shift and frame length. Then, in the original music, 0-30ms is taken as the first frame for the first time, 10-40ms is taken as the second frame for the second time, 20-50ms is taken as the third frame for the third time, and so on. That is, there will be 20ms of overlap between adjacent frames. This is because the cost of adding windows in the subsequent windowing process is that the two ends of a frame signal are weakened, so when dividing the frame, there needs to be overlapping signals between frames. After completing the framing, a window function can be added to each frame signal, such as adding a hanning window to each frame signal. Adding the hanning window obtains the windowed frame signal sequence after segmentation, and its expression can be expressed as follows:

[0055] x n (i) = x(L·n+i)·w hann (i);

[0056] Where n is the index of the frame position, i is the i-th sample point in the n-th frame, and L is the frame shift, which corresponds to 10ms here. The definition of the Hanning window is:

[0057]

[0058] Here N represents the frame length, and the corresponding duration is 30ms.

[0059] After completing the windowing of each frame signal, the windowing result can be further Fourier transformed to obtain the spectrum corresponding to each frame signal of the original music. For example, the Fourier transform of the nth frame signal can be expressed as follows:

[0060]

[0061] Wherein, i=0, 1, 2, ..., N-1 represents the sample point index, N represents the length of each frame signal, n=1, 2, ..., M represents the frame index, M represents the total number of frames, and k=0, 1, 2, ..., N-1 represents the frequency point index of the spectrum of each frame signal.

[0062] After obtaining the spectrum corresponding to each frame signal of the original music, the percussion spectrum and harmony spectrum of the original music can be generated according to the spectrum of the multiple frame signals of the original music. Specifically, the spectrum corresponding to each frame signal of the original music can be converted into the amplitude spectrum corresponding to each frame signal of the original music. In the vertical direction of the amplitude spectrum, for each frame signal, the frame signal is used as the current frame signal, and the observation interval is determined with the current frame signal as the center and the left and right multiple frame signals, and the amplitude median in the observation interval is determined as the percussion filtering result corresponding to the current frame signal, and the percussion filtering result corresponding to each frame signal of the original music is obtained.

[0063] In the horizontal direction of the amplitude spectrum, for each frame signal, the frame signal is taken as the current frame signal, and the observation interval is determined with the current frame signal as the center and multiple frame signals on the left and right, and the median amplitude in the observation interval is determined as the harmonious music filtering result corresponding to the current frame signal, so as to obtain the harmonious music filtering result corresponding to each frame signal of the original music.

[0064] Furthermore, a percussion spectrum and a harmonious music spectrum may be generated according to the percussion filtering result, the harmonious music filtering result and the spectrum corresponding to each frame signal of the original music.

[0065] Using the above example, after obtaining the spectrum X(n, k) corresponding to each frame signal of the original music, it can be converted into an amplitude spectrum. One expression of the conversion method is as follows:

[0066] A(n,k)=|X(n,k)|.

[0067] In addition, when filtering, filtering methods such as median filtering can be used. For example, Lh and Lp can be defined as the window lengths corresponding to the harmonic music component and the percussion component during filtering, respectively. For the spectrum generation of the harmonic music component, each frame signal can be used as the current frame signal in the horizontal direction of the amplitude spectrum, and the observation interval is determined with the current frame signal as the center and the Lh / 2 frame signals on the left and right, and the amplitude median within the observation interval is determined as the harmonic music filtering result corresponding to the current frame signal, which can be expressed as follows:

[0068]

[0069] For example, when the value of Lh is 10, for the current frame signal, the observation interval is composed of 5 frames of signals on the left and right, that is, this observation interval includes 11 frames of signals, and the median of the amplitude of these 11 frames of signals is taken as the harmony filter result corresponding to the current frame signal. Similarly, the harmony filter result corresponding to each frame signal can be determined in turn.

[0070] For the spectrum generation of percussion components, each frame signal can be used as the current frame signal in turn in the vertical direction of the amplitude spectrum, and the observation interval is determined with the current frame signal as the center and the Lp / 2 frame signals on the left and right. The median amplitude in the observation interval is determined as the percussion filtering result corresponding to the current frame signal, which can be expressed as follows:

[0071]

[0072] For example, when the value of Lp is 10, for the current frame signal, the observation interval is composed of 5 frames of signals on the left and right, that is, this observation interval includes 11 frames of signals, and the median of the amplitude of these 11 frames of signals is taken as the percussion filter result corresponding to the current frame signal. Similarly, the percussion filter result corresponding to each frame signal can be determined in turn.

[0073] Furthermore, a percussion spectrum and a harmonious music spectrum may be generated according to the percussion filtering result, the harmonious music filtering result and the spectrum corresponding to each frame signal. For example, one way to generate a percussion spectrum may be:

[0074]

[0075] One way to generate a harmonic spectrum could be:

[0076]

[0077] Of course, the method of generating percussion spectrum and harmony spectrum is not limited to the above-mentioned expressions. For example, spectrum generation methods such as wavelet transform can also be used to generate harmony spectrum and percussion spectrum, which is not limited here.

[0078] 302. Convert the percussion spectrum into a time domain signal, and reconstruct the percussion segment of the original music according to the time domain signal;

[0079] In this embodiment, a preferred implementation method for reconstructing a percussion segment may be to perform an inverse Fourier transform on the percussion spectrum to obtain a time domain signal, and add a window function to the time domain signal to obtain a modulated signal corresponding to each frame signal of the original music, and overlap and add the modulated signals corresponding to each frame signal of the original music to reconstruct the percussion segment of the original music.

[0080] Continuing with the above example, we can use the short-time inverse Fourier transform to convert the percussion spectrum X P (n, k) is converted from the frequency domain to the time domain to obtain its time domain signal. Short-Time Fourier Transform Inverse is a signal processing technique used to convert frequency domain signals into time domain signals. It is a variant of Fourier transform that can analyze signals in different time periods to provide more detailed information. In signal processing, short-time Fourier transform is used for audio and speech processing. It can convert audio signals into time domain signals, so that the characteristics and structure of audio signals can be better understood. One of the conversion methods can be expressed as follows:

[0081]

[0082] The basic principle of short-time inverse Fourier transform is to decompose the frequency domain signal into a series of window functions, and then perform inverse Fourier transform on each window function. In this way, the time domain signal in each time period can be obtained. By combining these time domain signals, the original signal can be reconstructed. Therefore, the time domain signal can be further windowed, such as adding window functions such as hanning window, Hamming window, triangular window, etc., and supplementing the corresponding hanning window weight coefficients to obtain the modulation signal of each frame signal, which can be expressed as follows:

[0083]

[0084] Among them, w inv (i) is a variation of the hanning window. Afterwards, the modulated signal of each frame signal can be overlapped and added, such as using the overlap-addition OLA (overlap-addition) method to obtain the final modulated output. An overlap-addition method can be expressed as follows:

[0085] xp (i) = OLA{x p (L·n+i)}.

[0086] Thus, the music segment signal x of the percussion component in the original music can be obtained p (i). Similarly, the Fourier inverse transform can be performed on the harmonious music spectrum to obtain the time domain signal, and the window function can be added to the time domain signal of the harmonious music spectrum to obtain the harmonious music modulation signal corresponding to each frame signal of the original music, and the harmonious music modulation signal corresponding to each frame signal of the original music can be overlapped and added to reconstruct the harmonious music segment x of the original music. h (i).

[0087] 303. Determine a sample point sequence in which a plurality of sample points of the original music are distributed over time, and in the sample point sequence, assign a first identification value to a sample point at a strong beat, and assign a second identification value to a sample point at a weak beat;

[0088] In this embodiment, the time positions of each strong beat and weak beat in the original music can be identified. For example, the time positions of the strong beat and weak beat of the original music can be extracted using the open source tool madmom. For example, the time sequence signal of a certain piece of music and the time positions of its corresponding light and heavy beats (strong and weak beats) are as follows: Figure 4 As shown, the numbers "1" and "0.5" shown in the figure respectively indicate the time positions of each heavy beat (strong beat) and light beat (weak beat).

[0089] And mapped to the sample sequence b(i) of the original music with multiple sample points distributed over time, such as Figure 5 As shown, each strong beat and weak beat are distributed in the sample point sequence, and the sample points in the strong beat and the sample points in the weak beat can be identified. For example, the sample points in the strong beat can be assigned a value of "1", and the sample points in the weak beat can be assigned a value of "0.5". Then, the sample point sequence b(i) can be expressed as follows:

[0090]

[0091] Therefore, by assigning different identification values, it is easy to identify the sample points at the strong beat and the sample points at the weak beat, so as to facilitate different degrees of loudness enhancement of the percussion segment according to the different positions of the sample points.

[0092] 304. Calculate a weighting coefficient for loudness enhancement of the percussion music segment according to the first identification value and the second identification value of a plurality of sample points of the original music;

[0093] Furthermore, the weighted coefficient for loudness enhancement of the percussion segment can be calculated according to the first identification value and the second identification value of the plurality of sample points of the original music. In a preferred embodiment, the loudness enhancement weight of each sample point can be calculated according to the first identification value and the second identification value of the plurality of sample points of the original music, and the loudness increment of each sample point can be calculated according to the preset loudness enhancement threshold and the loudness enhancement weight, and the loudness increment of the plurality of sample points of the original music can be converted into a linear domain, that is, a functional relationship is obtained according to the loudness increment of the plurality of sample points to obtain the weighted coefficient, which can be presented as a smooth curve in the coordinate system.

[0094] When the loudness enhancement weight of each sample point is calculated according to the first identification value and the second identification value of multiple sample points of the original music, a kernel function corresponding to the multiple sample points of the original music can be constructed, and the loudness enhancement weight of each sample point is calculated according to the kernel function and the first identification value and the second identification value of the multiple sample points of the original music.

[0095] When constructing the kernel function corresponding to multiple sample points of the original music, the number of sample points of each beat of the original music can be determined according to the preset beat duration and the preset signal sampling rate, and the index values ​​of the multiple sample points of the original music are used as the independent variables of the kernel function, and the kernel function is constructed based on the independent variables and the number of sample points.

[0096] For example, when constructing the kernel function, the beat duration T is preset rg , such as 0.3s; and, presetting the signal sampling rate fs for each beat. To prevent the predefined beat duration from exceeding the detected beat interval Choose half of the beat interval as T rg The upper limit of

[0097] Then, under this beat duration, the number of samples per beat can be expressed as:

[0098]

[0099] In determining the number of samples per beat N rg Afterwards, the index values ​​i of the multiple sample points of the original music can be used as the independent variable of the kernel function, and the kernel function is constructed based on the independent variable and the number of sample points, so the kernel function can be expressed as follows:

[0100]

[0101] Where i = 0, 1, ..., (N rg -1).

[0102] Of course, the expression of the kernel function is not limited to the expressions listed above, for example, it can also be an expression of a kernel function of the linear kernel function, Gaussian kernel function, etc., which is not limited here.

[0103] After constructing the kernel function, the loudness enhancement weight of each sample point can be calculated according to the kernel function and the first identification value and the second identification value of the multiple sample points of the original music. Using the above example, the calculation method of the loudness enhancement weight of each sample point can be expressed as follows:

[0104] Where j = 0, 1, ..., (N rg -1).

[0105] For example, suppose N rg =5, for the loudness enhancement weight of the 0th sample point, w b (0) = h(0)·b(0)+h(1)·b(-1)+h(2)·b(-2)+h(3)·b(-3)+h(4)·b(-4). According to the definition of the value of the sample sequence b(i) in the previous text, when i is neither in the strong beat position nor in the weak beat position, b(i) = 0. Therefore, when ij is a negative number, b(i) = 0. Therefore, w b (0) = h(0)·b(0). Similarly, w b (1)=h(0)·b(1)+h(1)·b(0), the loudness enhancement weight corresponding to each sample point can be calculated in turn.

[0106] In order to enhance the heavy beats and light beats to different degrees in the loudness domain, w b (i) Add a loudness enhancement threshold α, which can be any positive value, such as 6, to obtain a loudness increment w dB (i), for example, the loudness increment can be expressed as:

[0107] w dB (i) = α·w b (i).

[0108] Figure 6 for Figure 5 Based on this, the loudness increment of each sample point is calculated to obtain the loudness increment curves of multiple discrete points, such as Figure 6 As shown, the loudness increment corresponding to each sample point at the strong beat position and the weak beat position can be determined by the above method.

[0109] Furthermore, the loudness increments of multiple sample points can be converted into the linear domain to obtain the weighting coefficient w(i) for the signal amplitude, which can be specifically expressed as:

[0110] w(i)=10w dB (i) / 20.

[0111] For example, for Figure 6 The loudness increment curves of the multiple discrete points shown in FIG. 1 can be fitted into a smooth curve based on the above method, that is, the following is obtained: Figure 7 The weighting coefficient curve is shown.

[0112] 305. Enhance the loudness of the percussion music segment according to the weighted coefficient to obtain a target percussion music segment;

[0113] Using the above example, after obtaining the weighted coefficient of the loudness of the percussion segment, the loudness of the percussion segment can be enhanced according to the weighted coefficient, and the loudness can be weighted to obtain the percussion accompaniment sound with enhanced loudness, which can be expressed as follows:

[0114] y p (i) = x p (i)·w(i);

[0115] Among them, y p (i) is a percussion music segment with loudness enhanced, i.e., the target percussion music segment.

[0116] 306. Obtain a harmonious music segment corresponding to the harmonious music spectrum, and mix the target percussion music segment with the harmonious music segment to obtain the original music with enhanced rhythm;

[0117] After obtaining the target percussion segment y p (i) and harmony passages x h (i) Afterwards, the target percussion music segment and the harmony music segment may be mixed to obtain the original music with enhanced rhythm.

[0118] If the original music is the accompaniment music separated from the song, the target percussion segment y p (i) Harmonious music segment x h (i) and the singing voice in the song are remixed into a song with enhanced rhythm. For example, the remix operation can be realized by directly summing, that is, the expression can be expressed as follows:

[0119] y msc (i) = x voc (i)+y acc (i) = x voc (i)+y p (i)+x h (i).

[0120] where y msc (i) represents the music signal after remix, y acc (i) indicates the enhanced accompaniment of percussion, x vocIndicates the singing voice separated from the song.

[0121] In this embodiment, the loudness of the drum arrangement in the original music can also be enhanced. When it is detected that the original music has a drum arrangement, the weight of the drum arrangement is increased to obtain an enhanced drum arrangement, and then the enhanced drum arrangement, the target percussion section and the harmony section can be mixed to obtain the original music with enhanced rhythm.

[0122] For example, the existence of the drum instrument can be determined by the energy of the track signal of the instrument "drum". When the track signal exists, the weight γ of the instrument is increased (for example, γ = double weighting corresponds to 6dB loudness improvement) to obtain an enhanced drum instrument. Then, the enhanced accompaniment is re-superimposed on the singing voice to obtain the remixed music, thereby achieving an enhanced sense of rhythm. The method can be expressed as follows:

[0123] y msc (i) = x voc (i)+y acc (i) = x voc (i)+γ·x drum (i)+x others (i);

[0124] Among them, x drum (i) represents the audio track signal of the drum orchestration, x other (i) Includes target percussion segment y p (i) and harmony passages x h (i) and other accompaniment sounds.

[0125] Therefore, in this embodiment, the positions of strong beats and weak beats in the original music can be detected, and then the original music can be increased in loudness to varying degrees according to the positions of the strong beats and weak beats, so that the improvement in the sense of music rhythm is more obvious, thereby meeting the user's demand for enhanced sense of music rhythm. Compared with manual processing, the automated music rhythm enhancement method of this embodiment can greatly reduce personnel time consumption, thereby reducing production costs and improving the efficiency of music rhythm processing.

[0126] The computer device in the embodiment of the present application is described below. Figure 8 In the embodiment of the present application, one embodiment of the computer device includes:

[0127] The computer device 800 may include one or more central processing units (CPU) 801 and a memory 805 , wherein the memory 805 stores one or more application programs or data.

[0128] The memory 805 may be a volatile storage or a persistent storage. The program stored in the memory 805 may include one or more modules, each of which may include a series of instruction operations in the computer device. Furthermore, the central processing unit 801 may be configured to communicate with the memory 805 and execute a series of instruction operations in the memory 805 on the computer device 800.

[0129] The computer device 800 may also include one or more power supplies 802, one or more wired or wireless network interfaces 803, one or more input and output interfaces 804, and / or one or more operating systems, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, etc.

[0130] The CPU 801 can execute the aforementioned Figures 2 to 3 The operations performed by the computer device in the illustrated embodiment will not be described in detail here.

[0131] The present application also provides a computer storage medium, wherein one embodiment includes: the computer storage medium stores instructions, and when the instructions are executed on a computer, the computer executes the aforementioned Figures 2 to 3 The operations performed by the computer device in the illustrated embodiment.

[0132] The present application also provides a computer program product, wherein one embodiment includes: when the computer program product is run on a computer device, the computer device executes the aforementioned Figures 2 to 3 The operations performed by the computer device in the illustrated embodiment.

[0133] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0134] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0135] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0136] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0137] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, read-only memory), random access memory (RAM, random access memory), disk or optical disk and other media that can store program code.

Claims

1. A method for enhancing music rhythm, characterized in that: The method comprises: Acquire the original music to be processed, and generate a percussion spectrum and a harmony spectrum of the original music; Converting the percussion spectrum into a time domain signal, and reconstructing the percussion segment of the original music according to the time domain signal; Determine a sample point sequence in which a plurality of sample points of the original music are distributed over time, and in the sample point sequence, assign a first identification value to a sample point at a strong beat, and assign a second identification value to a sample point at a weak beat; Calculating a weighting coefficient for loudness enhancement of the percussion section according to the first identification value and the second identification value of a plurality of sample points of the original music; enhancing the loudness of the percussion section according to the weighting coefficient to obtain a target percussion section; A harmonious music segment corresponding to the harmonious music spectrum is obtained, and the target percussion music segment is mixed with the harmonious music segment to obtain the original music with enhanced rhythm.

2. The method according to claim 1, characterized in that The step of calculating a weighted coefficient for enhancing the loudness of the percussion section according to the first identification value and the second identification value of the plurality of sample points of the original music comprises: Calculate a loudness enhancement weight for loudness enhancement of each sample point according to the first identification value and the second identification value of a plurality of sample points of the original music; Calculating the loudness increment of each sample point according to the loudness enhancement weight and a preset loudness enhancement threshold; The loudness increments of the plurality of sample points of the original music are converted into a linear domain to obtain the weighting coefficients.

3. The method according to claim 2, characterized in that The step of calculating the loudness enhancement weight of each sample point according to the first identification value and the second identification value of the plurality of sample points of the original music comprises: A kernel function corresponding to the plurality of sample points of the original music is constructed, and a loudness enhancement weight for loudness enhancement of each sample point is calculated according to the kernel function and the first identification value and the second identification value of the plurality of sample points of the original music.

4. The method according to claim 3, characterized in that The kernel function corresponding to the plurality of sample points of the original music is constructed, comprising: Determining the number of samples of each beat of the original music according to a preset beat duration and a preset signal sampling rate; The index values ​​of the plurality of sample points of the original music are used as independent variables of the kernel function, and the kernel function is constructed based on the independent variables and the number of sample points.

5. The method according to claim 1, characterized in that The step of generating the percussion spectrum and the harmony spectrum of the original music comprises: Performing frame processing on the original music according to a preset frame shift to obtain a frame result, and adding a window function to the frame result to obtain a windowed result; Performing Fourier transform on each frame signal of the original music according to the windowing result to obtain a frequency spectrum corresponding to each frame signal of the original music; The percussion spectrum and the harmony spectrum are generated according to the spectrum of the multi-frame signal of the original music.

6. The method according to claim 5, characterized in that The step of generating the percussion spectrum and the harmony spectrum according to the spectrum of the multi-frame signal of the original music comprises: Converting the frequency spectrum corresponding to each frame signal of the original music into the amplitude spectrum corresponding to each frame signal of the original music; In the vertical direction of the amplitude spectrum, for each frame signal, the frame signal is used as the current frame signal, and an observation interval is determined with the current frame signal as the center and multiple frame signals on the left and right, and the amplitude median in the observation interval is determined as the percussion filtering result corresponding to the current frame signal, so as to obtain the percussion filtering result corresponding to each frame signal of the original music; In the horizontal direction of the amplitude spectrum, for each frame signal, the frame signal is taken as the current frame signal, and the observation interval is determined with the current frame signal as the center and multiple frame signals on the left and right, and the amplitude median in the observation interval is determined as the harmonious music filtering result corresponding to the current frame signal, so as to obtain the harmonious music filtering result corresponding to each frame signal of the original music; The percussion spectrum and the harmonious music spectrum are generated according to the percussion filtering result, the harmonious music filtering result and the spectrum corresponding to each frame signal of the original music.

7. The method according to claim 1, characterized in that The step of converting the percussion spectrum into a time domain signal and reconstructing the percussion segment of the original music according to the time domain signal comprises: Performing inverse Fourier transform on the percussion spectrum to obtain the time domain signal; Adding a window function to the time domain signal to obtain a pitch-shifted signal corresponding to each frame signal of the original music; The pitch-shifted signals corresponding to each frame signal of the original music are overlapped and added to reconstruct the percussion section of the original music.

8. The method according to any one of claims 1 to 7, characterized in that: The method further comprises: When it is detected that the original music has drum accompaniment, the weight of the drum accompaniment is increased to obtain the enhanced drum accompaniment; The mixing of the target percussion music segment and the harmony music segment to obtain the original music with enhanced rhythm includes: The enhanced drum instrumentation, the target percussion section and the harmony section are mixed to obtain the original music with enhanced rhythm.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the method according to any one of claims 1 to 8 is implemented.

10. A computer storage medium, characterized in that: The computer storage medium stores instructions, and when the instructions are executed on a computer, the computer is caused to execute the method according to any one of claims 1 to 8.