Music file processing method and device, and music singing equipment

By obtaining music files from multiple audio signal sources, determining the synthesis method based on attribute information, and combining hidden Markov models and chromaticity features, intelligent processing of music files is achieved, solving the problem of personalized music production in the existing technology. Improved user experience and music quality.

CN113936629BActive Publication Date: 2024-10-01GUANGZHOU AIMYUNION NETWORK TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111189741.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-12
Publication Date
2024-10-01
Estimated Expiration
2041-10-12

AI Technical Summary

Technical Problem

Existing music playback equipment and smart terminals are difficult to conveniently and intelligently create personalized music for users, and cannot effectively meet users' personalized needs.

Method used

By obtaining music files from multiple audio signal sources, determining the synthesis method according to the file attribute information, extracting and synthesizing the target music files, using multi-instrument synthesis and song stringing technology, combined with hidden Markov models and chroma features, to realize music files intelligent processing.

Benefits of technology

It enables users to conveniently produce personalized music, improves user experience, meets the needs of simultaneous singing of multiple songs and personalized production, and ensures the envelope consistency of sound and music quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113936629B_ABST
    Figure CN113936629B_ABST
Patent Text Reader

Abstract

The present application relates to a music file processing method and device, music singing equipment, computer equipment, and computer-readable storage medium; the method includes: obtaining multiple music files from multiple external audio signal sources; determining a synthesis method of the music files according to attribute information of each of the music files; extracting corresponding music synthesis information from each music file according to the synthesis method; executing a corresponding synthesis process according to the synthesis method, and synthesizing the music synthesis information into a target music file; with this technical solution, users can import music files from multiple different audio signal sources, so that synthesized music can be produced intelligently and conveniently, meeting users' personalized needs and improving users' application experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of entertainment equipment, and in particular to a method and device for processing music files, music singing equipment, computer equipment, and computer-readable storage medium. Background Art

[0002] Modern society belongs to a fast-paced digital age. When appreciating a piece of music, people not only listen to it for the sake of listening to it, but also feel the content of the song, including the essence of the song, the meaning of the song, etc. Not only that, more users even join in the process of song creation, using songs to express their current life status and mood, and express personal emotions, which makes the production of personalized songs particularly important.

[0003] At present, for music playing devices, smart terminals, KTV equipment, etc., the music files played are generally edited by professionals, which cannot adapt well to the personalized needs of users. Although some audio editors and other software are also provided on PC applications or mobile applications, users can use audio editors to edit their favorite music, but the operation is complicated and the effect is not good; it is difficult to conveniently and intelligently make personalized music for users, and it is difficult to meet market demand. Summary of the invention

[0004] In response to one of the above-mentioned technical defects, the present application provides a music file processing method and device, music singing equipment, computer equipment, and computer-readable storage medium, so that personalized songs can be produced for users conveniently and intelligently.

[0005] First aspect:

[0006] The present application provides a music file processing method, comprising:

[0007] Acquire multiple music files from multiple external audio signal sources;

[0008] Determining a synthesis method of the music files according to the attribute information of each of the music files;

[0009] Extracting corresponding music synthesis information from each music file according to the synthesis method;

[0010] The corresponding synthesis process is executed according to the synthesis method to synthesize the music synthesis information into a target music file.

[0011] In one embodiment, multiple music files are obtained from multiple external audio signal sources, including:

[0012] Establishing communication connections with multiple data sources;

[0013] Adopt time-division working mode to receive audio data packets encapsulated based on private protocols from various data sources;

[0014] Each audio data packet is parsed according to the private protocol to obtain multiple music files.

[0015] In one embodiment, determining the synthesis method of the music files according to the attribute information of each of the music files includes:

[0016] Calculate the similarity between music files based on the attribute information of each music file;

[0017] If the similarity is higher than the first threshold, the corresponding music file is determined to be a multi-instrument synthesis of the same piece of music;

[0018] If the similarity is lower than the second threshold, it is determined that the corresponding music file is a medley of songs of different music.

[0019] In one embodiment, the synthesis method is a multi-instrument synthesis method;

[0020] Extracting corresponding music synthesis information from each music file according to the synthesis method includes:

[0021] Extracting multiple instrument accompaniment information and vocal information of different instruments playing the same music from each music file;

[0022] Executing a corresponding synthesis process according to the synthesis method to synthesize the music synthesis information into a target music file includes:

[0023] The instrument accompaniment information of each of the music files is synthesized in a linear mixing manner, and combined with the vocal information to obtain a target music file.

[0024] In one embodiment, the instrument accompaniment information of each of the music files is synthesized in a linear mixing manner, and combined with the vocal information to obtain a target music file, including:

[0025] Calculating the paragraph similarity of the music files according to the vocal information, and obtaining the song paragraph deviation of each music file according to the similarity;

[0026] Selecting a music file with the best sound quality as a first synthesized music file, calculating the deviation value of each other music file relative to each section of the first synthesized music file according to the song section deviation, and correcting the instrument accompaniment information corresponding to each music file according to the deviation value;

[0027] The accompaniment information of each instrument is added and multiplied to synthesize, and then enters a low-pass filter for filtering, and the filtered instrument accompaniment information is synthesized with the human voice information to obtain a target music file.

[0028] In one embodiment, the synthesis method is a song medley synthesis method;

[0029] Extracting corresponding music synthesis information from each music file according to the synthesis method includes:

[0030] Separate the vocals and accompaniment of each music file, and extract the instrument accompaniment information and vocal information of different music;

[0031] Locate the verse part and the chorus part of the corresponding music file according to the instrument accompaniment information and the vocal information;

[0032] Executing a corresponding synthesis process according to the synthesis method to synthesize the music synthesis information into a target music file includes:

[0033] The verse part and the chorus part of each music file are intercepted, and the verse part and / or the chorus part of the music file are strummed to synthesize the target music file.

[0034] In one embodiment, locating the verse part and the chorus part of the corresponding music file according to the instrument accompaniment information and the vocal information includes:

[0035] Analyzing the music file using the vocal information combined with the melody;

[0036] The structure sections of the verse and chorus of the corresponding music file are obtained by using the hidden Markov model and chromaticity features based on Viterbi decoding;

[0037] Calculate the rhythm, melody contour curve and emotional information of each piece of music in the corresponding music file according to the instrument accompaniment information;

[0038] The positions of the verse part and the chorus part are obtained by performing multiple determinations on the structural sections of the verse and the chorus according to the rhythm, melody contour curve and emotional information.

[0039] In one embodiment, the structure segments of the verse and chorus of the corresponding music file are obtained by using the hidden Markov model and the chromaticity feature based on Viterbi decoding, including:

[0040] Determine the scaling factor of the accompaniment according to the effective level value of each of the music files, and linearly compress the music files according to the scaling factor to obtain the sound volume of the target music files;

[0041] Calculating the effective level value and the corresponding Mel-frequency cepstrum of each frame of the music file;

[0042] Locate the position and pitch of the fundamental tone according to the effective level value and the peak curve of the Mel-frequency cepstrum, and obtain the corresponding note;

[0043] Calculating the duration of the note and converting the note into a corresponding chromaticity feature; wherein the chromaticity feature includes a chromaticity vector and a chromaticity spectrum;

[0044] The similarity of each frame of the music file is calculated by using a hidden Markov model to obtain the boundary values ​​of the structural sections of the verse and the chorus.

[0045] In one embodiment, the verse part and / or the chorus part of the music file are strummed together to form a target music file, including:

[0046] Get the main song or chorus mashup mode selected by the user;

[0047] Performing loudness normalization processing on each of the music files;

[0048] Combining the verse part and / or the chorus part of each of the music files into a medley;

[0049] The connection positions between the music files are gradually processed using a power exponential fade-in and fade-out algorithm.

[0050] Second aspect:

[0051] The present application provides a music file processing device, comprising:

[0052] A transmission module, used for acquiring multiple music files from multiple external audio signal sources;

[0053] A determination module, used to determine a synthesis method of the music files according to the attribute information of each of the music files;

[0054] An extraction module, used to extract corresponding music synthesis information from each music file according to the synthesis method;

[0055] The synthesis module is used to execute the corresponding synthesis process according to the synthesis method, and synthesize the music synthesis information into a target music file.

[0056] The third aspect:

[0057] The present application provides a music performance device, comprising: a mainboard, and an audio system and a display device respectively connected to the mainboard; wherein the mainboard is also connected to a microphone;

[0058] The mainboard is used to execute the steps of the above-mentioned music file processing method;

[0059] The audio system is used to play audio data;

[0060] The microphone is used to pick up the singing voice of the user;

[0061] The display device is used to display image content when the song file is sung.

[0062] Fourth aspect:

[0063] The present application provides a computer device, comprising:

[0064] one or more processors;

[0065] Memory;

[0066] One or more application programs, wherein the one or more application programs are stored in the memory and are configured to be executed by the one or more processors, and the one or more programs are configured to: execute the above-mentioned music file processing method.

[0067] Fifth aspect:

[0068] The present application provides a computer-readable storage medium, which stores at least one instruction, at least one program, a code set or an instruction set. The at least one instruction, the at least one program, the code set or the instruction set is loaded by the processor and executes the above-mentioned music file processing method.

[0069] The above-mentioned music file processing method and device, music singing equipment, computer equipment and computer-readable storage medium can obtain multiple music files through multiple external audio signal sources, determine the synthesis method of the music files according to the attribute information of each music file, and extract the corresponding music synthesis information from each music file, and execute the corresponding synthesis process to synthesize the music synthesis information into the target music file; with this technical solution, users can import music files from multiple different audio signal sources, so that they can intelligently and conveniently produce synthesized music, meet the personalized needs of users, and enhance the user application experience.

[0070] Furthermore, the transmission of audio data packets encapsulated based on private protocols improves transmission efficiency and can be processed while being transmitted. At the same time, a time-division working method is used during the transmission process to import data from multiple audio signal sources to achieve parallel reception and processing, thereby improving processing efficiency and fluency.

[0071] Furthermore, the synthesis method adopts a multi-instrument synthesis method for the same music, respectively extracts multiple instrument accompaniment information and vocal information of different instruments played by the same music, and adopts a linear mixing method to synthesize the instrument accompaniment information and vocal information of each music file to obtain a target music file; this technical solution automatically synthesizes the same music imported from multiple audio signal sources into a multi-instrument type of music, which can be used for online concerts, where multiple different users sing the same song in different regions, and the song is mixed to simulate the effect of a live chorus. The linear mixing method is used to synthesize the instrument accompaniment, which can ensure the consistency of the envelope direction of the sound, and will not cause distortion due to excessive sound, nor will the music quality be reduced due to too little sound.

[0072] In addition, by calculating the deviation values ​​between the various music files, the positions of the notes corresponding to the instrumental accompaniment of each music file are corrected using the deviation values, thereby improving the synthesis effect of the instrumental accompaniment.

[0073] Furthermore, the synthesis method adopts a song medley synthesis method of different music, separates the vocals and accompaniment of each music file, extracts the instrument accompaniment information and vocal information of different music; locates the verse part and chorus part of the corresponding music file according to the instrument accompaniment information and vocal information; intercepts the verse part and chorus part of each music file, and medleys the verse part and / or chorus part of the music file to synthesize the target music file; this technical solution enables users to independently produce a medley of verses or choruses of different music, thereby satisfying the purpose of users singing multiple songs at the same time at one time, especially in KTV scenarios, users can import multiple songs from multiple different audio data sources according to needs, and automatically generate a medley song to meet the needs of users to produce personalized medley music.

[0074] In addition, combined with the hidden Markov model, the chromaticity features are calculated using the instrumental accompaniment, and the notes are fitted into an envelope curve as the melody contour line to determine the distinction between the main song and the chorus part, which can achieve better paragraph division.

[0075] Furthermore, the loudness of each music file is normalized before the mashup is synthesized to ensure the consistency of the loudness of the mashup music. The connection positions between each music file are gradually processed using a power exponential fade-in and fade-out algorithm to ensure a smooth and natural transition of the volume of different music mashups.

[0076] Additional aspects and advantages of the present application will be partially given in the following description, which will become apparent from the following description, or will be understood through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0077] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:

[0078] Figure 1 is a structural framework diagram of an exemplary music file processing technical solution;

[0079] Figure 2 is a flow chart of a music file processing method according to an embodiment;

[0080] Figure 3 This is a flowchart of synthesizing a target music file from multiple music files.

[0081] Figure 4-7 This is a sample music score diagram of the verse and chorus;

[0082] Figure 8 It is a flowchart for calculating the notes of a music file;

[0083] Fig. 9 is a flow chart of dividing the verse part and the chorus part of an embodiment;

[0084] Fig.10 The structure diagram of a music file processing device of an embodiment is shown. DETAILED DESCRIPTION

[0085] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application, and cannot be interpreted as limiting the present application.

[0086] Those skilled in the art will appreciate that, unless otherwise stated, the singular forms "a", "an", "said" and "the" used herein may also include plural forms. It should be further understood that the term "comprising" used in the specification of the present application refers to the presence of the features, integers, steps, operations, but does not exclude the presence or addition of one or more other features, integers, steps, operations.

[0087] The music file processing solution of the present application can be applied to music singing devices, such as smart speaker devices and KTV devices; in addition, it can also be applied to smart terminals such as smart phones, tablets, and personal computers; the music singing device can be connected to the backend server through the network, and can be connected to the audio signal source 1-n (n≥1) through WIFI, Bluetooth or data network connection. The audio signal source can be a smart phone, tablet, personal computer, storage medium or network device, etc.; the music file processing method provided by the present application can be deployed on the terminal device in the form of software, or can be deployed on the server, or can be deployed on the music singing device in different functional modules; Figure 1 As shown, Figure 1 This is an example of a network topology diagram for a music file processing solution; the terminal devices in the figure can be connected to a variety of audio signal sources to transmit music files, and the music singing equipment provides users with convenient and intelligent music file processing functions, which can synthesize the required personalized songs for users in real time. At the same time, users can also share the song files in their personalized music library with other users for use; of course, the music file processing method provided in this application can also be implemented on a personal computer through a software program, installed on a smart phone through an APP, and communicate with multiple other terminal devices through Bluetooth and a private protocol to transmit music files, and synthesize the required personalized songs in real time.

[0088] The following takes a music performance device as an example, and combines the embodiments of the music file processing method to illustrate the music file processing method. Figure 2 As shown, Figure 2 The flowchart of the music file processing method of an embodiment mainly includes the following steps:

[0089] Step S10: Acquire multiple music files from multiple external audio signal sources.

[0090] In this step, the music singing device allows users to transfer multiple music files from smart phones, local transmission (such as CD, Blu-ray, DVD, USB flash drive, etc.), network disk, WIFI, coaxial optical fiber, FM and other audio signal sources via Bluetooth. Users can choose the appropriate method to transfer music files according to personal preferences. They can transfer different music files or different versions of the same music files.

[0091] After transmitting the music file, the music singing device can obtain the music file's encoding format, bit rate, sampling rate, number of bits, number of channels, song name, singer name, lyrics, song data, file size, song length, song style and other attribute information, and at the same time determine the quality of the music file whether it is lossy sound quality (below 320kbps, such as MP3, WMA, OGG, etc.) or lossless sound quality (WAVE, FLAC, AIFF, APE, WAV, WAVPACK, LPAC, TTK, etc.).

[0092] In one embodiment, taking the example of a smart phone transmitting a music file to a music performance device, the process of step S10 may include the following:

[0093] S101: Establish communication connections with multiple data sources.

[0094] For example, multiple users' smartphones can establish communication connections with music performance equipment through Bluetooth or WiFi transmission. Taking Bluetooth as an example, since Bluetooth is a standard communication protocol, in order to better transmit music files, a private protocol can be designed and the data of the music files can be transmitted on the Bluetooth protocol. The smartphone can use the transmission module to encapsulate the audio data of the music files based on the private protocol, and then transmit it to the music performance equipment through Bluetooth.

[0095] S102, receiving audio data packets encapsulated based on a private protocol from various data sources in a time-division working mode.

[0096] During the transmission process, a time-division working method is adopted to transmit data from multiple audio signal sources, so that the audio data packets can be received and subsequently processed at the same time, thereby improving processing efficiency and fluency.

[0097] S103, parsing each audio data packet according to the private protocol to obtain multiple music files.

[0098] Exemplarily, after receiving each audio data packet, the music singing device can parse each audio data packet separately to obtain multiple music files and then store them in a cache, and then read and process them in real time by a subsequent processing flow.

[0099] The above-mentioned embodiment improves the transmission efficiency based on the audio data packet transmission encapsulated by the private protocol, and can process while transmitting. At the same time, a time-division working mode is adopted during the transmission process to import data from multiple audio signal sources to realize parallel reception and processing, thereby improving processing efficiency and fluency.

[0100] Step S20: determining a synthesis method of the music files according to the attribute information of each of the music files.

[0101] In this step, the relationship between the music files is determined based on the attribute information between the input music files, and the user can select different synthesis methods to synthesize the music files.

[0102] In one embodiment, the process of determining the synthesis method of the music file in step S20 includes the following steps:

[0103] First, the similarity between music files can be calculated based on the attribute information of each music file; for example, the singer name, song name and song similarity calculation can be used to determine whether multiple audio signal sources are the same music or significantly different music.

[0104] Then, a judgment is made based on the similarity. If the similarity is higher than a first threshold, the corresponding music file is determined to be a multi-instrument synthesis of the same music; if the similarity is lower than a second threshold, the corresponding music file is determined to be a medley synthesis of different music.

[0105] Exemplarily, when the data transmitted by the audio signal source is the same piece of music, it will be merged into a multi-instrument accompaniment music according to the different instrumental accompaniments on each piece of music; if the attribute information transmitted by the audio signal source is different music names, different types, different styles or different singers, it is considered that the user has transmitted different music, and a song medley operation can be performed at this time.

[0106] In the scheme of the above embodiment, when the imported music files contain music files of the same piece, instrumental accompaniment synthesis can be performed, and when different music files are imported, a medley of the music files can be synthesized.

[0107] Step S30: extracting corresponding music synthesis information from each music file according to the synthesis method.

[0108] In this step, different parts of the content are extracted from the music file for synthesis according to different synthesis methods; the following takes multi-instrument accompaniment synthesis and medley synthesis as examples for explanation. Figure 3 As shown, Figure 3 The flowchart of an example of synthesizing a target music file from a plurality of music files.

[0109] (1) For the multi-instrument synthesis method; the vocal accompaniment can be separated from each music file, and after the vocals and accompaniment parts are separated to obtain the corresponding instrument accompaniment, the multiple instrument accompaniment information and vocal information of different instruments playing the same music can be obtained.

[0110] (ii) For the song medley synthesis method, the vocals and accompaniment of each music file are separated respectively, and the instrumental accompaniment information and vocal information of different music are extracted; the main song part and the chorus part of the corresponding music file are located according to the instrumental accompaniment information and the vocal information, and in order to better connect the interesting parts of each music, the song types are divided into main song medley and chorus medley parts.

[0111] For the technical solution of separating vocals and accompaniment, the separation method can be selected according to the quality of the music file. For lossless music files, the vocal separation technology can be directly used to extract vocal information, accompaniment information, and instrument group track information, etc. For lossy music files, the sound quality enhancement technology can be used to enhance the lossy music files to high-quality accompaniment music as much as possible.

[0112] Step S40: executing a corresponding synthesis process according to the synthesis method, and synthesizing the music synthesis information into a target music file.

[0113] In this step, a corresponding synthesis process is performed on the music synthesis information according to the synthesis method, and the music synthesis information is synthesized into a target music file.

[0114] In one embodiment, as described above, for the multi-instrument synthesis method, the instrument accompaniment information of each of the music files can be synthesized in a linear mixing method, and the target music file can be obtained by combining the vocal information;

[0115] In one embodiment, as described above, for the song mashup synthesis method, the verse part and the chorus part of each music file can be intercepted, and the verse part and / or the chorus part of the music file can be mashed together to synthesize the target music file.

[0116] As an embodiment, the verse or chorus mashup mode selected by the user is obtained; the loudness of each of the music files is normalized; the verse part and / or the chorus part of each of the music files are merged and mashed together; and the connection position between each of the music files is gradually processed using a power exponential fade-in and fade-out algorithm.

[0117] Exemplarily, after the verse and chorus parts of each music file are intercepted, they are merged into a medley respectively. The user can choose the verse medley or the chorus medley according to personal preference. The connection between each music file is processed by a fade-in and fade-out algorithm. The algorithm is very slow in the beginning and then quickly moves to the end of the music file. It is suitable for being placed between two music clips to gradually maintain a natural transition of volume. In addition, in order to achieve consistent loudness of the medley songs, before the chorus, the loudness of each song is normalized, for example, normalized to -6 to 0dB.

[0118] To summarize the above embodiments, the music singing device obtains multiple music files through multiple external audio signal sources, determines the synthesis method of the music files according to the attribute information of each music file, extracts the corresponding music synthesis information from each music file, and executes the corresponding synthesis process to synthesize the music synthesis information into a target music file; thus, the user can import music files from multiple different audio signal sources, so as to produce synthesized music intelligently and conveniently, meet the user's personalized needs, and enhance the user's application experience.

[0119] In the scheme of the above embodiment, multiple users can transfer a piece of music to the music singing device through a smart phone, and the music singing device extracts the climax clips and splices them into a medley music file, thereby improving the user application experience; after the music file is transferred, it can be saved in a sound quality format (dts, wav, APE, FLAC, mp3, aac, mp4, avi, mkv, mpg audio, video MTV music, etc.). The music singing device can perform the following operations: directly perform the synthesis process of the music file on the music singing device to obtain the target music file; or upload the music file to the server, and the server drives the synthesis operation and returns the target music file.

[0120] In order to make the technical solution of the present application more clear, it is described in detail below with reference to the accompanying drawings.

[0121] In one embodiment, the technical solution of synthesizing the target music file by linear mixing in step S40 may include the following:

[0122] S401, calculating the paragraph similarity of the music files according to the vocal information, and obtaining the song paragraph deviation of each music file according to the similarity.

[0123] Exemplarily, the singer name, song name, and song similarity calculation are used to determine whether multiple signal sources are transmitting the same music; for example, signal source 1 transmits <Blue and White Porcelain - Piano Music>, signal source 2 transmits <Blue and White Porcelain - Cello Music>, and signal source 3 transmits <Blue and White Porcelain - Guzheng>.

[0124] S402, selecting a music file with the best sound quality as the first synthesized music file, calculating the deviation value of each other music file relative to each section of the first synthesized music file according to the song section deviation, and correcting the instrument accompaniment information corresponding to each music file according to the deviation value.

[0125] Exemplarily, the vocal accompaniment of each music file is separated to obtain the corresponding instrumental accompaniment; such as the piano accompaniment of signal source 1, the cello accompaniment of signal source 2 and the guzheng accompaniment of signal source 3.

[0126] The DP paragraph similarity calculation is performed based on the vocal part to obtain the paragraph deviation of each song, and the three music files with higher sound quality (96K, 128kps, WAVE, FLAC, AIFF, APE, WAV, WAVPACK, LPAC or TTK) are selected as the main synthesis object; the deviation of each paragraph is calculated to correct the accompaniment in the corresponding signal source.

[0127] S403, synthesizing each instrument accompaniment information by addition and multiplication, and then entering into a low-pass filter for filtering, synthesizing the filtered instrument accompaniment information with the human voice information to obtain a target music file.

[0128] Exemplarily, music files of the main synthesis object and other signal sources are subjected to additive and multiplicative synthesis, and after synthesis enter a low-pass filter to reduce high-frequency noise generated by the synthesis process, and finally a piano, cello and guzheng ensemble version of "Blue and White Porcelain" is obtained.

[0129] The above technical solution adopts a linear mixing method to synthesize the instrument accompaniment information and vocal information of each music file to obtain a target music file; this technical solution automatically synthesizes the same music imported from multiple audio signal sources into a multi-instrument type of music, which can be used for online concerts. Multiple different users in different regions sing or play the same song, and the song is mixed to simulate the effect of live chorus or multi-person ensemble. The instrument accompaniment is synthesized in a linear mixing method, which can ensure the consistency of the sound envelope direction, and will not produce distortion due to excessive sound, nor will the music quality be reduced due to too little sound.

[0130] In one embodiment, the technical solution of intercepting the verse part and the chorus part of each music file and performing a mashup to synthesize the target music file in step S40 may include the following:

[0131] S411, using hidden Markov model and chromaticity features and based on Viterbi decoding to obtain the structural sections of the verse and chorus of the corresponding music file; wherein, the verse is generally the beginning or the middle of the song, which is a relatively plain preparation part, and even if it is repeated, the lyrics will mostly change; the chorus is the climax and essence of the song.

[0132] Specifically, the pure vocal part and the accompaniment part are obtained according to the vocal separation, and then the vocal part is combined with melody analysis, the hidden Markov model and chromaticity features are adopted, and the corresponding music structure paragraphs, namely the verse part and the chorus part, are obtained by Viterbi decoding; in this technical solution, the similarity between each piece of music can be calculated through the hidden Markov model, so as to accurately obtain the boundary value of each section, so as to achieve the purpose of dividing the verse part and the chorus part.

[0133] S412, calculating the rhythm, melody contour curve and emotional information (sadness, pleasure, happiness, anger or sexiness, etc.) of each piece of music in the corresponding music file according to the instrument accompaniment information.

[0134] Specifically, the rhythm, melody contour curve and emotional changes of each section in the music file are calculated according to the accompaniment information, so that the main song part and the chorus part can be determined.

[0135] S413, performing multiple determinations on the structural sections of the verse and chorus according to the rhythm, melody contour curve and emotional information to obtain the positions of the verse part and the chorus part.

[0136] Specifically, the main song is relatively soft and stable, while the chorus highlights the emotion of the main song and has a more intense climax. Its melody contour is more obvious and its rhythm is faster than that of the main song. The switch from the main song to the chorus creates an atmosphere of gradually increasing emotion. The chorus generally accounts for a larger proportion than the main song. Therefore, the positions of the main song and the chorus can be accurately located through multiple judgments such as rhythm, melody contour curve and emotional information.

[0137] The following is an example to illustrate the division process of the verse and chorus. For example, the music file is the song "Ordinary Road". Currently, songs generally adopt the following structure: prelude, verse, chorus, interlude, and outro; Figure 4-7 As shown, Figure 4-7 This is a schematic diagram of the music score of the verse and chorus of an example. The preset data segment is divided into multiple sub-segments, and multiple sub-segments with high similarity that are sung repeatedly are found in the verse section, so as to divide the verse and chorus. For example, the verse and chorus of the song "Ordinary Road" are as follows:

[0138] like Figure 4 The first verse is: "Wandering on the road, are you going to leave? Fragile pride, that was once my appearance. Hot and uneasy, where are you going? Mysterious and silent, are you listening?"

[0139] like Figure 5 The first chorus is: "I have crossed mountains and seas, and walked through crowds of people. Everything I once had was gone like smoke in the blink of an eye. I was lost and disappointed and lost all direction until ordinariness became the only answer."

[0140] like Figure 6 , the second verse is: "When you are still fantasizing about your tomorrow, will she be better or worse? To me, it is another day."

[0141] like Figure 7 The second chorus is: "I once destroyed everything I had and just wanted to leave forever. I once fell into endless darkness and wanted to struggle but couldn't extricate myself. I once was like you, like him, like the weeds and wild flowers, desperate, longing, crying, laughing, and ordinary."

[0142] From the above example, it can be seen that the verse part and the chorus part are obviously two sub-paragraphs, each paragraph has a clear boundary, and the melody of each paragraph is consistent. After processing through steps S411 to S413, the verse part and the chorus part can be accurately divided.

[0143] In order to make the division scheme of the main song part and the chorus part in this application clearer, this application provides the division scheme of the following embodiment for the division method.

[0144] In one embodiment, the technical solution for dividing the structural sections of the verse and the chorus in step S411 may include the following:

[0145] (1) Determine the scaling factor of the accompaniment according to the effective level value of each of the music files, and linearly compress the music files according to the scaling factor to obtain the sound volume of the target music files.

[0146] Specifically, the RMS (effective level value) value of each piece of music and the maximum RMS value are calculated, and the multiples by which the accompaniment in each piece of music needs to be scaled are determined according to the RMS value of each piece of music. The dynamic smoothing coefficient is:

[0147] gsmoth=factor*fsmoth+(1-factor)*gsmoth

[0148] fsmoth=RMStarget-rms

[0149] By calculating the static compression value, the music is linearly compressed to the sound volume of the music to be synthesized.

[0150] (2) Calculate the effective level value and the corresponding Mel-frequency cepstrum of each frame of the music file.

[0151] Exemplarily, based on SSM (self-similarity matrix) technology processing, STFT (Short-Time Fourier Transform) spectrum analysis is performed on the music file, and the RMS of each frame and the corresponding Mel-cepstrum are calculated. The Mel-cepstrum conforms to the human auditory effect and can well reflect the location of the notes in the music and their corresponding pitches.

[0152] (3) Locate the position and pitch of the fundamental tone according to the effective level value and the peak curve of the Mel-frequency cepstrum, and obtain the corresponding note.

[0153] like Figure 8 As shown, Figure 8 It is a flowchart for calculating the notes of a music file. According to the peak curves of RMS and Mel-frequency inverse spectrum, the position and pitch of the fundamental tone can be located, thus obtaining the notes corresponding to the music file.

[0154] (4) Calculating the duration of the note and converting the note into a corresponding chromaticity feature; wherein the chromaticity feature includes a chromaticity vector and a chromaticity spectrum.

[0155] The duration of the corresponding note can be calculated using the duration, which is converted into the corresponding chromaticity feature (chroma) according to the note. The chromaticity feature includes a chromaticity vector and a chromaticity spectrum. The chromaticity vector is a vector V containing 12 elements, each element represents a pitch (C, C# / Db, D, D# / Eb, E, F, F# / Gb, G, G# / Ab, A, A# / Bb, B), and a pitch represents an octave. The duration calculation formula is as follows:

[0156]

[0157] The similarity calculation formula is as follows:

[0158]

[0159] Among them, V1 and V2 represent the chrominance vector values ​​of the two frame signals respectively, and the range of d is 0-1.

[0160] (5) A hidden Markov model is used to calculate the similarity of each frame of the music file to obtain the boundary values ​​of the structural sections of the verse and the chorus.

[0161] refer to Fig. 9 As shown, Fig. 9 The present invention is a flowchart of dividing the verse part and the chorus part of an embodiment. The similarity of each frame is calculated by the hidden Markov model to determine the best music paragraph structure division. In order to better realize the paragraph division, the corresponding chromaticity features are calculated by using the music accompaniment, and the notes are fitted into an envelope curve as the music melody contour line to determine the verse and chorus parts. At the same time, the hidden Markov model is combined to find the repeated parts in the song.

[0162] Among them, the Gaussian density function is calculated as follows;

[0163]

[0164] tem2=-2×std 2

[0165]

[0166] In the formula, scale is approximately 0.01*samplerate, and step is 44100 / 512. According to the Gaussian density function, for each chromaticity value, the corresponding Markov matrix can be obtained:

[0167]

[0168] According to the obtained Gaussian value a, a plurality of chromaticity Markov matrices mat are obtained.

[0169] Viterbi decoding is performed on the Markov matrix, and each chrominance value is multiplied by the high-frequency weight, that is,

[0170]

[0171] The chromaticity vector of each frame is distributed higher and then summed. When the sum value is relatively small, its pitch is at a low position. When the sum value is large, the sum value is at a high position. After calculating the chromaticity sum value of each frame, it is normalized as its high-pitch probability p and bass probability value (1-p)), and the analytical Markov matrix is ​​calculated:

[0172] cost(i)=oldcos(i-1)+mat(i),i>1

[0173] cost(0)=p+beatpath

[0174] diffval = oldcost-mat(0),

[0175] beatpath=diffval(min(diffval))

[0176] Through feedback search, we look for similar structural paragraphs, namely the verse part and the chorus part. Based on the changes in melody and emotion, we can determine whether the structural paragraph is the verse part or the chorus part.

[0177] The solution of the above embodiment adopts Mel-frequency cepstrum and RMS to jointly determine the fundamental pitch position, so as to accurately locate the current pitch, and use the chromaticity vector to determine its similar parts. Rough calculation helps to reduce the complexity of the algorithm, and the Markov model can be used to accurately determine the verse and chorus parts, thereby increasing the accuracy of the determination and achieving better paragraph division.

[0178] An embodiment of the music file processing apparatus is described below.

[0179] refer to Fig.10 As shown, Fig.10 The structure diagram of a music file processing device according to an embodiment includes:

[0180] The transmission module 10 is used to obtain multiple music files from multiple external audio signal sources;

[0181] A determination module 20, configured to determine a synthesis method of the music files according to the attribute information of each of the music files;

[0182] An extraction module 30, used to extract corresponding music synthesis information from each music file according to the synthesis method;

[0183] The synthesis module 40 is used to execute a corresponding synthesis process according to the synthesis method, and synthesize the music synthesis information into a target music file.

[0184] The music file processing device of this embodiment can execute a music file processing method provided by the embodiment of the present disclosure, and the implementation principle is similar. The actions performed by each module in the music file processing device in each embodiment of the present disclosure correspond to the steps in the music file processing method in each embodiment of the present disclosure. For the detailed functional description of each module of the music file processing device, please refer to the description in the corresponding music file processing method shown in the previous text, which will not be repeated here.

[0185] An embodiment of the music performance device is described below.

[0186] The music singing device provided by the present application can perform functions such as music playing, image playing and music singing. Specifically, its structure may include: a main board, and an audio system and a display device respectively connected to the main board, etc.; wherein the main board is also connected to a microphone;

[0187] During use, the main board is used to execute the steps of the above-mentioned music file processing method; the audio system is used to play audio data, such as music files and the singing voice of the user; the microphone is used to pick up the singing voice of the user; the display device is used to display image content when singing the song file, and for the display device, a large touch screen system can be used.

[0188] An embodiment of a computer device of the present application is described below. The computer device comprises:

[0189] one or more processors;

[0190] Memory;

[0191] One or more application programs, wherein the one or more application programs are stored in the memory and are configured to be executed by the one or more processors, and the one or more programs are configured to: execute the music file processing method according to any of the above embodiments.

[0192] An embodiment of the computer-readable storage medium of the present application is described below, wherein the storage medium stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set are loaded by the processor and execute the music file processing method of any of the above embodiments.

[0193] In the technical solutions of the above-mentioned music file processing device, music singing equipment, computer equipment, and computer-readable storage medium, users can import music files from multiple different audio signal sources, so that they can intelligently and conveniently produce synthesized music to meet users' personalized needs and enhance users' application experience.

[0194] The above description is only a partial implementation method of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. A music file processing method, characterized in that: include: Acquire multiple music files from multiple external audio signal sources; Determining a synthesis method of the music files according to the attribute information of each of the music files, including: calculating the similarity between the music files according to the attribute information of each of the music files; if the similarity is higher than a first threshold, determining that the corresponding music file is a multi-instrument synthesis method of the same music; When the synthesis mode is a multi-instrument synthesis mode, extracting corresponding music synthesis information from each music file according to the synthesis mode, including: extracting multiple instrument accompaniment information and vocal information played by different instruments of the same music from each music file; The corresponding synthesis process is executed according to the synthesis method to synthesize the music synthesis information into a target music file, including: calculating the paragraph similarity of the music files according to the vocal information, and obtaining the song paragraph deviation of each music file according to the similarity; selecting the music file with the best sound quality as the first synthesized music file, calculating the deviation value of each other music file relative to each paragraph of the first synthesized music file according to the song paragraph deviation, and correcting the instrument accompaniment information corresponding to each music file according to the deviation value; synthesizing each instrument accompaniment information by addition and multiplication, and then filtering it into a low-pass filter, synthesizing the filtered instrument accompaniment information with the vocal information to obtain the target music file.

2. The music file processing method according to claim 1, characterized in that: Get multiple music files from multiple external audio signal sources, including: Establishing communication connections with multiple data sources; Adopt time-division working mode to receive audio data packets encapsulated based on private protocols from various data sources; Each audio data packet is parsed according to the private protocol to obtain multiple music files.

3. The music file processing method according to claim 1, characterized in that: Determining a synthesis method of the music files according to the attribute information of each of the music files also includes: Calculate the similarity between music files based on the attribute information of each music file; If the similarity is lower than the second threshold, it is determined that the corresponding music file is a medley of songs of different music.

4. The music file processing method according to claim 3, characterized in that: When the synthesis method is a song medley synthesis method; Extracting corresponding music synthesis information from each music file according to the synthesis method, further comprising: Separate the vocals and accompaniment of each music file, and extract the instrument accompaniment information and vocal information of different music; Locate the verse part and the chorus part of the corresponding music file according to the instrument accompaniment information and the vocal information; Executing a corresponding synthesis process according to the synthesis method to synthesize the music synthesis information into a target music file also includes: The verse part and the chorus part of each music file are intercepted, and the verse part and / or the chorus part of the music file are strummed to synthesize the target music file.

5. The music file processing method according to claim 4, characterized in that: Locating the verse part and the chorus part of the corresponding music file according to the instrument accompaniment information and the vocal information includes: Analyzing the music file using the vocal information combined with the melody; The structure sections of the verse and chorus of the corresponding music file are obtained by using the hidden Markov model and chromaticity features based on Viterbi decoding; Calculate the rhythm, melody contour curve and emotional information of each piece of music in the corresponding music file according to the instrument accompaniment information; The positions of the verse part and the chorus part are obtained by performing multiple determinations on the structural sections of the verse and the chorus according to the rhythm, melody contour curve and emotional information.

6. The music file processing method according to claim 5, characterized in that: The structure sections of the verse and chorus of the corresponding music file are obtained by using the hidden Markov model and chromaticity features based on Viterbi decoding, including: Determine the scaling factor of the accompaniment according to the effective level value of each of the music files, and linearly compress the music files according to the scaling factor to obtain the sound volume of the target music files; Calculating the effective level value and the corresponding Mel-frequency cepstrum of each frame of the music file; Locate the position and pitch of the fundamental tone according to the effective level value and the peak curve of the Mel-frequency cepstrum, and obtain the corresponding note; Calculating the duration of the note and converting the note into a corresponding chromaticity feature; wherein the chromaticity feature includes a chromaticity vector and a chromaticity spectrum; The similarity of each frame of the music file is calculated by using a hidden Markov model to obtain the boundary values ​​of the structural sections of the verse and the chorus.

7. The music file processing method according to claim 4, characterized in that: The verse part and / or the chorus part of the music file are sung together to form a target music file, comprising: Get the main song or chorus mashup mode selected by the user; Performing loudness normalization processing on each of the music files; Combining the verse part and / or the chorus part of each of the music files into a medley; The connection positions between the music files are gradually processed using a power exponential fade-in and fade-out algorithm.

8. A music file processing device, characterized in that: include: A transmission module, used for acquiring multiple music files from multiple external audio signal sources; A determination module, used to determine the synthesis method of the music files according to the attribute information of each of the music files, including: calculating the similarity between the music files according to the attribute information of each of the music files; if the similarity is higher than a first threshold, determining that the corresponding music file is a multi-instrument synthesis method of the same music; The extraction module is used for extracting corresponding music synthesis information from each music file according to the synthesis mode when the synthesis mode is a multi-instrument synthesis mode, including: extracting multiple instrument accompaniment information and vocal information played by different instruments of the same music from each music file; A synthesis module is used to execute a corresponding synthesis process according to the synthesis method to synthesize the music synthesis information into a target music file, including: calculating the paragraph similarity of the music files according to the vocal information, and obtaining the song paragraph deviation of each music file according to the similarity; selecting the music file with the best sound quality as the first synthesized music file, calculating the deviation value of each other music file relative to each paragraph of the first synthesized music file according to the song paragraph deviation, and correcting the instrument accompaniment information corresponding to each music file according to the deviation value; synthesizing each instrument accompaniment information by addition and multiplication, and then filtering it in a low-pass filter, synthesizing the filtered instrument accompaniment information with the vocal information to obtain the target music file.