System and method for generating customized songs
Through a song generation system driven by user needs, combining music element screening, melody and rhythm generation, and lyric generation of recurrent neural network language model, the lack of creativity and music structure in the existing technology is solved, and efficient and personalized song generation effect is achieved.
Patent Information
- Application Number
- CN202411776778.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-05
- Publication Date
- 2025-03-28
AI Technical Summary
The existing song generation technology lacks creativity and innovation, emotional expression is not delicate enough, and there are problems with the music structure and logic, making it difficult to generate brand new and unique and creative music works.
By entering the desired demand information of the song by the user, identifying and analyzing and extracting feature information, filtering music elements from the preset element database, generating melody and rhythm, combining the recurrent neural network language model to generate lyrics, and finally combining to generate customized songs.
It realizes the generation of exclusive songs based on users' unique needs, improves creative efficiency and quality, can integrate multiple music styles, reduces production costs, and meets personalized and diversified music needs.
Smart Images

Figure CN119719412A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of song generation, and in particular to a system and method for generating customized songs. Background Art
[0002] In the past, efforts have been made to customize songs. Recent efforts have enabled users to manipulate music tracks to customize favorite songs to specific preferences. Musicians can individually record tracks and collaborate over the Internet to create a song without ever meeting face to face. Existing song customization software programs allow users to combine multiple previously recorded tracks to create a customized song. Users can use pre-recorded tracks in various formats, or alternatively, can record original tracks for combination with pre-recorded tracks to obtain a customized end result.
[0003] To customize songs, some software applications use karaoke-style recording of song lyrics for later insertion or merging with previously recorded tracks. In these applications, it is understood that when the song that the user wishes to customize is being performed, he or she must sing into a microphone so that the original song and the user's voice can be recorded simultaneously. Other software applications provide mixing programs that allow the user to merge previously recorded tracks in an attempt to create a unique song. However, such recording systems are often complex, expensive, and time consuming, requiring a relatively high skill level for users who desire quick access to personalized, customized recordings.
[0004] At present, song generation technology still has some shortcomings:
[0005] Lack of creativity and innovation: Although it is possible to generate music, it is often limited to imitating existing music styles and patterns, and it is difficult to truly create new and unique music works. For example, the generated melody may be similar to some known songs, lacking a unique style that is refreshing.
[0006] Emotional expression is not delicate enough: Music is an important art form for expressing emotions, but current song generation technology is still insufficient in accurately expressing and conveying delicate emotions. The generated music may lack emotional depth and complexity, making it difficult to arouse strong emotional resonance among the audience.
[0007] Music structure and logic issues: The generated songs may not be perfect in terms of music structure, such as lack of clear division of verses, choruses, bridges, etc., or lack of internal logic and coherence in the development of melody and rhythm. This makes the whole song sound not compact and organized enough.
[0008] Currently, no effective solution has been proposed for the problems in the related technologies. Summary of the invention
[0009] In view of the problems in the related art, the present invention proposes a system and method for generating customized songs to overcome the above-mentioned technical problems existing in the existing related art.
[0010] The technical solution of the present invention is achieved in this way:
[0011] In one aspect, the present invention:
[0012] A method for generating a customized song comprises the following steps:
[0013] The user describes the desired information about the song through the input box, and the desired information includes at least: style, theme, emotion, speed and duration;
[0014] Identify and analyze the demand information input by the user and extract feature information;
[0015] Selecting music elements from a preset element database according to the extracted feature information;
[0016] Generate melody and rhythm for musical elements, and combine melody and rhythm into a song framework;
[0017] According to the song framework, lyrics are generated according to the recurrent neural network language model, and the song framework and lyrics are combined to generate a customized song and output in the form of an audio file.
[0018] The step of combining the melody and the rhythm into a song framework comprises the following steps:
[0019] Optimize the song framework, including: adjusting the duration of notes and adjusting the pitch.
[0020] The melody generation of the music element includes the following steps:
[0021] According to a random number generation algorithm, a series of note sequences are randomly generated as an initial melody;
[0022] Preset music rules and optimize the initial melody based on genetic algorithm to generate melody.
[0023] The step of generating the rhythm of the music element includes the following steps:
[0024] The presets include a rhythm pattern library with various different rhythm patterns;
[0025] According to the music elements, a suitable rhythm pattern is selected from the rhythm pattern library as a template, and parameters of the currently selected template are adjusted, and the adjusted template is used as the rhythm generation.
[0026] Among them, according to the theme and emotion of the preliminary song framework, relevant words are selected from the preset lyrics data as target words, and high-frequency words are extracted from the target words;
[0027] Mark the rhythm and rhyme of high-frequency words according to the rhyme dictionary;
[0028] Using a recurrent neural network language model to generate words and sentences for high-frequency words with rhythm and rhyme, including: sorting the high-frequency words according to a preset rule and using them as inputs of the recurrent neural network language model respectively to predict the next word and sentence;
[0029] Filter matching words and phrases and output them as lyrics.
[0030] Another aspect of the present invention is:
[0031] A system for generating customized songs, comprising:
[0032] The user input module is used for the user to describe the desired information about the song through the input box;
[0033] The recognition and extraction module is used to recognize and analyze the demand information input by the user and extract feature information;
[0034] The music rhythm generation module is used to generate melody and rhythm for music elements and combine the melody and rhythm into a song framework;
[0035] The lyrics generation module is used to generate lyrics according to the song framework and the recurrent neural network language model;
[0036] The song synthesis module is used to combine the song framework with the lyrics to generate a customized song and output it in the form of an audio file.
[0037] Furthermore, the optimization and adjustment module is used to optimize the song framework, including: adjusting the duration of notes and adjusting the pitch.
[0038] Beneficial effects of the present invention:
[0039] 1. The present invention meets the personalized needs of users and can generate exclusive songs based on the user's unique preferences, emotional experiences, story backgrounds, etc., while meeting the special needs of different scenarios.
[0040] 2. The present invention provides new creative ideas and sources of inspiration for professional music creators. Some basic melodies, rhythms or lyrics can be quickly generated according to the set theme, style, etc. The creators can modify, improve and innovate on this basis, thereby improving the creation efficiency and expanding the creation direction. For non-professional music lovers, the creation threshold is lowered, allowing them to transform the musical ideas in their minds into actual works, stimulate their creative enthusiasm, tap their potential creative ability, and enable more people to participate in music creation.
[0041] 3. Compared with the traditional manual creation method, the present invention can generate a large amount of music materials and preliminary song frameworks in a short time. Creators can quickly obtain multiple creative directions and possibilities, and select satisfactory parts for in-depth creation, saving time for conception and creation from scratch. Especially when facing urgent creative tasks or a large number of creative needs, the advantages are more obvious, and some tedious creative links can be automatically completed, such as melody generation, harmony matching, rhythm arrangement, etc., so that creators can focus more on the core creativity and emotional expression of the song, thereby improving the overall creative quality and efficiency.
[0042] 4. The present invention can integrate a variety of different musical styles and elements to create a new and unique musical style. For example, combining classical music with modern pop music, or integrating folk music elements into electronic music, can bring a new auditory experience to the audience and promote the innovation and development of musical styles. Songs with corresponding style characteristics can be generated according to different cultural backgrounds, domain characteristics, etc., to promote the exchange and integration of music culture and make music more diversified.
[0043] 5. The present invention reduces production costs. Traditional music production often requires a large amount of money to hire professional music creators, rent recording equipment, build recording studios, etc. The present invention reduces the dependence on human and material resources and reduces production costs. Especially for some individual users, small businesses or non-profit organizations with limited budgets, song customization can be achieved at a lower cost to meet their specific music needs. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0045] Figure 1 is a flow chart of a method for generating a customized song according to an embodiment of the present invention;
[0046] Figure 2 It is a principle block diagram of a system for generating customized songs according to an embodiment of the present invention. DETAILED DESCRIPTION
[0047] The following will be combined with the accompanying drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field belong to the scope of protection of the present invention.
[0048] According to an embodiment of the present invention, a method for generating a customized song is provided.
[0049] like Figure 1 As shown, the method for generating a customized song according to an embodiment of the present invention includes the following steps:
[0050] Step S1, the user describes the desired information about the song through the input box, and the desired information at least includes: style, theme, emotion, speed and duration;
[0051] Step S2, identifying and analyzing the demand information input by the user and extracting feature information;
[0052] Step S3, selecting music elements from a preset element database according to the extracted feature information;
[0053] Step S4, generating melody and rhythm from the music elements, and combining the melody and rhythm into a song framework;
[0054] The melody generation of the music element includes the following steps:
[0055] According to a random number generation algorithm, a series of note sequences are randomly generated as an initial melody;
[0056] Preset music rules and optimize the initial melody based on genetic algorithm to generate melody.
[0057] When the technical solution is applied, the randomly generated series of note sequences can be randomly generated within a certain pitch range and rhythm restrictions.
[0058] At the same time, initial melody optimization can make the melody conform to specific musical rules such as harmony rules, rhythm rules, etc., while meeting user needs such as specific emotions, styles, etc.
[0059] Furthermore, specifically, during the optimization process, the evaluation function scores different melodies, and selects melodies with higher scores for further optimization and improvement, until the user obtains a satisfactory initial melody.
[0060] The step of generating the rhythm of the music element includes the following steps:
[0061] The presets include a rhythm pattern library with various different rhythm patterns;
[0062] According to the music elements, a suitable rhythm pattern is selected from the rhythm pattern library as a template, and parameters of the currently selected template are adjusted, and the adjusted template is used as the rhythm generation.
[0063] The step combines the melody and rhythm into a song framework, including the following steps:
[0064] Optimize the song framework, including: adjusting the duration of notes and adjusting the pitch.
[0065] This technical solution, for the rhythm pattern library, can cover different music styles and emotional expressions, such as the four-beat rhythm commonly seen in pop music and the strong drum beat rhythm in rock music.
[0066] In addition, according to the musical elements, a suitable rhythm pattern is selected from the rhythm pattern library as a basis. The selection can be based on factors such as the style, speed, emotion, etc. of the song. At the same time, the user can adjust and change the selected rhythm pattern, such as changing the strength of the rhythm, adding some additional percussion instrument rhythms, etc., to make it more in line with the overall atmosphere of the song, and the adjusted rhythm is used as the rhythm generation.
[0067] In addition, for the above-mentioned combination of melody and rhythm into a song framework, when it is applied, the generated melody and rhythm are synchronized to ensure the temporal consistency of the two.
[0068] Specifically, you can use the built-in timeline function to align the notes of the melody and rhythm, and adjust the speed of the melody and rhythm according to user needs to make them match each other. For example: if the melody is slow, the rhythm should also be slowed down accordingly; conversely, if the melody is energetic, the rhythm should also be accelerated.
[0069] In addition, during the combination process, you can also add different musical layers to the song, such as main melody, harmony, accompaniment, etc. According to the style and emotional needs of the song, reasonably arrange the volume and timbre of each layer. And determine the structure of the song, such as prelude, main song, chorus, interlude, etc. Organize the melody and rhythm according to the song structure, so that the song has clear layers and development context.
[0070] In addition, when using the application, after the song framework is generated, you can audition it. Listen to the coordination effect of melody and rhythm, as well as the balance and coordination of various musical layers. According to the audition results, further adjust and optimize the melody and rhythm. You can adjust the pitch, duration, strength of the rhythm, etc. of the notes until you get a song framework that meets the user's needs to enhance the fluency and beauty of the music.
[0071] Step S5, generating lyrics according to the song framework and the recurrent neural network language model, and combining the song framework with the lyrics to generate a customized song and output it in the form of an audio file.
[0072] Among them, according to the theme and emotion of the preliminary song framework, relevant words are selected from the preset lyrics data as target words, and high-frequency words are extracted from the target words;
[0073] Mark the rhythm and rhyme of high-frequency words according to the rhyme dictionary;
[0074] Using a recurrent neural network language model to generate words and sentences for high-frequency words with rhythm and rhyme, including: sorting the high-frequency words according to a preset rule and using them as inputs of the recurrent neural network language model respectively to predict the next word and sentence;
[0075] Filter matching words and phrases and output them as lyrics.
[0076] According to an embodiment of the present invention, a system for generating customized songs is provided.
[0077] like Figure 2 As shown, the system for generating customized songs according to an embodiment of the present invention includes:
[0078] User input module 1, used for users to describe their desired song requirements through an input box;
[0079] Identification and extraction module 2, used to identify and analyze the demand information input by the user and extract feature information;
[0080] The music rhythm generation module 3 is used to generate melody and rhythm for the music elements, and combine the melody and rhythm into a song framework;
[0081] Lyrics generation module 4, used to generate lyrics according to the song framework and the recurrent neural network language model;
[0082] The song synthesis module 5 is used to combine the song framework with the lyrics to generate a customized song and output it in the form of an audio file.
[0083] In addition, the optimization and adjustment module 6 is used to optimize the song framework, including: adjusting the duration of notes and adjusting the pitch.
[0084] In addition, for the above recurrent neural network language model, the following steps are included:
[0085] Assuming the vocabulary size is V, the input vector dimension is x, and the number of hidden layer neurons is h, the parameters of the recurrent neural network language model are as follows:
[0086] The weight matrix U from the input layer to the hidden layer: Its dimension is h × v. For example, if the vocabulary has 8000 words, the input is represented by a one-hot vector, and the hidden layer has 100 neurons, then the dimension of U is 100 × 8000.
[0087] The weight matrix from hidden layer to hidden layer: The dimension is h×h. For example, in the above example, the dimension of W is 100×100.
[0088] The weight matrix from the hidden layer to the output layer has dimensions v×h, which is 8000×100 in this example.
[0089] Perform forward propagation, including the following steps:
[0090] For each word in the input text sequence, first convert it into a one-hot vector representation x t , expressed as: x t ∈R V ;
[0091] Calculate the state value s of the hidden layer at time t t , expressed as: s t =tanh(Ux t +Ws t-1 ), where x t ∈R h , the initial time s0 is usually initialized to the zero vector.
[0092] Calculate the output o at time t t , expressed as: o t =softmax(Vs t ), o t ∈R V ;
[0093] The softmax function is used to convert the score into a probability distribution so that each element of the output is between 0 and 1 and the sum of all elements is 1.
[0094] The loss function calculation includes the following steps:
[0095] Calibration y t is the true label at time t, that is, the one-hot vector of the correct next word, then the loss function E is expressed as:
[0096] Back propagation includes the following steps:
[0097] Calculate the error term δ of the output layer o , expressed as: o =o t -y t ;
[0098] Calculate the gradient of the hidden layer to the output layer weight matrix V, expressed as:
[0099] Calculate the error term δ of the hidden layer s , expressed as: in, Indicates element-by-element multiplication;
[0100] Calculate the gradients of the input layer to the hidden layer weight matrix U and the hidden layer to the hidden layer weight matrix W, which are expressed as:
[0101]
[0102]
[0103] With the help of the above technical solution, the gradient obtained through the above calculation is used to update the parameters U, V, and W using the stochastic gradient descent optimization algorithm to minimize the loss function, thereby continuously optimizing the performance of the model so that it can better predict the next word in the text sequence and generate text that conforms to the language logic.
[0104] In summary, with the help of the above technical solution of the present invention, the following advantages can be achieved:
[0105] 1. The present invention meets the personalized needs of users and can generate exclusive songs based on the user's unique preferences, emotional experiences, story backgrounds, etc., while meeting the special needs of different scenarios.
[0106] 2. The present invention provides new creative ideas and sources of inspiration for professional music creators. Some basic melodies, rhythms or lyrics can be quickly generated according to the set theme, style, etc. The creators can modify, improve and innovate on this basis, thereby improving the creation efficiency and expanding the creation direction. For non-professional music lovers, the creation threshold is lowered, allowing them to transform the musical ideas in their minds into actual works, stimulate their creative enthusiasm, tap their potential creative ability, and enable more people to participate in music creation.
[0107] 3. Compared with the traditional manual creation method, the present invention can generate a large amount of music materials and preliminary song frameworks in a short time. Creators can quickly obtain multiple creative directions and possibilities, and select satisfactory parts for in-depth creation, saving time for conception and creation from scratch. Especially when facing urgent creative tasks or a large number of creative needs, the advantages are more obvious, and some tedious creative links can be automatically completed, such as melody generation, harmony matching, rhythm arrangement, etc., so that creators can focus more on the core creativity and emotional expression of the song, thereby improving the overall creative quality and efficiency.
[0108] 4. The present invention can integrate a variety of different musical styles and elements to create a new and unique musical style. For example, combining classical music with modern pop music, or integrating folk music elements into electronic music, can bring a new auditory experience to the audience and promote the innovation and development of musical styles. Songs with corresponding style characteristics can be generated according to different cultural backgrounds, domain characteristics, etc., to promote the exchange and integration of music culture and make music more diversified.
[0109] 5. The present invention reduces production costs. Traditional music production often requires a large amount of money to hire professional music creators, rent recording equipment, build recording studios, etc. The present invention reduces the dependence on human and material resources and reduces production costs. Especially for some individual users, small businesses or non-profit organizations with limited budgets, song customization can be achieved at a lower cost to meet their specific music needs.
[0110] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. After considering the disclosure of the specification and the examples, those skilled in the art will easily think of other embodiments of the present disclosure. This application is intended to cover any modification, use or adaptation of the present disclosure, which follows the general principles of the present disclosure and includes common knowledge or customary technical means in the art that are not disclosed in the present disclosure. The specification and the examples are only regarded as exemplary, and the true scope and spirit of the present disclosure are indicated by the claims.
[0111] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A method for generating a customized song, characterized in that: The following steps are involved: The user describes the desired information about the song through the input box, and the desired information includes at least: style, theme, emotion, speed and duration; Identify and analyze the demand information input by the user and extract feature information; Selecting music elements from a preset element database according to the extracted feature information; Generate melody and rhythm for musical elements, and combine melody and rhythm into a song framework; According to the song framework, lyrics are generated according to the recurrent neural network language model, and the song framework and lyrics are combined to generate a customized song and output in the form of an audio file.
2. The method for generating a customized song according to claim 1, characterized in that: The steps of combining melody and rhythm into a song framework include the following steps: Optimize the song framework, including: adjusting the duration of notes and adjusting the pitch.
3. The method for generating a customized song according to claim 1, characterized in that: Generating melody from music elements includes the following steps: According to a random number generation algorithm, a series of note sequences are randomly generated as an initial melody; Preset music rules and optimize the initial melody based on genetic algorithm to generate melody.
4. The method for generating a customized song according to claim 3, characterized in that: Generating rhythm for music elements includes the following steps: The presets include a rhythm pattern library with various different rhythm patterns; According to the music elements, a suitable rhythm pattern is selected from the rhythm pattern library as a template, and parameters of the currently selected template are adjusted, and the adjusted template is used as the rhythm generation.
5. The system and method for generating customized songs according to claim 1, characterized in that: According to the theme and emotion of the preliminary song framework, relevant words are selected from the preset lyrics data as target words, and high-frequency words are extracted from the target words; Mark the rhythm and rhyme of high-frequency words according to the rhyme dictionary; Using a recurrent neural network language model to generate words and sentences for high-frequency words with rhythm and rhyme, including: sorting the high-frequency words according to a preset rule and using them as inputs of the recurrent neural network language model respectively to predict the next word and sentence; Filter matching words and phrases and output them as lyrics.
6. A system for generating customized songs, used in the method for generating customized songs as claimed in any one of claims 1 to 5, characterized in that: include: A user input module (1), used for the user to describe the desired song requirements through an input box; The identification and extraction module (2) is used to identify and analyze the demand information input by the user and extract feature information; A music rhythm generation module (3), used for generating melody and rhythm from music elements, and combining the melody and rhythm into a song framework; A lyrics generation module (4), used to generate lyrics according to the song framework and the recurrent neural network language model; The song synthesis module (5) is used to combine the song framework and lyrics to generate a customized song and output it in the form of an audio file.
7. The system for generating customized songs according to claim 1, characterized in that: The optimization and adjustment module (6) is used to optimize the song framework, including: adjusting the duration of notes and adjusting the pitch.