A method, storage medium and terminal for generating music game spectrum
By obtaining the accompaniment data of the song file, determining the beat information and performing Fourier calculations to generate music game scores, the problems of complex and high threshold for spectral production in the existing technology are solved, and the automatic generation of high playability scores is achieved to improve user experience.
Patent Information
- Application Number
- CN202210815050.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-12
- Publication Date
- 2025-08-08
- Estimated Expiration
- 2042-07-12
AI Technical Summary
The existing music game scores are complex and have high thresholds, low production efficiency, and it is difficult to automatically generate highly playable scores.
By obtaining the accompaniment data of the song file, determining the beat information, performing Fourier calculations to obtain audio features, determining the probability and type of spectrum event occurrence, and using the preset spectrum generation model to generate the music game spectrum.
It realizes automatic generation of music game scores without manual intervention, enriching user listening experience and improving user satisfaction.
Smart Images

Figure CN115177956B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method for generating a music game score, a storage medium, and a terminal. Background Art
[0002] Currently, users can play games by performing actions while listening to music, earning points based on their accuracy. Music game charts are files that describe the events and associated properties of a series of interactive actions within this type of music game. However, existing game charts require manual intervention, making the production process complex and time-consuming. For new songs, manual generation is required, and creating a highly playable chart requires users to have a certain musical foundation. This makes the production of music game charts difficult, challenging, and inefficient. Summary of the Invention
[0003] The purpose of this application is to provide a method for generating a music game score, a computer-readable storage medium and a terminal, which can generate a music game score that meets the difficulty requirements of the user without human intervention, thereby enriching the user's listening experience.
[0004] To solve the above technical problems, this application provides a method for generating a music game score. The specific technical solution is as follows:
[0005] Acquire a song file and extract accompaniment data, and determine beat information in the accompaniment data;
[0006] Assigning a time point to each beat in the beat information to obtain an initial time point sequence;
[0007] For each time point in the initial time point sequence, taking the time point as the center, taking a preset number of different time ranges to perform Fourier calculations to obtain the audio features at the time point position;
[0008] Determine the occurrence probability of the spectrum event and the event type probability corresponding to the time point according to the audio feature;
[0009] Arrange the occurrence probabilities of the spectrum events in descending order, and take the time points where the occurrence probability of the spectrum events is greater than a preset threshold as the target time point sequence;
[0010] The music game score is generated using a preset score generation model and the target time point sequence.
[0011] Optionally, when determining the beat information in the accompaniment data, the method further includes:
[0012] Determining beats per minute information in the accompaniment data;
[0013] Correspondingly, after determining the beat information in the accompaniment data, the method further includes:
[0014] The sparse beats or dense beats in the beat information are corrected according to the beats per minute information.
[0015] Optionally, before taking the time point at which the probability of occurrence of the spectrum event is greater than a preset threshold as the target time point sequence, the method further includes:
[0016] Determining the difficulty of the music game score;
[0017] The preset threshold is determined according to the difficulty; wherein the difficulty is positively correlated with the preset threshold.
[0018] Optionally, generating the music game score using a preset score generation model and the target time point sequence includes:
[0019] Determine event details of each time point in the target time point sequence using a preset spectrum generation model;
[0020] Generate a music game score based on the detailed information of each event.
[0021] Optionally, before generating the music game score based on the score event occurrence probability, the event type probability, and the classification probability using a preset score generation model, the method further includes:
[0022] Determine the rules of the music game;
[0023] A sequence correction operation is performed on the target time point sequence according to the music game rules; the sequence correction operation includes at least one of prohibiting continuous occurrence of events, adding personalized events, and event synchronization.
[0024] Optionally, after generating the music game score based on the score event occurrence probability, the event type probability, and the classification probability using a preset score generation model, the method further includes:
[0025] The music game score is converted into a falling game score, and score rules of the falling game score are configured; the score rules include at least one of a falling rule, an event occurrence rule, and a game compression rule.
[0026] Optionally, if the music game score includes lyrics comparison, it also includes:
[0027] Determining a target time point on the time point sequence that is closest to the appearance time of the lyrics;
[0028] If the probability of occurrence of the score event corresponding to the target time point is greater than the preset threshold and the event type is a normal strike or a long press operation at the starting position, process normally;
[0029] If the probability of occurrence of the score event corresponding to the target time point is greater than the preset threshold and the event type is the long press operation at the middle position or the end position, cancel the long press operation and change the event type of the target time point to the normal strike;
[0030] If the probability of occurrence of the score event corresponding to the target time point is less than the preset threshold, the event type of the target time point is set to normal strike.
[0031] When determining the occurrence probability of the spectrum event and the event type probability corresponding to the time point according to the audio feature, the method further includes:
[0032] Determining a probability of a long press corresponding to the time point according to the audio feature;
[0033] If the type of the score event at the previous time point of the current time point is a long press, and the long press probability is greater than the long press probability threshold, the score event at the current time point is maintained as a long press operation;
[0034] If the type of the score event at the previous time point of the current time point is a long press, and the long press probability is less than the long press probability threshold, the long press operation is ended at the previous time point of the current time point;
[0035] If the beat event type at the previous time point of the current time point is not a long press, the long press operation at the current time point is invalid.
[0036] Optionally, if the score events are aligned with the music beat, it also includes:
[0037] Delete the score event that starts at a time point within 1 / 4 beat before the moment corresponding to the beat information, has a length not greater than 1 / 4 beat, and has an event type of long press operation.
[0038] The present application also provides a computer-readable storage medium having a computer program stored thereon, which implements the steps of the above-described method when executed by a processor.
[0039] The present application also provides a terminal, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps of the above method when calling the computer program in the memory.
[0040] The present application provides a method for generating a music game score, comprising: obtaining a song file and extracting accompaniment data, and determining beat information in the accompaniment data; configuring a time point for each beat in the beat information to obtain an initial time point sequence; for each time point on the initial time point sequence, taking the time point as the center, taking a preset number of different time ranges to perform Fourier calculation to obtain audio features of the time point position; determining the probability of occurrence of a score event and the probability of the event type corresponding to the time point based on the audio features; arranging the probability of occurrence of the score events in descending order, and taking the time points where the probability of occurrence of the score events is greater than a preset threshold as the target time point sequence; and generating a music game score using a preset score generation model and the target time point sequence.
[0041] After obtaining the song file and extracting the accompaniment data, this application sets the time point for the beat in the accompaniment data and performs Fourier calculations centered on the time point to determine the audio features of the time point position. Based on the audio features, the relevant probability of the occurrence of the score event is further determined to complete the setting of the score event occurrence in the music game score. Subsequently, the music game score can be obtained using the preset score generation model. Through this application, the music game score of the song can be automatically generated. Users can configure the music game score by adjusting the game difficulty, allowing users to freely play the music game corresponding to the song they are interested in, listening to music while playing games, enriching the listening experience and improving user satisfaction.
[0042] The present application also provides a computer-readable storage medium and a terminal, which have the above-mentioned beneficial effects and are not described in detail here. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are merely embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without any creative work.
[0044] Figure 1 A flowchart of a method for generating a music game score provided in an embodiment of the present application;
[0045] Figure 2 A flowchart of another method for generating a music game score provided in an embodiment of the present application;
[0046] Figure 3 This is a diagram of the terminal structure provided in an embodiment of the present application. DETAILED DESCRIPTION
[0047] To make the purpose, technical solutions, and advantages of the embodiments of this application more clear, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0048] See also Figure 1 , Figure 1 This is a flowchart of a method for generating a music game score provided in an embodiment of the present application, the method comprising:
[0049] S101: Acquire a song file and extract accompaniment data, and determine beat information in the accompaniment data;
[0050] This step needs to obtain song file, and extracts the accompaniment data of this song from song file, how to obtain this accompaniment data is not limited at this, usually song file can be parsed, to determine the different tracks of song, thus directly determine that the track corresponding to accompaniment is pulled and can obtain accompaniment data.If song file does not have a track version, such as the song distributed by streaming media, the method based on neural network can be used to separate accompaniment data from the song file having completed mixing.After obtaining accompaniment data, it is necessary to further determine the beat information in the accompaniment data, i.e. beat information, and usually beat information can be strong beat and weak beat.How to determine beat information is not limited at this, beat information can be obtained by music information retrieval.
[0051] S102: configuring a time point for each beat in the beat information to obtain an initial time point sequence;
[0052] This step requires configuring the time points for the beats. It should be noted that the time points in each beat can be uniformly configured, or can be customized by the user, or can be uniformly configured first and then the user can customize the configuration of some of the time points. There is no limitation on how to configure the time points here. Each beat can be configured with several times. Usually, in order to conform to the beat rhythm of the song, each beat can be configured with 3, 7, or 15 time points to divide a beat into 4, 8, and 16 parts. The more time points are configured, the larger the range of score events that can occur, and the higher the difficulty of the music game score that is usually generated. Of course, how many time points are set for each beat can be set by the user, that is, the time point configuration parameters set by the user can be received in advance before this step, so as to execute this step.
[0053] In this step, it is necessary to obtain a time point sequence containing all time points, and the time point sequence contains the occurrence points of all possible score events in the song file.
[0054] S103: For each time point in the initial time point sequence, taking the time point as the center, taking a preset number of different time ranges to perform Fourier calculation to obtain the audio feature at the time point position;
[0055] This step is intended to calculate audio features. Specifically, for each time point on the initial time point sequence, audio data of different lengths of time ranges are taken with the time point as the center to perform Fourier calculations, and perform conversion of audio data from time domain to frequency domain, that is, spectrum conversion, and the smaller the time window, the higher the degree of repetition. There is no limitation on the specific calculation method used to calculate audio features. For example, a short-time Fourier transform can be used to obtain audio features near the time point. It should also be noted that this step does not limit the preset number. It is easy to understand that the larger the preset number, the more accurate the calculated audio features, and the corresponding amount of calculation is also greater. Usually the preset number can be 5, 7, 9, etc., which can be set by those skilled in the art.
[0056] S104: Determine the occurrence probability of the spectrum event and the event type probability corresponding to the time point according to the audio feature;
[0057] This step requires determining the probability associated with the score event based on the audio features from the previous step. The score event occurrence probability refers to the probability of the score event occurring at that point in time, with a probability ranging from 0 to 1. The higher the score event occurrence probability, the higher the difficulty of the overall music game score. The event type probability refers to the maximum probability that the score event type falls into a certain category if a score event occurs. This step does not limit the type of score event, including but not limited to normal clicks, long presses, continuous clicks, swipes, and so on. It is easy to understand that different types of events correspond to different levels of difficulty. Assuming the total number of events is the same, the variability of events will also affect the overall difficulty of the music game score. For event type probabilities, the sum of the probabilities of different types is 1. The event type probabilities of different events can also be set according to different game difficulties. When the overall difficulty of the music game score is higher, the probability of the score event type that makes the game more difficult will be higher.
[0058] It should be noted that the probability of a chart event occurring refers to the probability of a chart event occurring. In fact, the probability of a chart event occurring should be the sum of the probabilities of occurrence of different numbers of chart events. Therefore, when a chart event occurs at any point in time, it is possible for one or more chart events to occur. If multiple chart events occur, different chart events can be set to different tracks on the chart.
[0059] In other embodiments of the present application, when determining the probability of occurrence of a music score event and the probability of the event type, the probability of a long press corresponding to the time point can also be determined based on the audio features. The probability of a long press is a probability that is valid only when the music score event at the previous time point is a long press operation. The specific application method can be as follows:
[0060] If the beat event type at the previous time point of the current time point is long press, and the long press probability is greater than the long press probability threshold, the beat event at the current time point is kept as a long press operation;
[0061] If the beatmap event type at the previous time point of the current time point is long press, and the long press probability is less than the long press probability threshold, the long press operation ends at the previous time point of the current time point;
[0062] If the beatmap event type at the previous time point is not a long press, the long press operation at the current time point is invalid.
[0063] From this, we can see that since the long press operation needs to span several time points, at the first time point, the long press event at the first time point will only take effect if its chart event is a long press event and the probability of long press at the next time point is greater than the long press threshold. If the chart event at the first time point is a long press event, but the probability of long press at the next time point is less than the long press probability threshold, the chart event at the first time point will be invalid.
[0064] On this basis, in order to reduce the difficulty of operating the score event, you can also set the score to have several time points. The first time point is a long press operation. Subsequently, you only need to keep the long press probability at each time point greater than the long press probability threshold to maintain the long press. If the third time point is also a long press operation, it is just a different long press operation position from the first time point, but the long press probability at the third time point is also greater than the threshold. At this time, the long press operation at the third time point is invalid, that is, continuous long press operations are prohibited to prevent players from continuously performing long press operations. The minimum interval between continuous long press events can be set, for example, to 1 / 4 beat, so that the interval between any two long press events is at least 1 / 4 beat, so that players can better perform long press operations.
[0065] As can be seen above, both the probability of occurrence of a score event and the probability of the event type are related to the difficulty of the music game score. One feasible approach is that, when executing this step, the user can adjust the difficulty of the music game score by modifying the thresholds of each probability. Furthermore, the probability of a score event occurring and the probability of the event within the duration of other score events can be controlled by thresholds, meaning that the event will only occur at that time point if the probability at that point in time is greater than the corresponding threshold. If the probability of a score event occurring corresponds to a first threshold, and the probability of the event within the duration of the remaining score events corresponds to a third threshold, then for a time point, if the probability of the score event occurring at that time point is greater than the first threshold, the score event will occur at that time point. If the probability of the event occurring at that time point within the duration of the remaining score events is greater than the third threshold, the score event at that time point will be within the duration of other score events. Therefore, the occurrence of score events can be controlled by adjusting the first and third thresholds, thereby affecting the difficulty of the score game.
[0066] There is no specific limitation on how to determine the probability of occurrence of a spectrum event, the probability of the event type, and the probability of the event in the duration of the remaining spectrum events. One feasible implementation method is to determine them through a neural network. For example, a neural network model combining CNN+RNN can be used to input the audio features obtained in the previous step and output the above three probabilities.
[0067] S105: Arrange the occurrence probabilities of the spectrum events in descending order, and take the time points where the occurrence probability of the spectrum events is greater than a preset threshold as the target time point sequence;
[0068] This step requires sorting the occurrence probabilities of the chart events in descending order, and filtering out the time points that are greater than the preset threshold as the target time point sequence. Each time point in the target time point sequence contains the event type probability calculated above and the event probability within the duration of the remaining chart events.
[0069] This step does not specifically limit the size of the preset threshold. One feasible implementation method is to first determine the difficulty of the music game score before executing this step, and then determine the preset threshold based on the difficulty, with the difficulty being positively correlated with the preset threshold. The difficulty can be a user-set difficulty coefficient, difficulty parameter, difficulty standard, etc. It is particularly important to emphasize that the difficulty standard refers to the user's settings for the frequency and order of occurrence of score events in the music game score, or includes related settings for specified score events, such as specifying that a slide operation must occur at each beat, etc.
[0070] For the time points where the probability of occurrence of score events is less than or equal to the preset threshold, the probability of occurrence is low and the uncontrollable factors are large. In order to control the difficulty volatility of the music game score, the time points where the probability of occurrence of score events is less than or equal to the preset threshold are discarded.
[0071] S106: Generate a music game score using a preset score generation model and the target time point sequence.
[0072] This step can generate a music game score using a preset score generation model and a target time point sequence. Since each time point in the target time point sequence has a corresponding score event probability, event type probability, and event probability within the remaining score event durations, the score events are already set in the form of probabilities. Simply integrating the target time point sequence with the preset score generation model to generate the music game score is sufficient. The preset score generation model is not specifically limited here; it can include user style preferences, the game format of the music game score, and so on.
[0073] As a preferred implementation of this step, a preset score generation model can be used to determine event details for each time point in the target time point sequence, and then a music game score can be generated based on this event details. The so-called time details refer to the detailed information after the score event occurs, including but not limited to the performance of the score event, the location of occurrence, and changes in position. Taking the sliding operation as an example, the initial position, sliding path, and sliding end position of the sliding operation can be set. In other words, the event details can be configured and adjusted using the preset score generation model to optimize the occurrence of the score event.
[0074] As a more preferred execution method, the music game score can also be converted into a form. After the music game score is generated, the music game score can be converted into a falling game score, and the score rules of the falling game score can be configured. The score rules include at least one of the falling rules, event occurrence rules and game compression rules. In the falling game score, the occurrence of each score event occurs in sequence from the top to the bottom of the screen. The falling rules can be set specifically, such as the animation when the score event occurs, or setting a reminder when it is about to happen, the falling speed of the score event, etc. The game compression rule refers to compressing the time length of the song and the music game score to retain only the essence. That is, the user does not need to execute the music game score corresponding to a complete song. If the user likes the chorus of the song, he can choose the music game score corresponding to the chorus for trial play.
[0075] After acquiring a song file and extracting accompaniment data, the embodiment of the present application sets a time point for the beat in the accompaniment data and performs Fourier calculations centered on the time point to determine the audio features of the time point position. Based on the audio features, the relevant probability of occurrence of the score event is further determined to complete the setting of the score event occurrence in the music game score. Subsequently, the music game score can be obtained using a preset score generation model. Through this application, a music game score for a song can be automatically generated. Users can configure the music game score by adjusting the game difficulty, allowing users to freely play the music game corresponding to the song they are interested in, playing games while listening to music, enriching the listening experience, and improving user satisfaction.
[0076] Based on the above embodiment, as a preferred embodiment, when determining the beat information in the accompaniment data, the beats per minute information in the accompaniment data, i.e., the BPM information, can also be determined. In this way, after determining the beat information in the accompaniment data, the sparse beats or dense beats in the beat information can be corrected according to the beats per minute information. Since the accompaniment data in the song file may have some beats that are sparse or too dense, in order to facilitate the configuration of time points in subsequent steps, the beat information is corrected using the beats per minute information, so that the beats of the song file are relatively uniform, and the time points in the initial time point sequence obtained by the configuration are more uniform, thereby avoiding the concentrated occurrence of score events and making the difficulty of the music game score uncontrollable.
[0077] Based on the above embodiment, as a preferred embodiment, before using a preset music score generation model to generate a music game score based on the score event occurrence probability, the event type probability, and the classification probability, the target time point sequence can also be modified using specific music game rules. Specifically, the following steps may be included:
[0078] S201: Determine the rules of the music game;
[0079] S202: performing a sequence correction operation on the target time point sequence according to the music game rules.
[0080] Since users can customize the music game rules, after obtaining the target time point sequence, they can adjust it according to the rules, adding personalized requests, and so on. Sequence modification operations are not limited here; they should be configured according to the rules. Certain time points can be added to or deleted from the target time point sequence, and so on. Specific operations can include prohibiting the occurrence of consecutive events, adding personalized events, and event synchronization. They can also change the type of score events at a time point, among other things. Prohibiting the occurrence of consecutive events involves setting rules for the occurrence of score events. Specifically, the probability of a score event at the previous time point can be detected and adjusted accordingly to prevent two score events from occurring consecutively. Adding personalized events allows personalized score events to be added to a specified time point. It should be noted that event synchronization includes limiting the synchronization time between two score events, as well as synchronizing score events or non-synchronizing score events. This allows the existing music game rules to be used to set the rhythm of score events to correspond to song information, such as using lyrics timing information to align score events with lyrics, or aligning score events with beats based on song information. If you do not need to align the score events with the beat or lyrics, you only need to perform correction operations according to your personalized needs.
[0081] It should be noted that the determination of the music game rules can be completed only before the execution of the sequence correction operation, that is, there is no predetermined execution order between any steps S101-S105 in the previous embodiment. Figure 2 , Figure 2 This is a flowchart of another method for generating a music game score provided in an embodiment of the present application.
[0082] Based on this embodiment, as a preferred implementation method, if the score event is aligned with the music beat, the time point corresponding to the beat point is considered separately, which can be specifically implemented as follows:
[0083] First, determine the target time point closest to the occurrence time of the lyrics in the time point sequence, and then perform one of the following three steps based on the probability of occurrence of the score event and the event type:
[0084] If the probability of the score event corresponding to the target time point is greater than the preset threshold and the event type is a normal hit or a long press operation at the starting point, it will be processed normally;
[0085] If the probability of the score event corresponding to the target time point is greater than the preset threshold and the event type is a long press operation at the middle or end position, cancel the long press operation and change the event type of the target time point to a normal strike;
[0086] If the probability of occurrence of the score event corresponding to the target time point is less than the preset threshold, the event type of the target time point is set to normal attack.
[0087] Based on the above embodiment, as another preferred implementation method, if the score events are aligned with the lyrics of the song, find the closest time point on the target time point sequence for each lyric occurrence time point. Consider these closest time points separately:
[0088] If the probability of the score event corresponding to the most recent time point is greater than the preset threshold and the event type is a normal hit or a long press operation at the starting point, it will be processed normally;
[0089] If the probability of the score event corresponding to the most recent time point is greater than the preset threshold and the event type is a long press operation at the middle or end position, cancel the long press operation and change the event type of the most recent time point to a normal strike;
[0090] If the probability of occurrence of the score event corresponding to the most recent time point is less than the preset threshold, the event type of the most recent time point is set to normal attack.
[0091] Based on the above embodiment, as a preferred implementation method, in order to further improve the playability of the music game score and reduce the game difficulty, when the difficulty is less than a preset difficulty value, the score events with a start point within 1 / 4 beat before the moment corresponding to the beat information, a length no greater than 1 / 4 beat, and an event type of long press operation can be deleted. Of course, the preset difficulty value is not limited here.
[0092] Alternatively, you can delete events according to specific rules. If each beat is divided into 4 parts, delete the objects in the 1 / 4 and 3 / 4 beats. If it's a long press, determine the starting position of the long press. If the starting position is at the moment to be deleted, delete the entire long press. If each beat is divided into more detailed parts, more deletion strategies can be used. For example, if it is divided into 8 parts, you can delete 1 / 8, 1 / 4, 3 / 4, and 7 / 8. The specific strategy will be adjusted based on the target difficulty and playability of the score.
[0093] The present application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed, can implement the steps provided in the above embodiments. The storage medium may include: a USB flash drive, a mobile hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, among other media capable of storing program code.
[0094] This application also provides a terminal, see Figure 3, a structural diagram of a terminal provided in an embodiment of the present application, such as Figure 3 As shown, a processor 1410 and a memory 1420 may be included.
[0095] The processor 1410 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 1410 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), or PLA (Programmable Logic Array). The processor 1410 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 1410 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 1410 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.
[0096] The memory 1420 may include one or more computer-readable storage media, which may be non-transitory. The memory 1420 may also include high-speed random access memory, and non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In this embodiment, the memory 1420 is used to store at least the following computer program 1421, wherein, after the computer program is loaded and executed by the processor 1410, it can implement the relevant steps of the method for generating the music game score of the terminal application executed by the terminal side disclosed in any of the aforementioned embodiments. In addition, the resources stored in the memory 1420 may also include an operating system 1422 and data 1423, etc., and the storage method may be temporary storage or permanent storage. Among them, the operating system 1422 may include Windows, Linux, Android, etc.
[0097] In some embodiments, the terminal may further include a display screen 1430 , an input / output interface 1440 , a communication interface 1450 , a sensor 1460 , a power supply 1470 , and a communication bus 1480 .
[0098] certainly, Figure 3The structure of the terminal shown does not constitute a limitation on the terminal in the embodiment of the present application. In actual applications, the terminal may include Figure 3 More or fewer components than shown, or combinations of certain components.
[0099] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. Reference can be made to the common and similar parts between the various embodiments. For the systems provided in the embodiments, since they correspond to the methods provided in the embodiments, the description is relatively simple, and the relevant parts can be referred to the method description.
[0100] This document uses specific examples to illustrate the principles and implementation methods of this application. The description of the above examples is only intended to help understand the method and core ideas of this application. It should be noted that for those skilled in the art, without departing from the principles of this application, various improvements and modifications can be made to this application, and such improvements and modifications also fall within the scope of protection of the claims of this application.
[0101] It should also be noted that, in this specification, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variants thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or apparatus comprising the element.
Claims
1. A method for generating a music game score, characterized in that: include: Acquire a song file and extract accompaniment data, and determine beat information in the accompaniment data; Assigning a time point to each beat in the beat information to obtain an initial time point sequence; For each time point in the initial time point sequence, taking the time point as the center, taking a preset number of different time ranges to perform Fourier calculations to obtain the audio features at the time point position; Determine the occurrence probability of the spectrum event and the event type probability corresponding to the time point according to the audio feature; Arrange the occurrence probabilities of the spectrum events in descending order, and take the time points where the probability of the spectrum events is greater than a preset threshold as the target time point sequence; each time point in the target time point sequence contains the probability of the event type and the probability of the event within the duration of the remaining spectrum events; the probability of the event within the duration of the remaining spectrum events is used to characterize the probability of the spectrum event within the duration of other spectrum events; The music game score is generated using a preset score generation model and the target time point sequence.
2. The generation method according to claim 1, characterized in that When determining the beat information in the accompaniment data, the method further includes: Determining beats per minute information in the accompaniment data; Correspondingly, after determining the beat information in the accompaniment data, the method further includes: The sparse beats or dense beats in the beat information are corrected according to the beats per minute information.
3. The generation method according to claim 1, characterized in that Before taking the time point at which the probability of occurrence of the spectrum event is greater than the preset threshold as the target time point sequence, it also includes: Determining the difficulty of the music game score; The preset threshold is determined according to the difficulty; wherein the difficulty is positively correlated with the preset threshold.
4. The generation method according to claim 1, characterized in that The method of generating a music game score using a preset score generation model and the target time point sequence includes: Determine event details of each time point in the target time point sequence using a preset spectrum generation model; Generate a music game score based on the detailed information of each event.
5. The generation method according to any one of claims 1 to 4, characterized in that: Before using the preset score generation model and the target time point sequence to generate the music game score, the method further includes: Determine the rules of the music game; A sequence correction operation is performed on the target time point sequence according to the music game rules; the sequence correction operation includes at least one of prohibiting continuous occurrence of events, adding personalized events, and event synchronization.
6. The generation method according to any one of claims 1 to 4, characterized in that: After generating the music game score using the preset score generation model and the target time point sequence, the method further includes: The music game score is converted into a falling game score, and score rules of the falling game score are configured; the score rules include at least one of a falling rule, an event occurrence rule, and a game compression rule.
7. The generation method according to claim 1 or 3, characterized in that: If the music game score includes lyrics comparison, it also includes: Determining a target time point on the time point sequence that is closest to the appearance time of the lyrics; If the probability of occurrence of the score event corresponding to the target time point is greater than the preset threshold and the event type is a normal strike or a long press operation at the starting position, process normally; If the probability of occurrence of the score event corresponding to the target time point is greater than the preset threshold and the event type is the long press operation at the middle position or the end position, cancel the long press operation and change the event type of the target time point to the normal strike; If the probability of occurrence of the score event corresponding to the target time point is less than the preset threshold, the event type of the target time point is set to normal strike.
8. The generation method according to claim 1, characterized in that When determining the occurrence probability of the spectrum event and the event type probability corresponding to the time point according to the audio feature, the method further includes: Determining a probability of a long press corresponding to the time point according to the audio feature; If the type of the score event at the previous time point of the current time point is a long press, and the long press probability is greater than the long press probability threshold, the score event at the current time point is maintained as a long press operation; If the type of the score event at the previous time point of the current time point is a long press, and the long press probability is less than the long press probability threshold, the long press operation is ended at the previous time point of the current time point; If the beat event type at the previous time point of the current time point is not a long press, the long press operation at the current time point is invalid.
9. The generation method according to claim 3 or 8, characterized in that: If the score events are aligned with the music beat, it also includes: Delete the score event that starts at a time point within 1 / 4 beat before the moment corresponding to the beat information, has a length not greater than 1 / 4 beat, and has an event type of long press operation.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of generating a music game score as described in any one of claims 1 to 9 are implemented.
11. A terminal, characterized in that: The method comprises a memory and a processor, wherein a computer program is stored in the memory, and when the processor calls the computer program in the memory, the method implements the steps of the method for generating a music game score as described in any one of claims 1 to 9.
Citation Information
Patent Citations
Information processing method and device in game, storage medium and electronic device
CN111185006A
Beat detection model training method, beat detection method and beat detection device
CN113223485A