Music accompaniment generation method and apparatus, device, storage medium and program product

By extracting beat, chord and melody information in the music data to generate accompaniment data, the problem of the generation of music accompaniment and music theory information in the prior art is solved, and a more accurate and stable music accompaniment effect is achieved.

WO2025139724A1PCT designated stage expired Publication Date: 2025-07-03GUANGZHOU KUGOU COMP TECH CO LTD
View PDF 12 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/137646
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-12-27
Filing Date
2024-12-06
Publication Date
2025-07-03

AI Technical Summary

Technical Problem

The music accompaniment generation method based on deep learning in the prior art ignores music theory information, resulting in a large gap between the music style and the music itself, affecting the accuracy of the music accompaniment.

Method used

By obtaining musical data, the beat data information, chord data information and melody data information are extracted, and the music accompaniment data is generated based on this information, and combined with audio data rendering, the precise presentation of the music accompaniment is achieved.

Benefits of technology

It improves the stability and effect of the generation of music accompaniment, ensures the precise correspondence between the accompaniment and the melody of the music, and enhances the accuracy of the music accompaniment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024137646_03072025_PF_FP_ABST
    Figure CN2024137646_03072025_PF_FP_ABST
Patent Text Reader

Abstract

A music accompaniment generation method and apparatus, a device, a storage medium and a program product, relating to the technical field of computers. The method comprises: acquiring music data (210); extracting beat data information, chord data information and melody data information from the music data (220); generating music accompaniment data on the basis of the melody data information, the beat data information and the chord data information (230); and executing audio data rendering on the basis of the music accompaniment data to obtain a music accompaniment corresponding to the music data (240). In this way, music beats and music notes can be quantized, and the beats and chords are incorporated into an accompaniment melody generation process within the limitation of the music melody, so that music accompaniment data can be presented more precisely by means of music parameters, thereby improving the generation stability and the generation effect of music accompaniments. The present application can be applied to various scenarios such as music accompaniment generation.
Need to check novelty before this filing date? Find Prior Art

Description

Method, device, equipment, storage medium and program product for generating music accompaniment

[0001] This application claims priority to Chinese patent application No. 202311824499.3 filed on December 27, 2023, entitled “Method, device, equipment, storage medium and program product for generating musical accompaniment”, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] The embodiments of the present application relate to the field of computer technology, and in particular to a method, apparatus, device, storage medium, and program product for generating a music accompaniment. Background Art

[0003] Artistic creation has always been considered the exclusive domain of artists. However, with the development of computer technology in recent years, artistic creation has gradually broken through traditional barriers. With the help of computer technology, musical works can be artificially produced, giving music types and content greater room for improvement.

[0004] In related technologies, if one wishes to generate corresponding musical accompaniment based on music, a deep learning-based method is usually used to generate the accompaniment. The model is trained with the help of sample music and the corresponding sample accompaniment so that the model learns the method of generating the accompaniment. The music for which the accompaniment needs to be generated is then input into the trained model to obtain the musical accompaniment.

[0005] The above process relies too much on the accurate correspondence between the sample music and the sample accompaniment. Although this method can obtain good music accompaniment to a certain extent, it ignores the music theory information of the music itself, which easily leads to a large gap between the style of the music accompaniment and the music itself, affecting the accuracy of the music accompaniment in the music field. Summary of the Invention

[0006] The present application provides a method, apparatus, device, storage medium, and program product for generating a musical accompaniment. These methods can quantize the beats and notes of a musical piece, incorporating beats and chords into the accompaniment melody generation process within the constraints of the musical melody. This allows the musical accompaniment data to be presented more meticulously through musical parameters, thereby improving the stability and quality of musical accompaniment generation. The technical solution is as follows.

[0007] In one aspect, a method for generating a music accompaniment is provided, the method being executed by a computer device, the method comprising:

[0008] Acquire music data, where the music data is divided into at least two music beats, and the music beats include music notes;

[0009] Extracting beat data information, chord data information, and melody data information from the music data, wherein the beat data information is used to describe the changing speed of the at least two music beats, the chord data information is used to describe the chord units extracted based on the music beat, and the melody data information is used to describe the note changes between at least two music notes;

[0010] generating music accompaniment data according to the melody data information, the beat data information, and the chord data information, wherein the melody data information is used to define an accompaniment melody of the music accompaniment with the music melody of the music data, and the music accompaniment data is used to describe an accompaniment condition of the music data;

[0011] Audio data rendering is performed based on the music accompaniment data to obtain the music accompaniment corresponding to the music data.

[0012] In another aspect, a device for generating a music accompaniment is provided, the device comprising:

[0013] A data acquisition module is used to acquire music data, where the music data is divided into at least two music beats, and the music beats include music notes;

[0014] an information extraction module, configured to extract beat data information, chord data information, and melody data information from the music data, wherein the beat data information is used to describe the changing speed of the at least two music beats, the chord data information is used to describe the chord units extracted based on the music beat, and the melody data information is used to describe the note changes between at least two music notes;

[0015] a data generating module, configured to generate music accompaniment data based on the melody data information, the beat data information, and the chord data information, wherein the melody data information is used to define an accompaniment melody of the music accompaniment with the music melody of the music data, and the music accompaniment data is used to describe an accompaniment condition of the music data;

[0016] The accompaniment generation module is used to perform audio data rendering based on the music accompaniment data to obtain the music accompaniment corresponding to the music data.

[0017] On the other hand, a computer device is provided, comprising a processor and a memory, wherein the memory stores at least one program, and the at least one program is loaded and executed by the processor to implement the method for generating a musical accompaniment as described in any of the above-mentioned embodiments of the present application.

[0018] On the other hand, a computer-readable storage medium is provided, in which at least one program is stored. The at least one program is loaded and executed by a processor to implement the method for generating a music accompaniment as described in any of the above embodiments of the present application.

[0019] In another aspect, a computer program product or computer program is provided, the computer program product including a computer program stored in a computer-readable storage medium. A processor of a computer device reads the computer program from the computer-readable storage medium and executes the computer program, causing the computer device to perform the method for generating a musical accompaniment as described in any of the above embodiments.

[0020] The beneficial effects of the technical solutions provided in the embodiments of the present application include at least:

[0021] Extract beat data information, chord data information, and melody data information from the acquired music data; generate music accompaniment data based on the melody data information and the chord data information, and finally render the music accompaniment based on the music accompaniment data. In the process of generating music accompaniment data from music data, the music beat and music notes are quantized through the music information extraction process to improve the accuracy of the analysis of the music data, making the accompaniment data generation process more targeted. In addition, the melody data information, beat data information, and chord data information are integrated, and the beat and chord are incorporated into the accompaniment melody generation process under the limitation of the music melody, so that the music accompaniment data can be presented more carefully through music parameters, making the music accompaniment of the music data rendered by the music accompaniment data more accurate, and improving the generation stability and generation effect of the music accompaniment. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] FIG1 is a schematic diagram of an implementation environment provided by an exemplary embodiment of the present application;

[0023] FIG2 is a flow chart of a method for generating a music accompaniment provided by an exemplary embodiment of the present application;

[0024] FIG3 is a flow chart of a method for generating a music accompaniment provided by another exemplary embodiment of the present application;

[0025] FIG4 is a flowchart of a method for generating a music accompaniment provided by yet another exemplary embodiment of the present application;

[0026] FIG5 is a flowchart of a method for generating a music accompaniment provided by another exemplary embodiment of the present application;

[0027] FIG6 is a schematic diagram of the overall framework of a method for generating a music accompaniment provided by an exemplary embodiment of the present application;

[0028] FIG7 is a schematic diagram of an input of an accompaniment generation method provided by an exemplary embodiment of the present application;

[0029] FIG8 is a process flow chart of a method for generating a music accompaniment according to an exemplary embodiment of the present application;

[0030] FIG9 is a schematic diagram of a piano notation provided by an exemplary embodiment of the present application;

[0031] FIG10 is a structural block diagram of a device for generating a music accompaniment provided by an exemplary embodiment of the present application;

[0032] FIG11 is a structural block diagram of a computer device provided by an exemplary embodiment of the present application. DETAILED DESCRIPTION

[0033] In order to make the objectives, technical solutions and advantages of this application clearer, the implementation methods of this application will be further described in detail below with reference to the accompanying drawings.

[0034] First, a brief introduction is given to the terms involved in the embodiments of this application.

[0035] Symbolic domain: In music theory, the symbolic domain refers to the range of symbols or values ​​used by computers when processing music. Specifically, the symbolic domain refers to the digital music format that computers read and process during the generation process. In digital music formats, musical elements such as notes, pitch, and volume are typically represented digitally. Examples of digital music formats include the Musical Instrument Digital Interface (MIDI) format and the Music Extensible Markup Language (MusicXML) format. For example, MIDI uses numbers to represent notes, pitch, volume, and other musical parameters. In MIDI files, different numerical values ​​represent different notes, and the velocity of a note can be represented numerically. The symbolic domain may include note value (a number representing the duration of a note, such as 4 for a quarter note and 8 for an eighth note), pitch (a number or code representing the pitch of a note; in MIDI, each note has a corresponding pitch value), and volume (a number representing the volume level of a note or instrument, with larger values ​​typically indicating a higher volume). These numbers or symbols constitute the symbolic domain used by computers in the music generation process. Through these symbols, computers can read, process and generate music. In this context, the definition of symbolic domain refers to the range and way in which musical elements can be represented digitally.

[0036] Piano cover: refers to the adaptation and performance of the original song in audio format with vocals and complete accompaniment in the form of piano music.

[0037] In related technologies, if one wishes to generate a corresponding musical accompaniment based on music, a deep learning-based approach is typically used. A model is trained using sample music and the corresponding sample accompaniment, allowing the model to learn how to generate the accompaniment. The music for which the accompaniment is to be generated is then input into the trained model to generate the musical accompaniment. This process relies heavily on the accurate correspondence between the sample music and the sample accompaniment. While this approach can produce good musical accompaniment to a certain extent, it ignores the musical theory inherent in the music itself, which can easily lead to a significant discrepancy between the musical style of the musical accompaniment and the music itself, affecting the accuracy of the musical accompaniment in the music field.

[0038] In an embodiment of the present application, a method for generating a music accompaniment is introduced. The method can quantize the beat and notes of a music through a music information extraction process, thereby improving the accuracy of the analysis of the music data. Furthermore, the method integrates at least two pieces of quantized information and incorporates the beat and chords into the accompaniment melody generation process under the limitation of the music melody, so that the music accompaniment data can be presented more carefully through music parameters, thereby improving the stability and effect of the generation of the music accompaniment. The method for generating a music accompaniment can be applied to the fields of music production, music creation, game production, advertising production, virtual reality (VR) and augmented reality (AR), etc., and the embodiments of the present application do not limit this.

[0039] It should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, storage, display, etc.), and signals involved in this application are all authorized by the user or fully authorized by all parties, and the collection, use, and processing of relevant data must comply with the relevant laws, regulations, and standards of the relevant region. For example, the music data and music information extraction involved in this application were obtained with full authorization.

[0040] Next, the implementation environment involved in the embodiments of the present application is described. The method for generating a musical accompaniment provided in the embodiments of the present application can be implemented by a terminal device alone, or by a server, or by a terminal device and a server through data interaction, and the embodiments of the present application are not limited thereto. In some embodiments, the method for generating a musical accompaniment is described by taking the interactive execution of the musical accompaniment by a terminal device and a server as an example.

[0041] In some embodiments, please refer to FIG. 1 , the implementation environment involves a terminal device 110 and a server 120 , and the terminal device 110 and the server 120 are connected via a communication network 130 .

[0042] In some embodiments, the terminal device 110 has a music data acquisition function, and can obtain music data through recording, manual production, etc. For example, a song is used as music data.

[0043] In some embodiments, the terminal device 110 sends the music data to the server 120 via the communication network 130, and the server 120 obtains the music data. The music data is divided into at least two music beats, and the music beats include music notes.

[0044] In some embodiments, the server 120 extracts beat data information, chord data information, and melody data information from the music data.

[0045] Among them, the beat data information is used to characterize the changing speed of at least two music beats, the chord data information is used to describe the chord unit extracted based on the music beat, and the melody data information is used to describe the note changes between at least two music notes.

[0046] In some embodiments, the server 120 uses the melody data information as a constraint condition for generating the music accompaniment, and generates the music accompaniment data through the beat data information and the chord data information.

[0047] The melody data information is used to define the accompaniment melody of the music accompaniment based on the music melody of the music data, and the music accompaniment data is used to describe the accompaniment of the music data. As the melody content of the music data as a whole, the melody data information facilitates the overall definition of the music accompaniment during the music accompaniment generation process. Based on the definition of the accompaniment melody by the music melody, the beat data information represents the tempo, and the chord data information represents the local notes of the music, allowing for the generation of more accurate music accompaniment data.

[0048] In some embodiments, the server 120 performs audio data rendering based on the music accompaniment data to obtain the music accompaniment corresponding to the music data.

[0049] The music accompaniment data, as the accompaniment described by music parameters, is music data content presented in the symbolic domain. Therefore, to obtain the music accompaniment corresponding to the music data, it is necessary to perform audio data rendering on the music accompaniment data to obtain the played music accompaniment. For example, the music accompaniment data can be analyzed using specific audio data decoding software to obtain the music accompaniment represented by the audio data of the music accompaniment data.

[0050] In some embodiments, the server 120 sends the music accompaniment data to the terminal device 110 via the communication network, so that the terminal device 110 performs audio data rendering on the music accompaniment data to obtain the music accompaniment; or, the server performs audio data rendering on the music accompaniment data to obtain an accompaniment data file that is convenient for the terminal device to directly play, and sends the accompaniment data file to the terminal device 110 via the communication network, and the terminal device 110 downloads and plays the music accompaniment based on the accompaniment data file.

[0051] It is worth noting that the above-mentioned terminal devices include but are not limited to mobile terminal devices such as mobile phones, tablet computers, portable laptops, intelligent voice interaction devices, smart home appliances, vehicle-mounted terminal devices, etc., and can also be implemented as desktop computers, etc.; the above-mentioned servers can be independent physical servers, or they can be a server cluster or distributed system composed of at least two physical servers, or they can be cloud servers.

[0052] In some embodiments, the above-mentioned server can also be implemented as a node in a blockchain system.

[0053] The computer device in this application can be at least one of the terminal device 110 and the server 120, and this application does not limit this. The execution subject of each step in the following embodiments is a computer device.

[0054] In combination with the above-mentioned noun introduction and application scenarios, the method for generating music accompaniment provided in this application is explained, and the method is applied to the above-mentioned computer device as an example. As shown in Figure 2, the method includes at least one step from the following steps 210 to 240.

[0055] Step 210: Acquire music data.

[0056] In some embodiments, music data refers to data expressed in audio form, and is used to contain the actual audio content of the music.

[0057] In some embodiments, music data can be stored in formats such as Waveform Audio File Format (WAV), Moving Picture Experts Group Audio Layer III (MP3), and Free Lossless Audio Codec (FLAC). Since the music data contains sound wave signals, the music data can be used to play music content.

[0058] For example, music data may be implemented as a vocal song, such as an album of music sung by a singer, or a song sung by an individual, or a song hummed by an individual, etc.; music data may also be implemented as a radio station program, a television program, a news broadcast, etc.; music data may also be implemented as a concert recording or a concert recording; music data may also be implemented as a telephone recording, etc.

[0059] The music data is divided into at least two music beats, and the music beats include music notes.

[0060] In some embodiments, musical meter is a fundamental organizing element in music, determining the temporal arrangement and emphasis of musical notes. As a means of expressing a sense of musical time, a piece of music typically consists of alternating strong and weak beats. The strong and weak relationships between beats create a sense of rhythm in the musical data. The use and emphasis of meter may vary across musical styles and cultures. Musical meter is a crucial means for composers to express musical emotion and convey musical information.

[0061] In some embodiments, a beat is a time unit within a time signature. Each beat has a strong beat (usually the first beat), with the remaining beats being weak beats. A beat, a symbol used on musical notation to indicate musical rhythm, consists of two numbers: the upper number represents the number of beats in each measure, and the lower number represents the duration of each beat. The duration represents the duration of a musical note within the beat. For example, a 4 / 4 time signature indicates that each measure has four beats, with each beat being the duration of a quarter note.

[0062] In other words, a musical beat is a basic unit of time in music, and the notes contained within it determine the musical information within this time unit. Within a beat, notes of different durations can be accommodated, and the combination and arrangement of these notes form the rhythm of the music.

[0063] Step 220: extracting beat data information, chord data information, and melody data information from the music data.

[0064] In some embodiments, music information extraction is used to quantize music data so that the music data presented in audio form can be presented in data form. In some embodiments, beat data information, chord data information, and melody data information are extracted from the music data by music information extraction. In some embodiments, the beat data information, chord data information, and melody data information corresponding to the music data are obtained by quantizing the music data. Of course, the extraction method is not limited to quantization processing, and beat data information, chord data information, and melody data information can also be extracted through a trained neural network model.

[0065] In some embodiments, music information extraction is performed on music data to obtain beat data information representing rhythm changes in the music data, chord data information representing different chords in the music data, and melody data information representing overall melody changes in the music data.

[0066] That is, the beat data information is used to characterize the changing speed of at least two music beats, the chord data information is used to describe the chord units extracted based on the music beat, and the melody data information is used to describe the note changes between at least two music notes.

[0067] In some embodiments, music beats, as the basic time unit in music data, create the basic rhythmic structure of the music data and define the ordering of music notes on the timeline. When represented by a beat (Time Signature), the music beat specifies the number of beats in each measure and the duration of each beat. When acquiring beat data information, at least two music beats corresponding to the music data can be first determined, and then the beat data information can be determined based on the distribution changes of the at least two music beats.

[0068] In some embodiments, a chord is a set of at least two notes played simultaneously, arranged in a fixed interval relationship. Chords are the basis of harmony in music and are very important for creating and emphasizing a sense of harmony. A chord can contain musical notes such as a fundamental tone, a third tone, and a fifth tone, thereby forming different harmonic textures. In other words, a chord focuses on the combination of sounds that occur simultaneously, and focuses on expressing pitch relationships in the vertical direction. When acquiring chord data information, the musical notes in each musical beat can be determined in units of musical beats, and the musical audio can be grouped into chords (or chord units).

[0069] In some embodiments, a melody is a series of organically connected notes, played in chronological order, forming a musical expression with melodic clues. Melody is a combination of pitch and duration, and is the most recognizable and memorable part of music. It is typically composed of a primary melody and a secondary melody. In other words, melody focuses on the horizontal combination of pitch and duration. When acquiring melody data information, attention is paid to the pitch changes corresponding to at least two musical notes and the durations corresponding to at least two musical notes, thereby comprehensively determining the melody data information corresponding to the musical data.

[0070] Within a piece of music data, the three elements of beat, chords, and melody often intertwine to create a complex and engaging musical experience. Meter provides a temporal framework, chords provide a harmonic foundation, and melody provides guiding clues, allowing for a more nuanced presentation of the music data.

[0071] With the help of the music information extraction process, the music beat is quantized into beat data information, the chord is quantized into chord data information, and the melody is quantized into melody data information, so that the music data can be analyzed based on at least two quantized information after information extraction.

[0072] Step 230: Generate music accompaniment data based on the melody data information, the beat data information and the chord data information.

[0073] In some embodiments, after obtaining the melody data information, the melody data information is used to characterize the overall melody of the music data, and thus the melody data information is used as a generation restriction condition to generate a music accompaniment corresponding to the music data within the music melody represented by the melody data information.

[0074] That is, the melody data information is used to define the accompaniment melody of the music accompaniment using the music melody of the music data.

[0075] In some embodiments, a musical melody represents a series of organically connected musical notes, played in chronological order to form a musical expression with a melodic thread. This is the most recognizable and memorable component of musical data. Melody data information refers to a digital, symbolic, or computer-readable representation of the melody, and may include pitch sequences, duration information, and note durations. It is typically encoded in digital or symbolic form and is used for computer analysis, music generation, or other digital music processing tasks. In other words, the melody data information corresponds to the musical melody and is the digital representation of the musical melody.

[0076] Similarly, an accompaniment melody is used to represent a series of organically connected musical notes, played in chronological order to form a musical accompaniment with a melodic clue. Therefore, when melody data information is used as a constraint condition for generating a musical accompaniment, the musical melody corresponding to the melody data information is used to limit the accompaniment melody corresponding to the musical accompaniment.

[0077] The music accompaniment data describes the accompaniment of the music data through music parameters. The music parameters here refer to parameters related to music, such as at least one of pitch, pitch, intensity, etc.

[0078] In some embodiments, there is a correspondence between the music accompaniment data and the accompaniment melody, and the music accompaniment data is a digital form of the accompaniment melody; when generated through beat data information and chord data information, music accompaniment data corresponding to the accompaniment melody is generated. The music accompaniment data, as a digital form corresponding to the accompaniment melody, is content generated after describing the accompaniment of the music data through numerous music parameters.

[0079] Because music accompaniment is not only related to the melody of the music data, but also to the chords and beats, when generating music accompaniment data, it is expressed not only through musical parameters related to the melody, such as pitch, duration, and timbre, but also through musical parameters related to the chords, such as pitch and harmony, and also through musical parameters related to the beat, such as volume and rhythmic pattern. In other words, the musical parameters used to describe the accompaniment of the music data include various parameters related to the music accompaniment, such as pitch, timbre, volume, rhythmic pattern, and harmony.

[0080] Step 240 , performing audio data rendering based on the music accompaniment data to obtain the music accompaniment corresponding to the music data.

[0081] In some embodiments, after obtaining the music accompaniment data, the music accompaniment data may be decoded to present the music accompaniment data in audio form, as the music accompaniment data is in digital form. That is, the music accompaniment data may be rendered as audio data to obtain the music accompaniment corresponding to the music data.

[0082] In some embodiments, the music accompaniment data is implemented as a digital representation of the music data—a MIDI file. To obtain the music accompaniment corresponding to the music accompaniment data, the MIDI file contains musical information such as notes, pitches, and durations, but does not contain sound waveforms. Therefore, the MIDI file must be converted into accompaniment data for rendering the music accompaniment. Specifically, audio conversion is first performed based on the music accompaniment data to obtain the accompaniment audio; then, audio rendering is performed on the accompaniment audio to obtain the music accompaniment.

[0083] In some embodiments, the method of performing audio conversion on music accompaniment data and obtaining accompaniment data includes the following steps.

[0084] (1) Software tools: MIDI files are converted into instrumental data using specialized music production software or MIDI editors. MIDI editors include professional sequencers (Ableton Live), Fruity Loops Studio (FL Studio), Logic Pro, Fluid Synth, Timidity++, etc.

[0085] (2) Virtual instruments or sound sources: Select or load virtual instrument or sound source plug-ins in the above software. These plug-ins act as virtual instruments and can generate corresponding audio waveforms based on the information in the MIDI file.

[0086] (3) Connect MIDI files: Import MIDI files into the software, usually by dragging and dropping files or using the import function. MIDI files contain information such as musical notes, pitches, and durations.

[0087] (4) Assigning a timbre: Assigning a suitable timbre (instrument) to a MIDI file or note determines which instrument is used to simulate the note in the MIDI file. This process is usually completed in the interface of a virtual instrument or sound source plug-in.

[0088] (5) Render to audio: Use the "Export" or "Render" function of the preset software to render the MIDI file into an audio file, usually WAV, MP3, Audio Interchange File Format (AIFF), etc. The preset software will generate the corresponding audio waveform based on the MIDI file.

[0089] (6) Adjust the effect: You can add audio effects, reverb, equalizer, etc. in the software as needed to adjust the final effect of the audio.

[0090] It's worth noting that the sound quality and expressiveness of the MIDI file-to-accompaniment audio conversion process described above depend on the quality of the virtual instrument or sound source used. Some professional virtual instrument libraries offer high-quality sound and realistic audio generation. This process converts the musical information in the MIDI file into a computer-readable audio format (accompaniment audio), allowing you to open the accompaniment audio on a computer or other audio device for playback.

[0091] In some embodiments, the accompaniment audio after audio conversion is rendered to obtain the music accompaniment, for example, the accompaniment audio is opened through a terminal device to play the music accompaniment.

[0092] It should be noted that the above are only examples in some embodiments, and the embodiments of the present application do not limit this.

[0093] In summary, beat data information, chord data information and melody data information are extracted from the acquired music data; the melody data information is used to generate restriction conditions, and music accompaniment data is generated through the beat data information and chord data information, and finally the music accompaniment is obtained by rendering based on the music accompaniment data. In the process of generating music accompaniment data through music data, the music beat and music notes are quantized through the music information extraction process, so as to improve the accuracy of the analysis of the music data and make the accompaniment data generation process more targeted. In addition, the melody data information, beat data information and chord data information are integrated, and the beat and chord are incorporated into the accompaniment melody generation process under the limitation of the music melody, so that the music accompaniment data can be presented more meticulously through music parameters, so that the music accompaniment of the music data rendered through the music accompaniment data is more accurate, and the generation stability and generation effect of the music accompaniment are improved.

[0094] In some embodiments, the beat data is determined by the number of at least two music beats per unit time, and the melody data and chord data corresponding to the music data are obtained through the melody track and the chord track, respectively, thereby improving data acquisition efficiency and accuracy. In some embodiments, as shown in FIG3 , step 220 shown in FIG2 can also be implemented as at least one of the following steps 310 to 330.

[0095] Step 310: Determine beat data information based on the number of at least two music beats within a unit time.

[0096] In some embodiments, the unit time is a pre-set unit time length, for example, the unit time is 1 minute, or the unit time is half a minute, or the unit time is 5 seconds, etc.

[0097] In some embodiments, beats per minute (BPM) is used as the data tempo information corresponding to the music data; BPM is a unit used to represent rhythm speed in music, and is used to represent the number of beats per minute. In the process of determining BPM, manual calculation can be used, or tools such as music production software can be used. For example, when using manual calculation, if you can feel the rhythm of the music, you can use a watch or timer to determine the number of beats in one minute. For example, if you count 120 beats in one minute, the BPM is 120; alternatively, a music beat detector can be used to determine the BPM, and the BPM of the song can be displayed.

[0098] Step 320: extract the chord track and melody track corresponding to the music data.

[0099] The chord track is used to describe a sound group constructed in the form of a chord by at least two music notes having a time sequence relationship.

[0100] In some embodiments, a chord track is a feature in music production software that is used to represent chord progressions in music.

[0101] In some embodiments, the Chord track is often divided into measures to better organize and understand the structure of the music. The number of measures on the Chord track depends on the structure and arrangement of the music; in music production software, chords can be created and edited on the Chord track, with each measure typically corresponding to a measure in the music. This helps maintain a consistent chord progression throughout the track, making it easier to adjust and organize the music.

[0102] The melody track is used to describe the main melody composed of at least two music notes in a time sequence.

[0103] In some embodiments, in music production software, a melody track is a concept in music production that refers to the audio track or track containing the main melody. The main melody is the most prominent and eye-catching melodic line in the music, usually performed by an instrument or singing (such as vocals). In music production software, the producer can use the melody track to record, edit, and arrange the main melody.

[0104] The melody track, which contains the main melody, can capture the most important and memorable melodic line in a piece of music. This is because the main melody is one of the key elements in music that captures the audience's attention. The melody track allows producers to precisely shape and control the core elements of the music, creating works with unique style and emotion.

[0105] In some embodiments, the chord track is also typically divided into measures. The number of measures in the melody track depends on the structure, arrangement, and creative style of the music.

[0106] Step 330: Determine melody data information and chord data information based on the melody track and the chord track.

[0107] In some embodiments, the number of bars in the chord track is adjusted based on the number of bars in the melody track to obtain chord data information; based on the note pitches corresponding to at least two music notes in the melody track, a melody transformation is performed on the melody track to obtain melody data information.

[0108] In some embodiments, the number of bars in the melody track and the number of bars in the chord track are determined separately to obtain a first number corresponding to the melody track and a second number corresponding to the chord track.

[0109] The first number is used to represent the number of bars in the melody track, that is, the melody track includes the first number of bars; the second number is used to represent the number of bars in the chord track, that is, the chord track includes the second number of bars.

[0110] In some embodiments, the melody track and the chord track are typically each divided into bars; after dividing the melody track into bars, a first number of bars are obtained; after dividing the chord track into bars, a second number of bars are obtained.

[0111] In some embodiments, a music feature extraction model is pre-acquired. The music feature extraction model is a pre-trained model used to analyze features of music data, such as beats, chords, and melody. The music feature extraction model is used to extract bars from the melody track and the chord track, respectively, to obtain a first number of bars in the melody track and a second number of bars in the chord track.

[0112] In some embodiments, the first quantity and the second quantity may be equal; or, the first quantity and the second quantity may be different, such as: the first quantity is smaller than the second quantity, or the second quantity is smaller than the first quantity, etc.

[0113] In some embodiments, the second number of chord tracks is adjusted based on the first number, and the adjusted chord tracks are obtained as the chord data information.

[0114] In some embodiments, in response to the second number being less than the first number, the chord track is padded based on the first number to obtain a padded chord track as the chord data information. The padded chord track is the adjusted chord track.

[0115] In some embodiments, if the second number is less than the first number, it means that the number of bars obtained after dividing the chord track into bars is smaller, and the number of bars obtained after dividing the melody track into bars is larger; based on the fact that the melody track can better represent the overall effect of the music data, the second number is padded based on the first number corresponding to the melody track, thereby obtaining the padded chord track as the chord data information.

[0116] In some embodiments, during the filling operation, the filled chord track is obtained as the chord data information by copying the chord of the previous measure of the measure to be filled in the chord track.

[0117] In some embodiments, each measure in the completed chord track is checked. To avoid long pauses in the accompaniment, when there is a measure without any chords, the chords of the previous measure are copied; if the measure is the first measure, the chords of the first subsequent measure that is not a full rest are copied.

[0118] In some embodiments, in response to the second number being equal to the first number, the chord track is used as the chord data information; in response to the second number being greater than the first number, the melody track and the chord track are aligned to obtain an aligned chord track corresponding to the melody track as the chord data information, etc.

[0119] In some embodiments, based on the pitches of the notes corresponding to at least two music notes in the melody track, a melody transformation process is performed on the melody track to obtain an updated melody track as melody data information.

[0120] In some embodiments, the melody track describes note features corresponding to at least two music notes. Pitch is a basic and important concept in music, which determines the relative height of music notes.

[0121] In some embodiments, for the case where the melodies of some songs generally have a lower pitch, in order to improve the listening experience and prevent conflicts with the accompaniment, the melody can be selectively processed to a higher octave.

[0122] The technical solution provided in the embodiments of this application adjusts the number of bars in the chord track by the number of bars in the melody track, thereby completing the chord track and ultimately obtaining the chord data information corresponding to the completed chord track. Melody transformation processing is performed on the melody track based on the pitch of the musical notes in the melody track, making the melody more harmonious and ultimately obtaining the melody data information. This approach helps ensure the accuracy of the acquired chord and melody data information.

[0123] In some embodiments, a preset first pitch and a preset second pitch are obtained, and the first pitch and the second pitch are used to define a transformation method for performing a melody transformation on the melody track. Exemplarily, the first pitch is a preset low pitch, and the second pitch is a preset high pitch. That is, the preset low pitch and the preset high pitch are obtained. Exemplarily, the first pitch and the second pitch correspond to different pitch values, and the first pitch is lower than the second pitch.

[0124] The preset low pitch and the preset high pitch are used to comprehensively limit the processing method of performing melody transformation processing on the melody track.

[0125] In some embodiments, the note pitches corresponding to at least two music notes in the melody track are compared with the first pitch and the second pitch respectively to determine a first note ratio and a second note ratio, the first note ratio being used to indicate the note ratio of the first note to at least two music notes, and the first note being used to indicate a music note lower than the first pitch, the second note ratio being used to indicate the note ratio of the second note to at least two music notes, and the second note being used to indicate a music note higher than the second pitch; based on the first note ratio and the first note ratio, a melody transformation is performed on the melody track to obtain melody data information.

[0126] In some embodiments, the first note ratio is also referred to as the bass note ratio in the following embodiments. In some embodiments, the second note ratio is also referred to as the treble note ratio in the following embodiments.

[0127] In some embodiments, the first note is also referred to as a bass note in the following embodiments. In some embodiments, the second note is also referred to as a treble note in the following embodiments.

[0128] In some embodiments, the note pitches corresponding to at least two music notes in the melody track are compared with a preset low pitch, and the note pitches corresponding to at least two music notes are compared with a preset high pitch to determine the bass note ratio and the treble note ratio.

[0129] Among them, the bass note ratio is used to indicate the note ratio of bass notes to at least two music notes, and bass notes are used to indicate music notes that are lower than a preset bass pitch; the treble note ratio is used to indicate the note ratio of treble notes to at least two music notes, and treble notes are used to indicate music notes that are higher than a preset treble pitch.

[0130] In some embodiments, a melody transformation process is performed on the melody track based on the bass note ratio and the treble note ratio to obtain an updated melody track as melody data information.

[0131] In some embodiments, after obtaining the melody track, the note pitches corresponding to at least two music notes are determined; a preset low pitch and a preset high pitch are obtained, and at least two music notes are compared with the preset low pitch and the preset high pitch, respectively, to calculate the bass note ratio and the treble note ratio, respectively.

[0132] For example: taking the preset bass pitch as 56 and the preset treble pitch as 70 as an example, after determining the note pitches corresponding to at least two music notes respectively, the at least two note pitches are compared with 56 and 70 respectively. If the note pitch corresponding to the music note is lower than 56, the music note is regarded as a bass note; if the note pitch corresponding to the music note is higher than 70, the music note is regarded as a treble note; thereby, the first note number of the bass note and the second note number of the treble note can be determined, and then the ratio of the bass notes is determined by combining the number of the first notes and the number of music notes, and the ratio of the treble notes is determined by combining the number of the second notes and the number of music notes.

[0133] In some embodiments, when both the bass note ratio and the treble note ratio meet the preset conditions, the melody track is not adjusted.

[0134] For example: when the proportion of high notes exceeds 10% and the proportion of bass notes is less than 20%, the melody track will not be processed in the higher octave; when the above preset conditions are not met, the melody track will be adjusted.

[0135] In some embodiments, to ensure a sense of completeness and closure, an outro can be added to each piece of music, ranging in length from one to three bars. Since different pieces of music have different ending bars, some end with a single, long note, some with a long pause, and some without enough time for an outro, it's necessary to use the melody track's information to determine in advance whether to add an outro to the accompaniment track.

[0136] In some embodiments, when the last note of the ending measure of the melody track ends after the second beat and is not a long note, a blank coda measure is pre-added when generating the accompaniment track, and the chords copy the chords of the previous measure; thus, when performing texture conversion on the coda, if the selected texture exceeds four beats, it will be extended to two to three measures when writing to MIDI.

[0137] In some embodiments, melody data information and chord data information are obtained based on the melody track and the chord track through the above process. The melody data information and chord data information are used to express the music data in digital form in combination with the beat data information.

[0138] The technical solution provided by the embodiments of this application compares a preset low pitch and a preset high pitch with the pitches corresponding to at least two musical notes in a melody track, thereby determining the ratio of high and low notes in the musical notes. Different melody processing methods are employed based on the note ratios, demonstrating flexible and targeted melody processing, thereby improving the efficiency and accuracy of determining melody data information.

[0139] It should be noted that the above are only examples in some embodiments, and the embodiments of the present application do not limit this.

[0140] In summary, beat data information, chord data information and melody data information are extracted from the acquired music data; the melody data information is used to generate restriction conditions, and music accompaniment data is generated through the beat data information and chord data information, and finally the music accompaniment is obtained by rendering based on the music accompaniment data. In the process of generating music accompaniment data through music data, the music beat and music notes are quantized through the music information extraction process, so as to improve the accuracy of the analysis of the music data and make the accompaniment data generation process more targeted. In addition, the melody data information, beat data information and chord data information are integrated, and the beat and chord are incorporated into the accompaniment melody generation process under the limitation of the music melody, so that the music accompaniment data can be presented more meticulously through music parameters, so that the music accompaniment of the music data rendered through the music accompaniment data is more accurate, and the generation stability and generation effect of the music accompaniment are improved.

[0141] In some embodiments, the accompaniment textures corresponding to at least two music measures in the music data are first obtained, and then the corresponding music measures are adjusted according to the accompaniment textures, thereby generating the music accompaniment data by combining the at least two adjusted music measures. In some embodiments, as shown in FIG4 , step 230 shown in FIG2 can also be implemented as steps 410 to 430 as follows.

[0142] Step 410 : In the case of a music measure as a unit, the melody data information is used as a generation constraint condition for the music accompaniment, and based on the beat data information and the chord data information, an accompaniment texture corresponding to at least two music measures is determined.

[0143] Among them, a music measure, also known as a bar, includes a preset number of music beats and is a basic organizational unit for detailed analysis of music data, used to divide and organize music clips; introducing bars to analyze music data facilitates improving the understanding of music measures.

[0144] The unit of music bar is used to indicate that each music bar of the music data is analyzed separately. For each music bar, the melody data information is used as a generation constraint condition for the music accompaniment, thereby comprehensively determining the accompaniment texture based on the beat data information and the chord data information.

[0145] Among them, the accompaniment texture is a sound element used to set off the main melody corresponding to the melody data information. In some embodiments, the accompaniment texture refers to the sound layer in the music that is responsible for supporting and setting off the main melody. This layer usually includes elements such as chords, bass, drums, percussion, etc., and their combination forms the basis and background of the music. The role of the accompaniment texture in music is to provide support for the main melody and add layers and richness to the music. The rational use of accompaniment texture can make the music more complete and rich, and enhance the audience's musical experience. Different types of music may have different accompaniment texture construction methods to adapt to different styles and emotional expressions.

[0146] In some embodiments, accompaniment textures corresponding to at least two music measures are determined, and the music notes within the music measures are adjusted using the accompaniment textures, thereby enriching the performance of the music measures. Furthermore, the music accompaniment data generated by combining the adjustment measures corresponding to the music measures is more diverse, reflecting the diversity and flexibility of the music accompaniment generation method.

[0147] In some embodiments, when determining the accompaniment texture, the melody, beat, and chord progression are comprehensively adjusted to determine the accompaniment texture that is convenient for enhancing the musical performance of the music section.

[0148] In some embodiments, the texture determination rule is acquired in units of musical measure.

[0149] The texture determination rule is used to determine the accompaniment texture corresponding to the music measure through the music information extraction result.

[0150] In some embodiments, the music information extraction result is used to represent a result obtained through a music information extraction process, and the music information extraction result includes at least one of melody data information, beat data information, and chord data information.

[0151] That is, the obtained texture determination rule is used to integrate the melody data information, beat data information and chord data information in the music measure to determine the accompaniment texture corresponding to the music measure.

[0152] In some embodiments, under the limitation of texture determination rules, the note change amplitude of the music accompaniment is limited by melody data information, the rhythm change of the music accompaniment is limited by beat data information, and the degree of coordination of the notes of the music accompaniment is limited by chord data information, so as to determine the accompaniment textures corresponding to the music measures respectively.

[0153] In some embodiments, the melody data information is closely related to the music notes, so the melody data information can be used to assist in determining the pitch, changes, etc. of the accompaniment notes in the music accompaniment, that is, the melody data information can be used to limit the note change amplitude of the music accompaniment.

[0154] In some embodiments, the melody data information is used to limit the note variation amplitude corresponding to the music accompaniment through pitch range, pitch density, and pitch value (such as the pitch value of the lowest note).

[0155] In some embodiments, the beat data information is closely related to the beat of the music composed of the music notes, so the beat data information can be used to assist in determining the note rhythm, note change rate, etc. of the accompaniment notes in the music accompaniment.

[0156] In some embodiments, the beat data information is used to determine the rhythm type corresponding to the music accompaniment by the number of music beats per unit time. For example, the rhythm types include slow, medium and fast.

[0157] In some embodiments, the chord data information, as information determined by the chord content composed of at least two notes, is closely related to the music notes themselves. Therefore, the chord data information can be used to assist in determining the note form of the accompaniment notes in the music accompaniment, that is, to determine the notes that should be used in the music accompaniment, thereby more finely improving the accuracy of the music accompaniment.

[0158] In some embodiments, the chord data information is used to assist the melody data information in determining the degree of note harmony by chord positions.

[0159] In an embodiment of the present application, the melody data information is used to limit the note change amplitude corresponding to the music accompaniment, the beat data information is used to determine the rhythm type corresponding to the music accompaniment, and the chord data information is used to determine the degree of note coordination. The music accompaniment determined based on these three data is relatively consistent with the music data, which is conducive to ensuring the accompaniment generation effect and generation efficiency.

[0160] In some embodiments, each music measure is analyzed to obtain the accompaniment texture corresponding to each music measure.

[0161] In some embodiments, the classification of accompaniment textures is often based on the combination of different parts in a piece of music (e.g., harmony, bass, percussion, etc.) and their functions in the piece of music. Accompaniment textures include: harmonic accompaniment (based on chords, responsible for supporting the main melody), rhythmic accompaniment (based on drums and percussion, responsible for providing rhythmic sense), bass accompaniment (based on bass instruments, providing a stable bass foundation for the music), and melodic accompaniment (accompanied by the main melody, highlighting the main melody through harmony, timbre, or musical embellishment).

[0162] That is: based on the melody, chords and beats, the accompaniment texture type corresponding to each music measure is comprehensively determined, so that the corresponding music measure can be adjusted through the accompaniment texture.

[0163] In some embodiments, when performing texture conversion on a bar-by-bar basis, each song is processed in a loop from the beginning to the end. To accommodate songs of varying tempos, three texture conversion routines are designed based on BPM. A BPM of 90 or less is considered slow, a BPM of 90 or more but less than 120 is considered medium, and a BPM of 120 or more is considered fast. Slow songs have the richest variety of rhythmic textures, while medium-tempo songs often have a minimum note duration of eighth notes, while fast songs have a minimum note duration of quarter notes.

[0164] After the speed judgment is completed, enter the melody judgment of the measure. Calculate the pitch range, note density and the pitch of the lowest note of the melody, and select a high or low, sparse or dense accompaniment texture. In each case, the selection of accompaniment texture from the alternatives that meet the conditions also has a certain degree of randomness. For the first measure, it is necessary to judge whether it meets the requirements of a weak-start measure and whether to add a prelude. The judgment rules are: non-weak-start measures or the first note starts before the second beat are treated as normal measures. Weak-start measures but the first note appears before the third beat are not accompanied by accompaniment. Weak-start measures but the first note appears on the third beat and later are randomly selected to have no accompaniment or a prelude. The prelude only selects the accompaniment texture based on the first chord.

[0165] After selecting the accompaniment texture, to avoid errors in the total duration of the notes in the measure, which could lead to cumulative deviations, you can set a limit on the number of beats per measure: within a limited number of cycles, the sum of the durations of all the notes in the current measure is checked to see if it equals 4 beats. If it exceeds, the last note or rest is removed; if it falls short, a rest is added. To avoid disrupting the designed accompaniment texture, measures that require an introductory or ending measure are exempt from this limit.

[0166] For the last accompaniment measure, you can first determine the melody: for an empty measure, play the coda directly; if the rest reaches three beats and the last note ends on or before the first beat, or the note is dragged out, add a one-beat chord and then play the coda; for the rest, add two-beat chords and then play the coda.

[0167] It should be noted that the above are only examples in some embodiments, and the embodiments of the present application do not limit this.

[0168] Step 420 : adjusting the duration of the music notes in the music measure corresponding to the accompaniment texture through the accompaniment texture, and obtaining adjusted measures corresponding to at least two music measures respectively.

[0169] In some embodiments, after the accompaniment texture corresponding to each music measure is obtained, the music notes in the music measure can be adjusted through the accompaniment texture.

[0170] In some embodiments, the note duration corresponding to the music notes is adjusted through the accompaniment texture, and the note duration is used to indicate the duration of the music notes.

[0171] In some embodiments, the duration of a musical note is modified within a musical measure to make the musical note shorter or longer. This process can be achieved by splitting the musical note into shorter notes or combining at least two musical notes into a longer note. For example, a quarter note can be split into two eighth notes, or two eighth notes can be combined into a quarter note.

[0172] In addition, when modifying the duration of musical notes, you can also use legato or staccato to adjust the note values. That is, legato connects adjacent musical notes to make them closer in time; staccato creates a short interval between musical notes to add a sense of space.

[0173] In some embodiments, embellishments such as tremolo, glissando, legato, etc. can be added to the music notes in the music measure through the accompaniment texture, which can make the original music notes more expressive. These embellishments can increase the changes in the music without changing the basic melody.

[0174] In some embodiments, new rhythmic patterns can also be introduced into the music measure through the accompaniment texture, for example: introducing more complex drum beats, emphasis on weak beats or cross-rhythms. This process can be achieved by making changes to the drum beats or other percussion instruments in the accompaniment texture.

[0175] In some embodiments, the accompaniment texture can also be used to emphasize weak beats or other parts of the beat in a music measure to make the music accompaniment more dynamic.

[0176] In some embodiments, the accompaniment texture can also be accelerated or decelerated at the end of the music measure to create a gradual change, etc.

[0177] In some embodiments, the above content is determined based on the accompaniment texture corresponding to the music measure, and the accompaniment texture is determined comprehensively by means of texture determination rules, melody, chords and beats.

[0178] The adjusted measure includes at least two adjusted music notes.

[0179] In some embodiments, the music notes in the corresponding music measure are adjusted through the accompaniment texture to obtain at least two adjusted music notes, thereby determining the adjusted music notes in each music measure, and each adjusted music measure is called an adjusted measure.

[0180] Step 430 : Combining the adjustment measures corresponding to at least two music measures to generate music accompaniment data.

[0181] In some embodiments, a temporal relationship between at least two music measures in the music data is determined; and the at least two adjusted measures are combined according to the temporal relationship, thereby generating music accompaniment data.

[0182] In some embodiments, since the adjustment measure is obtained by adjusting the musical notes using the accompaniment texture, the adjustment measure focuses on expressing the digital information of the musical accompaniment. The musical accompaniment data generated from at least two adjustment measures also focuses on expressing the digital information of the musical accompaniment. For example, the musical accompaniment data is information expressed in the form of a MIDI file. Furthermore, determining the accompaniment texture using texture determination rules, melody data information, beat data information, and chord data information facilitates ensuring the accuracy and efficiency of accompaniment texture determination, thereby improving the generation of the musical accompaniment.

[0183] It is worth noting that the above distances are only in some embodiments, and the embodiments of the present application are not limited to this.

[0184] In summary, beat data information, chord data information and melody data information are extracted from the acquired music data; the melody data information is used to generate restriction conditions, and music accompaniment data is generated through the beat data information and chord data information, and finally the music accompaniment is obtained by rendering based on the music accompaniment data. In the process of generating music accompaniment data through music data, the music beat and music notes are quantized through the music information extraction process, so as to improve the accuracy of the analysis of the music data and make the accompaniment data generation process more targeted. In addition, the melody data information, beat data information and chord data information are integrated, and the beat and chord are incorporated into the accompaniment melody generation process under the limitation of the music melody, so that the music accompaniment data can be presented more meticulously through music parameters, so that the music accompaniment of the music data rendered through the music accompaniment data is more accurate, and the generation stability and generation effect of the music accompaniment are improved.

[0185] In some embodiments, when rendering audio data using music accompaniment data, in order to improve the melody accuracy of the music accompaniment data, the melody data information and the music accompaniment data can be mixed, and then the music result is obtained by rendering the mixed audio data. In some embodiments, as shown in Figure 5, the embodiment shown in Figure 2 above can also be implemented as the following steps 510 to 550; and step 240 shown in Figure 2 above can also be implemented as the following steps 540 to 550.

[0186] Step 510: Acquire music data.

[0187] The music data is divided into at least two music beats, and the music beats include music notes.

[0188] In some embodiments, step 510 has been described in the above step 210 and will not be repeated here.

[0189] Step 520: extracting beat data information, chord data information, and melody data information from the music data.

[0190] Among them, the beat data information is used to characterize the changing speed of at least two music beats, the chord data information is used to describe the chord unit extracted based on the music beat, and the melody data information is used to describe the note changes between at least two music notes.

[0191] In some embodiments, step 520 has been described in the above step 220 and steps 310 to 330 and will not be repeated here.

[0192] Step 530: Generate music accompaniment data based on the melody data information, the beat data information, and the chord data information.

[0193] The melody data information is used to define the accompaniment melody of the music accompaniment with the music melody of the music data, and the music accompaniment data describes the accompaniment of the music data through music parameters.

[0194] In some embodiments, step 530 has been described in the above step 230 and steps 410 to 430 and will not be repeated here.

[0195] Step 540: Perform mixing processing on the melody data information and the music accompaniment data to obtain a mixing result.

[0196] In some embodiments, in order to more appropriately present the music melody while reflecting the accompaniment, the melody data information corresponding to the music melody is mixed with the generated music accompaniment data.

[0197] Mixing refers to the process of combining different audio tracks (such as melody and accompaniment) to create a complete musical composition. The purpose of mixing is to combine the individual tracks into a complete musical work while maintaining audio clarity and balance. The purpose of mixing melody data and music accompaniment data is to create a sense of unity in the music, so that the music melody data corresponding to the music data itself and the generated music accompaniment data form an organic whole, so that after mixing, they can complement each other without suppressing each other, forming balanced, compressed, and reverberant audio effects.

[0198] In some embodiments, the melody data information and the music accompaniment data are mixed by a sound source reverberator to generate a mixing result.

[0199] In some embodiments, both the melody data and the music accompaniment data are implemented as MIDI files, and the melody data and the music accompaniment data involved in the mixing process are combined to create a complete MIDI file. This can be adjusted in terms of notes, volume, timbre, etc. to create a more complex and rich musical work.

[0200] In some embodiments, the music melody track corresponding to the melody data information and the music accompaniment track corresponding to the music accompaniment data are determined; under the condition that the audio tracks are aligned, the music melody track and the music accompaniment track are mixed to generate a mixing result.

[0201] In some embodiments, the melody data represents a melody track, including the representation of musical notes based on the melody data; the accompaniment data represents an accompaniment track, including the representation of musical notes based on the accompaniment data. Audio track alignment involves mixing the melody and accompaniment tracks under the condition that the melody and accompaniment tracks are aligned, thereby generating a mixed audio result. This approach ensures the correctness of the mixing process, thereby improving the accuracy of the generated mixed audio result.

[0202] In some embodiments, the mixing process may be implemented as follows.

[0203] (1) Import melody data and music accompaniment data: Import the two pieces of information that need to be mixed into MIDI editing software or a digital audio workstation (DAW), and ensure that they are correctly aligned on the timeline.

[0204] (2) Adjust the starting point: Make sure that the melody data information and the music accompaniment data start from the same starting point on the time axis so that they can be synchronized.

[0205] (3) Note Editing: Edit the notes in the melody data and music accompaniment data. For example, you can delete or adjust some notes to make them blend better. You can also consider adjusting the duration of some notes to create richer chords or melody changes.

[0206] (4) Volume balance: Adjust the volume of the melody data information and the music accompaniment data to ensure that they can maintain a balance after mixing. This can be achieved by adjusting the volume controllers on the channels corresponding to the melody data information and the music accompaniment data respectively.

[0207] (5) Tone and expression: During the mixing process, the tone (instrument selection) and expression controller (such as volume, note length, tone, etc.) on the channels corresponding to the melody data information and music accompaniment data can be adjusted to make the overall music more expressive.

[0208] (6) Rhythm and time sense: Adjust the rhythm and time sense of the melody data information and the music accompaniment data so that they are better coordinated after mixing, such as: time offset of music notes, adding some artificial micro-time value changes, etc.

[0209] (7) Effect processing: Apply some transformation effects, such as merge effect, delay effect, chorus effect, etc., to increase the complexity and layering of the mix.

[0210] (8) Mixing and exporting: In the final stage of the mixing process, after ensuring that the mixing effect of the melody data information and the music accompaniment data meets the preset requirements, the mixed results are exported and the mixing results are realized in the form of MIDI files.

[0211] Step 550 , performing audio data rendering on the mixing result to obtain a music result corresponding to the music data.

[0212] Among them, the music result uses the music accompaniment as the accompaniment content.

[0213] In some embodiments, after obtaining the mixing result, the audio data of the mixing result is rendered to obtain a music result that expresses the complete music content. Since the generation of the music result depends on the music accompaniment data, the music result includes the music accompaniment corresponding to the music accompaniment data, which is conducive to more realistically presenting the music content through melody data information while generating the music accompaniment.

[0214] In some embodiments, the mixing data is implemented as a MIDI file, a digital representation of the music data. To obtain the resulting music piece corresponding to the mixing data, the MIDI file contains musical information such as notes, pitches, and durations, but does not contain sound waveforms. Therefore, the MIDI file must be converted into data for rendering the resulting music piece. Specifically, audio conversion is first performed based on the mixing result to obtain the resulting music piece audio; then, audio rendering is performed on the resulting music piece audio to obtain the resulting music piece.

[0215] In some embodiments, the music result audio after audio conversion is rendered to obtain the music result. For example, the music result audio is opened through a terminal device to play the music result with music accompaniment.

[0216] It should be noted that the above are only examples in some embodiments, and the embodiments of the present application do not limit this.

[0217] In summary, beat data information, chord data information and melody data information are extracted from the acquired music data; the melody data information is used to generate restriction conditions, and music accompaniment data is generated through the beat data information and chord data information, and finally the music accompaniment is obtained by rendering based on the music accompaniment data. In the process of generating music accompaniment data through music data, the music beat and music notes are quantized through the music information extraction process, so as to improve the accuracy of the analysis of the music data and make the accompaniment data generation process more targeted. In addition, the melody data information, beat data information and chord data information are integrated, and the beat and chord are incorporated into the accompaniment melody generation process under the limitation of the music melody, so that the music accompaniment data can be presented more meticulously through music parameters, so that the music accompaniment of the music data rendered through the music accompaniment data is more accurate, and the generation stability and generation effect of the music accompaniment are improved.

[0218] In some embodiments, the above-mentioned music data can be implemented as any popular song, and the method for generating music accompaniment is applied to the accompaniment generation process of popular music. The method can also be called "a method for automatically generating piano covers of popular songs in the symbolic domain", as shown in Figure 6, which is an overall framework diagram of an embodiment of the present application.

[0219] In some embodiments, after obtaining the original song audio file 610 (i.e., the above-mentioned music data), a preset algorithm (such as a neural network transform) is first used to perform melody extraction, beat tracking, and chord extraction on the original song audio file 610 to obtain music information, including melody notes 621 after melody extraction, beat information 622 after beat tracking, and chord sequence 623 after chord extraction.

[0220] The extracted melody note 621 is represented by a starting point, an offset point and a pitch; the melody note 621 is aligned with the beat information 622 detected from the original song audio file 610 and quantized to sixteenth notes to obtain a melody MIDI file (i.e., the above-mentioned melody data information).

[0221] In chord extraction, one beat is used as the smallest unit, including major and minor triads, and a chord sequence 623 is obtained.

[0222] The melody and chord sequence are combined into a MIDI file after deleting the bars without melody, with the time signature being 4 / 4.

[0223] Furthermore, the tempo information (BPM) of the original audio file 610 is estimated from the beat information 622, and the average tempo of the original audio file 610 is slightly slowed down. Secondly, while controlling the accompaniment's range and density based on the melody, the accompaniment generation algorithm generates a texture that matches the melody based on the chord progression and type, and outputs a piano accompaniment MIDI file (i.e., music accompaniment data). Finally, the two MIDI tracks of melody and accompaniment are rendered into a piano cover audio file (i.e., the music audio used to render the music accompaniment).

[0224] In some embodiments, an example input to the accompaniment generation algorithm is shown in FIG7 , which includes at least two notes 710. The input file is in the ".mid" format, i.e., a MIDI file, storing both a melody track and a chord track, along with time signature (both in 4 / 4) and key signature metadata. Chords are pre-processed to specific pitches rather than chord notations such as "C" or "Am." The input chord pitch range is within the default pitch range (starting with the first octave), considering only major and minor triads in their original position, but the texture includes inversions, sevenths, and ninths.

[0225] The accompaniment generation method is executed with the help of the accompaniment generation algorithm, as shown in Figure 8, which mainly includes the following five processes: (1) input reading 810: input MIDI and BPM reading; (2) preprocessing 820: chord track preprocessing; (3) texture conversion 830; (4) post-processing 840: melody and accompaniment post-processing; (5) writing (MIDI) file 850.

[0226] (1) Input read 810

[0227] In some embodiments, an input MIDI file is read, the melody and chords are divided into two tracks and stored in two parts, and the estimated BPM of the original song is input as one of the conditions for selecting the accompaniment texture.

[0228] (2) Preprocessing 820

[0229] The number of bars in the melody and chord tracks is calculated separately. If the number of bars in the chord track is less than the number of bars in the melody track, the number of bars is filled in, and the chords of the previous bar are copied to the added bar. In addition, each bar is checked. To avoid long rests in the accompaniment, if a bar does not have any chords, the algorithm copies the chords of the previous bar. If the bar is the first bar, the algorithm copies the chords of the first subsequent bar that is not a full rest.

[0230] For songs with generally low-pitched melodies, the melody can be raised an octave to improve the listening experience and prevent conflict with the accompaniment. The specific determination method is to use MIDI pitch 56 and 70 as thresholds, calculate the proportion of bass notes and treble notes respectively, and if the treble note ratio exceeds 10% and the bass note ratio is less than 20%, the octave raising is not performed.

[0231] In order to make the music feel complete and final, an ending can be added to each piece of music, with a length ranging from one measure to three measures. Since the ending measures of the melody of different songs are different, some end with a long note, some end with a long rest, and some do not have enough time to add an ending. Therefore, it is necessary to determine in advance whether to add an ending measure to the accompaniment track. The specific judgment rule is: when the last note of the melody ending measure ends after the second beat and is not a long note, a blank ending measure is added in advance, and the chords copy the chords of the previous measure. When converting the texture of the ending, if the selected texture exceeds four beats, it will be extended to two to three measures when writing to MIDI.

[0232] (3) Texture conversion 830

[0233] Texture conversion is performed in measure units, looping through each song from beginning to end. To accommodate songs of varying tempos, three texture conversion routines have been designed based on BPM. BPMs up to 90 are considered slow, BPMs above 90 but below 120 are considered medium, and BPMs above 120 are considered fast. Slow songs have the richest variety of rhythmic textures, while medium-tempo songs typically have a minimum note duration of eighth notes, and fast songs have a minimum note duration of quarter notes.

[0234] After the speed judgment is completed, enter the melody judgment of the measure. Calculate the pitch range, note density and the pitch of the lowest note of the melody, and select a high or low, sparse or dense accompaniment texture. In each case, the selection of texture from the alternatives that meet the conditions also has a certain degree of randomness. For the first measure, it is necessary to determine whether it meets the requirements of a weak-start measure and whether to add a prelude. The specific rules are: non-weak-start measures or the first note starts before the second beat are treated as normal measures. Weak-start measures but the first note appears before the third beat are not accompanied by accompaniment. Weak-start measures but the first note appears on the third beat and later are randomly selected without accompaniment or with a prelude. The prelude only selects the texture based on the first chord.

[0235] After selecting a texture, a beat limit is set to prevent errors in the total duration of the notes in the measure, which could lead to cumulative deviations. Within a limited number of iterations, the system checks whether the sum of the durations of all the notes in the measure equals four beats. If it exceeds, the last note or rest is removed; if it falls short, a rest is added. To avoid disrupting the designed texture, measures requiring an introductory or coda are exempt from this limit.

[0236] For the last accompaniment measure, the algorithm first determines the melody: if the measure is empty, the coda is played directly; if the rest reaches three beats and the last note ends on or before the first beat, or the note is prolonged, a one-beat chord is added and then a coda is played; for the rest, a two-beat chord is added and then a coda is played.

[0237] In some embodiments, the texture types include column, semi-decomposed, and fully decomposed, and the rhythmic patterns include quarter, twenty-eighth, sixteenth, syncopated, dotted, quintuplets, and other types, and include ornaments such as arpeggios, which are rich in diversity. When the input only has major and minor triads, seventh, ninth, thirteenth, and chord inversions are selectively added according to the range and density of the melody to expand the chord types. Taking into account the speed of the song, various specially designed textures can cover songs of various styles, such as lyrical slow songs, medium-speed songs, and fast and popular songs, while maintaining a soothing overall style. In addition, the prelude texture is designed for the weak start bar with a rest of three beats, and is randomly selected for the two situations of no accompaniment for the weak start bar. In order to give the music a sense of ending, a variety of codas are also designed, which are selected based on the note value, end position, and other information of the ending bar of the melody.

[0238] Texture conversion can be done using two methods: function and file. Function conversion is simple and stable, applicable to all input chord types, while file conversion is more scalable. Function conversion involves using a corresponding texture conversion function to directly select basic notes from the chord for various chord durations within a measure, then harmonically design the pitch and duration, combining single notes and chords to generate and return a complete texture measure. File conversion involves using digital sheet music files (.mxl) to store the texture for each measure. Each type of texture is divided into eight files, corresponding to major and minor triads, and chord durations of four beats, three beats, two beats, and one beat. Each score file stores a texture for each measure, all of which are C or Cm chords and their variations. Transposition is performed based on the interval relationship between the root note of the current chord and the pitch of C4. Figure 9 shows an example of a texture file containing at least two musical notes 910 representing a Cadd9 chord with a duration of four beats.

[0239] (4) Post-processing 840

[0240] After completing the texture conversion, the algorithm first inserts the estimated BPM of the original song into the current score. Except for the first and last measures, the accompaniment is pitch-adjusted for optimal listening: single notes below G2 are pitched an octave higher, and chord notes below A2 are pitched an octave lower. Accompaniment notes higher than the melody are pitched an octave lower. Next, the algorithm compares notes with similar starting points in the melody and accompaniment, adjusting for dissonant major and minor seconds and identical notes. Furthermore, repeated identical notes in the accompaniment are legato (excluding chords). Finally, the dynamics of the melody and accompaniment are adjusted for later audio production.

[0241] (5) Write MIDI file 850

[0242] After completing all the above steps, save the melody and accompaniment as two MIDI files respectively to facilitate batch rendering of audio later.

[0243] It should be noted that the above are only examples in some embodiments, and the embodiments of the present application do not limit this.

[0244] To sum up, in the process of generating music accompaniment data through music data, the music beat and music notes are quantized through the music information extraction process, which improves the accuracy of the analysis of the music data and makes the accompaniment data generation process more targeted; then, the melody data information, beat data information and chord data information are integrated, and the beat and chords are incorporated into the accompaniment melody generation process under the limitation of the music melody, so that the music accompaniment data can be presented more carefully through music parameters, and then the music accompaniment that can more accurately present the music data is obtained through the music accompaniment data rendering, thereby improving the generation stability and generation effect of the music accompaniment.

[0245] FIG10 is a block diagram of a device for generating a music accompaniment according to an exemplary embodiment of the present application. As shown in FIG10 , the device includes the following parts:

[0246] The data acquisition module 1010 is configured to acquire music data, where the music data is divided into at least two music beats, each of which includes music notes.

[0247] An information extraction module 1020 is configured to extract beat data information, chord data information, and melody data information from the music data, wherein the beat data information is used to describe the changing speed of the at least two music beats, the chord data information is used to describe the chord units extracted based on the music beat, and the melody data information is used to describe the note changes between at least two music notes;

[0248] a data generating module 1030 for generating music accompaniment data based on the melody data information, the beat data information, and the chord data information, wherein the melody data information is used to define an accompaniment melody of the music accompaniment with the music melody of the music data, and the music accompaniment data is used to describe the accompaniment of the music data;

[0249] The accompaniment generation module 1040 is configured to perform audio data rendering based on the music accompaniment data to obtain the music accompaniment corresponding to the music data.

[0250] In some embodiments, the information extraction module 1020 is further used to determine the beat data information based on the number of the at least two music beats in unit time; extract the chord track and melody track corresponding to the music data, the chord track is used to describe the sound group constructed by the at least two music notes in the form of chords, and the melody track is used to describe the melody composed of the at least two music notes according to the time sequence relationship; based on the melody track and the chord track, determine the melody data information and the chord data information corresponding to the music data respectively.

[0251] In some embodiments, the information extraction module 1020 is further used to adjust the number of bars in the chord track based on the number of bars in the melody track to obtain the chord data information; and perform melody transformation on the melody track based on the note pitches corresponding to the at least two music notes in the melody track to obtain the melody data information.

[0252] In some embodiments, the information extraction module 1020 is further used to obtain a preset first pitch and a second pitch, and the first pitch and the second pitch are used to limit the transformation method of performing melody transformation on the melody track; the note pitches corresponding to the at least two music notes in the melody track are compared with the first pitch and the second pitch respectively to determine a first note ratio and a second note ratio, the first note ratio is used to indicate the note ratio of the first note to the at least two music notes, and the first note is used to indicate the music notes lower than the first pitch, and the second note ratio is used to indicate the note ratio of the second note to the at least two music notes, and the second note is used to indicate the music notes higher than the second pitch; based on the first note ratio and the second note ratio, melody transformation is performed on the melody track to obtain the melody data information.

[0253] In some embodiments, the data generation module 1030 is also used to determine, in units of music bars, the melody data information as a generation restriction condition for the music accompaniment, based on the beat data information and the chord data information, accompaniment textures corresponding to at least two music bars respectively, wherein a music bar includes a preset number of music beats, and the accompaniment texture is a sound element used to set off the melody corresponding to the melody data information; through the accompaniment texture, adjust the note value of the music note in the music bar corresponding to the accompaniment texture to obtain an adjusted bar corresponding to the at least two music bars respectively, the note value is used to indicate the duration of the music note, and the adjusted bar includes at least two adjusted music notes; combine the adjusted bars corresponding to the at least two music bars respectively to generate the music accompaniment data.

[0254] In some embodiments, the data generation module 1030 is also used to obtain a texture determination rule, and the texture determination rule is used to determine the accompaniment texture corresponding to the music measure through the music information extraction result, and the music information extraction result includes at least one of the beat data information, the chord data information and the melody data information; under the limitation of the texture determination rule, the note change amplitude of the music accompaniment is limited by the melody data information, the rhythm change of the music accompaniment is limited by the beat data information, and the note coordination degree of the music accompaniment is limited by the chord data information, so as to determine the accompaniment textures corresponding to the at least two music measures respectively.

[0255] In some embodiments, the melody data information is used to limit the note variation amplitude corresponding to the music accompaniment through pitch range, pitch density and pitch value;

[0256] The beat data information is used to determine the rhythm type corresponding to the music accompaniment according to the number of music beats per unit time;

[0257] The chord data information is used to assist the melody data information in determining the degree of harmony of notes through chord positions.

[0258] In some embodiments, the accompaniment generation module 1040 is also used to perform mixing processing on the melody data information and the music accompaniment data to obtain a mixing result; perform audio data rendering on the mixing result to obtain a music result corresponding to the music data, and the music result uses the music accompaniment as the accompaniment content.

[0259] In some embodiments, the accompaniment generation module 1040 is further used to determine the music melody track corresponding to the melody data information and the music accompaniment track corresponding to the music accompaniment data; under the condition that the audio tracks are aligned, perform mixing processing on the music melody track and the music accompaniment track to generate the mixing result.

[0260] In summary, beat data information, chord data information and melody data information are extracted from the acquired music data; the melody data information is used to generate restriction conditions, and music accompaniment data is generated through the beat data information and chord data information, and finally the music accompaniment is obtained by rendering based on the music accompaniment data. In the process of generating music accompaniment data through music data, the music beat and music notes are quantized through the music information extraction process, so as to improve the accuracy of the analysis of the music data and make the accompaniment data generation process more targeted. In addition, the melody data information, beat data information and chord data information are integrated, and the beat and chord are incorporated into the accompaniment melody generation process under the limitation of the music melody, so that the music accompaniment data can be presented more meticulously through music parameters, so that the music accompaniment of the music data rendered through the music accompaniment data is more accurate, and the generation stability and generation effect of the music accompaniment are improved.

[0261] It should be noted that the above-described embodiment of the apparatus for generating a musical accompaniment is merely illustrative of the division of the aforementioned functional modules. In actual applications, the aforementioned functions can be assigned to different functional modules as needed, i.e., the internal structure of the device can be divided into different functional modules to perform all or part of the functions described above. Furthermore, the apparatus for generating a musical accompaniment and the embodiment of the method for generating a musical accompaniment are conceptually identical. The specific implementation process is detailed in the method embodiment and will not be further elaborated here.

[0262] Figure 11 shows a schematic diagram of the structure of a computer device provided by an exemplary embodiment of the present application. The computer device 1100 includes a central processing unit (CPU) 1101, a system memory 1104 including a random access memory (RAM) 1102 and a read-only memory (ROM) 1103, and a system bus 1105 connecting the system memory 1104 and the CPU 1101. The computer device 1100 also includes a mass storage device 1106 for storing an operating system 1113, application programs 1114, and other program modules 1115.

[0263] The mass storage device 1106 is connected to the central processing unit 1101 through a mass storage controller (not shown) connected to the system bus 1105. The mass storage device 1106 and its associated computer-readable media provide non-volatile storage for the computer device 1100. In other words, the mass storage device 1106 may include a computer-readable medium (not shown) such as a hard disk or a compact disc read-only memory (CD-ROM) drive.

[0264] Without loss of generality, computer-readable media may include computer storage media and communication media. Computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer-readable instructions, data structures, program modules, or other data. The system memory 1104 and mass storage device 1106 described above may be collectively referred to as memory.

[0265] According to various embodiments of the present application, the computer device 1100 may also be connected to a remote computer on a network such as the Internet for operation. That is, the computer device 1100 may be connected to the network 1112 via the network interface unit 1111 connected to the system bus 1105, or the network interface unit 1111 may be used to connect to other types of networks or remote computer systems (not shown).

[0266] The memory also includes one or more programs, which are stored in the memory and configured to be executed by the CPU.

[0267] An embodiment of the present application also provides a computer device, which includes a processor and a memory, wherein the memory stores at least one program, and the at least one program is loaded and executed by the processor to implement the method for generating music accompaniment provided by the above-mentioned method embodiments.

[0268] An embodiment of the present application further provides a computer-readable storage medium, on which at least one program is stored. The at least one program is loaded and executed by a processor to implement the method for generating a music accompaniment provided by the above-mentioned method embodiments.

[0269] The present application also provides a computer program product, comprising a computer program stored in a computer-readable storage medium. A processor of a computer device reads the computer program from the computer-readable storage medium and executes the computer program, causing the computer device to perform the method for generating a musical accompaniment described in any of the above embodiments.

[0270] The above description is merely an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.

Claims

1. A method for generating music accompaniment, which is executed by a computer device, and the method includes: Obtain music data, where the music data is divided into at least two music beats, and the music beats include music notes; Extract beat data information, chord data information, and melody data information from the music data. The beat data information is used to describe the change speed of the at least two music beats, the chord data information is used to describe the chord units extracted in units of the music beats, and the melody data information is used to describe the note change situation between at least two music notes; Generate music accompaniment data according to the melody data information, the beat data information, and the chord data information. The melody data information is used to define the accompaniment melody of the music accompaniment with the music melody of the music data, and the music accompaniment data is used to describe the accompaniment situation of the music data; Perform audio data rendering based on the music accompaniment data to obtain the music accompaniment corresponding to the music data.

2. The method according to claim 1, wherein, The extracting beat data information, chord data information, and melody data information from the music data includes: Determine the beat data information based on the quantity of the at least two music beats within a unit time; Extract the chord track and the melody track corresponding to the music data. The chord track is used to describe the group of sounds constructed by the at least two music notes in the form of chords, and the melody track is used to describe the melody formed by the at least two music notes according to the time sequence relationship; Determine the melody data information and the chord data information based on the melody track and the chord track.

3. The method according to claim 2, wherein, The determining the melody data information and the chord data information based on the melody track and the chord track includes: Adjust the number of measures in the chord track based on the number of measures in the melody track to obtain the chord data information; Perform a melody transformation on the melody track based on the note pitches of the at least two music notes respectively corresponding in the melody track to obtain the melody data information.

4. The method according to claim 3, wherein, The performing a melody transformation on the melody track based on the note pitches of the at least two music notes respectively corresponding in the melody track to obtain the melody data information includes: Obtain a preset first pitch and a second pitch, where the first pitch and the second pitch are used to define the transformation method for performing the melody transformation on the melody track; Compare the note pitches of the at least two music notes respectively corresponding in the melody track with the first pitch and the second pitch to determine a first note ratio and a second note ratio. The first note ratio is used to represent the note ratio of the first note in the at least two music notes, the first note is used to represent the music note lower than the first pitch, the second note ratio is used to represent the note ratio of the second note in the at least two music notes, and the second note is used to represent the music note higher than the second pitch; Perform a melody transformation on the melody track based on the first note ratio and the first note ratio to obtain the melody data information.

5. According to the method of any one of claims 1 to 4, wherein Generating music accompaniment data according to the melody data information, the beat data information, and the chord data information includes: In the case of taking musical sections as units, using the melody data information as the generation constraint condition for the music accompaniment, and based on the beat data information and the chord data information, determining accompaniment textures corresponding to at least two musical sections. One musical section includes a preset number of musical beats, and the accompaniment texture is a sound element used to set off the melody corresponding to the melody data information; Through the accompaniment texture, adjusting the note durations of the musical notes within the musical sections corresponding to the accompaniment texture to obtain adjusted sections corresponding to the at least two musical sections. The note duration is used to represent the duration of the musical note, and the adjusted section includes at least two adjusted musical notes; Combining the adjusted sections corresponding to the at least two musical sections to generate the music accompaniment data.

6. The method according to claim 5, wherein, Taking the melody data information as the generation constraint condition for the music accompaniment, and based on the beat data information and the chord data information, determining the accompaniment textures corresponding to at least two musical sections includes: Obtaining a texture determination rule, which is used to determine the accompaniment texture corresponding to the musical section through the result of musical information extraction. The result of musical information extraction includes at least one of the beat data information, the chord data information, and the melody data information; Under the limitation of the texture determination rule, limiting the note change range of the music accompaniment through the melody data information, limiting the rhythm change situation of the music accompaniment through the beat data information, and limiting the note coordination degree of the music accompaniment through the chord data information, to determine the accompaniment textures corresponding to the at least two musical sections.

7. According to the method according to any one of claims 1 to 6, wherein, The melody data information is used to limit the note change range corresponding to the music accompaniment through the pitch range, pitch density, and pitch value; The beat data information is used to determine the rhythm type corresponding to the music accompaniment through the number of musical beats within a unit time; The chord data information is used to assist the melody data information to determine the note coordination degree through the chord position.

8. The method according to any one of claims 1 to 7, wherein The method further includes: Performing a mixing process on the melody data information and the music accompaniment data to obtain a mixing result; Performing audio data rendering on the mixing result to obtain the music result corresponding to the music data, and the music result uses the music accompaniment as the accompaniment content.

9. The method according to claim 8, wherein, Performing a mixing process on the melody data information and the music accompaniment data to obtain a mixing result includes: Determining the music melody track corresponding to the melody data information and the music accompaniment track corresponding to the music accompaniment data; Under the condition of audio track alignment, performing a mixing process on the music melody track and the music accompaniment track to generate the mixing result.

10. A device for generating music accompaniment, the device includes: A data acquisition module, configured to acquire music data, where the music data is divided into at least two music beats, and the music beats include music notes; An information extraction module, configured to extract beat data information, chord data information, and melody data information from the music data, where the beat data information is used to describe the change speed of the at least two music beats, the chord data information is used to describe chord units extracted in units of the music beats, and the melody data information is used to describe the note change situation between at least two music notes; A data generation module, configured to generate music accompaniment data according to the melody data information, the beat data information, and the chord data information, where the melody data information is used to define the accompaniment melody of the music accompaniment with the music melody of the music data, and the music accompaniment data is used to describe the accompaniment situation of the music data; An accompaniment generation module, configured to perform audio data rendering based on the music accompaniment data to obtain the music accompaniment corresponding to the music data.

11. A computer device, where the computer device includes a processor and a memory, and at least one program is stored in the memory, and the at least one program is loaded and executed by the processor to implement the method for generating a music accompaniment according to any one of claims 1 to 9.

12. A computer-readable storage medium, where at least one program is stored in the storage medium, and the at least one program is loaded and executed by a processor to implement the method for generating a music accompaniment according to any one of claims 1 to 9.

13. A computer program product, including a computer program, where the computer program, when executed by a processor, implements the method for generating a music accompaniment according to any one of claims 1 to 9.

Citation Information

Patent Citations

  • Method, device, equipment, storage medium and program product for generating music accompaniment

    CN117765902B

  • Device, system and method for generating an accompaniment of input music data

    CN104380371A

  • A method and system for intelligent accompaniment of music

    CN109166566A

  • Intelligent accompaniment system based on deep learning algorithm

    CN112528631A

  • Music work generation method and device thereof, music work synthesis method and device, equipment, medium and product

    CN113611268A