A rhythm generation method and device, computer equipment and storage medium

By selecting rhythmic materials that fit the lyric structure from a rhythm library and classifying the lyric phrases, rhythms are generated using strategies of synthesis or adding note units. This solves the problems of insufficient diversity and efficiency in rhythm generation methods, and improves the quality and efficiency of music creation.

CN120032612BActive Publication Date: 2025-11-11GUANGZHOU HUANCHENG CULTURE MEDIA CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510243505.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-03-03
Publication Date
2025-11-11
Estimated Expiration
2045-03-03

AI Technical Summary

Technical Problem

Existing rhythm generation methods cannot balance diversity and efficiency, and traditional generation schemes are highly homogeneous and inefficient.

Method used

Find target rhythm materials that match the structure of the target lyrics from the rhythm library, divide the lyrics into first and second categories according to a specific ratio, and make the number of units in each category equal by synthesizing or adding note units. Use the rhythm information of the material sentences to generate the rhythm of the target lyrics.

Benefits of technology

By selecting rhythmic materials that fit the lyrical structure and adopting different rhythm matching methods for different categories, the quality and efficiency of music creation have been improved, and the diversity of rhythm generation has been ensured.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120032612B_ABST
    Figure CN120032612B_ABST
Patent Text Reader

Abstract

The application provides a rhythm generation method. The method first finds out target rhythm material matching a target lyric structure from a rhythm library, then divides target lyrics into a first category and a second category according to a specific first proportion, for the first category, a synthesis strategy is used to match the number of units of the first material sentence with the category, and for the second category, an adding note unit strategy is used to match the number of units of the second material sentence with the category, so that the rhythm information of each sentence of the target lyrics can be obtained by using the rhythm information of the material sentence. The scheme selects the rhythm material suitable for the lyric structure, lays a good foundation for subsequent creation, classifies the sentences of the target lyrics, adopts different rhythm matching methods for different categories, combines the two creation methods to ensure the diversity of rhythm generation, and helps to improve the quality and efficiency of rhythm generation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of music generation technology, and more particularly to a rhythm generation method, apparatus, computer device, and storage medium. Background Technology

[0002] In the field of music arrangement, rhythm is a crucial element that often needs to be considered when producing music, as it determines the flow, rise and fall, and beat of the music. With the development of artificial intelligence technology, algorithms capable of automatically generating rhythms have gradually emerged. However, traditional generation methods often produce rhythms that are highly homogenized and inefficient. Summary of the Invention

[0003] The purpose of this application is to at least address one of the aforementioned technical deficiencies, particularly the inability of existing rhythm generation methods to balance diversity and efficiency.

[0004] Firstly, this application provides a rhythm generation method, including:

[0005] Find target rhythmic material from the rhythm library that matches the structure of the target lyrics;

[0006] The target lyrics are divided into a first category and a second category according to the first proportion;

[0007] For any sentence belonging to the first category, find the first material sentence with the same order in the target rhythm material. Based on the difference between the number of basic units in the first material sentence and the number of text units in the sentence, synthesize the basic units and their rhythm information in the first material sentence so that the number of units in the first material sentence is equal to that in the sentence. Based on the rhythm information of each unit in the first material sentence, obtain the rhythm information of each text unit in the sentence in sequence. The basic units include text units and symbol units.

[0008] For any sentence belonging to the second category, find the second material sentence with the same order in the target rhythm material. Based on the difference between the number of basic units in the second material sentence and the number of text units in the sentence, add symbol units to the sentence so that the number of units in the second material sentence is equal to that in the sentence. Based on the rhythm information of each unit in the second material sentence, obtain the rhythm information of the corresponding text units of the sentence in sequence.

[0009] In one embodiment, before finding target rhythmic material that matches the target lyric structure from the rhythm library, the method further includes:

[0010] Determine whether the target lyrics conform to the preset sentence segmentation rules;

[0011] If so, then proceed with the step of finding the target rhythm material that matches the target lyric structure from the rhythm library;

[0012] If not, then the target lyrics are segmented and adjusted, and then the step of finding the target rhythm material that matches the structure of the target lyrics from the rhythm library is performed.

[0013] In one embodiment, determining whether the target lyrics conform to preset sentence segmentation rules includes:

[0014] If the number of sentences in the target lyrics is within the first range, and the number of text units in each sentence is within the second range, then the target lyrics are determined to conform to the preset sentence segmentation rules.

[0015] In one embodiment, the target lyrics are segmented and adjusted, including:

[0016] Sentences with fewer than the second range of text units in each clause of the target lyrics are identified as the first clauses to be adjusted, and sentences with more than the second range are identified as the second clauses to be adjusted.

[0017] For any first clause to be adjusted, if the number of text units in the clause obtained after merging the first clause to be adjusted with the adjacent clause is within the second range, then the first clause to be adjusted is merged with the adjacent clause.

[0018] For any second clause to be adjusted, the second clause to be adjusted is segmented into words. While retaining the original boundaries, a boundary is added at the interval of at least one word segmentation so that the number of text units in each segmented clause is within the second range.

[0019] In one embodiment, finding target rhythmic material that matches the target lyric structure from a rhythm library includes:

[0020] Determine the number of phrases within the target lyrics and perform matching in the rhythm library based on the number of phrases;

[0021] Select the target rhythm track from the matched rhythm tracks.

[0022] In one embodiment, determining the number of phrases within the target lyrics and matching them in a rhythm library based on the number of phrases further includes:

[0023] If the target lyrics have been segmented and the number of matched rhythmic materials is greater than the first threshold, then the step of selecting the target rhythmic material from the matched rhythmic materials is executed.

[0024] Otherwise, the target lyrics are merged, the merged target lyrics are re-sentenced, and the process of determining the number of sentences in the target lyrics and matching them in the rhythm library based on the number of sentences continues.

[0025] In one embodiment, the merged target lyrics are re-segmented, including:

[0026] If the target lyrics have sentences that meet the conditions for flexible sentence segmentation, the merged target lyrics are segmented into words, with the word segmentation as the smallest unit, and the merged target lyrics are segmented into sentences according to the preset sentence segmentation rules; the conditions for flexible sentence segmentation include that the difference between the number of text units in the sentence and the upper bound of the second range is greater than the second threshold.

[0027] Otherwise, the merged target lyrics are segmented into sentences using text units as the smallest unit and according to preset sentence segmentation rules.

[0028] Secondly, this application provides a rhythm generation device, comprising:

[0029] The matching module is used to find target rhythmic material that matches the structure of the target lyrics from the rhythm library;

[0030] The classification module is used to divide the sentences of the target lyrics into a first category and a second category according to a first ratio;

[0031] The first rhythm processing module is used to find the first material sentence with the same order in the target rhythm material for any sentence belonging to the first category. Based on the difference between the number of basic units in the first material sentence and the number of text units in the sentence, the basic units and their rhythm information in the first material sentence are synthesized so that the number of units in the first material sentence is equal to the number of units in the sentence. Based on the rhythm information of each unit in the first material sentence, the rhythm information of each text unit in the sentence is obtained in sequence. The basic units include text units and symbol units.

[0032] The second rhythm processing module is used to find a second material sentence with the same order in the target rhythm material for any sentence belonging to the second category. Based on the difference between the number of basic units in the second material sentence and the number of text units in the sentence, symbol units are added to the sentence so that the number of units in the second material sentence is equal to that in the sentence. Based on the rhythm information of each unit in the second material sentence, the rhythm information of the corresponding text units of the sentence is obtained in sequence.

[0033] Thirdly, this application provides a computer device including one or more processors and a memory storing computer-readable instructions. When the computer-readable instructions are executed by one or more processors, they perform the steps of the rhythm generation method in any of the above embodiments.

[0034] Fourthly, this application provides a storage medium storing computer-readable instructions, which, when executed by one or more processors, cause the one or more processors to perform the steps of the rhythm generation method in any of the above embodiments.

[0035] As can be seen from the above technical solutions, the embodiments of this application have the following advantages:

[0036] Based on the rhythm generation method in this embodiment, target rhythmic materials matching the structure of the target lyrics are first found in the rhythm library. Then, the target lyrics phrases are divided into a first category and a second category according to a specific first ratio. For phrases in the first category, a synthesis strategy is used to match the number of units in the first material phrase with that category of phrases. For phrases in the second category, a note unit addition strategy is used to match the number of units in the second material phrase with that category of phrases. Thus, the rhythmic information of each phrase in the target lyrics can be obtained using the rhythmic information of the material phrases. This scheme lays a good foundation for subsequent creation by selecting rhythmic materials that are suitable for the lyric structure. Furthermore, by classifying the phrases of the target lyrics and adopting different rhythm matching methods for different categories, the combination of two creative techniques ensures the diversity of rhythm generation, which helps to improve the quality and efficiency of music creation. Attached Figure Description

[0037] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0038] Figure 1 A flowchart illustrating a rhythm generation method provided in one embodiment of this application;

[0039] Figure 2 This is a flowchart illustrating the process of determining whether target lyrics conform to preset sentence segmentation rules in one embodiment of this application;

[0040] Figure 3 This is a flowchart illustrating the process of adjusting the sentence structure of target lyrics in one embodiment of this application;

[0041] Figure 4 This is an internal structural diagram of a computer device provided in one embodiment of this application. Detailed Implementation

[0042] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0043] This application provides a rhythm generation method; please refer to [link / reference]. Figure 1 This includes steps S102 to S108.

[0044] S102, find the target rhythm material that matches the target lyrics structure from the rhythm library.

[0045] It is understood that the rhythm library is a collection of materials with a large number of different rhythm patterns and structures, which are pre-collected, organized, and stored. These materials contain a rich variety of rhythmic combinations and can cover various music styles and beat characteristics. The target lyrics are the objects for generating rhythms in this embodiment. The target rhythm material is the rhythm material matched from the rhythm library according to the structure of the target lyrics. It matches the target lyrics in the selected structural features and contains both lyrical and rhythmic information. The structural features here can be one or more of the following: the number of clauses, the number of characters contained in each clause, etc.

[0046] To ensure the lyrics match the musical rhythm, rhythmic materials suitable for the lyrical structure need to be selected from existing rhythmic resources. Since different lyrical structures differ in rhyme, phrasing, and emotional expression—for example, some lyrics may have four phrases while others may have twelve—this inconsistency in the number of phrases makes it difficult to choose a suitable rhythm for the target lyrics. Therefore, the basis for selecting target rhythmic information is consistency with the structure of the target lyrics. In some embodiments, step S102 involves first determining the number of phrases in the target lyrics, matching them in a rhythmic library based on the number of phrases, and then selecting the target rhythmic material from the matched rhythmic materials. Matching can be done by directly selecting a rhythmic material with the same number of phrases as the target lyrics. In some embodiments designed to showcase complex creative techniques, multiple rhythmic materials whose sum of phrase count matches the number of phrases in the target lyrics can be considered as a single match. Alternatively, rhythmic materials with a greater number of phrases than the target lyrics can be trimmed, and the trimmed rhythmic material with the same number of phrases as the target lyrics can be considered as a single match.

[0047] S104, divide the sentences of the target lyrics into a first category and a second category according to the first ratio.

[0048] It's understandable that the first ratio is a classification ratio set based on the user's needs for creative style. The first and second categories are the result of dividing the target lyrics into phrases based on this ratio. Different categories differ in subsequent rhythm processing, and different rhythmic segments with different creative effects can be obtained by setting different first ratios. For example, assuming the first ratio is 3:2, and the target lyrics have 10 phrases, classifying all the phrases means dividing 6 phrases into the first category and 4 phrases into the second category. The first ratio only determines the number of phrases contained in the first and second categories. The specific selection of which phrases to include in which category can be random sampling or classification based on complex analyses such as semantics and paragraph structure.

[0049] S106, for any clause belonging to the first category, find the first material clause with the same order in the target rhythmic material. Based on the difference between the number of basic units in the first material clause and the number of text units in the clause, synthesize the basic units and their rhythmic information in the first material clause to make the number of units in the first material clause equal to the number of text units in the clause. Then, based on the rhythmic information of each unit in the first material clause, obtain the rhythmic information of each text unit in the clause. Basic units include text units and symbol units.

[0050] It can be understood that the first material phrase is the rhythmic segment in the target rhythmic material that corresponds in sequence to the phrase of the target lyrics belonging to the first category. For example, if the third phrase in the target lyrics belongs to the first category, its corresponding first material phrase is the third phrase in the target rhythmic material. Textual units (such as Chinese characters in lyrics) are the elements that constitute the target lyrics, while the elements that constitute the rhythmic material are collectively referred to as basic units, which include not only textual units but also symbolic units (such as rests, glissando notes, etc. in music).

[0051] The rhythm processing strategy adopted for the first category of phrases is synthesis. This means that when the number of basic units in the first phrase of the rhythmic material is inconsistent with the number of text units in the target lyric phrase, the basic units in the first phrase are synthesized to ensure that the phrase being processed has the same number of units as the first phrase (the synthesized first phrase includes both basic units and synthesized units), thus establishing a one-to-one correspondence between them. The rhythmic information of these merged basic units is also integrated. In the rhythmic material, each basic unit has corresponding rhythmic information. The beat and tempo of the rhythmic information are predefined; common beats include 2 / 4, 3 / 4, and 4 / 4, and tempo is generally expressed in beats per minute (BPM). The rhythmic information includes the duration of the basic unit, which is generally expressed in units of time, such as a 1 / 16 note. In some embodiments, the rhythmic information may also include whether the corresponding note of the basic unit is accented or unacceptable. Taking duration as an example, in this embodiment, merging the rhythmic information involves adding their durations to obtain the duration of the synthesized new unit. Furthermore, merging can involve combining a group of adjacent basic units, or merging two or more groups of adjacent basic units. For example, if a clause in the first category has 10 textual units, and the corresponding clause in the first source material has 15 basic units, it can be done by selecting 6 consecutive basic units from the first source material clause and merging them into one. Alternatively, it can be done by selecting 3 or 4 consecutive basic units from the first source material clause and merging them separately (these two groups of basic units have no overlap). The key is to ensure that the number of units in the first source material clause is equal to the number in the first category clause after merging.

[0052] In some embodiments, the basic units selected for merging can be chosen arbitrarily and randomly. However, in order to preserve the semantic factors considered during the rhythm creation of the first material clause, only text units can be selected for merging.

[0053] S108. For any sentence belonging to the second category, find a second material sentence in the target rhythm material that has the same order as the sentence. Based on the difference between the number of basic units in the second material sentence and the number of text units in the sentence, add symbol units to the sentence so that the number of units in the second material sentence is equal to that in the sentence. Based on the rhythm information of each unit in the second material sentence, obtain the rhythm information of the corresponding text units of the sentence in sequence.

[0054] It can be understood that the second material phrase is the rhythmic segment in the target rhythmic material that corresponds in sequence to the phrase of the target lyrics belonging to the second category. For example, if the fifth phrase in the target lyrics belongs to the second category, its corresponding second material phrase is the fifth phrase in the target rhythmic material.

[0055] The rhythmic processing strategy adopted for the second category of phrases involves adding symbolic units with special musical effects. For example, if the second material phrase has 10 basic units and the target lyric phrase has 8 textual units, then 2 symbolic units are added to the target lyric phrase to make both have the same number of units. Adding symbolic units to the second category of phrases achieves matching the number of units with the rhythmic material. This not only adheres to the overall rhythmic framework of the rhythmic material to a certain extent but also adds musical expression to the lyric phrases, satisfying the rhythmic processing needs of multi-layered music creation.

[0056] The specific added symbol units can be glissando notes and rests. Glissando notes are used to guide continuous pitch gliding during performance, smoothly transitioning from one note to another. In singing, glissando notes are especially often used when it is necessary to express emotions or add sound effects. For example, a singer can use a glissando to rise from a low note to a high note, or slide down from a high note to a low note, creating rich emotional layers. Rests, on the other hand, represent pauses, and their use can also add layers to the expression of a song. The specific number of rests and glissando notes added can be determined by a preset second ratio. The specific placement of rests and glissando notes can be freely set. In some embodiments, in order to better express the semantics of the lyrics, the phrase can be segmented, and it is stipulated that rests can only be added at the end of the segmented words. After steps S106 and S108, each phrase of the target lyrics generates corresponding rhythmic information, thereby completing the rhythm generation of the target lyrics.

[0057] Based on the rhythm generation method in this embodiment, target rhythmic materials matching the structure of the target lyrics are first found in the rhythm library. Then, the target lyrics phrases are divided into a first category and a second category according to a specific first ratio. For phrases in the first category, a synthesis strategy is used to match the number of units in the first material phrase with that category of phrases. For phrases in the second category, a note unit addition strategy is used to match the number of units in the second material phrase with that category of phrases. Thus, the rhythmic information of each phrase in the target lyrics can be obtained using the rhythmic information of the material phrases. This scheme lays a good foundation for subsequent creation by selecting rhythmic materials that are suitable for the lyric structure. Furthermore, by classifying the phrases of the target lyrics and adopting different rhythm matching methods for different categories, the combination of two creative techniques ensures the diversity of rhythm generation, which helps to improve the quality and efficiency of music creation.

[0058] In one embodiment, please refer to Figure 2 Before finding the target rhythm material that matches the target lyrics structure from the rhythm library, steps S202 to S206 are also included.

[0059] S202, determine whether the target lyrics conform to the preset sentence segmentation rules.

[0060] It's understandable that preset phrasing rules are pre-defined standards and specifications regarding the phrasing characteristics of lyrics. The rhythmic materials in the rhythm library all conform to these preset phrasing rules. Different rhythmic materials often have specific patterns in rhythmic sections, beat cycles, etc., and the corresponding lyric phrasing also needs to follow certain rules. If the target lyrics also conform to the preset phrasing rules, then when matching them with materials in the rhythm library, there is a structural matching basis between the target lyrics and the rhythmic materials. This allows for more efficient finding of suitable rhythmic templates; that is, the target lyrics can only match a sufficient number of rhythmic materials if they conform to the preset phrasing rules. Therefore, it is essential to first determine whether the target lyrics conform to the preset phrasing rules before officially starting the matching and processing.

[0061] In some embodiments, the preset sentence segmentation rules involve a quantitative definition of the number of sentences in the target lyrics and the number of text units in each sentence. Specifically, if the number of sentences in the target lyrics falls within a first range and the number of text units in each sentence falls within a second range, then the target lyrics are determined to conform to the preset sentence segmentation rules. For example, if the preset first range is 2-12 sentences and the second range is 4-16 text units per sentence, then when the target lyrics, after analysis, have 2-12 sentences and 4-16 text units per sentence, they conform to the preset sentence segmentation rules; otherwise, they do not.

[0062] S204, if so, then execute the step of finding the target rhythm material that matches the target lyric structure from the rhythm library.

[0063] It is understandable that when the target lyrics conform to the preset sentence segmentation rules, it means that the lyrics have the basic conditions for effective matching with the materials in the rhythm library in terms of structure. Therefore, we can directly proceed to the key step of finding target rhythm materials that match the structure of the target lyrics (i.e., step S102).

[0064] S206, If not, then adjust the sentence structure of the target lyrics and then perform the step of finding the target rhythm material that matches the structure of the target lyrics from the rhythm library.

[0065] It is understandable that when the target lyrics do not conform to the preset phrasing rules, it is necessary to adjust the phrasing. This operation aims to make the phrasing structure of the lyrics meet the requirements for effective matching with the rhythm library materials by means of re-dividing, combining or modifying the lyrics, and then proceed to the step of finding target rhythm materials that match the structure of the target lyrics (i.e., step S102).

[0066] In one embodiment, please refer to Figure 3 The target lyrics are segmented and adjusted, including steps S302 to S306.

[0067] S302, the sentences in each clause of the target lyrics with the number of text units less than the second range are identified as the first clauses to be adjusted, and the sentences with the number of text units greater than the second range are identified as the second clauses to be adjusted.

[0068] It can be understood that the first phrase to be adjusted refers to a phrase in the target lyrics whose number of text units is lower than the preset lower limit of the second range. The second phrase to be adjusted is a phrase whose number of text units is higher than the upper limit of the second range. In other words, the first phrase to be adjusted is a short phrase in the target lyrics, and this embodiment will process it by merging it with adjacent phrases. The second phrase to be adjusted is a long phrase in the target lyrics, and this embodiment will process it by splitting it.

[0069] S304, for any first clause to be adjusted, if the number of text units in the clause obtained after merging the first clause to be adjusted with the adjacent clause is within the second range, then the first clause to be adjusted is merged with the adjacent clause.

[0070] It's understandable that merging the first clause to be adjusted with an adjacent clause is a way to adjust the structure of the lyrics. The purpose is to integrate clauses with fewer text units with adjacent clauses, ensuring that the number of text units in the merged clause falls within a predetermined reasonable range, thereby improving the overall structure of the lyrics' adaptability to rhythmic matching. From the perspective of the synergy between musical rhythm and lyrics, shorter clauses often cannot independently carry complete rhythmic units. Merging them with adjacent clauses can create structural units that better conform to rhythmic patterns without altering the overall semantic coherence of the lyrics.

[0071] When merging, since there may be adjacent clauses on both sides of the first clause to be adjusted, there may be a situation where the number of clauses after merging with one of them is too long. Therefore, it is necessary to first determine the sum of the number of text units of the first clause to be adjusted and the adjacent clauses, and select the adjacent clauses that can ensure that the sum of the number of text units is within the second range to be merged.

[0072] S306, for any second clause to be adjusted, the second clause to be adjusted is segmented into words. While retaining the original boundaries, a boundary is added at the interval of at least one word segmentation so that the number of text units in each segmented clause is within the second range.

[0073] It's understandable that segmenting the second clause to be adjusted and adding boundaries is a method for adjusting clauses with an excessive number of text units. By segmenting and adding boundaries at appropriate positions, the originally long clause is divided into multiple shorter clauses, ensuring that the number of text units in each new clause falls within a preset range to suit the musical rhythm. This step retains the original boundaries in each clause, but adds one or more new boundaries to the second clause to be adjusted, dividing the original long clause into two or more short clauses. The added boundaries need to consider the original semantics, using phrases as the smallest unit of segmentation. That is, no boundaries should be placed between phrases composed of multiple text units; new boundaries should be placed at the end of the phrase. This adjustment method maintains the overall structure of the original lyrics by preserving the boundaries in the original target lyrics, and reduces the semantic impact on the lyrics by adding boundaries between segmentation intervals.

[0074] In one embodiment, determining the number of phrases within the target lyrics and matching them in a rhythm library based on the number of phrases further includes: if the target lyrics have been segmented and the number of matched rhythmic materials is greater than a first threshold, then performing the step of selecting a target rhythmic material from the matched rhythmic materials. Otherwise, the target lyrics are merged, the merged target lyrics are re-segmented, and the step of determining the number of phrases within the target lyrics and matching them in the rhythm library based on the number of phrases continues.

[0075] It is understandable that the first threshold is a pre-set lower limit used to measure whether the number of matched rhythmic materials is sufficient to meet the needs of rhythm generation. When matching in the rhythm library based on the number of phrases in the target lyrics, different numbers of matching results may appear. When the number of matched rhythmic materials is too small or even fails to reach a suitable number, it is likely due to poor compatibility between the current phrasing of the lyrics and the materials in the rhythm library. In this case, merging and re-segmenting the target lyrics helps to change the lyric structure, making it more likely to find suitable rhythmic materials, thus ensuring that music creation can proceed smoothly according to the requirement of good rhythm and lyrics matching. Therefore, if the target song has been segmented and the number of matched rhythmic materials is greater than the first threshold, step S102 can be executed to find the target rhythmic material from the multiple matched results. However, if the target lyrics have not been segmented (e.g., the entire target lyrics lacks separators), or the number of matched rhythmic materials is too small, it is necessary to merge the target lyrics into a complete section, re-segment the merged target lyrics, determine the number of phrases based on the re-segmented target lyrics, and continue the process of matching in the rhythm library based on the number of phrases.

[0076] In one embodiment, the merged target lyrics are re-sentenced, including: if the target lyrics contain sentences that satisfy the flexible sentence segmentation condition, the merged target lyrics are segmented into words, with each word as the smallest unit, and then segmented into sentences according to a preset sentence segmentation rule. The flexible sentence segmentation condition includes that the difference between the number of text units within a sentence and the upper bound of a second range is greater than a second threshold. Otherwise, the merged target lyrics are segmented into sentences with each text unit as the smallest unit, according to the preset sentence segmentation rule.

[0077] It is understandable that the flexible sentence segmentation condition is a basis for determining whether a special method is needed to segment the merged target lyrics. The second threshold involved is a predetermined numerical limit, which is measured by comparing the difference between the number of text units in the segment and the upper limit of the preset second range. If the difference is greater than the second threshold, the flexible sentence segmentation condition is considered to be met.

[0078] For cases meeting the conditions for flexible sentence segmentation, sentence segmentation is performed with the goal of balancing semantics and music theory. Specifically, meeting the conditions for flexible sentence segmentation means that the target lyrics contain relatively long and complex sentences. If sentence segmentation is performed using conventional text units as the smallest unit, it cannot adequately meet the requirements of rhythmic adaptation, semantic expression, and rhyme coordination. By segmenting sentences using word segments as the smallest unit, it is necessary to ensure that, in addition to conforming to the preset sentence segmentation rules, the boundary of the added sentence segment must be located at the end of the word segment, not inside the word segment. This allows for reasonable division based on more semantically related units such as words and phrases, making the sentence structure more flexible and reasonable. If the target lyrics are not segmented, it can be considered as containing only one very long sentence, or it can be considered as meeting the conditions for flexible sentence segmentation, and the sentence segmentation method described in this paragraph should be used.

[0079] For cases where the conditions for flexible phrasing are not met, phrasing is performed with the goal of conforming to music theory. Specifically, not meeting the conditions for flexible phrasing means that the target lyrics do not contain relatively long and complex phrases. If word segmentation is still performed as the smallest unit, it may result in phrases that are too short, making it difficult to conform to the preset phrasing rules, or disrupting the continuity at the music theory level. Therefore, in this case, phrasing is performed with text units as the smallest unit. This means that, while conforming to the preset phrasing rules, the added phrase boundaries are not required to be located at the end of the word segment; that is, the phrase boundaries can be located inside the word segment. Phrasing is performed solely with the goal of conforming to music theory in terms of phrase structure.

[0080] After re-segmenting, the target lyrics of the re-segmented lyrics need to be matched against the rhythm library. If the number of matched rhythm materials is still insufficient, the sentence segmentation needs to be repeated until the number of matched rhythm materials is sufficient.

[0081] This application provides a rhythm generation device, including a matching module, a classification module, a first rhythm processing module, and a second rhythm processing module. The matching module is used to find target rhythmic material that matches the structure of target lyrics from a rhythm library. The classification module is used to divide the phrases of the target lyrics into a first category and a second category according to a first ratio. The first rhythm processing module is used to, for any phrase belonging to the first category, find a first material phrase in the target rhythmic material that has the same order as that phrase, and synthesize the basic units and their rhythmic information in the first material phrase based on the difference between the number of basic units in the first material phrase and the number of text units in that phrase, so that the number of units in the first material phrase is equal to the number of units in that phrase. The rhythmic information of each text unit in the phrase is then obtained sequentially based on the rhythmic information of each unit in the first material phrase. The basic units include text units and symbol units. The second rhythm processing module is used to find a second material sentence with the same order in the target rhythm material for any sentence belonging to the second category. Based on the difference between the number of basic units in the second material sentence and the number of text units in the sentence, symbol units are added to the sentence so that the number of units in the second material sentence is equal to that in the sentence. Based on the rhythm information of each unit in the second material sentence, the rhythm information of the corresponding text units of the sentence is obtained in sequence.

[0082] Specific limitations regarding the rhythm generation device can be found in the limitations of the rhythm generation method described above, and will not be repeated here. Each module in the aforementioned rhythm generation device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device in hardware form, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module. It should be noted that the module division in this embodiment is illustrative and only represents a logical functional division; other division methods may be used in actual implementation.

[0083] This application provides a computer device including one or more processors and a memory storing computer-readable instructions. When executed by one or more processors, the computer-readable instructions perform the steps of the rhythm generation method in any of the above embodiments.

[0084] Indicatively, such as Figure 4 As shown, Figure 4 This is a schematic diagram of the internal structure of a computer device provided in an embodiment of this application. (Refer to...) Figure 4The computer device 400 includes a processing component 402, which further includes one or more processors, and memory resources represented by memory 401 for storing instructions, such as application programs, that can be executed by the processing component 402. The application programs stored in memory 401 may include one or more modules, each corresponding to a set of instructions. Furthermore, the processing component 402 is configured to execute instructions to perform the steps of the rhythm generation method of any of the above embodiments.

[0085] The computer device 400 may also include a power supply component 403 configured to perform power management of the computer device 400, a wired or wireless model interface 404 configured to connect the computer device 400 to a model, and an input / output (I / O) interface 405.

[0086] This application provides a storage medium storing computer-readable instructions, which, when executed by one or more processors, cause the one or more processors to perform the steps of the rhythm generation method in any of the above embodiments.

[0087] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0088] The various embodiments in this specification are described in a progressive manner. Each embodiment focuses on the differences from other embodiments. The various embodiments can be combined as needed, and the same or similar parts can be referred to each other.

[0089] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A rhythm generation method, characterized in that, include: Find target rhythmic material from the rhythm library that matches the structure of the target lyrics; The target lyrics are divided into a first category and a second category according to a first ratio; For any sentence belonging to the first category, a first material sentence with the same order as the sentence is found in the target rhythm material. Based on the difference between the number of basic units in the first material sentence and the number of text units in the sentence, the basic units and their rhythm information in the first material sentence are synthesized so that the number of units in the first material sentence is equal to the number of units in the sentence. The rhythm information of each text unit in the sentence is obtained sequentially based on the rhythm information of each unit in the first material sentence. The basic unit includes the text unit and the symbol unit. For any sentence belonging to the second category, find a second material sentence in the target rhythm material that has the same order as the sentence. Based on the difference between the number of basic units in the second material sentence and the number of text units in the sentence, add the symbol unit to the sentence so that the number of units in the second material sentence is equal to the number of units in the sentence. Based on the rhythm information of each unit in the second material sentence, obtain the rhythm information of the text unit corresponding to the sentence in sequence.

2. The rhythm generation method according to claim 1, characterized in that, Before finding the target rhythm material that matches the target lyric structure from the rhythm library, the process also includes: Determine whether the target lyrics conform to the preset sentence segmentation rules; If so, then perform the step of finding the target rhythm material that matches the target lyric structure from the rhythm library; If not, then the target lyrics are segmented and adjusted, and then the step of finding the target rhythm material that matches the structure of the target lyrics from the rhythm library is executed.

3. The rhythm generation method according to claim 2, characterized in that, The determination of whether the target lyrics conform to the preset sentence segmentation rules includes: If the number of sentences in the target lyrics is within a first range, and the number of text units in each sentence is within a second range, then the target lyrics are determined to conform to the preset sentence segmentation rules.

4. The rhythm generation method according to claim 3, characterized in that, The phrase-by-phrase adjustment of the target lyrics includes: Sentences in which the number of text units in each clause of the target lyrics is less than the second range are identified as the first clauses to be adjusted, and sentences that are greater than the second range are identified as the second clauses to be adjusted. For any of the first clauses to be adjusted, if the number of text units in the clause obtained after merging the first clause to be adjusted with the adjacent clauses is within the second range, then the first clause to be adjusted is merged with the adjacent clauses. For any of the second clauses to be adjusted, the second clauses to be adjusted are segmented into words. While retaining the original boundaries, boundaries are added at the intervals of at least one segmentation, so that the number of text units in each segmented clause is within the second range.

5. The rhythm generation method according to claim 3, characterized in that, The process of finding target rhythmic material that matches the structure of the target lyrics from the rhythm library includes: Determine the number of phrases within the target lyrics, and perform matching in the rhythm library based on the number of phrases; Select the target rhythm track from the matched rhythm tracks.

6. The rhythm generation method according to claim 5, characterized in that, The step of determining the number of phrases within the target lyrics and matching them in the rhythm library based on the number of phrases further includes: If the target lyrics have been segmented into phrases and the number of matched rhythmic materials is greater than a first threshold, then the step of selecting the target rhythmic material from the matched rhythmic materials is executed. Otherwise, the target lyrics are merged, the merged target lyrics are re-sentenced, and the steps of determining the number of sentences in the target lyrics and matching them in the rhythm library according to the number of sentences are returned to continue the process.

7. The rhythm generation method according to claim 6, characterized in that, The process of re-segmenting the merged target lyrics includes: If the target lyrics contain sentences that satisfy the flexible sentence segmentation conditions, the merged target lyrics are segmented into words, with each word segmentation being the smallest unit, and the merged target lyrics are segmented into sentences according to the preset sentence segmentation rules; the flexible sentence segmentation conditions include the difference between the number of text units in the sentence and the upper bound of the second range being greater than the second threshold. Otherwise, the target lyrics are segmented into sentences using the text unit as the smallest unit and according to the preset sentence segmentation rules.

8. A rhythm generation device, characterized in that, include: The matching module is used to find target rhythmic material that matches the structure of the target lyrics from the rhythm library; A classification module is used to divide the sentences of the target lyrics into a first category and a second category according to a first ratio; The first rhythm processing module is used to, for any sentence belonging to the first category, find a first material sentence in the target rhythm material that has the same order as the sentence, and synthesize the basic units and their rhythm information in the first material sentence based on the difference between the number of basic units in the first material sentence and the number of text units in the sentence, so that the number of units in the first material sentence is equal to the number of units in the sentence. The rhythm information of each text unit in the sentence is obtained sequentially based on the rhythm information of each unit in the first material sentence. The basic units include text units and symbol units. The second rhythm processing module is used to find a second material sentence with the same order as the sentence in the target rhythm material for any sentence belonging to the second category, and add the symbol unit to the sentence according to the difference between the number of basic units in the second material sentence and the number of text units in the sentence, so that the number of units in the second material sentence is equal to the number of units in the sentence. The rhythm information of the text units corresponding to the sentence is obtained sequentially according to the rhythm information of each unit in the second material sentence.

9. A computer device, characterized in that, It includes one or more processors and a memory storing computer-readable instructions that, when executed by the one or more processors, perform the steps of the rhythm generation method as described in any one of claims 1-7.

10. A storage medium, characterized in that, The storage medium stores computer-readable instructions that, when executed by one or more processors, cause the one or more processors to perform the steps of the rhythm generation method as described in any one of claims 1-7.

Citation Information

Patent Citations

  • Automatic composition device

    JP1997062263A

  • Lyric writing and composing system and program

    JP2002278549A