Method, device and medium for generating performance instruction information in a virtual scene

By acquiring sheet music files and generating virtual key performance instructions based on note conversion relationships, the problem of high development costs and lack of versatility in self-made music editors is solved, achieving universality of note and virtual key configurations for various musical instruments in a virtual scene.

CN115129193BActive Publication Date: 2026-11-27TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202110321317.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-03-25
Publication Date
2026-11-27
Estimated Expiration
2041-03-25

AI Technical Summary

Technical Problem

In existing technologies, self-made music editors require developers to have knowledge of music theory, resulting in high development costs and a lack of versatility. They are also difficult to universally adapt to the note and virtual button configurations of various musical instruments in virtual scenarios.

Method used

By acquiring the sheet music file of the performance audio, the first type of note information is determined, and the target note information of the second type of note is generated based on the note conversion relationship. This generates performance instruction information corresponding to multiple virtual keys, reducing generation costs and improving versatility.

Benefits of technology

It eliminates the need to consider the conversion between program logic and music logic, reducing generation costs. It can universally adapt to the note and virtual key configurations of various musical instruments, improving the versatility of the configuration.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115129193B_ABST
    Figure CN115129193B_ABST
Patent Text Reader

Abstract

The application provides a generation method and device of performance instruction information in a virtual scene, an equipment and a computer readable storage medium. The method comprises the following steps: obtaining a score file corresponding to performance audio, and determining note information of the performance audio corresponding to a first type of note based on the score file; obtaining a note conversion relationship, and performing note conversion on the note information based on the note conversion relationship to obtain target note information corresponding to a second type of note; wherein the second type of note is a note associated with a plurality of virtual keys used for audio performance in the virtual scene, and the second type of note corresponds to the virtual key one by one; generating performance instruction information corresponding to the plurality of virtual keys based on the target note information; wherein the performance instruction information is used to indicate performance information of each virtual key in a key sequence corresponding to the target note information composed of the plurality of virtual keys. Through the application, the generation cost of the performance instruction information can be reduced, and the universality of the note and the virtual key configuration can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a method, apparatus, device, and computer-readable storage medium for generating performance instruction information in a virtual scene. Background Technology

[0002] When editing performance instructions in a virtual scene, it's necessary to first establish the association between the notes indicated by the instructions and the virtual buttons. For example, in the development of music performance games, virtual buttons are related to the rhythm, melody, and harmony of the background music. Currently, some technologies use custom music editors to configure and edit the virtual buttons corresponding to notes. However, developing a custom music editor requires developers to be familiar with music theory and to learn how to develop new music editors, consuming more time and effort, resulting in high development costs. Furthermore, custom music editors are only suitable for configuring a specific type of note and virtual button, lacking versatility. Summary of the Invention

[0003] This application provides a method, apparatus, device, and computer-readable storage medium for generating performance instruction information in a virtual scene, which can reduce the cost of generating performance instruction information and improve the universality of note and virtual key configuration.

[0004] The technical solution of this application embodiment is implemented as follows: This application provides a method for generating performance instruction information in a virtual scene, including: Obtain the sheet music file corresponding to the performance audio, and based on the sheet music file, determine the note information of the performance audio corresponding to the first type of note; Obtain the note conversion relationship, and perform note conversion on the note information based on the note conversion relationship to obtain the target note information corresponding to the second type of note; The second type of note refers to the notes associated with multiple virtual keys used for audio performance in the virtual scene, and the second type of note corresponds one-to-one with the virtual keys; Based on the target note information, playing instruction information corresponding to the multiple virtual keys is generated; The performance instruction information is used to indicate the performance information of each virtual key in the key sequence corresponding to the target note information, which is composed of the plurality of virtual keys.

[0005] In the above scheme, before obtaining the sheet music file corresponding to the performance audio, the method further includes: Presents the score editing interface corresponding to the aforementioned performance audio; In response to a music score editing operation triggered based on the music score editing interface for the performance audio, the music score parameters corresponding to the music score editing operation are determined; In response to the file generation instruction, a score file corresponding to the performance audio is generated based on the edited score parameters.

[0006] This application provides an apparatus for generating performance instruction information in a virtual scene, including: The information acquisition module is used to acquire the sheet music file corresponding to the performance audio, and based on the sheet music file, determine the note information of the performance audio corresponding to the first type of note; The note conversion module is used to obtain note conversion relationships and perform note conversion on the note information based on the note conversion relationships to obtain target note information corresponding to the second type of note; The second type of note refers to the notes associated with multiple virtual keys used for audio performance in the virtual scene, and the second type of note corresponds one-to-one with the virtual keys; The information generation module is used to generate performance instruction information corresponding to the multiple virtual keys based on the target note information; The performance instruction information is used to indicate the performance information of each virtual key in the key sequence corresponding to the target note information, which is composed of the plurality of virtual keys.

[0007] In the above scheme, before obtaining the sheet music file corresponding to the performance audio, the device further includes: The file generation module is used to present the score editing interface corresponding to the performance audio; In response to a music score editing operation triggered based on the music score editing interface for the performance audio, the music score parameters corresponding to the music score editing operation are determined; In response to the file generation instruction, a score file corresponding to the performance audio is generated based on the edited score parameters.

[0008] In the above scheme, there are multiple first-type notes, and the note conversion module is also used to determine the second-type notes corresponding to each first-type note and the pitch of the second-type notes based on the note conversion relationship; The note information of each of the first type of notes is used as the note information of the second type of notes of the corresponding tone.

[0009] In the above scheme, the information acquisition module is also used to filter and obtain the note parameters corresponding to the target channel from the music score file when the music score file contains note parameters corresponding to multiple channels; Extract the note parameters corresponding to the first type of note from the note parameters corresponding to the target channel; Based on the note parameters corresponding to the first type of note, determine the note information corresponding to the first type of note; The note parameters include at least the time code and the tempo corresponding to the performance audio.

[0010] In the above scheme, the number of the first type of notes in the music score file is multiple, and the note information includes the start time of the performance; the information acquisition module is also used to acquire unit time code, and the unit time code is the note length of a unit note; The ratio of the time code to the unit time code for each of the first type of notes is determined, and the unit duration of the unit note is determined based on the music tempo. The product of the ratio and the unit duration is determined as the start time of the performance of the corresponding first type of note.

[0011] In the above scheme, the note information includes the note distance between adjacent first-type notes, and the device further includes: The distance determination module is used to determine the performance time difference between adjacent first-class notes based on the performance start time of each first-class note; Based on the tempo corresponding to the performance audio and the performance time difference between adjacent first-class notes, the note distance between adjacent first-class notes is determined.

[0012] In the above scheme, the information generation module is further used to generate a corresponding button indicator icon for the virtual button corresponding to each second type of note when the target note information includes the performance start time of each second type of note. The generated button indicator icons are used as performance indicator information for the corresponding virtual buttons.

[0013] In the above scheme, after generating the performance instruction information corresponding to the plurality of virtual keys, the device further includes: An indicator presentation module is used to present the performance interface, and to present the multiple virtual buttons in the performance area of ​​the performance interface, and to present multiple button indicator icons in the performance indicator area of ​​the performance interface. When the start time for playing the virtual key corresponding to the target key indicator icon is reached, the display mode of the target key indicator icon is changed to indicate that the corresponding virtual key should be played.

[0014] In the above scheme, the indicator presentation module is also used to present the movement process of multiple button indicator icons and to present the target location identifier; When the start time of the performance of the virtual key corresponding to the target key indicator icon is reached, the target key indicator icon moves to the target position mark and disappears.

[0015] In the above scheme, when the target note information includes the pressing pressure of each of the second type of notes, the device further includes: The information display module is used to determine a display style that matches the pressing pressure of the corresponding second type of note for each generated key indicator icon, and to use the display style of each key indicator icon as the performance instruction information of the corresponding virtual key. The display style of the button indicator icon is used to indicate the corresponding pressing pressure when the virtual button is triggered, and the pressing pressure is used to control the volume of the corresponding second type of note output.

[0016] In the above scheme, after generating the performance instruction information corresponding to the plurality of virtual keys, the device further includes: The performance output module is used to present a performance interface, in which the plurality of virtual buttons are presented, and each button indicator icon is displayed using the corresponding display style. When a press operation is received on the target virtual button, the second type of note corresponding to the target virtual button is output using a volume level corresponding to the pressure applied by the press operation.

[0017] In the above scheme, when the target note information includes the pitch of each of the second type of notes, the information display module is also used to determine the display area of ​​the corresponding key indicator icon for the virtual key corresponding to the second type of note at each performance start time. The number of display areas is at least two, and different display areas correspond to different pitches. The display area of ​​the key indicator icon is used as the performance instruction information for the corresponding virtual key.

[0018] In the above scheme, after generating the performance instruction information corresponding to the multiple virtual buttons, the performance output module is also used to present a performance interface, in which at least two operation areas are presented, and the operation areas correspond one-to-one with the display areas. The plurality of virtual buttons are presented in each of the operation areas, and each button indicator icon is displayed in the corresponding display area; When a trigger operation is received for a target virtual key, the second type of note corresponding to the target virtual key is output using the corresponding tone, based on the operation area where the trigger operation is located.

[0019] This application provides an electronic device, including: Memory, used to store executable instructions; The processor, when executing executable instructions stored in the memory, implements the method for generating performance instruction information in a virtual scene provided in the embodiments of this application.

[0020] This application provides a computer-readable storage medium storing executable instructions for inducing a processor to execute, thereby implementing the method for generating performance instruction information in a virtual scene provided in this application.

[0021] The embodiments of this application have the following beneficial effects: The process involves acquiring the sheet music file corresponding to the performance audio, determining the note information for the first type of note based on the sheet music file, obtaining note conversion relationships, and performing note conversions on the note information to obtain the target note information for the second type of note. Based on the target note information, performance instruction information for multiple virtual buttons is generated. Thus, based on the sheet music file and note conversion relationships of the performance audio, the target note information for the second type of note used for audio performance in the virtual scene is obtained, and performance instruction information is generated based on the target note information. For game developers, this eliminates the need to consider the conversion between program logic and music logic, and eliminates the need to learn a new music editor, reducing the cost of generating performance instruction information. Furthermore, it can be universally adapted to the generation of performance instruction information for notes corresponding to various musical instruments in the virtual scene, improving the versatility of note and virtual button configurations. Attached Figure Description

[0022] Figure 1 A schematic diagram of an optional architecture for a system 100 for generating performance instruction information in a virtual scene, as provided in an embodiment of this application; Figure 2 This is an optional structural schematic diagram of the electronic device 500 provided in an embodiment of this application; Figure 3 A flowchart illustrating the method for generating performance instruction information in a virtual scene according to an embodiment of this application; Figure 4 This is a schematic diagram of the music score editing interface provided in an embodiment of this application; Figure 5 A flowchart illustrating the method for generating performance instruction information in a virtual scene according to an embodiment of this application; Figure 6 This is a schematic diagram of the display interface for performance instruction information provided in an embodiment of this application; Figure 7 This is a schematic diagram of the display interface for performance instruction information provided in an embodiment of this application; Figure 8 This is a schematic diagram of the display interface for performance instruction information provided in an embodiment of this application; Figure 9A schematic flowchart illustrating the method for generating performance instruction information in a virtual scene according to an embodiment of this application; Figure 10 This is a schematic diagram of the structure of the device for generating performance instruction information in a virtual scene provided in the embodiments of this application. Detailed Implementation

[0023] To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings. The described embodiments should not be regarded as limitations on this application. All other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0024] In the following description, references are made to “some embodiments,” which describe a subset of all possible embodiments. However, it is understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

[0025] In the following description, the terms “first, second…” are used merely to distinguish similar objects and do not represent a specific ordering of objects. It is understood that “first, second…” may be interchanged in a specific order or sequence where permitted, so that the embodiments of this application described herein can be implemented in an order other than that illustrated or described herein.

[0026] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.

[0027] In the implementation of this application, the collection and processing of relevant data should strictly comply with the requirements of relevant laws and regulations, obtain the informed consent or separate consent of the personal information subject, and carry out subsequent data use and processing within the scope of laws and regulations and the authorization of the personal information subject.

[0028] Before providing a further detailed description of the embodiments of this application, the nouns and terms involved in the embodiments of this application will be explained, and the nouns and terms involved in the embodiments of this application shall be interpreted as follows.

[0029] 1) Digital Audio Workstation (DAW): refers to comprehensive audio software that includes functions such as audio editing, mixing, and music production.

[0030] 2) Musical Instrument Digital Interface (MIDI): This is a universal digital music notation format or an industry-standard format that is supported by all audio software with music production capabilities.

[0031] 3) MIDI Editor: This is a digital music score editor. All DAWs with music production functions come with a MIDI editor. Usually, the MIDI editor in a DAW is very mature in terms of operation, display, and other user experience aspects.

[0032] 4) Client: An application running on a terminal that provides various services, such as a video playback client or a game client.

[0033] 5) In response to, used to indicate the conditions or states on which the operation performed depends. When the conditions or states on which it depends are met, one or more operations performed may be performed in real time or with a set delay. Unless otherwise specified, there is no restriction on the order in which the multiple operations are performed.

[0034] See Figure 1 , Figure 1 This is an optional architecture diagram of a system 100 for generating performance instruction information in a virtual scene provided in an embodiment of this application. To support an exemplary application, terminals (exemplarily, terminals 400-1 and 400-2) connect to server 200 via network 300. Network 300 can be a wide area network or a local area network, or a combination of both, and data transmission is achieved using wireless or wired links.

[0035] The terminal can be any type of user terminal such as a smartphone, tablet, or laptop, or any combination of two or more of these data processing devices such as a desktop computer, game console, television, or the server 200 can be a single server configured to support various services, a server cluster, or a cloud server, etc.

[0036] In practical applications, terminals install and run applications (or clients) that support virtual scenes (such as games). Players (i.e., users) log in to the virtual scene application using their registered accounts to control the virtual character corresponding to that account and participate in virtual scene interactions. For example, when a player logs in to a game client installed on terminal 400-1, terminal 400-1 sends a login request to server 200. Server 200 verifies the login account used by the player and, upon successful verification, returns a login success notification to terminal 400-1. During the interaction of the player through the client in the virtual scene, terminal 400-1 and server 200 synchronize data in real time. Terminal 400-1 synchronizes the virtual scene data of its local client to server 200, and server 200 synchronizes the virtual scene data of clients on other terminals 400-2 to terminal 400-1. The virtual scene data can include virtual scene display data (such as game screen) data, music data, etc.

[0037] Upon entering the virtual scene, players choose a virtual character. Different players can choose the same or different characters. For music performance games, the virtual character can be a musician or other roles. Multiple characters can be pre-defined by the server 200. Players select the appropriate character through their terminal. In some embodiments, the server 200 may randomly assign a character to each player participating in the virtual scene. After entering the virtual scene, players continuously control their virtual characters through their terminals, such as controlling the character's movement within the game environment and performing musical pieces. Music performance games require players to perform actions in sync with the music and rhythm. Players press virtual buttons corresponding to notes, perform dance steps, and operate controllers that mimic musical instruments according to the performance instructions. Generally, matching the rhythm with the player's actions increases the score, while mismatched actions deduct points.

[0038] In practical applications, before a player plays a music game, the terminal edits the score of the audio to be played, generating a score file. Based on the score file, the note information corresponding to the first type of note is determined. The note conversion relationship is obtained, and the note information is converted based on the note conversion relationship to obtain the target note information corresponding to the second type of note. Based on the target note information, performance instruction information corresponding to multiple virtual buttons is generated, and when the player plays the score, the performance instruction information is displayed on the performance interface for the player's reference.

[0039] Among them, the first type of notes and the second type of notes belong to different categories of notes. For example, the first type of notes correspond to general standard notes (such as piano notes): 1 (do), 2 (re), 3 (mi), 4 (fa), 5 (so), 6 (la), 7 (xi). Correspondingly, the second type of notes are ancient Chinese character notes (such as guqin notes): Gong, Shang, Jiao, Bianzhi, Zhi, Yu, Biangong. Here, the second type of notes are the notes associated with multiple virtual keys used for audio performance in virtual scenes (such as music performance games). The second type of notes correspond one-to-one with the virtual keys.

[0040] See Figure 2 , Figure 2 This is an optional structural diagram of the electronic device 500 provided in the embodiments of this application. In practical applications, the electronic device 500 can be... Figure 1 The terminal or server in the middle, with electronic devices as Figure 1 Taking the terminal shown as an example, the computer device that implements the method for generating performance instruction information in a virtual scene according to the embodiments of this application will be described. Figure 2 The illustrated electronic device 500 includes at least one processor 510, a memory 550, at least one network interface 520, and a user interface 530. The various components in the electronic device 500 are coupled together via a bus system 540. It is understood that the bus system 540 is used to implement communication between these components. In addition to a data bus, the bus system 540 also includes a power bus, a control bus, and a status signal bus. However, for clarity, ... Figure 2 The general labeled all buses as Bus System 540.

[0041] The processor 510 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor, etc.

[0042] User interface 530 includes one or more output devices 531 that enable the presentation of media content, including one or more speakers and / or one or more visual displays. User interface 530 also includes one or more input devices 532, including user interface components that facilitate user input, such as a keyboard, mouse, microphone, touch screen display, camera, other input buttons and controls.

[0043] The memory 550 may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid-state storage, hard disk drives, optical disk drives, etc. The memory 550 may optionally include one or more storage devices physically located away from the processor 510.

[0044] The memory 550 may include volatile memory or non-volatile memory, or both. The non-volatile memory may be read-only memory (ROM), and the volatile memory may be random access memory (RAM). The memory 550 described in this application embodiment is intended to include any suitable type of memory.

[0045] In some embodiments, memory 550 is capable of storing data to support various operations, examples of which include programs, modules, and data structures or subsets or supersets thereof, as illustrated below.

[0046] Operating system 551 includes system programs for handling various basic system services and performing hardware-related tasks, such as the framework layer, core library layer, driver layer, etc., for implementing various basic business functions and handling hardware-based tasks; The network communication module 552 is used to reach other computing devices via one or more (wired or wireless) network interfaces 520, exemplary network interfaces 520 including: Bluetooth, WiFi, and Universal Serial Bus (USB), etc. Presentation module 553 is used to enable the presentation of information (e.g., user interface for operating peripheral devices and displaying content and information) via one or more output devices 531 (e.g., display screen, speaker, etc.) associated with user interface 530. The input processing module 554 is used to detect and translate one or more user inputs or interactions from one or more input devices 532.

[0047] In some embodiments, the apparatus for generating performance instruction information in a virtual scene provided in this application can be implemented in software. Figure 2 A device 555 for generating performance instruction information in a virtual scene stored in memory 550 is shown. It can be software in the form of programs and plug-ins, including the following software modules: information acquisition module 5551, note conversion module 5552, and information generation module 5553. These modules are logical and can therefore be arbitrarily combined or further divided according to the functions they implement. The functions of each module will be described below.

[0048] In other embodiments, the apparatus provided in this application can be implemented in hardware. For example, the apparatus provided in this application can be a processor in the form of a hardware decoding processor, which is programmed to execute the method for generating performance instruction information in a virtual scene provided in this application. For example, the processor in the form of a hardware decoding processor can be one or more application-specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field-programmable gate arrays (FPGAs), or other electronic components.

[0049] Based on the above description of the system and electronic device for generating performance instruction information in a virtual scene according to the embodiments of this application, the method for generating performance instruction information in a virtual scene provided by the embodiments of this application will be described next. In some embodiments, this method can be implemented by a terminal or a server alone, such as through... Figure 1 Terminal 400-1 or server 200 can be implemented independently, or they can be implemented collaboratively by the server and terminal, such as through... Figure 1 The terminal 400-1 and server 200 are implemented in collaboration. Next, we will combine... Figure 1 and Figure 3 , Figure 3 This is a flowchart illustrating the method for generating performance instruction information in a virtual scene according to an embodiment of this application. Figure 1 The method for generating performance instruction information in a virtual scene provided in this application embodiment is used as an example to illustrate the implementation of the method in terminal 400-1.

[0050] Step 101: The terminal obtains the sheet music file corresponding to the performance audio, and determines the note information of the performance audio corresponding to the first type of note based on the sheet music file.

[0051] In this context, a sheet music file refers to a file containing digital sheet music information, created by editing performance audio. For example, a MIDI file is created by editing performance audio using a MIDI editor in a DAW. Type I notes refer to fixed-pitch notes of universal standard notes contained in the sheet music file (such as a MIDI file), such as piano notes: do, re, mi, fa, so, la, xi. Note information refers to information associated with the score of the performance audio, such as timecode, tempo, pitch, and dynamics. Based on the timecode and tempo, the relative timing (or start time) and relative duration (time offset between two adjacent notes) of the corresponding Type I notes can be determined. Pitch information represents the pitch of the corresponding note, and dynamics information represents the volume of the corresponding note.

[0052] In some embodiments, before obtaining the sheet music file corresponding to the performance audio, the terminal can also edit the sheet music file in the following way: Presents the score editing interface corresponding to the performance audio; responds to score editing operations triggered based on the score editing interface for the performance audio, determines the score parameters corresponding to the score editing operation; responds to file generation commands, generates the score file corresponding to the performance audio based on the edited score parameters.

[0053] In practical applications, the performance audio can be imported into audio editing software (such as Ableton Live). Opening the audio editing software will present the corresponding score editing interface for the performance audio. Based on the score editing interface, the score parameters to be edited can be entered, such as instrument type, note time code, note height, etc. After all score parameters are entered, a file generation command can be triggered by a one-click confirmation operation based on the score parameters. The terminal responds to the file generation command and generates the score file corresponding to the performance audio, such as a MIDI file, based on the edited score parameters, thus completing the score editing work.

[0054] See Figure 4 , Figure 4 This is a schematic diagram of the music score editing interface provided in the embodiments of this application, such as... Figure 4 In the chart, the horizontal axis displays numbers "1, 2, 3...", representing the number of musical measures. The black horizontal lines below represent the pitch of the notes, their relative timing (the start time of the performance), and their relative duration (the time offset between two adjacent notes). Once the score is edited, the corresponding score file (such as a MIDI file) can be obtained and exported, which describes the score of the audio to be performed using bytes.

[0055] See Figure 5 , Figure 5This is a flowchart illustrating a method for generating performance instruction information in a virtual scene according to embodiments of this application. In some embodiments, Figure 4 Show Figure 3 Step 101, "Determine the note information of the performance audio corresponding to the first type of note based on the score file," can be achieved through steps 1011-1013: Step 1011: When the score file contains note parameters corresponding to multiple channels, filter out the note parameters corresponding to the target channel from the score file; Step 1012: Extract the note parameters corresponding to the first type of note from the note parameters corresponding to the target channel; Step 1013: Determine the note information corresponding to the first type of note based on the note parameters; The note parameters include at least the timecode and the tempo of the music corresponding to the played audio.

[0056] Here, the MIDI file is parsed and its notes are converted, transforming it into an information format usable by the virtual scene. In practical applications, the MIDI file, a music score file, contains performance definitions for up to 16 channels, each corresponding to a performance score. Here, the note parameters corresponding to the channel edited during the music score editing process (i.e., the target channel) are selected from multiple channels.

[0057] The data in the target channel of a MIDI file consists of several sub-data items with the same format. These sub-data items record all the information of a track in a multi-track format. Whether it is a global track or a track containing notes, they all start with "4D54 72 6B", which is actually the ASCII character "MTrk". After the beginning, there is a 4-byte integer used to represent the number of bytes in the track. Then comes the data used to record the note parameters. Each data item has the same structure: time difference + event. The time difference refers to the number of time between the previous note and the current note, that is, the time offset between two adjacent notes, and the unit is tick (the smallest time unit of MIDI). Events include notes, controllers, and system information. For these events, there is a unified expression structure: type + parameter. For example, for note types, since the effective range of each note is 0~127, the note type can be represented by 00~7F. For example, 3C represents middle C note, and 3C 64 represents a middle C note with a velocity of 100 in decimal.

[0058] In some embodiments, the number of notes of the first type in the score file is multiple, and the note information includes the performance start time point; the terminal can determine the note information of the corresponding first type of note based on the note parameters of the corresponding first type of note in the following manner: obtain the unit time code, where the unit time code is the note length of the unit note; determine the ratio of the time code of each first type of note to the unit time code, and determine the unit duration of the unit note based on the music tempo; and determine the performance start time point of the corresponding first type of note by multiplying the ratio by the unit duration.

[0059] Here, assuming the unit note is a quarter note, the unit timecode is the length of one quarter note. When calculating the duration of a unit note, we need to introduce tempo (BMP, Beat Per Minute). BMP represents the number of unit notes within one minute. For example, assuming the unit note is a quarter note and BPM = 120, it means there are 120 quarter notes per minute. Therefore, the unit duration of one quarter note is 60 / BPM = 0.5 seconds. For a first-type note denoted by timecode N, if the unit timecode is 96, then N / 96 represents how many quarter notes precede this first-type note. If the start time of playing this first-type note is P, then P = (N / 96). (60 / BPM).

[0060] In some embodiments, the note information includes the note distance between adjacent first-class notes. The terminal can determine the performance time difference between adjacent first-class notes based on the performance start time of each first-class note in the following manner; and determine the note distance between adjacent first-class notes based on the music tempo corresponding to the performance audio and the performance time difference between adjacent first-class notes.

[0061] Here, the note distance between adjacent first-class notes can be used to determine the key distance between adjacent virtual keys corresponding to adjacent second-class notes. Based on the tempo of the music corresponding to the playing audio, the movement speed of the corresponding virtual keys is obtained. The product of the movement speed of the virtual keys and the corresponding playing time difference is used as the key distance between adjacent virtual keys.

[0062] Step 102: Obtain the note conversion relationship, and perform note conversion on the note information based on the note conversion relationship to obtain the target note information corresponding to the second type of note.

[0063] The second type of note consists of notes associated with multiple virtual buttons used for audio performance in the virtual scene. Each note in the second type corresponds one-to-one with a virtual button; that is, the second type of note represents the notes played using the selected instrument in the virtual scene. This type differs from the first type of note. For example, the first type of note consists of fixed-pitch notes of standard notes commonly used in MIDI files, such as piano notes. The second type of note consists of ancient Chinese musical notes, such as notes on the guqin (a seven-stringed zither). The target note information for the second type of note is consistent with the note information for the first type of note. For instance, the time code of the first type of note is the same as the time code of the corresponding second type of note. Furthermore, the start time of the performance of the first type of note is the same as the start time of the performance of the corresponding second type of note.

[0064] In some embodiments, when there are multiple first-class notes, the terminal can perform note conversion on the note information based on the note conversion relationship to obtain the target note information corresponding to the second-class notes in the following manner: based on the note conversion relationship, determine the second-class notes corresponding to each first-class note and the pitch of the second-class notes; use the note information of each first-class note as the target note information of the second-class note with the corresponding pitch.

[0065] Here, the first type of note is the fixed-pitch note of the universal standard notes in MIDI files, such as piano notes, including: do, re, mi, fa, so, la, xi. The second type of note is the note played in the virtual scene using the selected instrument. For example, the second type of note is the ancient Chinese character notes, such as the notes of the guqin, including: gong, shang, jiao, bianzhi, zhi, yu, biangong. The first type of note and the second type of note have a one-to-one correspondence. For example, do, re, mi, fa, so, la, xi correspond one-to-one with gong, shang, jiao, bianzhi, zhi, yu, biangong.

[0066] In practical applications, guqin notes and MIDI fixed-key notes (such as piano notes) cannot be directly converted. An input variable is needed for conversion, specifying the key ("Gong, Shang, Jiao, Zhi, Yu"). "Gong, Shang, Jiao, Zhi, Yu" represent the tonic keys "do, re, mi, so, la," but in practice, they can be either C major or D major. In C major, "do" is the note C, and "Gong" is also the note C. In D major, "do" is the note D, and "Gong" is also the note D. Therefore, in terms of MIDI information, n=52 represents E2, which is an E note to the left of middle C. According to note conversion relationships, n=52 represents a low-pitched "Jiao" note in C major.

[0067] After obtaining the target note information for the second type of note, the correspondence between the target note information and the corresponding virtual keys can be stored in the form of a txt file. This results in a txt file that the game client on the terminal can understand, allowing the game client on the terminal to directly read the txt file and generate corresponding performance instruction information based on the correspondence between the target note information for each second type of note and the corresponding virtual keys in the txt file.

[0068] Step 103: Based on the target note information, generate performance instruction information for multiple virtual keys.

[0069] Among them, the performance instruction information is used to indicate the performance information of each virtual key in the key sequence that corresponds to the target note information, which consists of multiple virtual keys.

[0070] In some embodiments, the terminal can generate performance instruction information corresponding to multiple virtual keys based on the target note information in the following manner: when the target note information includes the performance start time of each second type of note, a corresponding key indicator icon is generated for the virtual key corresponding to each second type of note at the performance start time; and the generated key indicator icons are used as performance instruction information for the corresponding virtual keys.

[0071] Here, since the first type of note corresponds to the second type of note, the note information of the first type of note is consistent with the target note information of the corresponding second type of note. For example, the start time of playing the second type of note is the start time of playing the corresponding first type of note. Based on the virtual key corresponding to the second type of note at each start time of playing, a corresponding key indicator icon is generated.

[0072] In some embodiments, after the terminal generates performance instruction information corresponding to multiple virtual keys, it can also present a performance interface and display multiple virtual keys in the performance area of ​​the performance interface, and display multiple key indicator icons in the performance instruction area of ​​the performance interface; when the performance start time of the virtual key corresponding to the target key indicator icon is reached, the display mode of the target key indicator icon is changed to indicate the performance of the corresponding virtual key.

[0073] See Figure 6 , Figure 6This is a schematic diagram of the display interface for performance instruction information provided in this application embodiment. The performance interface 601 presents a performance area 602 and a performance instruction area 603. Multiple virtual buttons are presented in the performance area 602, and multiple button indicator icons are presented in the performance instruction area 603, such as the button indicator icon 604 for the character "feather". When the performance start time of the button indicator icon 604 is reached, a different display method than before the performance start time is reached is adopted, such as highlighting the button indicator icon 604 to indicate the performance of the corresponding virtual button.

[0074] In some embodiments, the terminal may present multiple key indicator icons in the following manner: presenting the movement process of multiple key indicator icons and presenting a target position marker; correspondingly, the terminal may change the display mode of the target key indicator icon when the performance start time of the virtual key corresponding to the target key indicator icon is reached in the following manner: when the performance start time of the virtual key corresponding to the target key indicator icon is reached, presenting the process of the target key indicator icon moving to the target position marker and disappearing.

[0075] See Figure 7 , Figure 7 This is a schematic diagram of the display interface for performance instruction information provided in this application embodiment. The performance interface 701 presents a performance area 702 and a performance instruction area 703. The performance instruction area 703 presents a target position identifier 704. When the target button indicator icon moves to the target position identifier 704, it indicates that the performance start time of the virtual button indicated by the target button indicator icon has arrived.

[0076] In some embodiments, when the target note information includes the pressing pressure of each second type of note, the terminal can also determine a display style that matches the pressing pressure of the corresponding second type of note for each generated key indicator icon, and use the display style of each key indicator icon as the performance indication information of the corresponding virtual key; wherein, the display style of the key indicator icon is used to indicate the pressing pressure triggered for the virtual key, and the pressing pressure is used to control the volume of the corresponding second type of note output.

[0077] Here, when displaying the key indicator icons, the corresponding pressure value or pressure level of the second type of note can be shown around each key indicator icon. The key indicator icons and their corresponding pressure values ​​or pressure levels are collectively referred to as the performance indication information of the corresponding virtual keys; alternatively, different pressure levels may correspond to different display sizes of the key indicator icons, see [reference needed]. Figure 8 , Figure 8 This is a schematic diagram of the display interface for performance instruction information provided in an embodiment of this application. The greater the pressure applied, the larger the corresponding button indicator icon becomes.

[0078] In some embodiments, after the terminal generates performance instruction information corresponding to multiple virtual keys, it can also present a performance interface, in which multiple virtual keys are presented and each key indicator icon is displayed using a corresponding display style; when a press operation is received for the target virtual key, the second type of note corresponding to the target virtual key is output using a volume level corresponding to the pressing force of the press operation.

[0079] For example, Figure 6 In the middle, the display style of the virtual key 605, namely "Gong", is the same as the display style of the key indicator icon 604 corresponding to the virtual key 605. When outputting the second type of note corresponding to the target virtual key, the greater the pressing force of the target virtual key, the louder the playing volume of the second type of note corresponding to the target virtual key.

[0080] In some embodiments, when the target note information includes the pitch of each second type of note, the terminal can also determine the display area of ​​the corresponding key indicator icon for each virtual key corresponding to the second type of note at the start of the performance. The number of display areas is at least two, and different display areas correspond to different pitches. The display area of ​​the key indicator icon is used as the performance indication information of the corresponding virtual key.

[0081] For example, Figure 7 In the operation area 702, the display area for the button indicator icons corresponding to the virtual buttons is 703. Display area 703 includes a treble display area and a bass display area (two rows). Different display areas correspond to different tones; for example, the first row corresponds to treble and the second row corresponds to bass. In practical applications, the number of display areas can be more than two. For example, display area 703 may include a treble display area, an accent display area, and a bass display area (three rows), with the first row corresponding to treble, the second row to midrange, and the third row to bass.

[0082] In some embodiments, after the terminal generates performance instruction information corresponding to multiple virtual keys, it can also present a performance interface, which presents at least two operation areas, with a one-to-one correspondence between the operation areas and the display areas; multiple virtual keys are presented in each operation area, and each key indicator icon is displayed in the corresponding display area; when a trigger operation is received for a target virtual key, the second type of note corresponding to the target virtual key is output using the corresponding pitch according to the operation area where the trigger operation is located.

[0083] Here, there are multiple operating areas, such as... Figure 7In the operation area 702, there are two operation areas: a high-frequency operation area and a low-frequency operation area. Correspondingly, the display area 703 includes a high-frequency display area and a low-frequency display area. When a trigger operation is received for a target virtual button, the corresponding second-type note is output according to the operation area where the trigger operation is located. For example, when a trigger operation is received for the target virtual button "Gong" in the high-frequency operation area, the second-type note "Gong" corresponding to the target virtual button is output in high-frequency mode.

[0084] The following describes an exemplary application of the embodiments of this application in a real-world application scenario. Taking a virtual scene as a music performance game as an example, when generating performance instruction information, related technologies use a table configuration method to configure virtual buttons in the music performance game. For example, when the music begins to play, the virtual button corresponding to the first note appears at second x and lasts for second y. A two-dimensional table related to the virtual buttons and timeline is formed in this format, and the virtual button corresponding to each note is configured. However, this configuration method is essentially a mode closer to program thinking, which is inconsistent with musical logic. This is because the music score is designed based on concepts such as musical tempo and rhythm, rather than time. Therefore, this configuration method is less visual, less intuitive, less efficient, prone to errors, and affects artistic creation for music professionals.

[0085] Based on the table configuration method, a self-made editor-encapsulated table configuration method has been developed. This method provides a visual operation interface, such as using mouse drag and drop to replace table input operations. Although this improves the visualization and reduces the probability of errors to some extent, music editors are very special editors. When developing a self-made music editor, developers need to be familiar with music theory and learn to develop new music editors. This will inevitably consume more time and energy, resulting in high development costs. Moreover, music practitioners need to spend additional time and energy learning to operate the self-made music editor, and the need for multiple software collaborations leads to more file import and export work, making the operation complicated and inefficient.

[0086] Therefore, this application provides a method for generating performance instruction information in a virtual scene. It directly uses the MIDI editors in various DAWs that are most familiar to music professionals to directly edit and generate performance instruction information. For game developers, there is no need to consider the conversion between program logic and music logic, no need to learn new editors, no need to switch between various software, and no need to develop and maintain new editors, saving time and effort. For music professionals, the MIDI editors in the familiar DAWs are intuitive, fast, reliable, and easy to produce good results.

[0087] See Figure 9 , Figure 9This is a schematic diagram of the method for generating performance instruction information in a virtual scene according to an embodiment of this application, which will be combined with... Figure 9 Please provide an explanation.

[0088] Step 301: The terminal acquires the performance audio.

[0089] Step 302: Edit the score of the performance audio to obtain the corresponding MIDI file.

[0090] Here, the performance audio is input into the DAW on the terminal, and an independent melody related to the performance audio is designed by creating a new MIDI channel, which is the virtual key sequence in the game.

[0091] In practice, designing an independent melody related to the performance audio involves editing the performance score, such as modifying the instrument type, note duration, pitch, and dynamics, to obtain the corresponding MIDI file (i.e., score file). This involves describing the accompaniment score using bytes. Next, the game engine parses the MIDI file and performs note conversion, transforming it into an information format usable by the game.

[0092] Step 303: Based on the MIDI file, determine the target note information corresponding to the instrument used in the music performance game.

[0093] Here, the MIDI file contains notes, timings, and performance definitions for up to 16 channels. The MIDI file includes performance note information for each channel: key channel number, duration, volume, and velocity. When editing and modifying the MIDI data, notes can be easily added or deleted, or their attributes can be changed. MIDI files themselves are highly information-rich and have very complex internal rules; a single MIDI file can carry far more information than a traditional paper sheet music. For example, a MIDI file carries velocity information from 0 to 127 levels, recording the performance velocity of each "note" on the "sheet music." Therefore, it is necessary to extract the parts needed for music performance game gameplay from the performance note information contained in the MIDI file.

[0094] A MIDI file can have multiple channels, each corresponding to a musical score. Here, the channel used for score editing is selected from multiple channels, and the note information of the universal standard notes (i.e., the first type of notes, such as piano notes: do, re, mi, fa, so, la, xi) corresponding to the performance audio is obtained from the selected channel. This includes the note time code, tempo (BPM), pitch information, and dynamics information. The note information of the universal standard notes is then converted to obtain the target note information of the ancient Chinese character notes (i.e., the second type of notes, such as guqin notes) corresponding to the instruments used in the music performance game. Among them, the ancient Chinese character notes are the notes associated with the virtual keys used in the music performance game to play the guqin, such as gong, shang, jiao, bianzhi, zhi, yu, biangong. The second type of notes correspond one-to-one with the virtual keys, and the first type of notes correspond one-to-one with the second type of notes. For example, do, re, mi, fa, so, la, xi correspond one-to-one with gong, shang, jiao, bianzhi, zhi, yu, biangong, respectively.

[0095] For example, a MIDI file is shown in Table 1: Table 1

[0096] First column (N): Time code, used to represent the relative duration of the note.

[0097] MIDI files do not record the appearance of virtual keys corresponding to notes (i.e., the start time of the performance) in absolute time. In other words, they do not directly record the second when a note appears. Instead, they determine the absolute start time of the performance through music tempo and relative timecode. Music tempo (BPM) represents the number of unit notes per minute in a piece of music, and unit timecode represents the length of one unit note. n depends on the value set by the DAW manufacturer.

[0098] Assuming the unit note is a quarter note, then the unit timecode is the length of one quarter note. When calculating the duration of a unit note, we need to introduce musical tempo (BMP). BMP represents the number of unit notes within one minute. For example, assuming the unit note is a quarter note and BPM = 120, it means there are 120 quarter notes per minute. Therefore, the unit duration of one quarter note is 60 / BPM = 0.5 seconds. For a first-type note denoted by timecode N, if the unit timecode is 96, then N / 96 represents how many quarter notes precede this first-type note. If the start time of playing this first-type note is P, then P = (N / 96). (60 / BPM).

[0099] It should be noted that since the first type of note corresponds to the second type of note, the note information of the first type of note is consistent with the target note information of the corresponding second type of note. For example, the start time of playing the second type of note is the same as the start time of playing the corresponding first type of note.

[0100] The second column: On indicates that the virtual key corresponding to the note is pressed, and Off indicates that the virtual key corresponding to the note is released. Considering that in actual application, the pianist function only requires pressing the virtual key and does not need to release it, the entire row of data in the second column that is Off can be filtered out.

[0101] The third column represents the channels. Note information is generally on the ch=1 channel, so only the data of ch=1 is retained.

[0102] The fourth column represents musical notes. The MIDI standard has a clear mapping table; for example, n=52 represents the piano note E2. Based on the note conversion relationship between piano and guqin, these can be used to trigger virtual buttons corresponding to different notes in music performance games played on the guqin. The names of the virtual buttons can be the names of guqin notes, such as "Gong, Shang, Jiao, Zhi, Yu," etc. Guqin notes and MIDI fixed-key notes (such as piano notes) cannot be directly converted; an input variable is needed for conversion, specifying the key of "Gong, Shang, Jiao, Zhi, Yu."

[0103] "Gong, Shang, Jiao, Zhi, Yu" represent the notes "do, re, mi, so, la" in the major scale, respectively. In practical applications, they can be "do, re, mi, so, la" in the major scale of C or "do, re, mi, so, la" in the major scale of D. When it is the major scale of C, "do" is the note C, and "Gong" is the note C. When it is the major scale of D, "do" is the note D, and "Gong" is the note D. In terms of MIDI information, n=52 represents E2, which is an E note to the left of middle C. According to the note conversion relationship, n=52 represents a low "Jiao" note in the major scale of C.

[0104] The fifth column: Velocity information, used to characterize the playing intensity of notes. In practice, the velocity information can be determined based on the acceleration information of the gyroscope input device operated by the player. For example, in music performance games, virtual buttons require the player to press them forcefully to be considered correctly executed. A very heavy drum sound is due to the hand trembling as it presses the terminal device, causing a surge in gyroscope acceleration. When editing the note information corresponding to these gravity-based virtual buttons, the "v" information in MIDI can be used. For example, v < 60 for a normal button and v > 100 for an accented button. In this way, different velocity information can be stored in a MIDI file. At the same time, in a DAW, v > 100 sounds like the volume of the note is very high, achieving not only visual editing but also audible editing, making it more intuitive for music professionals.

[0105] Step 304: Store the correspondence between the target note information and the virtual keys.

[0106] Here, after obtaining the target note information of the second type of note through the above method, the correspondence between the target note information and the corresponding virtual keys can be stored in a file format that the game client on the terminal can understand, such as storing it in the form of a txt file, and exporting the txt file for use by the game client. For example, the game client can directly read the txt file and generate corresponding performance instruction information based on the correspondence between the target note information of each second type of note and the corresponding virtual keys in the txt file.

[0107] Step 305: Run the music performance game and generate performance instruction information based on the corresponding relationship.

[0108] Among them, the performance instruction information is used to indicate the performance information of each virtual key in the key sequence corresponding to the target note information, which consists of multiple virtual keys, such as the timing and duration of each virtual key's appearance.

[0109] Using the above method, and with the help of MIDI files containing a great deal of information, a correspondence is established between each second-class note and its corresponding virtual key. That is, each virtual key is associated with its corresponding note information and stored in a txt file for the game client to read. In this way, the virtual keys of various music performance games can be edited in a very versatile way.

[0110] The following description continues to illustrate the exemplary structure of the device 555 for generating performance instruction information in a virtual scene provided in this application embodiment as a software module. In some embodiments, such as... Figure 10 As shown, Figure 10This is a schematic diagram of the structure of the device for generating performance instruction information in a virtual scene provided in the embodiments of this application. The software modules in the device 555 for generating performance instruction information in a virtual scene stored in the memory 550 include: The information acquisition module 5551 is used to acquire the sheet music file corresponding to the performance audio, and based on the sheet music file, determine the note information of the performance audio corresponding to the first type of note; The note conversion module 5552 is used to acquire note conversion relationships and convert the note information based on the note conversion relationships to obtain target note information corresponding to the second type of note; The second type of note refers to the notes associated with multiple virtual keys used for audio performance in the virtual scene, and the second type of note corresponds one-to-one with the virtual keys; The information generation module 5553 is used to generate performance instruction information corresponding to the plurality of virtual keys based on the target note information; The performance instruction information is used to indicate the performance information of each virtual key in the key sequence corresponding to the target note information, which is composed of the plurality of virtual keys.

[0111] In some embodiments, before acquiring the sheet music file corresponding to the performance audio, the apparatus further includes: The file generation module is used to present the score editing interface corresponding to the performance audio; In response to a music score editing operation triggered based on the music score editing interface for the performance audio, the music score parameters corresponding to the music score editing operation are determined; In response to the file generation instruction, a score file corresponding to the performance audio is generated based on the edited score parameters.

[0112] In some embodiments, the number of the first type of notes is multiple, and the note conversion module is further configured to determine the second type of notes corresponding to each of the first type of notes and the pitch of the second type of notes based on the note conversion relationship; The note information of each of the first type of notes is used as the note information of the second type of notes of the corresponding tone.

[0113] In some embodiments, the information acquisition module is further configured to filter and obtain the note parameters corresponding to the target channel from the music score file when the music score file contains note parameters corresponding to multiple channels; Extract the note parameters corresponding to the first type of note from the note parameters corresponding to the target channel; Based on the note parameters corresponding to the first type of note, determine the note information corresponding to the first type of note; The note parameters include at least the time code and the tempo corresponding to the performance audio.

[0114] In some embodiments, the number of the first type of notes in the musical score file is multiple, and the note information includes the start time of the performance; the information acquisition module is further configured to acquire a unit time code, wherein the unit time code is the note length of a unit note; The ratio of the time code to the unit time code for each of the first type of notes is determined, and the unit duration of the unit note is determined based on the music tempo. The product of the ratio and the unit duration is determined as the start time of the performance of the corresponding first type of note.

[0115] In some embodiments, the note information includes note distances between adjacent first-class notes, and the device further includes: The distance determination module is used to determine the performance time difference between adjacent first-class notes based on the performance start time of each first-class note; Based on the tempo corresponding to the performance audio and the performance time difference between adjacent first-class notes, the note distance between adjacent first-class notes is determined.

[0116] In some embodiments, the information generation module is further configured to generate a corresponding key indicator icon for the virtual key corresponding to each second type of note when the target note information includes the performance start time of each second type of note; The generated button indicator icons are used as performance indicator information for the corresponding virtual buttons.

[0117] In some embodiments, after generating the performance instruction information corresponding to the plurality of virtual keys, the device further includes: An indicator presentation module is used to present the performance interface, and to present the multiple virtual buttons in the performance area of ​​the performance interface, and to present multiple button indicator icons in the performance indicator area of ​​the performance interface. When the start time for playing the virtual key corresponding to the target key indicator icon is reached, the display mode of the target key indicator icon is changed to indicate that the corresponding virtual key should be played.

[0118] In some embodiments, the indicator presentation module is further configured to present the movement process of the plurality of button indicator icons and present a target location identifier; When the start time of the performance of the virtual key corresponding to the target key indicator icon is reached, the process of the target key indicator icon moving to the target position mark and disappearing is presented.

[0119] In some embodiments, when the target note information includes the pressure applied to each of the second type of notes, the device further includes: The information display module is used to determine a display style that matches the pressing pressure of the corresponding second type of note for each generated key indicator icon, and to use the display style of each key indicator icon as the performance instruction information of the corresponding virtual key. The display style of the button indicator icon is used to indicate the corresponding pressing pressure when the virtual button is triggered, and the pressing pressure is used to control the volume of the corresponding second type of note output.

[0120] In some embodiments, after generating the performance instruction information corresponding to the plurality of virtual keys, the device further includes: The performance output module is used to present a performance interface, in which the plurality of virtual buttons are presented, and each button indicator icon is displayed using the corresponding display style. When a press operation is received on the target virtual button, the second type of note corresponding to the target virtual button is output using a volume level corresponding to the pressure applied by the press operation.

[0121] In some embodiments, when the target note information includes the pitch of each of the second type of notes, the information display module is further configured to determine the display area of ​​the corresponding key indicator icon for the virtual key corresponding to each second type of note at the start of the performance, wherein the number of display areas is at least two, and different display areas correspond to different pitches; The display area of ​​the key indicator icon is used as the performance instruction information for the corresponding virtual key.

[0122] In some embodiments, after generating the performance instruction information corresponding to the plurality of virtual buttons, the performance output module is further configured to present a performance interface, in which at least two operation areas are presented, and the operation areas correspond one-to-one with the display areas; The plurality of virtual buttons are presented in each of the operation areas, and each button indicator icon is displayed in the corresponding display area; When a trigger operation is received for a target virtual key, the second type of note corresponding to the target virtual key is output using the corresponding tone, based on the operation area where the trigger operation is located.

[0123] This application provides a computer program product or computer program that includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the method for generating performance instruction information in a virtual scene as described above in this application embodiment.

[0124] This application provides a computer-readable storage medium storing executable instructions. When the executable instructions are executed by a processor, the processor will execute the method for generating performance instruction information in a virtual scene provided in this application.

[0125] In some embodiments, the computer-readable storage medium may be a memory such as FRAM, ROM, PROM, EPROM, EEPROM, flash memory, magnetic surface memory, optical disk, or CD-ROM; or it may be a variety of devices including one or any combination of the above-mentioned memories.

[0126] In some embodiments, executable instructions may take the form of a program, software, software module, script, or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as a standalone program or as a module, component, subroutine, or other unit suitable for use in a computing environment.

[0127] As an example, executable instructions may, but do not necessarily, correspond to files in a file system. They may be stored as part of a file that holds other programs or data, for example, in one or more scripts in a Hyper Text Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple collaborating files (e.g., a file that stores one or more modules, subroutines, or code sections).

[0128] As an example, executable instructions can be deployed to execute on a single computing device, or on multiple computing devices located in one location, or on multiple computing devices distributed across multiple locations and interconnected via a communication network.

[0129] The above description is merely an embodiment of this application and is not intended to limit the scope of protection of this application. Any modifications, equivalent substitutions, and improvements made within the spirit and scope of this application are included within the scope of protection of this application.

Claims

1. A method for generating performance instruction information in a virtual scene, characterized in that, The method includes: Displays the sheet music editing interface corresponding to the performance audio; In response to a music score editing operation triggered based on the music score editing interface for the performance audio, the music score parameters corresponding to the music score editing operation are determined; wherein, the music score editing operation is used to edit an independent melody related to the performance audio in the target channel of the music score editing interface, and the independent melody corresponds to a virtual key sequence in the virtual scene; In response to the file generation instruction, a score file corresponding to the performance audio is generated based on the edited score parameters; Select the note parameters corresponding to the target channel from the music score file, filter out the Off event data representing the release of the virtual key in the selected note parameters, and determine the note information of the performance audio corresponding to the first type of note based on the retained note parameters after filtering. The note information includes time code, music tempo and dynamics information. Obtain the note conversion relationship, and perform note conversion on the note information based on the note conversion relationship to obtain the target note information corresponding to the second type of note; wherein, the second type of note is the note associated with multiple virtual keys used for audio performance in the virtual scene, and the second type of note corresponds one-to-one with the virtual keys, the target note information includes the performance start time point and target performance intensity of each second type of note, the performance start time point is determined according to the time code of the corresponding first type of note and the music tempo, and the target performance intensity is represented by the intensity information of the corresponding first type of note; For each virtual key corresponding to the second type of note at the start of the performance, generate a key indicator icon for the virtual key; For each generated key indicator icon, determine a display style that matches the target playing intensity of the corresponding second-class note; Each of the aforementioned button indicator icons and their display styles shall be used as the performance instruction information for the corresponding virtual buttons; The performance instruction information is used to indicate the performance information of each virtual key in the key sequence corresponding to the target note information, which is composed of the plurality of virtual keys; the display style of the key indicator icon is used to indicate the pressing operation corresponding to the target performance intensity triggered on the virtual key; the actual pressing force of the pressing operation is used to control the volume of the corresponding second type of note output.

2. The method as described in claim 1, characterized in that, The step of determining the note information of the performance audio corresponding to the first type of note based on the retained note parameters after filtering includes: Extract the note parameters corresponding to the first type of note from the retained note parameters after filtering; Based on the note parameters corresponding to the first type of note, determine the note information corresponding to the first type of note; The note parameters corresponding to the first type of note include at least the time code and the tempo of the music corresponding to the performance audio.

3. The method as described in claim 2, characterized in that, The number of notes of the first type in the musical score file is multiple, and the note information includes the start time of the performance; determining the note information corresponding to the first type of note based on the note parameters of the first type of note includes: Obtain the unit time code, where the unit time code is the note length of a unit note; The ratio of the time code to the unit time code for each of the first type of notes is determined, and the unit duration of the unit note is determined based on the music tempo. The product of the ratio and the unit duration is determined as the start time of the performance of the corresponding first type of note.

4. The method as described in claim 3, characterized in that, The note information includes the note distance between adjacent first-class notes, and the method further includes: Based on the start time of each of the first type of notes, determine the time difference between adjacent first type of notes; Based on the tempo corresponding to the performance audio and the performance time difference between adjacent first-class notes, the note distance between adjacent first-class notes is determined.

5. The method as described in claim 1, characterized in that, The first type of note has multiple components. The step of converting the note information based on the note conversion relationship to obtain the target note information corresponding to the second type of note includes: Based on the note conversion relationship, determine the second type of note corresponding to each first type of note, and the pitch of the second type of note; The note information of each of the first type of notes is used as the target note information of the second type of note of the corresponding tone.

6. The method as described in claim 1, characterized in that, After using the button indicator icons and their display styles as performance indication information for the corresponding virtual buttons, the method further includes: A performance interface is presented, and the multiple virtual buttons are displayed in the performance area of ​​the performance interface, and multiple button indicator icons are displayed in the performance indicator area of ​​the performance interface. When the start time for playing the virtual key corresponding to the target key indicator icon is reached, the display mode of the target key indicator icon is changed to indicate that the corresponding virtual key should be played.

7. The method as described in claim 6, characterized in that, The presentation of multiple button indicator icons includes: The movement process of multiple button indicator icons is displayed, along with the target location marker. When the performance start time of the virtual key corresponding to the target key indicator icon is reached, the display mode of the target key indicator icon is changed, including: When the start time of the performance of the virtual key corresponding to the target key indicator icon is reached, the process of the target key indicator icon moving to the target position mark and disappearing is presented.

8. The method as described in claim 1, characterized in that, After using the button indicator icons and their display styles as performance indication information for the corresponding virtual buttons, the method further includes: A performance interface is presented, in which the plurality of virtual buttons are displayed, and each button indicator icon is displayed using the corresponding display style; When a press operation is received on the target virtual key, the second type of note corresponding to the target virtual key is output using a volume level corresponding to the actual pressing force of the press operation.

9. The method as described in claim 1, characterized in that, When the target note information includes the pitch of each of the second type of notes, the method further includes: For each virtual key corresponding to the second type of note at the start of the performance, determine the display area of ​​the corresponding key indicator icon. The number of display areas is at least two, and different display areas correspond to different pitches. The display area of ​​the key indicator icon is used as the performance instruction information for the corresponding virtual key.

10. The method as described in claim 9, characterized in that, After using the button indicator icons and their display styles as performance indication information for the corresponding virtual buttons, the method further includes: A performance interface is presented, in which at least two operation areas are presented, and the operation areas correspond one-to-one with the display areas. The plurality of virtual buttons are presented in each of the operation areas, and each button indicator icon is displayed in the corresponding display area; When a trigger operation is received for a target virtual key, the second type of note corresponding to the target virtual key is output using the corresponding tone, based on the operation area where the trigger operation is located.

11. A device for generating performance instruction information in a virtual scene, characterized in that, The device includes: The file generation module is used to display the sheet music editing interface corresponding to the performance audio; in response to a sheet music editing operation triggered based on the sheet music editing interface for the performance audio, it determines the sheet music parameters corresponding to the sheet music editing operation; wherein, the sheet music editing operation is used to edit an independent melody related to the performance audio in the target channel of the sheet music editing interface, and the independent melody corresponds to a virtual key sequence in the virtual scene; in response to a file generation command, it generates a sheet music file corresponding to the performance audio based on the edited sheet music parameters; The information acquisition module is used to select the note parameters corresponding to the target channel from the music score file, filter out the Off event data representing the release of the virtual key in the selected note parameters, and determine the note information of the performance audio corresponding to the first type of note based on the retained note parameters after filtering. The note information includes time code, music tempo and dynamics information. The note conversion module is used to obtain note conversion relationships and perform note conversion on the note information based on the note conversion relationships to obtain target note information corresponding to the second type of note; The second type of note refers to the notes associated with multiple virtual keys used for audio performance in the virtual scene, and the second type of note corresponds one-to-one with the virtual keys; the target note information includes the performance start time of each second type of note and the target performance intensity, the performance start time is determined according to the time code of the corresponding first type of note and the music tempo, and the target performance intensity is represented by the intensity information of the corresponding first type of note; The information generation module is used to generate a key indicator icon for each virtual key corresponding to the second type of note at each performance start time; for each generated key indicator icon, determine a display style that matches the target performance intensity of the corresponding second type of note; and use each key indicator icon and its display style as performance instruction information for the corresponding virtual key. The performance instruction information is used to indicate the performance information of each virtual key in the key sequence corresponding to the target note information, which is composed of the plurality of virtual keys; the display style of the key indicator icon is used to indicate the pressing operation corresponding to the target performance intensity triggered on the virtual key; the actual pressing force of the pressing operation is used to control the volume of the corresponding second type of note output.

12. The apparatus as claimed in claim 11, characterized in that, The information acquisition module is also used for: When the score file contains note parameters corresponding to multiple channels, the note parameters corresponding to the target channel are obtained by filtering from the score file; Extract the note parameters corresponding to the first type of note from the retained note parameters after filtering; Based on the note parameters corresponding to the first type of note, determine the note information corresponding to the first type of note; The note parameters corresponding to the first type of note include at least the time code and the tempo of the music corresponding to the performance audio.

13. The apparatus as claimed in claim 12, characterized in that, The number of the first type of notes in the musical score file is multiple, and the note information includes the start time of the performance; the information acquisition module is further used for: Obtain the unit time code, where the unit time code is the note length of a unit note; The ratio of the time code to the unit time code for each of the first type of notes is determined, and the unit duration of the unit note is determined based on the music tempo. The product of the ratio and the unit duration is determined as the start time of the performance of the corresponding first type of note.

14. An electronic device, characterized in that, include: Memory, used to store executable instructions; A processor, when executing executable instructions stored in the memory, implements the method for generating performance instruction information in a virtual scene as described in any one of claims 1 to 10.

15. A computer-readable storage medium, characterized in that, It stores executable instructions for use by a processor to implement the method for generating performance instruction information in a virtual scene as described in any one of claims 1 to 10.

16. A computer program product, characterized in that, It includes computer-executable instructions or computer programs, which, when executed by a processor, implement the method for generating performance instruction information in a virtual scene as described in any one of claims 1 to 10.

Citation Information

Patent Citations

  • Music style conversion method, music style conversion device and terminal equipment

    CN110246472A

  • Network game control method and device and storage medium

    CN110585705A

  • MIDI multi-track sequence representation method and application thereof

    CN111627410A