Method and system for generating music

The hybrid generative method addresses the limitations of AI and rule-based music generation by integrating rule-based methods with AI to create more engaging and creative music compositions.

WO2026137320A1PCT designated stage Publication Date: 2026-07-02HARMAN INT IND INC +1

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
HARMAN INT IND INC
Filing Date
2024-12-26
Publication Date
2026-07-02

AI Technical Summary

Technical Problem

Current music generation methods, whether AI-based or rule-based, suffer from rigidity, repetitiveness, and lack of creativity, struggling with complex compositions and often producing unengaging music.

Method used

A hybrid generative method combining rule-based and AI approaches to determine music genre, select and modify samples based on a specified structure, and assemble tracks to generate music, incorporating elements like tempo, key, and instruments.

Benefits of technology

The hybrid method produces more engaging and creative music by leveraging both AI and rule-based systems, overcoming mechanical and repetitive outputs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024142722_02072026_PF_FP_ABST
    Figure CN2024142722_02072026_PF_FP_ABST
Patent Text Reader

Abstract

A method for generating music, the method comprising: determining a genre of the music; determining a rule for generating the music based on the genre, wherein the rule specifies a structure of the music; selecting a plurality of samples from a database; modifying the plurality of samples based on the structure; assembling the plurality of modified samples into a plurality of tracks based on the structure; and mastering the plurality of tracks to generate the music, wherein the structure comprises at least one of tempo of the music, key of the music, bar number of the music, tracks included in the music and instruments used in the music.
Need to check novelty before this filing date? Find Prior Art

Description

METHOD AND SYSTEM FOR GENERATING MUSICTECHNICAL FIELD

[0001] The disclosure relates to the technical field of music composition, in particular to a method for generating music, a system and a device thereof.BACKGROUND

[0002] There has been a lot of exploration and development in music generating, and there is still huge demand for high quality music. Artificial intelligence (AI) is the most commonly used method for generative music services in the current market, heavily relying on machine learning and deep learning. These models require vast datasets and significant hardware resources. Training the models can take a substantial amount of time, and the resulting music often feels mechanical and rigid. Rule-based methods are also widely used, but they are limited by a lack of creativity, often leading to rigid and predictable music. These systems struggle with complex compositions, and listeners may quickly find the output repetitive and unengaging.

[0003] In order to make up the shortcomings of the above two methods, the present disclosure provides a hybrid generative method that combines rule-based methods with AI, thereby overcoming rigidity, repetitiveness, and the "inhuman" feel of the generated music.SUMMARY

[0004] According to an aspect of the present disclosure, a method for generating music is provided. The method comprises: determining a genre of the music; determining a rule for generating the music based on the genre, wherein the rule specifies a structure of the music; selecting a plurality of samples from a database; modifying the plurality of samples based on the structure; assembling the plurality of modified samples into a plurality of tracks based on the structure; and mastering the plurality of tracks to generate the music, wherein the structure comprises at least one of tempo of the music, key of the music, bar number of the music, tracks included in the music and instruments used in the music.

[0005] According to another aspect of the present disclosure, adevice for generating music is provided. The device comprises: amemory; and a processor, configured to perform the method for generating music.BRIEF DESCRIPTION OF THE DRAWINGS

[0006] In order to more clearly explain the embodiments of the present disclosure or the technical solution in the prior art, the drawings needed to be used in the description of the embodiments of the present disclosure or the prior art will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments recorded in the present disclosure, and other drawings can be obtained according to these drawings of the embodiments of the present disclosure for those skilled in the art.

[0007] Fig. 1 illustrates a flowchart of a method for generating music according to at least one embodiment of the present application.

[0008] Fig. 2 illustrates a schematic diagram of a database including samples categorized by genre according to at least one embodiment of the present application.

[0009] Fig. 3 illustrates a schematic diagram of a database including samples categorized by genre and tempo according to at least one embodiment of the present application.

[0010] Fig. 4 illustrates a schematic diagram of the structure of example music generated based on a rule according to at least one embodiment of the present application.

[0011] Fig. 5 illustrates a schematic diagram of the structure of another example music generated based on a rule according to at least one embodiment of the present application.

[0012] Fig. 6 illustrates a schematic diagram of the structure of another example music generated based on a rule according to at least one embodiment of the present application.

[0013] Fig. 7 illustrates a schematic diagram of the structure of another example music generated based on a rule according to at least one embodiment of the present application.DETAILED DESCRIPTION

[0014] In order to provide a clearer and more complete description of the purpose, technical solution, and advantages of the present disclosure, the following description, in conjunction with the accompanying drawings, will provide a clear and comprehensive understanding of the technical solution in the present disclosure. It should be noted that the described embodiments are only a part of the embodiments disclosed herein, and not the entire embodiments. All other embodiments that ordinary skilled persons in the art can obtain without exercising inventive labor based on the embodiments disclosed herein are within the scope of the present disclosure.

[0015] The terms “first, ” “second, ” “third, ” “fourth, ” etc. (if present) used in the specification and claims, as well as in the accompanying drawings, are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the use of such data can be interchangeable in appropriate circumstances, so that the embodiments of the present disclosure described herein can be implemented in an order other than that shown or described here.

[0016] It should be understood that the numbering of the processes in various embodiments of the present disclosure does not imply a specific order of execution. The execution order of the processes should be determined based on their functionality and inherent logic, and should not impose any limitations on the implementation process of the embodiments of the present disclosure.

[0017] It should be understood that the terms “comprising” and “having” and their variations intend to cover non-exclusive inclusion, such as a process, method, system, product, or apparatus that includes a series of steps or units, not necessarily limited to those explicitly listed, but may include other steps or units that are inherently present in these processes, methods, products, or apparatus.

[0018] It should be understood that the term “multiple” means two or more. The term “and / or” is merely a description of the associated relationship between related objects, indicating that there can be three possible relationships. For example, “A and / or B” can mean: A exists alone, A and B exist simultaneously, or B exists alone. The character “ / ” generally indicates an “or” relationship between the preceding and following related objects. “Including A, B, and C, ” “including A, B, C” means that A, B, and C are all included, and “including A, B, or C” means that one of A, B, and C is included. “Including A, B and / or C” means that any one or two or all three of A, B, and C are included.

[0019] It should be understood that “corresponding to B with A, ” “corresponding to A with B, ” “A corresponds to B, ” or “B corresponds to A” means that B is associated with A and can be determined based on A. Determining B based on A does not mean that B can only be determined based on A, but can also be determined based on A and / or other information. The matching of A and B means that the similarity between A and B is greater than or equal to a predetermined threshold.

[0020] Depending on the context, the term “if” used herein can be interpreted as “when” or “in response to determining” or “in response to detecting. ”

[0021] The following specific embodiments will provide a detailed description of the technical solution of the present disclosure. These specific embodiments can be combined with each other, and certain concepts or processes may not be reiterated in some embodiments if they are the same or similar. In order to provide a clearer understanding of the purpose, technical solution, and advantages of the present disclosure, the following description will be provided in conjunction with the accompanying drawings.

[0022] Fig. 1 illustrates a flowchart of a method for generating music according to at least one embodiment of the present application.

[0023] At step 102, a genre of music to be generated is determined. The genre can be determined based on user input. For example, several optional genres may be provided to the user via user interface, such as touchscreen. The user can select a genre from the provided genres. For example, the user can touch the selected genre on the touchscreen. However, the present disclosure is not limited, and any applicable user interfaces may be used to provide genres to the user and receiving the user input including the selected genre.

[0024] According to at least one embodiment, the genre of music may be determined automatically. For example, a genre may be randomly selected from several optional genres. For another example, a genre may be selected based on priority. Optional genres may have corresponding priority, the genre with the highest priority may be selected from the optional genres. The priority of each genre may be based on preference information of the user, including historical selection of the genre of the user. For example, if a genre was selected previously by the user, the genre may have high priority. For another example, if music of a genre was played completely by the user, the genre may have high priority and if music of a genre was skipped by the user, the genre may have low priority.

[0025] For example, several optional genres may include energetic, focus and relax, and different genre corresponds to different music structures and rules. In an embodiment, each genre may include several subgenres. For example, the genre of energetic may include subgenres of sport and dream. For subgenres belonging to a genre, the music structures and rules are generally same but with slight differences. However, the present disclosure is not limited, more genres and subgenres can be included.

[0026] At step 104, a rule for generating the music is determined based on the genre. As discussed above, different genres correspond to different music structures and rules. For example, the genre of focus may correspond to a set of rules, and a rule may be selected from the set. For example, the rule may be randomly selected from the set. For another example, the rule may be selected from the set based on priority. Each rule in the set may have corresponding priority, the rule with the highest priority may be selected. The priority of each rule may be based on user preferences and history. If music generated with a rule was played completely by the user, the rule may have high priority and if music generated with a rule was skipped by the user, the rule may have low priority.

[0027] According to at least one embodiment, the rule may specify the structure of the music and other information needed to generate the music. For example, the structure of the music may include at least one of tempo of the music, key of the music, bar number of the music, tracks included in the music, instruments used in the music, sections of the music, length of each section of the music, bridge between one section and a next section among a plurality of sections of the music. Other information may include effect to be added to the music, compressor to be added to the music, expander to be added to the music, equalizer of the music; and starting bar of each track. However, the present disclosure is not limited, any applicable information can be included.

[0028] According to at least one embodiment, the rules may be either human-made or AI generated. For example, the rules may be drafted by human, categorized by genre and stored in a memory. For another example, the rules may be generated through machine learning or deep learning. The human-made rules may be used to train a model and the trained model may generate more rules to enrich rules.

[0029] According to at least one embodiment, the determined rule may be provided to the user via user interface, such as display, and the user may further modify the rule. Based on the modified rule, the generated music may be more in line with the user preferences.

[0030] At step 106, a plurality of samples are selected from a database. The database may include multiple samples categorized by at least one of the genre of the music, the tempo of the music, the key of the music, the track of the music or the instruments used of the music.

[0031] According to at least one embodiment, the samples may be either human-made or AI generated. For example, the samples may be generated by human, categorized and stored in the database. For another example, the samples may be generated through machine learning or deep learning. The human-made samples may be used to train a model and the trained model may generate more samples to enrich samples. The samples may be audio files, Musical Instrument Digital Interface (MIDI) files or any other digital format that can be processed and converted into audio signal. The details of the database will be described with reference to Fig. 2 and Fig. 3.

[0032] According to at least one embodiment, if the genre is determined, a rule is determined based on the genre and the structure of the music may also be determined. In this case, the tempo (range of temple) of the music, the key (range of key) of the music, the tracks of the music and the instruments used in the music are all known information. Therefore, samples of a certain genre, tempo (range of temple) , key (range of key) , track or instrument may be selected from the database.

[0033] At step 108, the selected samples are modified based on the structure. For example, the structure of the music specifies that the tempo of the music is 120BPM, while the selected samples may be with different tempo, such as from 110BPM to 130BPM. Therefore, the samples with different tempo should be modified to align with each other and following the structure. Similarly, the duration of each sample and pitch of each sample may also be modified to align with each other and following the structure.

[0034] At step 110, the modified samples are assembled into a plurality of tracks. For example, for each of the tracks defined in the structed, the modified samples are assembled based on the rule. For example, the structure may define the sections of the music and length of each section of the music, for each section, the modified samples will repeat for certain times to satisfy the requirement of length.

[0035] At step 112, the plurality of tracks are mastered to generate the music.

[0036] According to at least one embodiment, for each track, the rule may specify effect to be added to the track, compressor to be added to the track, expander to be added to the track, equalizer of the track; and starting bar and ending bar of each track. Based on the rule, each track may be mastered, and the plurality tracks may be mixed to generate the music.

[0037] Fig. 2 illustrates a schematic diagram of a database including samples categorized by genre according to at least one embodiment of the present application.

[0038] According to Fig. 2, a database 200 is illustrated. The database 200 includes a plurality of samples and the samples are categorized by genre. As shown in Fig. 2, the samples included in the database 200 are categorized into three genres, energetic 210, relax 220 and focus 230. According to at least one embodiment, each of the samples may be categorized by adding a tag identifying a category to which the sample belongs, so that it is convenient to filter needed samples. The tag may be genre (including rhythm, pad, lead, bass, etc. ) , tempo or key (such as Cmaj / Cm) . Some tags are manually identified, and some tags can also be automatically identified, such as BPM and key. With such categorization, when a genre is determined, the samples belonging to the determined genre can be easily searched.

[0039] According to at least one embodiment, when the genre is determined as energetic 210, the selection of a plurality of samples can be performed on sample 210-1, sample 210-2 …and 210-n, which narrows the selection and improves efficiency. Similarly, when the genre is determined as relax 220, the selection of plurality of samples can be performed on sample 220-1, sample 220-2 …and 220-n, and when the genre is determined as focus 230, the selection of plurality of samples can be performed on sample 220-1, sample 230-2 …and 230-n, which also narrows the selection and improves efficiency.

[0040] Fig. 3 illustrates a schematic diagram of a database including samples categorized by genre and tempo according to at least one embodiment of the present application.

[0041] According to Fig. 3, a database 300 is illustrated. The database 300 includes a plurality of samples and the samples are categorized by genre and tempo. As shown in Fig. 3, the samples included in the database 300 are categorized by both genre (energetic 310, relax 320 and focus 330) and tempo (90-110BPM and 110-130BPM) . With such categorization, when a genre is determined, the rule and the structure is determined accordingly, and the tempo of the music is also determined based on the structure, then the samples belonging to the determined genre with the specific temp can be easily searched.

[0042] According to at least one embodiment, when the genre is determined as energetic 310, a rule may be determined based on the genre, the determined rule may specify a structure of the music, and the structure may define the tempo of the music, for example, 120BPM. Therefore, the selection of a plurality of samples can be performed on sample 314-1… and 314-n. Similarly, when the genre is determined as relax 320, a rule may be determined based on the genre, the determined rule may specify a structure of the music, and the structure may define the tempo of the music, for example, 100BPM. Therefore, the selection of a plurality of samples can be performed on sample 322-1, sample 322-2…and 322-n, and when the genre is determined as focus 330, a rule may be determined based on the genre, the determined rule may specify a structure of the music, and the structure may define the tempo of the music, for example, 120BPM. Therefore, the selection of a plurality of samples can be performed on sample 334-1, sample 334-2…and 334-n. Therefore, with such database, the selection may be narrowed and the efficiency may be improved.

[0043] Fig. 4 illustrates a schematic diagram of the structure of example music generated based on a rule according to at least one embodiment of the present application.

[0044] According to Fig. 4, a schematic diagram of the structure of generated music is illustrated. As shown in the structure, the generated music includes intro section, core section, outro section, and the generated music is composed of 6 tracks. However, the present disclosure is not limited, more or less sections and more or less of tracks can be included in the generated music, as following the rule. In addition, a bridge 1 exists between the intro section and the core section, and a bridge 2 exists between the core section and the outro section. However, the present disclosure is not limited, the bridge may be replaced with breakdown or may be omitted.

[0045] According to at least one embodiment, the genre is determined as focus and the subgenre is determined as dynamic flow, then a rule is determined based on the genre and the subgenre. The rule specifies a structure of music to be generated and may specify other information needed to generate the music. The structure may define that the music should include 6 tracks (drums, top, bass, melody, pad, Special effects (FX) ) , the tempo of the music should be 120BPM with 4 / 4 time signature, the sections (intro, core, outro) should be included in the music and length of each section. For example, the structure may define that the length of the music is 6 minutes, the intro section lasts 2 minutes, the bridge between the intro section and the core section lasts 8 seconds, the core section lasts 1 minutes and 52 seconds, the bridge between the core section and the outro section lasts 8 seconds and the outro section lasts 1 minutes and 52 seconds.

[0046] Based on the genre and information defined in the structure, a plurality of samples may be selected from the database. For example, since the genre is focus, the subgenre is dynamic flow and the tempo of the music is 120BPM, the plurality of samples may be selected from the category of focus (dynamic flow) with tempo range of 110-130BPM. In some embodiments, the samples may also be categorized by tracks, therefore, for each track, a plurality of samples from the category of focus with tempo range of 110-130BPM may be selected.

[0047] Then the selected samples are modified. Since the samples are selected from samples of focus with tempo range of 110-130BPM, the tempo of the selected samples may vary from 110BPM to 130BPM. Therefore, the selected samples should be modified to align with the tempo of 120BPM. For example, if the tempo of a selected sample is 122BPM with 7.86s duration, each beat lasts 0.49s in 122bpm, which means the loop has 16 beats, under 4 / 4 TS, it has 4 bars (a bar has 4 beats in 4 / 4) . To modify the sample as 120BPM, the sample should be stretched from 7.86s to 8s. The target duration of the sample may be calculated as target tempo multiply with the number of bars.

[0048] The modified samples may be assembled into multiple tracks. For example, the modified samples may be assembled into 6 tracks respectively, including drums, top, bass, melody, pad and FX. Samples selected for respective track may be repeated for certain times to form the track and satisfy the requirement of length of each section and the requirement of length of the music.

[0049] Each track is mastered based on the rule and the plurality of tracks are mixed to generate the music. For example, for the track of drums, for the intro section, the rule further specifies that the starting bar is the fifth bar, sample should be repeated for 40 to 50 bars without gap, each trigger should be on rhythm and the volume of the sample should be adjusted to -9dB; for the core section, the rule further specifies that a new sample should be used and the core section should start right after the bridge between the intro section and the core section and other configurations should be same as that of the intro section; for the outro section, the rule further specifies that a new sample should be used and the outro section should start right after the bridge between the core section and the outro section, the ending bar is the eighth bar before the music ends, and other configurations should be same as that of the intro section.

[0050] For the track of top, for the intro section, the rule further specifies that the starting bar is the third bar, each trigger with [0, 2, 4] bars gap, 0 will not happen in a sequence more than 2 times, each trigger should be on rhythm and the volume of the sample should be adjusted to -14dB; for the core section, the rule further specifies that a new sample (same sample as used in the bridge between the intro section and the core section) should be used and other configurations should be same as that of the intro section; for the outro section, the rule further specifies that a new sample (same sample as used in the bridge between the core section and the outro section) should be used, the ending bar is the fourth bar before the music ends and other configurations should be same as that of the intro section.

[0051] For the track of pad, for the intro section, the rule further specifies that the this section should start from the beginning of the music, each trigger duration is 4 -10 bars, with 0-4 beats gap, the pad will not change throughout the whole music, all the bass and melody key should follow pad key, this section has 2 beats fade in and out, the volume of the sample should be adjusted to -25dB and high-reverb should be applied; for core section, each trigger duration 2-6 bars, with 4-8 beats gap and other configurations should be same as that of the intro section; and for outro section, the volume of the sample should be adjusted to -30dB, this section should play till end of the music and includes 1 bar fade out and other configurations should be same as that of the intro section.

[0052] For the track of melody, for the intro section, the rule further specifies that the key should follow the key of pad, the starting bar is the ninth bar, each trigger with [0, 2, 4, 8] bars gap, 0 will not happen in a sequence more than 2 times, each trigger should be on rhythm and the volume of the sample should be adjusted to -19dB; for core section, the rule further specifies that a new sample should be used, triggered 4 or 8 bars after drums, each trigger duration [4, 8] bars, with [8, 16] bars gap and other configurations should be same as that of the intro section; and for outro section, the rule further specifies that no melody in this section.

[0053] For the track of bass, for the intro section and the core section, the rule further specifies that no bass in this section; for the outro section, the rule further specifies that the key should follow the key of pad, starting [0, 4, 8] bars after drums, each trigger with [0, 2, 4, 8] bars gap, 0 will not happen in a sequence more than 2 times each trigger should be on rhythm, the volume of the sample should be adjusted to -19dB, and the ending bar is the tenth bar before the music ends.

[0054] For the track of FX, for the intro section, the rule further specifies that the starting bar is the twentieth bar, each trigger duration is 2-4 bars, with 8-12 bars gap, this section has 2 beats fade in and out and the volume of the sample should be adjusted to -24dB; for the core section, the rule further specifies that a new sample should be used, triggered 4 or 8 bars after drums and other configurations should be same as that of the intro section; for the outro section, the rule further specifies that a new sample should be used, triggered 4 or 8 bars after drums, this section plays till the end of the music and other configurations should be same as that of the intro section.

[0055] The rule further specifies that for the bridge between the intro section and the core section, the bridge starts from the 57th / 59th / 61th bar, duration 4 bars, drums should stop in this section, top from core will enter instantly, pad and FX will trigger normally and there is 50%chance to trigger melody from previous section for 4 bars. For the bridge between the core section and the outro section, the rule specifies the same. Further, for the core section, the rule further specifies a special time triggered 1-3 times and each time lasts 2 or 4 beats. For the special time, the rule may specify that there is no melody, stopping top or pad playing and only keeping FX and drum triggered, and Special time will not be triggered at the beginning or the end 4 bars.

[0056] Fig. 5 illustrates a schematic diagram of the structure of another example music generated based on a rule according to at least one embodiment of the present application.

[0057] According to Fig. 5, a schematic diagram of the structure of generated music is illustrated. As shown in the structure, the generated music includes intro section, core section, outro section, and the generated music is composed of 5 tracks. However, the present disclosure is not limited, more or less sections and more or less of tracks can be included in the generated music, as following the rule. In addition, a bridge 1 exists between the intro section and the core section, and a bridge 2 exists between the core section and the outro section. However, the present disclosure is not limited, the bridge may be replaced with breakdown or may be omitted.

[0058] According to at least one embodiment, the genre is determined as focus and the subgenre is determined as soft vibes, then a rule is determined based on the genre and the subgenre. The rule specifies a structure of music to be generated and may specify other information needed to generate the music. The structure may define that the music should include 5 tracks (drums, top, melody, pad, Special effects (FX) ) , the tempo of the music should be 100BPM with 4 / 4 time signature, the sections (intro, core, outro) should be included in the music and length of each section. For example, the structure may define that the length of the music is 6 minutes, the intro section lasts 2 minutes, the bridge between the intro section and the core section lasts 8 seconds, the core section lasts 1 minutes and 52 seconds, the bridge between the core section and the outro section lasts 8 seconds and the outro section lasts 1 minutes and 52 seconds.

[0059] Based on the genre and information defined in the structure, a plurality of samples may be selected from the database. For example, since the genre is focus, the subgenre is soft vibes and the tempo of the music is 100BPM, the plurality of samples may be selected from the category of focus (soft vibes) with tempo range of 90-110BPM. In some embodiments, the samples may also be categorized by tracks, therefore, for each track, a plurality of samples from the category of focus with tempo range of 90-110BPM may be selected.

[0060] Then the selected samples are modified. Since the samples are selected from samples of focus with tempo range of 90-110BPM, the tempo of the selected samples may vary between 90BPM to 110BPM. Therefore, the selected samples should be modified to align with the tempo of 100BPM.

[0061] The modified samples may be assembled into multiple tracks. For example, the modified samples may be assembled into 5 tracks respectively, including drums, top, melody, pad and FX. Samples selected for respective track may be repeated for certain times to form the track and satisfy the requirement of length of each section and the requirement of length of the music.

[0062] Each track is mastered based on the rule and the plurality of tracks are mixed to generate the music. For example, for the track of drums, for the intro section, the rule further specifies that the starting bar is the fifth bar, sample should be repeated for 48 to 56 bars without gap, each trigger should be on rhythm and the volume of the sample should be adjusted to -9dB; for the core section, the rule further specifies that a new sample should be used and the core section should start after 4 or 8 bars from intro drums and other configurations should be same as that of the intro section; for the outro section, the rule further specifies that a new sample should be used and the outro section should start right after the bridge between the core section and the outro section, the ending bar is the eighth bar before the music ends, and other configurations should be same as that of the intro section.

[0063] For the track of top, for the intro section, the rule further specifies that the starting bar is the third bar, no gap, each trigger should be on rhythm and the volume of the sample should be adjusted to -25dB; for the core section, the rule further specifies that a new sample (same sample as used in the bridge between the intro section and the core section) should be used, the core section should start right afterintro top and other configurations should be same as that of the intro section; for the outro section, the rule further specifies that a new sample (same sample as used in the bridge between the core section and the outro section) should be used, the ending bar is the fourth bar before the music ends and other configurations should be same as that of the intro section.

[0064] For the track of pad, for the intro section, the rule further specifies that the this section should start from the beginning of the music, each trigger duration is 4 -10 bars without gap, the pad will not change throughout the whole music, all the bass and melody key should follow pad key, this section has 2 beats fade in and out, the volume of the sample should be adjusted to -25dB and high-reverb should be applied; for core section, the rule further specifies that the configurations should be same as that of the intro section; and for outro section, the volume of the sample should be adjusted to -25dB, this section should play till end of the music and includes 1 bar fade out and other configurations should be same as that of the intro section.

[0065] For the track of melody, for the intro section, the rule further specifies that the key should follow the key of pad, the starting bar is the ninth bar, no gap, each trigger should be on rhythm and the volume of the sample should be adjusted to -19dB; for core section, the rule further specifies that a new sample should be used, this section should start right after the bridge between the intro section and the core section, each trigger with [0, 4] bars gap, 0 will not happen in a sequence more than 2 times and other configurations should be same as that of the intro section; and for outro section, the rule further specifies that a new sample should be used, this section should start right after the bridge between the core section and the outro section, each trigger with [0, 4] bars gap, 0 will not happen in a sequence more than 2 times, the ending bar is the tenth bar before the music ends and other configurations should be same as that of the intro section .

[0066] For the track of FX, for the intro section, the rule further specifies that the starting bar is the third bar, each trigger with 8-12 bars gap, this section has 2 beats fade in and out, the volume of the sample should be adjusted to -24dB and the FX will not change throughout the whole music; for the core section, the rule further specifies that the configurations should be same as that of the intro section; for the outro section, the rule further specifies that a new sample should be used, triggered 4 or 8 bars after drums, this section plays till the end of the music and other configurations should be same as that of the intro section.

[0067] The rule further specifies that for the bridge between the intro section and the core section, the bridge starts from the 49th / 57th bar, duration 4 bars, drums should stop in this section, top from core will trigger 8-16 bars, pad and FX will trigger normally and no melody during this bridge. For the bridge between the core section and the outro section, the rule specifies the same. Further, for the core section, the rule further specifies a special time triggered 1-3 times and each time lasts 2 or 4 beats. For the special time, the rule may specify that there is no melody, stopping top or pad playing and only keeping FX and drum triggered, and Special time will not be triggered at the beginning or the end 4 bars.

[0068] Fig. 6 illustrates a schematic diagram of the structure of another example music generated based on a rule according to at least one embodiment of the present application.

[0069] According to Fig. 6, a schematic diagram of the structure of generated music is illustrated. As shown in the structure, the generated music includes intro section, core section, outro section, and the generated music is composed of 10 tracks. However, the present disclosure is not limited, more or less sections and more or less of tracks can be included in the generated music, as following the rule. In addition, a breakdown exists between the core section and the outro section. However, the present disclosure is not limited, the breakdown may be replaced with bridge or may be omitted.

[0070] According to at least one embodiment, the genre is determined as energetic and the subgenre is determined as sport / workout / fitness, then a rule is determined based on the genre and the subgenre. The rule specifies a structure of music to be generated and may specify other information needed to generate the music. The structure may define that the music should include 10 tracks (drums, ARP, bass, pad, lead, fills_1, fills_2, fills_3, FX_1 and FX_2) , the tempo of the music should be 120BPM with 4 / 4 time signature, the sections (intro, core, outro) should be included in the music and length of each section. For example, the structure may define that the length of the music is 6 minutes, the intro section lasts 30 seconds (including bar 1-16) , the core section lasts 2 minutes and 14 seconds (including bar 17-113) , the breakdown between the core section and the outro section lasts 32 seconds (including bar 114-128) and the outro section lasts 1 minutes and 44 seconds (including bar 129-184) .

[0071] Based on the genre and information defined in the structure, a plurality of samples may be selected from the database. For example, since the genre is energetic, the subgenre is sport / workout / fitness and the tempo of the music is 120BPM, the plurality of samples may be selected from the category of energetic (sport / workout / fitness) with tempo range of 110-130BPM. In some embodiments, the samples may also be categorized by tracks, therefore, for each track, a plurality of samples from the category of energetic with tempo range of 110-130BPM may be selected.

[0072] Then the selected samples are modified. Since the samples are selected from samples of focus with tempo range of 110-130BPM, the tempo of the selected samples may vary between 110BPM to 130BPM. Therefore, the selected samples should be modified to align with the tempo of 120BPM.

[0073] The modified samples may be assembled into multiple tracks. For example, the modified samples may be assembled into 10 tracks respectively. Samples selected for respective track may be repeated for certain times to form the track and satisfy the requirement of length of each section and the requirement of length of the music.

[0074] Each track is mastered based on the rule and the plurality of tracks are mixed to generate the music. For example, for the track of drums, for the intro section, the rule further specifies that this section should start from the beginning, no gap, each trigger should be on rhythm and the volume of the sample should be adjusted to 10dB; for the core section, the rule further specifies that a new sample should be used and other configurations should be same as that of the intro section; for the breakdown, the rule further specifies that the configurations should be same as that of the core section; for the outro section, the rule further specifies that a new sample should be used, the ending bar is the last bar before the music ends, and other configurations should be same as that of the intro section.

[0075] For the track of ARP, for the intro section, the rule further specifies that the key should follow the key of bass, this section should start from the beginning, no gap, each trigger should be on rhythm and the volume of the sample should be adjusted to 15dB; for the core section, the rule further specifies that a new sample should be used, there is 50%chance trigger from the beginning of core, repeating the samples for 16 bars, with 16 bars gap (if sample duration 4 bars, repeating 4 times, then has 16 bars gap) , applying -0.2 panning and other configurations should be same as that of the intro section; for the breakdown, the rule further specifies that the configurations should be same as that of the core section and repeating the sample for 16 bars; for the outro section, the rule further specifies that same sample should be used as intro section, this section should start right after breakdown and the ending bar is sixteenth bar before the ending of the music.

[0076] For the track of bass, for the intro section, the rule does not specify any other information; for the core section, the rule further specifies that this section should start right after intro, no gap and the volume of the sample should be adjusted to 10dB; for the breakdown, the rule further specifies that the configurations should be same as that of the core section; for the outro section, the rule further specifies that the ending bar is the last bar before the music ends, and other configurations should be same as that of the core section.

[0077] For the track of pad, for the intro section, the rule does not specify any other information; for the core section, the rule further specifies that the key should follow the key of bass, this section should start at the 49th bar and end at the 112 bar, no gap, the volume of the sample should be adjusted to -5dB and this section includes 1s fade in and out, no fade in / out between repeating of samples; for the breakdown and outro section, the rule further specifies that no pad.

[0078] For the track of lead, for the intro section, the rule does not specify any other information; for the core section, the rule further specifies that the key should follow the key of bass, this section should start right after intro, repeating the samples for 32 bars, with 32 bars gap (if sample duration 4 bars, repeating 8 times, then has 32 bars gap) , applying +0.2 panning; for the breakdown, the rule further specifies that no lead; for the outro section, the rule further specifies that a new sample should be used, this section should start right after breakdown, trigger for 16 bars, with 16 bars gap and the ending bar is eighth bar before the ending of the music.

[0079] For the tracks of fills_1, fills_2, fills_3, for the intro section, the rule further specifies that fills_1, fills_2, fills_3 only appear at the end of intro, fills_1 and fills_2 tail align with the end point, fills_3 head align with the end point, the volume of the sample for fills_1should be adjusted to 10dB and the volume of the samples for fills_2 and fills_3should be adjusted to 5dB; for the core section, the rule specifies that fills_1, fills_2, fills_3 appear in each 32 bars and other configurations should be same as that of the intro section; for the breakdown, the rule specifies that fills_1, fills_2, fills_3 appear when enter and exist bridge and other configurations should be same as that of the intro section; for the outro section, the rule specifies that fills_1, fills_2, fills_3 appear in each 16 bars and triggered 4 times in total, and other configurations should be same as that of the intro section.

[0080] For the track of FX_1, for the intro section, core section and breakdown, the rule does not specify any other information; for the outro section, the rule further specifies that triggers starting from bar 129, trigger once in each 8 bars till the end of music and the volume of the sample should be adjusted to -5dB.

[0081] For the track of FX_2, for the intro section, breakdown and outro section, the rule does not specify any other information; for the core section, the rule further specifies that triggering from bar 49 to 112 and stopping at bar 113, and the volume of the sample should be adjusted to -12dB.

[0082] Fig. 7 illustrates a schematic diagram of the structure of another example music generated based on a rule according to at least one embodiment of the present application.

[0083] According to Fig. 7, a schematic diagram of the structure of generated music is illustrated. As shown in the structure, the generated music includes intro section, core section, outro section, and the generated music is composed of 6 tracks. However, the present disclosure is not limited, more or less sections and more or less of tracks can be included in the generated music, as following the rule.

[0084] According to at least one embodiment, the genre is determined as energetic and the subgenre is determined as dream, then a rule is determined based on the genre and the subgenre. The rule specifies a structure of music to be generated and may specify other information needed to generate the music. The structure may define that the music should include 6 tracks (drums, ARP, bass, pad, lead, fills) , the tempo of the music should be 100BPM with 4 / 4 time signature, the sections (intro, core, outro) should be included in the music and length of each section. For example, the structure may define that the length of the music is 6 minutes, the intro section lasts 2 minutes (including bar 1-48) , the core section lasts 2 minutes (including bar 49-96) and the outro section lasts 2 minutes (including bar 97-144) .

[0085] Based on the genre and information defined in the structure, a plurality of samples may be selected from the database. For example, since the genre is energetic, the subgenre is dream and the tempo of the music is 100BPM, the plurality of samples may be selected from the category of energetic (sport / workout / fitness) with tempo range of 90-110BPM. In some embodiments, the samples may also be categorized by tracks, therefore, for each track, a plurality of samples from the category of energetic with tempo range of 90-110BPM may be selected.

[0086] Then the selected samples are modified. Since the samples are selected from samples of focus with tempo range of 90-110BPM, the tempo of the selected samples may vary between 90BPM to 110BPM. Therefore, the selected samples should be modified to align with the tempo of 100BPM.

[0087] The modified samples may be assembled into multiple tracks. For example, the modified samples may be assembled into 6 tracks respectively. Samples selected for respective track may be repeated for certain times to form the track and satisfy the requirement of length of each section and the requirement of length of the music.

[0088] Each track is mastered based on the rule and the plurality of tracks are mixed to generate the music. For example, for the track of drums, for the intro section, the rule further specifies that this section should be from bar 9 to bar 48, each trigger should be on rhythm and the volume of the sample should be adjusted to 5dB; for the core section, the rule further specifies that a new sample should be used and the sample should be repeated for the whole section; for the outro section, the rule further specifies that a new sample should be used and the sample should be repeated from bar 97 to bar 144.

[0089] For the track of ARP, for the intro section, the rule further specifies that the key should follow the key of bass, this section should be from bar 1 to bar 32, no gap, each trigger should be on rhythm and the volume of the sample should be adjusted to 10dB; for the core section, the rule further specifies that a new sample should be used, there is 50%chance trigger from the beginning of core, repeating the samples for 16 bars, and -0.2 panning is applied; for the outro section, the rule further specifies that same sample as core section should be used, there is 50%chance start from either bar 97 or 113, if this section start from bar 97, lead will start from bar 113, if this section start from bar 113, lead will start from 97, and this section will last 16 bars.

[0090] For the track of bass, for the intro section, the rule does not specify any other information; for the core section, the rule further specifies that this section should be from bar 49 to bar 80, no gap and the volume of the sample should be adjusted to 10dB; for the outro section, the rule further specifies that same sample as core section should be used, this section starts from bar 97 and will last 16 bars or 32 bars.

[0091] For the track of pad, for the intro section, the rule further specifies that the key should follow the key of bass, this section should be from bar 16 to bar 48, no gap, the volume of the sample should be adjusted to 5dB and this section includes 1bar fade in and out, and no fade in / out between repeating of samples; for the core section, the rule further specifies that same sample as intro section should be used and this section should be from bar 65 to bar 96; for the outro section, the rule further specifies that same sample as core section should be used and this section should be from bar 105 to bar 152.

[0092] For the track of lead, for the intro section, the rule further specifies that the key should follow the key of bass, this section should be from bar 16 to bar 32, no gap, the volume of the sample should be adjusted to 12dB, +0.2 panning is applied and Each trigger should be on the rhythm; for the core section, the rule further specifies that a new sample should be used, there is 50%chance start from either bar 49 or 65, if this section start from bar 49, ARP will start from bar 65, and if this section start from bar 65, ARP will start from bar 49, and this section will last 16 bars; for the outro section, the rule further specifies that same sample as core section should be used, there is 50%chance start from either bar 97 or 113, if this section start from bar 97, ARP will start from bar 113, and if this section start from bar 113, ARP will start from bar 97, and this section will last 16 bars .

[0093] For the track of fill, for the intro section, the rule further specifies that trigger once and stops at bar 8, the volume of the sample should be adjusted to 10dB; for the core section, the rule further specifies that trigger once and stops at bar 96; for the outro section, the rule does not specify any other information.

[0094] According to another aspect of the present disclosure, a computer-readable storage medium for storing a computer-readable program is provided, when being executed by a computer or a processor, the computer-readable program causes the computer or the processor to perform the sound reproduction method as described above. According to yet another aspect of the present disclosure, the method may be integrated into software / hardware products in an offline form, and may also be streamed out through an online cloud service, so that devices that may access the Internet are also able to inherit the method.

[0095] Techniques of this disclosure may include additional aspects, such as any single aspect or any combination of aspects described below and / or in connection with one or more other processes described elsewhere herein.

[0096] In a first aspect, a method for generating music is provided, which comprises: determining a genre of the music; determining a rule for generating the music based on the genre, wherein the rule specifies a structure of the music; selecting a plurality of samples from a database; modifying the plurality of samples based on the structure; assembling the plurality of modified samples into a plurality of tracks based on the structure; and mastering the plurality of tracks to generate the music, wherein the structure comprises at least one of tempo of the music, key of the music, bar number of the music, tracks included in the music and instruments used in the music.

[0097] In a second aspect, alone or in combination with any other aspects, determining a genre of the music comprises: determining the genre of the music based on the input from the user; determining the genre of the music based on priority of each genre in a plurality of genres; or determining the genre of the music based on preference information of the user, wherein the preference information includes historical selection of the genre of the user.

[0098] In a third aspect, alone or in combination with any other aspects, determining a rule for generating the music based on the genre comprises: randomly selecting a rule from a set of rules associated with the genre; or selecting a rule with the highest priority from the set of rules associated with the genre.

[0099] In a fourth aspect, alone or in combination with any other aspects, the set of rules includes human-made rules or artificial intelligence-generated rules or both.

[0100] In a fifth aspect, alone or in combination with any other aspects, the structure of the music further comprises at least one of: sections of the music; length of each section of the music; transition between two adjacent sections among a plurality of sections of the music.

[0101] In a sixth aspect, alone or in combination with any other aspects, the database includes human-made samples or artificial intelligence-generated samples or both.

[0102] In a seventh aspect, alone or in combination with any other aspects, the samples are audio files or Musical Instrument Digital Interface MIDI files.

[0103] In an eighth aspect, alone or in combination with any other aspects, the database includes samples categorized by at least one feature, wherein the at least one feature includes at least one of the genre of the music, the tempo of the music, the key of the music, track of the music or the instruments used in the music.

[0104] In a ninth aspect, alone or in combination with any other aspects, selecting a plurality of samples from a database comprises: randomly selecting a plurality of samples from a set of samples associated with the at least one feature; selecting a plurality of samples from the set of samples associated with the genre based on priority of the samples included in the set.

[0105] In a tenth aspect, alone or in combination with any other aspects, modifying the plurality of samples based on the structure comprises: trimming length of each of the plurality of samples to a target length, wherein the target length is determined based on the tempo of the music and the bar number of the music; and adjusting pitch of each of the plurality of samples.

[0106] In an eleventh aspect, alone or in combination with any other aspects, mastering the plurality of tracks to generate the music comprises, for each of the plurality of tracks, at least one of: tuning volume of the track; adding effect to the track; adding compressor or expander to the track; and tuning equalizer for the track.

[0107] In a twelfth aspect, alone or in combination with any other aspects, the method for generating music further comprises at least one of: adding compressor or expander to the plurality of samples; and tuning equalizer for the plurality of samples.

[0108] In a thirteenth aspect, alone or in combination with any other aspects, the method for generating music further comprises at least one of: outputting the generated music; or storing the generated music.

[0109] In a fourteenth aspect, alone or in combination with any other aspects, the rule further specifies at least one of: effect to be added to the music; compressor to be added to the music; expander to be added to the music; equalizer of the music; starting bar of each track; and ending bar of each track.

[0110] In a fifteenth aspect, alone or in combination with any other aspects, the method for generating music further comprises: providing the rule to a user; and receiving input from the user to modify the rule.

[0111] In a sixteenth aspect, alone or in combination with any other aspect, a device for generating music is provided, which comprises: amemory; and a processor, configured to perform the method according to any of previous aspects.

[0112] Those of skill would appreciate that the logical blocks, circuits, and algorithm steps described here may be implemented as electronic hardware, computer software, or a combination. This interchangeability of hardware and software is shown by the illustrative components described functionally. Whether the functionality is implemented in hardware or software depends on the application and constraints. Experts may implement the functionality in various ways for each application, but those choices do not depart from the scope here. Experts also recognize the examples of components, methods, and interactions here are merely illustrative; the components, methods, or interactions may be combined or performed differently.

[0113] The illustrative logic, blocks, circuits, and processes described may be implemented as hardware, software, or a combination. This hardware and software interchangeability have been described generally in terms of functionality and illustrated in the components, blocks, circuits, and processes. Whether the functionality is implemented in hardware or software depends on the application and constraints.

[0114] It will be appreciated by a person skilled in the art, aspects of the present disclosure may be illustrated and described herein in any of a number of patentable classes or context including any new and useful process, machine, manufacture, or composition of matter, or any new and useful improvement thereof. Accordingly, aspects of the present disclosure may be implemented entirely hardware, entirely software (including firmware, resident software, micro-code, etc. ) or combining software and hardware implementation that may all generally be referred to herein as a “data block” , “circuit” , “engine” , “unit” , “circuit” or “system” . Furthermore, aspects of the present disclosure may take the form of a computer program product embodied in one or more computer-readable media having computer-readable program code embodied thereon.

[0115] Certain terminology has been used to describe embodiments of the present disclosure. For example, the terms “first / second embodiment” , “one embodiment” , “an embodiment” , and / or “some embodiments” mean that a particular feature, structure or characteristic described in connection with the embodiment is included in at least one embodiment of the present disclosure. Therefore, it is emphasized and should be appreciated that two or more references to “an embodiment” or “one embodiment” or “an alternative embodiment” in various portions of this specification are not necessarily all referring to the same embodiment. Furthermore, the particular features, structures or characteristics may be combined as suitable in one or more embodiments of the present disclosure.

[0116] Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. It will be further understood that terms, such as those defined in commonly used dictionaries, should be interpreted as having the meaning that is consistent with their meaning in the context of the relevant art and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein.

[0117] The above is illustration of the present disclosure and should not be construed as making limitation thereto. Although some exemplary embodiments of the present disclosure have been described, a person skilled in the art can easily understand that many modifications may be made to these exemplary embodiments without departing from the creative teaching and advantages of the present disclosure. Therefore, all such modifications are intended to be included within the scope of the present disclosure as defined by the appended claims. As will be appreciated, the above is to explain the present disclosure, it should not be constructed as limited to the specific embodiments disclosed, and modifications to the present disclosure and other embodiments are included in the scope of the attached claims. The present disclosure is defined by the claims and their equivalents.

Claims

1.A method for generating music, the method comprising:determining a genre of the music;determining a rule for generating the music based on the genre, wherein the rule specifies a structure of the music;selecting a plurality of samples from a database;modifying the plurality of samples based on the structure;assembling the plurality of modified samples into a plurality of tracks based on the structure; andmastering the plurality of tracks to generate the music,wherein the structure comprises at least one of tempo of the music, key of the music, bar number of the music, tracks included in the music and instruments used in the music.2.The method of claim 1, wherein determining a genre of the music comprises:determining the genre of the music based on the input from the user;determining the genre of the music based on priority of each genre in a plurality of genres; ordetermining the genre of the music based on preference information of the user, wherein the preference information includes historical selection of the genre of the user.3.The method of claim 1, wherein determining a rule for generating the music based on the genre comprises:randomly selecting a rule from a set of rules associated with the genre; orselecting a rule with the highest priority from the set of rules associated with the genre.4.The method of claim 1, wherein the set of rules includes human-made rules or artificial intelligence-generated rules or both.5.The method of claim 1, wherein the structure of the music further comprises at least one of:sections of the music;length of each section of the music;transition between two adjacent sections among a plurality of sections of the music.6.The method of claim 1, wherein the database includes human-made samples or artificial intelligence-generated samples or both.7.The method of claim 1, wherein the samples are audio files or Musical Instrument Digital Interface MIDI files.8.The method of claim 1, wherein the database includes samples categorized by at least one feature, wherein the at least one feature includes at least one of the genre of the music, the tempo of the music, the key of the music, track of the music or the instruments used in the music.9.The method of claim 8, wherein selecting a plurality of samples from a database comprises:randomly selecting a plurality of samples from a set of samples associated with the at least one feature;selecting a plurality of samples from the set of samples associated with the genre based on priority of the samples included in the set.10.The method of claim 1, wherein modifying the plurality of samples based on the structure comprises:trimming length of each of the plurality of samples to a target length, wherein the target length is determined based on the tempo of the music and the bar number of the music; andadjusting pitch of each of the plurality of samples.11.The method of claim 1, wherein mastering the plurality of tracks to generate the music comprises, for each of the plurality of tracks, at least one of:tuning volume of the track;adding effect to the track;adding compressor or expander to the track; andtuning equalizer for the track.12.The method of claim 1, further comprising at least one of:adding compressor or expander to the plurality of samples; andtuning equalizer for the plurality of samples.13.The method of claim 1, further comprising at least one of:outputting the generated music; orstoring the generated music.14.The method of claim 1, wherein the rule further specifies at least one of:effect to be added to the music;compressor to be added to the music;expander to be added to the music;equalizer of the music;starting bar of each track; andending bar of each track.15.The method of claim, further comprising:providing the rule to a user; andreceiving input from the user to modify the rule.16.A device for generating music, the device comprising:a memory;a processor, configured to perform the method according to any of claims 1-15.