A method and apparatus for setting dance moves according to music in a game
By acquiring users' voice resources and mapping them to game dance moves to generate corresponding relationships, the problem of users being unable to customize music and dance in existing technologies is solved, realizing the custom binding of dance moves and music and meeting users' customization needs.
Patent Information
- Application Number
- CN202211514926.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-28
- Publication Date
- 2025-11-18
- Estimated Expiration
- 2042-11-28
AI Technical Summary
In the current technology, music and dance games cannot meet users' needs for custom music and dance. The design of dance moves has a high technical threshold, and users cannot set dance moves on their own.
By acquiring user-generated sound resources, mapping them to multiple game dance moves and binding them, a corresponding relationship is generated. Based on the sound resources provided by the user, the dance moves are retrieved and screen recording results are generated, thus realizing the custom binding of dance moves and music.
It enables the generation of user-defined dance moves, meets users' needs for custom music and dance, and improves the freedom to expand user-defined dance moves.
Smart Images

Figure CN115738273B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of sound action simulation, in particular to a method for setting dance actions according to music in a game. The present application also relates to an apparatus for setting dance actions according to music in a game. BACKGROUND
[0002] Music and dance as a play appear in many games, adding game interest and appeal. But the two are often in a "separated state", such as dance games: music as background music, players only with other equipment to drive dance action. Music games: players only drive music rhythm to complete the game play.
[0003] In the prior art, music and dance games, when editing a music and dance program, usually first select a music, according to the rhythm of the music to arrange dance, according to the dance arrangement to design and generate animation of dance action, then the music and dance are one-to-one corresponding, generating music and dance program.
[0004] However, this high technical threshold design cannot meet the user's demand for customizing music and dance. SUMMARY
[0005] In order to solve one or more problems in the background art, the present application provides a method for setting dance actions according to music in a game. The present application also relates to an apparatus for setting dance actions according to music in a game.
[0006] The present application provides a method for setting dance actions according to music in a game, comprising:
[0007] Obtaining a sound resource generated by a user through a music plug-in;
[0008] Mapping one or more syllables in the sound resource to a dance action in a plurality of game dance actions and binding to generate a corresponding relationship between the sound resource and the dance action;
[0009] According to the sound resource provided by the user, based on the corresponding relationship, calling the dance action corresponding to the sound resource;
[0010] Generating a screen recording result according to the sound resource and the dance action.
[0011] Optionally, the sound resource includes music, lyrics and sound effects.
[0012] Optionally, generating a corresponding relationship between the sound resource and the dance action comprises:
[0013] Extracting syllables of the sound resource and adding labels to the syllables;
[0014] According to the tag, a mapping table is established with a tag of each preset dance action;
[0015] According to the mapping table, a mapping relationship between the phonemes and the dance actions is generated.
[0016] Optionally, the mapping table is added to a cache when a program is started.
[0017] Optionally, the phonemes are provided with a time threshold, if a time length of the phonemes exceeds the threshold, the phonemes are divided into one or more phoneme segments with the threshold time length, and each phoneme segment is mapped to a different dance action.
[0018] The application further provides a device for setting dance actions according to music in a game, comprising:
[0019] An acquisition module is configured to acquire sound resources generated by a user through a music plug-in;
[0020] A mapping module is configured to map one or more phonemes in the sound resources to one dance action in a plurality of game dance actions and bind them to generate a corresponding relationship between the sound resources and the dance action;
[0021] A calling module is configured to call the dance action corresponding to the sound resources based on the corresponding relationship according to the sound resources provided by the user;
[0022] A screen recording module is configured to generate a screen recording result according to the sound resources and the dance action.
[0023] Optionally, the sound resources include music, lyrics and sound effects.
[0024] Optionally, the mapping module generates the corresponding relationship between the sound resources and the dance action, comprising:
[0025] A tag unit is configured to extract phonemes of the sound resources and add tags to the phonemes;
[0026] A corresponding unit is configured to establish a mapping table according to the tags and tags of each preset dance action;
[0027] A generating unit is configured to generate a mapping relationship between the phonemes and the dance actions according to the mapping table.
[0028] Optionally, the mapping table is added to a cache when a program is started.
[0029] Optionally, the syllable is provided with a time length threshold, if the syllable time length exceeds the threshold, the syllable is divided into one or more syllable segments of the threshold time length, and each syllable segment is respectively mapped to a different dance action.
[0030] The application has the following advantages over the prior art:
[0031] The application provides a method for setting dance actions according to music in a game, comprising: obtaining a sound resource generated by a user through a music plug-in; mapping one or more syllables in the sound resource to a dance action in a plurality of game dance actions and binding the one or more syllables to the dance action, to generate a corresponding relationship between the sound resource and the dance action; based on the corresponding relationship, calling the dance action corresponding to the sound resource according to the sound resource provided by the user; and generating a screen recording result according to the sound resource and the dance action. The application realizes the customizable generation of dance actions by designing the dance actions and binding the dance actions to music, thereby meeting the demand of users for customizing music dance. BRIEF DESCRIPTION OF DRAWINGS
[0032] Figure 1 is a flowchart of a method for setting dance actions according to music in a game.
[0033] Figure 2 is a schematic diagram.
[0034] Figure 3 is a schematic diagram of a device for setting dance actions according to music in a game. DETAILED DESCRIPTION
[0035] The following is an example of a detailed implementation process of the technical solution claimed in the application, but the application can also be implemented in other ways different from the description, and those skilled in the art can implement the application by using different technical means under the guidance of the concept of the application, so the application is not limited by the following specific examples.
[0036] The application provides a method for setting dance actions according to music in a game, comprising: obtaining a sound resource generated by a user through a music plug-in; mapping one or more syllables in the sound resource to a dance action in a plurality of game dance actions and binding the one or more syllables to the dance action, to generate a corresponding relationship between the sound resource and the dance action; based on the corresponding relationship, calling the dance action corresponding to the sound resource according to the sound resource provided by the user; and generating a screen recording result according to the sound resource and the dance action. The application realizes the customizable generation of dance actions by designing the dance actions and binding the dance actions to music, thereby meeting the demand of users for customizing music dance.
[0037] Figure 1 is a game according to the music set dance action flow chart in the application.
[0038] Please refer to Figure 1 S101 to obtain the user through the music plug-in generated sound resources;
[0039] Specifically, the current voltage information generated by the music plug-in can be recorded to record the sound, and after recording is completed, the sound resource is obtained.
[0040] In the application, the sound resource can also be obtained by playing an instrument through a microphone. Based on this, the music plug-in itself can generate sound and sound effects to provide sound resource acquisition, and can also record the sound collected by the microphone to provide sound resource collection. In addition, the collected sound data can be directly imported to realize sound resource collection.
[0041] Specifically, based on the above description, the sound resource of the application can be any sound segment with rhythm, such as music, special effects, singing, and naturally generated sound. However, various sound types can be selected in specific actual use cases to determine a sound resource range. For example, in a music dance game, the sound resource can be a song or pure music, but not natural sound.
[0042] During the collection of the sound resource, the sound resource can be edited to make the notes of the sound resource more standard, and the sound resource can also be segmented, deleted, syllable adjusted, and other various edited to finally form the sound resource of the application.
[0043] After obtaining the sound resource, the sound resource is stored. The storage of the sound resource in the application has a fixed length, so when the length of the sound resource is insufficient, multiple sound resources can be spliced, otherwise segmented and stored.
[0044] The fixed length can be generated according to user customization. The fixed length means that the length of each music segment is fixed, not that the length of each music segment is the same. The fixed length can be understood as the beat length of a determined song. Based on the fixed length, the syllable of the music can be directly extracted without the need for syllable recognition, which speeds up the processing speed of the application.
[0045] Please refer to Figure 1As shown, S102 maps and binds one or more syllables in the sound resource to one dance action in a plurality of game dance actions, to generate a corresponding relationship between the sound resource and the dance action.
[0046] The sound resource has a plurality of beats, each of which can uniquely correspond to a dance action. Specifically, the beat is mapped to a specific dance action, and one dance action can correspond to a plurality of beats.
[0047] The dance action has a plurality of, stored in a preset dance action library. The dance action is preset, and each dance action is provided with a connector and a specific connector, the connector can point to any other dance action, and the specific connector points to one or more specified dance actions.
[0048] Figure 2 is the sound dance corresponding relationship mapping flowchart in the application.
[0049] Please refer to Figure 2 As shown, S201 extracts the syllable of the sound resource, and adds a label to the syllable;
[0050] S202 establishes a mapping table according to the label and the label of each preset dance action; S203 generates the mapping relationship between the syllable and the dance action according to the mapping table.
[0051] Specifically, in the application, the mapping of the beat to the dance action can be described by the following formula:
[0052] S i →W j , then S i+1 →W j ; i = 1, 2, …, n; j = 1, 2, …, m
[0053] S i →W j , then S i+1 →W j+z , i ∈ T, T ∈ (1, 2, 3, …, n)
[0054] Where, let S i be the beat, i or j be the serial number, W j be the dance action, and z be a preset constant.
[0055] The above expression details the mapping method of each syllable in the application. Based on this, a label B is added to each sound resource, and when indicating the mapping relationship, only the labels B, i, j and z need to be determined to determine the mapping relationship.
[0056] Therefore, the mapping relationship in the step S202 is represented as follows:
[0057] B(i, j, z)
[0058] When the z is 0, the z is defined as non-existent. Based on the mapping relationship, a mapping table is established and stored, and the mapping operation is completed.
[0059] As shown in Figure 1 According to the sound resource provided by the user, the corresponding dance action is retrieved based on the corresponding relationship.
[0060] After the mapping relationship is set, the dance action can be read based on the sound resource according to the mapping relationship.
[0061] Specifically, after reading a sound resource, the dance action is obtained based on the syllable associated dance action of the sound resource, and the dance action is corrected according to the duration of the syllable.
[0062] In this application, the dance action is a complete action, but when the syllable and the dance action are mapped, the dance action can be cut according to the duration of the syllable to obtain a dance action with the same duration as the syllable.
[0063] Specifically, the mapping relationship in this application is realized by a mapping table. The mapping table is added to the cache when the program is started, and can be freely read. When a sound resource is read, the dance action and the action sequence of the sound resource are first determined from the mapping standard, and then the dance action is corrected and spliced based on the syllable duration of the sound resource to generate dance.
[0064] Preferably, the syllable is provided with a duration threshold, and if the syllable duration exceeds the threshold, the syllable is divided into one or more syllable segments with the threshold duration, and each syllable segment is mapped to a different dance action.
[0065] Finally, the sound resource and the dance are synthesized to generate sound dance action data.
[0066] As shown in 1, S104 generates a screen recording result according to the sound resource and the dance action.
[0067] Finally, the sound dance action is generated to generate a screen recording result and is stored.
[0068] In the present application, the sound dance action is based on each different user terminal, according to the user selected fixed length, generate different dance action. Therefore, the present application can greatly improve the user-defined dance action of the expansion of freedom, meet the needs of users.
[0069] The present application also provides a game according to the music set dance action device, comprising: acquisition module 301, mapping module 302, calling module 303 and screen recording module 304.
[0070] Please refer to Figure 3 The acquisition module 301, for obtaining the user through the music plug-in generated sound resources;
[0071] Specifically, the current voltage information generated by the music plug-in can be recorded to record the sound, and after recording, the sound resource is obtained.
[0072] In the present application, the sound resource can also be obtained by playing the instrument through the microphone. Based on this, the music plug-in can generate sound and sound effects to provide sound resource acquisition, and can also record the sound collected by the microphone to provide sound resource acquisition. In addition, the sound data collected can be directly imported to realize the collection of sound resources.
[0073] Specifically, based on the above description, the sound resource of the present application can be any sound segment with rhythm, such as music, special effects, singing and natural sound, etc., but a variety of sound types can be selected in the specific actual use situation to determine a sound resource range. For example, in the music dance game, the sound resource can be a song, pure music, but does not contain natural sound.
[0074] In the process of collecting the sound resource, the sound resource can be edited to make the notes of the sound resource more standard, and the sound resource can also be segmented, deleted, syllable adjusted and edited in various ways, and finally form the sound resource of the present application.
[0075] After obtaining the sound resource, the sound resource is stored, and the storage of the sound resource in the present application is of fixed length, so when the length of the sound resource is insufficient, multiple sound resources can be spliced, otherwise segmented and stored.
[0076] The fixed length can be generated according to user self-definition, and the fixed length refers to that the length of each music segment is fixed, and does not refer to that the length of each music segment is the same. The fixed length can be understood as the beat length of a determined music piece. Based on the fixed length, the syllable of the music can be directly extracted, without the need of identifying the syllable, so that the processing speed of the present application is accelerated.
[0077] Please refer to Figure 3 The mapping module 302 is configured to map and bind one or more syllables in the sound resource to one dance action in a plurality of game dance actions, to generate a corresponding relationship between the sound resource and the dance action.
[0078] The sound resource has a plurality of beats, and each beat can uniquely correspond to one dance action. Specifically, the beat is mapped to a specific dance action, and one dance action can correspond to a plurality of beats.
[0079] The dance action has a plurality of dance actions stored in a preset dance action library. The dance action is preset, and each dance action is provided with a connection symbol and a specific connection symbol. The connection symbol can point to any other dance action, and the specific connection symbol points to one or more specified dance actions.
[0080] Figure 2 The figure is a flowchart of the mapping of the sound-dance corresponding relationship in the present application.
[0081] Please refer to Figure 2 S201 extracts the syllable of the sound resource, and adds a label to the syllable;
[0082] S202 establishes a mapping table according to the label and the label of each preset dance action; and S203 generates a mapping relationship between the syllable and the dance action according to the mapping table.
[0083] Specifically, in the present application, the mapping of the beat to the dance action can be described by the following formula:
[0084] S i →W j , then S i+1 →W j ; i = 1, 2, …, n; j = 1, 2, …, m
[0085] S i →W j , then S i+1 →W j+Z , i ∈ T, T ∈ (1, 2, 3, …, n)
[0086] Where, let S iis the beat, i or j is the serial number, W j is the dance action, z is a preset constant.
[0087] The above expression details the mapping manner of each syllable in the present application. Based on this, a mark B is added to each sound resource, and when indicating the mapping relationship, only the marks B, i, j and z need to be determined to determine the mapping relationship.
[0088] Therefore, the mapping relationship in step S202 is represented as follows:
[0089] B(i, j, z)
[0090] When z is 0, z is defined as non-existent. Based on the above mapping relationship, a mapping table is established for storage, and the mapping operation is completed.
[0091] Please refer to Figure 3 The calling module 303 is used to call the dance action corresponding to the sound resource based on the correspondence relationship according to the sound resource provided by the user.
[0092] After the mapping relationship is set, the dance action can be read based on the sound resource based on the mapping relationship.
[0093] Specifically, after reading a sound resource, the dance action is obtained based on the syllable-associated dance action of the sound resource, and the dance action is corrected according to the duration of the syllable.
[0094] In the present application, the dance action is a complete action, but when mapping the syllable and the dance action, the dance action can be cut according to the duration of the syllable to obtain a dance action with the same duration as the syllable.
[0095] Specifically, the mapping relationship in the present application is realized through a mapping table. The mapping table is added to the cache when the program is started and can be freely read. When a sound resource is read, the dance action and the action sequence of the sound resource are first determined from the mapping standard, and then the dance action is corrected and spliced based on the syllable duration of the sound resource to generate a dance.
[0096] Preferably, the syllable is provided with a duration threshold, and if the syllable duration exceeds the threshold, the syllable is divided into one or more syllable segments with the threshold duration, and each syllable segment is mapped to a different dance action.
[0097] Finally, the sound resource and the dance are synthesized to generate sound dance action data.
[0098] Referring to 3, the screen recording module 304 is configured to generate a screen recording result according to the sound resource and the dance action.
[0099] Finally, the screen recording result of the sound dance action is stored.
[0100] In the present application, the sound dance action is generated according to a fixed length selected by a user based on each different user terminal, so that the present application can greatly improve the expansion freedom of the user-defined dance action and meet the needs of the user.
[0101] The above only describes the preferred embodiments of the present application and is not intended to limit the present application. Various modifications and changes can be made by those skilled in the art within the spirit and principle of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A method for setting dance movements according to music in a game, characterized in that, include: Acquire sound resources generated by users through music plugins; Map one or more syllables from the sound resource to one dance move from multiple game dance moves and bind them together to generate a correspondence between the sound resource and the dance move; Extract syllables from the sound resources and add a label to each syllable; based on the labels, establish a mapping table with the labels of multiple pre-set game dance moves to generate a mapping relationship between syllables and dance moves, wherein the mapping table is loaded into the cache when the program starts; The syllable is set with a duration threshold. If the duration of a syllable exceeds the threshold, the syllable is divided into one or more syllable segments of the threshold duration, and each syllable segment is mapped to a different dance movement. The mapping rule for syllables is defined using a mathematical formula, which is: S i →W j Then S i+1 →W j ;i=1,2,…,n;j=1,2,…,m; S i →W j Then S i+1 →W j+Z , i∈T, T∈(1, 2, 3..., n); Where, let S i It is the beat, i or j is the sequence number, W j It refers to a dance move, where z is a preset constant. Based on the sound resources provided by the user, retrieve the dance moves corresponding to the sound resources according to the correspondence; The screen recording result is generated based on the audio resources and the dance movements.
2. The method for setting dance movements according to music in a game according to claim 1, characterized in that, The sound resources include: music, lyrics, and sound effects.
3. A device for setting dance movements according to music in a game, characterized in that, include: The acquisition module is used to acquire sound resources generated by the user through music plugins; The mapping module is used to map one or more syllables of the sound resource to a dance move of multiple game dance moves and bind them, thereby generating a correspondence between the sound resource and the dance move; Extract syllables from the sound resources and add a label to each syllable; based on the labels, establish a mapping table with the labels of multiple pre-set game dance moves to generate a mapping relationship between syllables and dance moves, wherein the mapping table is loaded into the cache when the program starts; The syllable is set with a duration threshold. If the duration of a syllable exceeds the threshold, the syllable is divided into one or more syllable segments of the threshold duration, and each syllable segment is mapped to a different dance movement. The calling module is used to retrieve the dance movement corresponding to the sound resource based on the correspondence provided by the user. The screen recording module is used to generate screen recording results based on the audio resources and the dance movements.
4. The device for setting dance movements according to music in a game according to claim 3, characterized in that, The sound resources include: music, lyrics, and sound effects.
5. The device for setting dance movements according to music in a game according to claim 3, characterized in that, The mapping module generates the correspondence between the sound resources and the dance movements, including: The tagging unit is used to extract the syllables of the sound resource and add tags to the syllables; The corresponding unit is used to establish a mapping table with the pre-set labels for each of the dance movements based on the labels; The generation unit is used to generate a mapping relationship between the syllables and the dance movements based on the mapping table.
Citation Information
Patent Citations
Sound source library acquisition and generation system
CN111653255A
Resource synthesis method and device, equipment and storage medium
CN114756706A
Dance example forming device and program
JP2005235039A