Sound procedural generation method, device, equipment, storage medium and program product
By determining the source material based on different frequency bands in the initial sound resources of the virtual object, and responding to the manipulation to obtain sound control parameters, the sound source material of each frequency band is adjusted, thus solving the problem of inconsistency between the waving motion and the sound of the virtual object, and realizing the generation of target sound with a higher degree of freedom.
Patent Information
- Application Number
- CN202210234926.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-09
- Publication Date
- 2026-11-24
- Estimated Expiration
- 2042-03-09
AI Technical Summary
Existing technologies cannot guarantee the consistency between waving movements and sound when controlling the waving motion of virtual objects with high degrees of freedom, resulting in insufficient flexibility and uniformity in sound generation.
By determining the sound material of each frequency band based on the different frequency bands in the initial sound resource of the virtual object, and in response to the manipulation to obtain sound control parameters, the sound material of each frequency band is adjusted to generate the target sound resource, thus achieving a higher degree of freedom in target sound performance.
It achieves synchronization and consistency between virtual object actions and sounds, improves the flexibility and freedom of sound generation, and adapts to various control methods.
Smart Images

Figure CN116764213B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of sound generation technology, specifically to a method, apparatus, device, storage medium, and program product for programmatic sound generation. Background Technology
[0002] Currently, the waving motion of virtual objects used by virtual characters in most games is usually achieved by using a large number of frame-by-frame animation resources and driving the switching and transition through different states. As a result, the sound resources for the various waving motions of virtual objects are also made based on the content of frame-by-frame animations and then triggered in a way that is strongly bound to the animation resources. However, the above method has limitations. Summary of the Invention
[0003] To address the aforementioned technical problems, embodiments of this application provide a method, apparatus, device, storage medium, and program product for programmatic voice generation.
[0004] According to one aspect of the embodiments of this application, a method for procedurally generating sound is provided. The method includes: determining sound material corresponding to each frequency band portion based on different frequency band portions in an initial sound resource of a virtual object; acquiring sound control parameters for adjusting the initial sound resource in response to manipulation of the virtual object; adjusting the sound material corresponding to each frequency band portion according to the sound control parameters; and generating a target sound resource of the virtual object based on the adjusted sound material for each frequency band portion.
[0005] According to one aspect of the embodiments of this application, a sound programmatic generation apparatus is provided. The apparatus includes: a determining module configured to determine sound material corresponding to each frequency band portion based on different frequency band portions in an initial sound resource of a virtual object; a parameter acquiring module configured to acquire sound control parameters for adjusting the initial sound resource in response to manipulation of the virtual object; an adjusting module configured to adjust the sound material corresponding to each frequency band portion according to the sound control parameters; and a generating module configured to generate a target sound resource of the virtual object based on the target sound material adjusted for each frequency band portion.
[0006] According to one aspect of the embodiments of this application, an electronic device is provided, including: a memory storing computer-readable instructions; and a processor reading the computer-readable instructions stored in the memory to execute the sound procedural generation method of any of the above.
[0007] According to one aspect of the embodiments of this application, a computer-readable storage medium is provided, on which computer-readable instructions are stored, which, when executed by a computer's processor, cause the computer to perform the sound procedural generation method as described above.
[0008] According to one aspect of the embodiments of this application, a computer program product is also provided, including a computer program that, when executed by a processor, implements the steps in the sound procedural generation method as described above.
[0009] In the technical solution provided by the embodiments of this application, the sound material of each frequency band is determined according to the different frequency bands in the initial sound resource of the virtual object, and in response to the manipulation of the virtual object, sound control parameters for adjusting the initial sound resource are obtained, and then the sound material corresponding to each frequency band is adjusted according to the sound control parameters to programmatically generate the target sound resource of the virtual object. It can be seen that the programmatic generation of the target sound resource of the virtual object in this application is adaptively adjusted according to the manipulation of the virtual object, realizing a higher degree of freedom in the performance of the target sound resource.
[0010] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit this application. Attached Figure Description
[0011] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application. It is obvious that the drawings described below are merely some embodiments of this application, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort. In the drawings:
[0012] Figure 1 This is a schematic diagram illustrating the effect of procedural sound generation in a procedural sound generation method according to an exemplary embodiment of this application;
[0013] Figure 2 This is a schematic diagram illustrating the implementation environment of a procedural sound generation method according to an exemplary embodiment of this application;
[0014] Figure 3 This is a flowchart illustrating a procedural sound generation method according to an exemplary embodiment of this application;
[0015] Figure 4 This is a schematic diagram illustrating the deconstruction of the initial sound resources of a virtual object in a procedural sound generation method according to an exemplary embodiment of this application;
[0016] Figure 5 yes Figure 3 The flowchart of step S330 in the procedural sound generation method shown is presented in an exemplary embodiment.
[0017] Figure 6 yes Figure 5The flowchart of step S510 in the procedural sound generation method shown is presented in an exemplary embodiment.
[0018] Figure 7 yes Figure 5 The flowchart of step S520 in the procedural sound generation method shown is presented in an exemplary embodiment.
[0019] Figure 8 This is a schematic diagram illustrating the effect of associating sound control parameters with sound materials corresponding to each frequency band in a procedural sound generation method according to an exemplary embodiment of this application;
[0020] Figure 9 yes Figure 3 The flowchart of step S320 in the illustrated embodiment is shown in an exemplary embodiment;
[0021] Figure 10 This is a schematic diagram illustrating the effect of simulated location information in a procedural sound generation method according to an exemplary embodiment of this application;
[0022] Figure 11 yes Figure 9 The flowchart of step S930 in the illustrated embodiment is shown in an exemplary embodiment;
[0023] Figure 12 yes Figure 3 The flowchart of step S310 in the illustrated embodiment is shown in an exemplary embodiment;
[0024] Figure 13 This is a block diagram illustrating a sound programming generation apparatus according to an exemplary embodiment of this application;
[0025] Figure 14 A schematic diagram of the structure of a computer system suitable for implementing the electronic device of the present application is shown. Detailed Implementation
[0026] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0027] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities can be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.
[0028] The flowcharts shown in the accompanying drawings are merely illustrative and do not necessarily include all content and operations / steps, nor do they necessarily have to be performed in the described order. For example, some operations / steps can be broken down, while others can be combined or partially combined; therefore, the actual execution order may change depending on the specific circumstances.
[0029] In this application, "multiple" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. The character " / " generally indicates that the preceding and following related objects have an "or" relationship.
[0030] First, it should be noted that in the internet age, procedural voice generation is a method of generating sound resources based on the waving movements of virtual objects in games. This allows the waving movements of virtual objects to be accompanied by corresponding sound resources, thereby enriching the user's gaming experience. In a broader sense, procedural voice generation exists in all aspects of life and can be applied to any technical field.
[0031] In existing technologies, this is usually achieved by using a large number of frame-by-frame animation resources in the game and driving the switching and transition through different states. This means that the sound resources for the various waving actions of virtual objects in the game are also made based on the content of the frame-by-frame animation, and then triggered in a way that is strongly bound to the animation resources.
[0032] However, in application scenarios where sound is programmed, there is a need to generate sound when controlling the waving motion of virtual objects using methods with higher degrees of freedom, such as mice, gamepads, or motion-sensing devices. Using existing technologies, it is impossible to guarantee the consistency between the waving motion of the virtual object and the sound.
[0033] Based on this, in order to adapt to the situation where the waving motion of a virtual object is controlled by a higher degree of freedom such as a mouse, gamepad, or motion sensing device, and the waving motion of the virtual object is consistent with the sound, embodiments of this application propose a method and apparatus for programmatic sound generation, an electronic device, and a computer-readable storage medium.
[0034] The embodiments of this application involve: determining the sound material corresponding to each frequency band based on different frequency band portions in the initial sound resource of a virtual object; and, in response to manipulation of the virtual object, acquiring sound control parameters for adjusting the initial sound resource; and then adjusting the sound material corresponding to each frequency band portion according to the sound control parameters to programmatically generate the target sound resource of the virtual object, thereby achieving a higher degree of freedom in the representation of the target sound resource. For details, please refer to... Figure 1 ,like Figure 1 As shown, Deconstruct sound assets refers to deconstructing the initial sound resources of a virtual object, that is, determining the sound material corresponding to each frequency band based on the different frequency bands in the initial sound resources of the virtual object. Calculate ControlParameters refers to the sound control parameters obtained in response to the manipulation of the virtual object. Deline Modeling Rules refers to adjusting the sound material corresponding to each frequency band using the sound control parameters, that is, associating the sound control parameters with the sound material corresponding to each frequency band. Final Results refers to the target sound resources of the virtual object obtained based on adjusting the sound material corresponding to each frequency band using the sound control parameters, that is, the accompanying sound obtained when controlling the waving action of the virtual object in a high degree of freedom.
[0035] For example, when players control the movements of virtual objects in a game using highly flexible methods such as mice, gamepads, or motion-sensing devices, the input generated by these methods can influence the generation of target sound resources for the virtual objects, thereby ensuring consistency between the movements of virtual objects controlled in a highly flexible manner and the generated target sound resources.
[0036] Figure 2 This is a schematic diagram of an implementation environment related to this application. The implementation environment includes a smart terminal 210 and a server 220, with the smart terminal 210 and the server 220 having a pre-established wired or wireless network connection.
[0037] like Figure 2 As shown, server 220 acquires the initial sound resources of the virtual object and determines the corresponding sound materials for each frequency band based on the different frequency bands in the initial sound resources of the virtual object. Terminal device 210 acquires sound control parameters based on the player's control of the virtual object and sends the acquired sound control parameters to server 220. Server 220 receives the sound control parameters sent by terminal device 210 and adjusts the sound materials corresponding to each frequency band based on the sound control parameters. Then, server 220 generates the target sound resources of the virtual object based on the adjusted sound materials for each frequency band.
[0038] in, Figure 2The smart terminal 210 shown can be any terminal device that supports programmed voice generation, such as a smartphone, in-vehicle computer, tablet computer, laptop computer, or wearable device, but is not limited to these. Figure 2 The server 220 shown is a server, which can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. No restrictions are placed on this. The smart terminal 210 can communicate with the server 620 via wireless networks such as 6G (third-generation mobile information technology), 4G (fourth-generation mobile information technology), and 5G (fifth-generation mobile information technology). No restrictions are placed on this as well.
[0039] Please see Figure 3 , Figure 3 This is a flowchart illustrating a procedural sound generation method according to an exemplary embodiment of this application. This procedural sound generation method can be applied to... Figure 2 The implementation environment shown is specifically executed by server 220 within that implementation environment. It should be understood that this method can also be applied to other exemplary implementation environments and executed by devices in other implementation environments; this embodiment does not limit the implementation environment to which the method is applicable.
[0040] The following section will describe in detail the procedural voice generation method proposed in this application embodiment, using the server as the specific execution entity.
[0041] like Figure 3 As shown, in an exemplary embodiment, the procedural voice generation method includes at least steps S310 to S340, which are described in detail below:
[0042] Step S310: Determine the sound material corresponding to each frequency band based on the different frequency bands in the initial sound resource of the virtual object.
[0043] First, it should be noted that virtual objects can be equipment used by virtual characters in a game, such as the resistance equipment used by character 1 in game A, or other virtual objects, such as the virtual watermelon used by the player to represent the watermelon in game B.
[0044] Initial sound resources refer to the sound effects of equipment used by virtual characters in a game when they swing. For example, the sound produced when character 1 uses resistance equipment to resist an opponent in game A, or the sound produced when a player swipes a virtual watermelon.
[0045] Frequency bands refer to different frequency bands within a sound resource. For details, please refer to [link / reference needed]. Figure 4 , Figure 4 The "deconstructsound assets" in this context refer to the sound materials corresponding to different frequency bands in the initial sound resources of the virtual object. These frequency bands include the Swish, Bass, Noise, and Metallic bands shown in the diagram. The Swish band is the main body of the initial sound resource, and its different distributions within this band clearly reflect the differences in the virtual object's material, shape, and weight. The Bass band is the low-frequency part with concentrated energy, further enhancing the sense of weight and solidity on top of the Swish main body. The Noise band is the noise part covering a wide frequency range, primarily representing high-frequency sounds and also acting as a kind of glue to smoothly blend the sounds of the various frequency bands. The Metallic band is the high-frequency part with a metallic texture, where the obvious fundamental and harmonic components highlight the sharpness brought by the metallic material.
[0046] The audio material corresponding to each frequency band refers to the material in each frequency band section that has stable frequency components and can be looped for a certain duration.
[0047] Because the diverse forms, types, lengths, materials, and usage methods of virtual objects all affect the performance of the target sound resources, the server acquires the initial sound resources of the virtual object and determines the sound materials for each frequency band based on the different frequency band components within the initial sound resources. For example, the server can use spectrogram analysis technology to deconstruct the initial sound resources of the virtual object, obtaining the sound materials corresponding to the Swish, Bass, Noise, and Metallic frequency bands.
[0048] Step S320: In response to manipulation of the virtual object, acquire sound control parameters for adjusting the initial sound resources.
[0049] Sound control parameters refer to parameters used to adjust the initial sound resources of virtual objects in real time. For example, sound control parameters can be angles, directions, speeds, accelerations, etc., but this embodiment does not limit them.
[0050] The terminal device receives real-time input parameters (i.e., sound control parameters) from the user's manipulation of virtual objects within the device, and sends these parameters to the server. The server then receives these sound control parameters to adjust the initial sound resources.
[0051] The manipulation of virtual objects can be triggered by the terminal device, such as gestures, or by the access device connected to the terminal device, such as a mouse, keyboard, or game controller, without any restrictions.
[0052] Step S330: Adjust the corresponding sound materials for each frequency band according to the sound control parameters.
[0053] To achieve greater freedom in controlling the movement of virtual objects and ensure consistency between the movement and sound, this application embodiment uses a server to adjust the sound material corresponding to each frequency band in real time based on acquired sound control parameters. For example, the server uses the acquired sound control parameters to adjust the sound material corresponding to the Swish, Bass, Noise, and Metallic frequency bands respectively. If the sound control parameter is acceleration, the server maps the acceleration to the adjustment of the Swish, Bass, Noise, and Metallic frequency bands, thereby adjusting the sound material of the corresponding frequency bands based on the acceleration in the Swish, Bass, Noise, and Metallic frequency bands.
[0054] It should also be noted that, considering the frequency characteristics of each frequency band, in order to highlight the sound material of each frequency band, the embodiments of this application can adaptively adjust the sound control parameters of each frequency band after mapping the sound control parameters to each frequency band, so as to better adjust the sound material of each frequency band based on the adjusted sound control parameters.
[0055] Step S340: Generate the target sound resource of the virtual object based on the sound material after partial adjustment of each frequency band.
[0056] The adjusted audio material refers to the audio material corresponding to each frequency band after adjustment using audio control parameters. Specifically, it's the adjusted audio material for the Swish, Bass, Noise, and Metallic frequency bands obtained by adjusting the audio material corresponding to these frequency bands based on audio control parameters.
[0057] The server generates the target sound resource for the virtual object based on the adjusted sound materials for each frequency band. For example, the server generates the target sound resource for the virtual object based on the adjusted sound materials corresponding to the Swish frequency band, Bass frequency band, Noise frequency band, and Metallic frequency band.
[0058] As can be seen, the audio procedural generation method of this application determines the audio material of each frequency band based on the different frequency bands in the initial audio resource of the virtual object, and in response to the manipulation of the virtual object, obtains audio control parameters for adjusting the initial audio resource, and then adjusts the audio material corresponding to each frequency band based on the audio control parameters to procedurally generate the target audio resource of the virtual object. It can be seen that the procedural generation of the target audio resource of the virtual object in this application is adaptively adjusted according to the manipulation of the virtual object, and achieves a higher degree of freedom in the performance of the target audio resource.
[0059] Based on the above embodiments, considering that each frequency band has a different impact on the initial sound resources, adjusting the sound materials of each frequency band using the same sound control parameters would not accurately adjust the sound materials of each frequency band. Therefore, this application embodiment adaptively adjusts the sound control parameters of each frequency band, and the following solution is provided in detail.
[0060] like Figure 5 As shown in the above exemplary embodiment, the process of adjusting the sound material corresponding to each frequency band according to the sound control parameters includes at least steps S510 to S520, which are described in detail below:
[0061] Step S510: Map the sound control parameters to each frequency band and adjust the corresponding sound control parameters for each frequency band to obtain the adjusted sound control parameters for each frequency band.
[0062] To enable real-time adjustment of sound control parameters based on each frequency band, the server maps the sound control parameters to each frequency band and adjusts the corresponding sound control parameters according to the characteristics of each frequency band. In other words, the server maps the sound control parameters to each frequency band and adjusts the corresponding sound control parameters for each frequency band to obtain the adjusted sound control parameters for each frequency band. For example, the server can use the program interface commands provided by the middleware Wwise tool to simultaneously map the sound control parameters to the Swish, Bass, Noise, and Metallic frequency bands. This provides at least four Real-Time Parameter Control (RTPCs) available. Consequently, adjustments to the sound control parameters in the Swish, Bass, Noise, and Metallic frequency bands result in different response behaviors from the same type of RTPC for the same sound control parameter. In other words, adjusting the same sound control parameter in the Swish, Bass, Noise, and Metallic frequency bands results in different sound performances for those bands.
[0063] Optionally, embodiments of this application may also employ methods such as Figure 6 Steps S610 to S620 shown implement step S510, as detailed below:
[0064] Step S610: Obtain the preset adjustment parameters for each frequency band.
[0065] Preset adjustment parameters refer to the values of the sound control parameters mapped to each frequency band based on its characteristics. For example, preset adjustment parameters can be preset parameters in a preset difference mode. For instance, if the preset difference mode is SlewRate and Filtering Over Time, then the preset adjustment parameters would be the preset adjustment parameters Attack and Release in the SlewRate and FilteringOver Time preset difference modes. It should be noted that the preset adjustment parameters differ for each frequency band. For example, if the sound control parameters include a speed parameter, then the Velocity RTPC will have smaller Attack and Release values for the real-time speed parameter control in the Metallic frequency band, resulting in a slower and slightly longer sound performance in the Metallic frequency band.
[0066] The server obtains the preset adjustment parameters for each frequency band, that is, it obtains the preset adjustment parameters in the preset difference mode corresponding to each frequency band. For example, the server obtains the preset adjustment parameters corresponding to the Swish frequency band, Bass frequency band, Noise frequency band, and Metallic frequency band.
[0067] Step S620: Adjust the corresponding sound control parameters according to the preset adjustment parameters of each frequency band to obtain the adjusted sound control parameters for each frequency band.
[0068] The server obtains the preset adjustment parameters for each frequency band and adjusts the corresponding sound control parameters based on these parameters to obtain the adjusted sound control parameters for each frequency band. For example, the server obtains the preset adjustment parameters Attack and Release from the preset difference modes Slew Rate and Filtering Over Time in the Swish, Bass, Noise, and Metallic frequency bands, respectively, and adjusts the corresponding sound control parameters using these parameters to obtain the adjusted sound control parameters for the Swish, Bass, Noise, and Metallic frequency bands.
[0069] Step S520: Adjust the sound material of the corresponding frequency band according to the adjusted sound control parameters.
[0070] The server adjusts the audio material in the corresponding frequency bands based on the adjusted audio control parameters, enabling real-time parameter control of each frequency band by the RTPC to control the corresponding audio material. For example, the server obtains the adjusted audio control parameters for the Swish, Bass, Noise, and Metallic frequency bands, and adjusts the audio material in the corresponding frequency bands using these adjusted parameters.
[0071] Optionally, embodiments of this application may also employ methods such as Figure 7 Steps S710 to S720 shown implement step S520, as detailed below:
[0072] Step S710: Obtain the preset adjustment curves of the audio material corresponding to each frequency band.
[0073] The preset adjustment curves include the correspondence between preset sound control parameters and preset sound materials. See details for further information. Figure 8 , Figure 8 The left side of the diagram represents the real-time parameter control of each frequency band by which the RTPC controls the audio material. The curves within the diagram are the preset adjustment curves, used to represent the correspondence between the preset audio control parameters and the preset audio material in each frequency band.
[0074] In order to adjust the audio material in each frequency band, the server in this embodiment of the application obtains the preset adjustment curve of the audio material corresponding to each frequency band.
[0075] Step S720: Determine the corresponding sound material from the preset adjustment curve according to the adjusted sound control parameters, and use the determined sound material as the adjusted sound material for the corresponding frequency band.
[0076] Since the preset adjustment curve includes the correspondence between preset sound control parameters and preset sound materials, the server can determine the corresponding adjusted sound material from the preset adjustment curve based on the adjusted sound control parameters. Because many factors influence sound materials, such as sound material attributes like pitch, volume, frequency, and depth, the server in this embodiment can determine each material attribute from the preset adjustment curve based on the adjusted sound control parameters, and then obtain the adjusted sound material for the corresponding frequency band based on the determined material attributes.
[0077] As can be seen, the audio programming generation method in this application maps audio control parameters to each frequency band and adjusts the audio control parameters corresponding to each frequency band to obtain the adjusted audio control parameters for each frequency band. The audio material for the corresponding frequency band is then adjusted based on the adjusted audio control parameters. On one hand, by adjusting the corresponding audio control parameters using the preset adjustment parameters for each frequency band, different audio representations of the same audio parameters are achieved in different frequency bands. On the other hand, adjusting the corresponding audio material based on the adjusted audio control parameters for each frequency band enriches the audio performance.
[0078] Figure 9 As shown, Figure 9 yes Figure 3 The flowchart of step S320 in the illustrated embodiment is shown in an exemplary embodiment. In the above exemplary embodiment, in response to the manipulation of the virtual object, obtaining the sound control parameters for adjusting the initial sound resources further includes at least steps S910 to S930, which are described in detail below:
[0079] Step S910: In response to the manipulation of the virtual object, obtain the real-time location information of the virtual object.
[0080] Real-time position information is determined based on the movement trajectory of a virtual object. For example, if the virtual object is a mouse, then the real-time position information is the real-time screen position within the mouse's movement trajectory on the display screen. See details... Figure 10 ,like Figure 10 As shown, the real-time position is the two-dimensional coordinate Cursor Position(x, y) in the figure. Alternatively, to simulate the movement of a virtual object in real space, back projection can be used to convert the two-dimensional real-time position information into three-dimensional real-time position information. This embodiment does not limit this approach.
[0081] The server responds to manipulations of virtual objects by obtaining their real-time location information.
[0082] Step S920: Perform difference smoothing on the real-time location information to obtain the simulated location information of the virtual object.
[0083] Difference smoothing refers to a method of obtaining simulated location information in real space by processing real-time location information.
[0084] Simulated location information is real-space location information obtained by processing real-time location information using interpolation smoothing techniques.
[0085] The server uses interpolation smoothing technology to process real-time position information to obtain simulated position information for virtual objects. It's worth noting that when processing real-time position information using interpolation smoothing, the server can also control the processing speed through an interpolation velocity parameter, ensuring that a faster velocity results in a faster simulated position. Furthermore, the simulated position information can be correlated with the weight of the virtual object to achieve inertial behavior under different weights.
[0086] Step S930: Determine the sound control parameters based on the simulated position information.
[0087] Sound control parameters refer to the parameters used to adjust the sound material in each frequency band.
[0088] The server responds to operations on the virtual object by obtaining the input sound control parameters. Specifically, the sound control parameters are determined based on the simulated position information.
[0089] As can be seen, the procedural sound generation method in this application obtains the real-time position information of the virtual object in response to the manipulation of the virtual object. The real-time position information is determined based on the movement trajectory of the virtual object. The real-time position information is then subjected to differential smoothing to obtain the simulated position information of the virtual object. Sound control parameters are determined based on the simulated position information. Specifically, high-degree-of-freedom operation methods such as mice, gamepads, or motion-sensing devices are used to influence the waving motion of the virtual object in real time, thereby achieving corresponding real-time changes in sound performance.
[0090] Based on the above embodiments, since the sound control parameters are related to the simulated position of the simulated object, that is, the sound control parameters are related to the parameters input by the input device, for example, when the sound control parameters include direction angle, the scheme for determining the direction angle based on the simulated position information is detailed below.
[0091] Figure 11 As shown, Figure 11 yes Figure 9 The flowchart of step S930 in the illustrated embodiment is shown in an exemplary embodiment. In the above exemplary embodiment, determining the sound control parameters based on the simulated position information further includes at least steps S1110 to S1130, which are described in detail below:
[0092] Step S1110: Determine the current displacement vector based on the simulated position information, and determine the previous displacement vector whose acquisition time is earlier than the current displacement vector.
[0093] The current position vector refers to the vector of the virtual object at the last moment, which is also the vector of the current position.
[0094] The previous position vector refers to the displacement vector whose movement time is earlier than the current position vector. For example, the previous position vector is the vector in which the virtual object moves to the position it was in at the previous time, which is earlier than the current time.
[0095] The server determines the current position vector and the previous position vector based on the movement trajectory of the virtual object.
[0096] Step S1120: Determine the displacement vector difference between the current displacement vector and the previous displacement vector.
[0097] The displacement vector difference is the difference between the current displacement vector and the previous displacement vector.
[0098] The server determines the displacement vector difference between the current displacement vector and the previous displacement vector based on the current displacement vector and the previous displacement vector.
[0099] Step S1130: Perform angle conversion processing on the displacement vector difference to obtain the direction angle.
[0100] The server performs angle conversion based on the difference between the current and previous displacement vectors to obtain the direction angle. For example, the difference between the current and previous displacement vectors determines the radian of the virtual object's movement direction, and then converts this radian using inverse trigonometric functions to obtain the direction angle. That is, the inverse trigonometric function can be used to convert this radian into a one-dimensional central angle within the range of 0 to 360 degrees, and 0 degrees is determined as the positive x-axis direction.
[0101] It should be noted that sound control parameters can also include speed, acceleration, and rate of change of acceleration. For example, when adjusting the sound material corresponding to each frequency band using sound control parameters to obtain the target sound resource of the virtual object, one of the sound control parameters—angle direction, speed, acceleration, or rate of change of acceleration—can be used to adjust the sound material corresponding to each frequency band. For example, the server maps the sound control parameter of speed to the Swish, Bass, Noise, and Metallic frequency bands. It then adjusts the speed in each band using preset adjustment parameters obtained from these bands, resulting in the adjusted speeds for each band. Finally, it determines the corresponding adjusted sound material from the preset adjustment curves of these bands, and then identifies the target sound resource for the virtual object based on the adjusted sound material.
[0102] Alternatively, two of the following parameters—angle, direction, speed, acceleration, and rate of change of acceleration—can be used to adjust the corresponding sound materials for each frequency band. For example, the server maps speed and acceleration to the Swish, Bass, Noise, and Metallic frequency bands. Using preset adjustment parameters obtained from these bands, the server adjusts the speed and acceleration parameters for each band, resulting in adjusted speeds and accelerations. This allows the server to determine the corresponding adjusted sound materials from the preset adjustment curves for each band, and finally, based on these adjusted sound materials, determine the target sound resource for the virtual object.
[0103] Alternatively, the server can adjust the sound materials corresponding to each frequency band using three of the following: angle / direction, speed, acceleration, and rate of change of acceleration. For example, the server maps speed, acceleration, and angle / direction to the Swish, Bass, Noise, and Metallic frequency bands. It then adjusts these three sound control parameters using preset adjustment parameters obtained from these bands, resulting in adjusted speed, acceleration, and angle / direction for each band. This yields the adjusted speed, acceleration, and angle / direction for the Swish, Bass, Noise, and Metallic bands. The corresponding adjusted sound materials are then determined from the preset adjustment curves for these bands. Finally, the target sound resource for the virtual object is determined based on the adjusted sound materials for these bands.
[0104] Alternatively, the sound material corresponding to each frequency band can be adjusted by using angle, direction, speed, acceleration, and rate of change of acceleration. For example, the server maps angle, velocity, acceleration, and rate of acceleration change to the Swish, Bass, Noise, and Metallic frequency bands. It then adjusts these four sound control parameters using preset adjustment parameters obtained from these bands, resulting in adjusted angle, velocity, acceleration, and rate of acceleration change for each band. This yields the adjusted angle, velocity, acceleration, and rate of acceleration change for the Swish, Bass, Noise, and Metallic frequency bands. The corresponding adjusted sound material is then determined from the preset adjustment curves for each band, and finally, the target sound resource for the virtual object is determined based on the adjusted sound material. This embodiment does not limit the scope of the example.
[0105] It should also be noted that the speed is determined based on simulated location information. For example, the server determines the speed based on the ratio of the change in simulated location information per unit time to the change in time per unit time. Furthermore, to facilitate subsequent use of speed as a sound control parameter, the server can map this parameter to a range of 0 to 100.
[0106] Acceleration is determined based on velocity. For example, the server determines the acceleration as a sound control parameter based on the ratio of the velocity change per unit time to the unit time interval. Additionally, to facilitate subsequent use of this acceleration sound control parameter, the server can map the acceleration to a parameter ranging from -10 to 10.
[0107] The rate of change of acceleration is determined based on the acceleration itself. For example, the server determines the rate of change of acceleration as a sound control parameter based on the ratio of the change in acceleration per unit time to the change in acceleration per unit time. Additionally, to facilitate subsequent use of this rate of change of acceleration as a sound control parameter, the server can map the acceleration to a parameter ranging from 0 to 1.
[0108] As can be seen, the procedural sound generation method in this application determines the current displacement vector based on simulated position information, and determines the previous displacement vector whose acquisition time is earlier than the current displacement vector; determines the displacement vector difference between the current displacement vector and the previous displacement vector; and performs angle conversion processing on the displacement vector difference to obtain the direction angle. Specifically, it uses simulated position information to determine sound control parameters such as angle and direction, and uses this to influence the waving action of the virtual object in real time, thereby achieving real-time changing sound performance.
[0109] Figure 12 As shown, Figure 12 yes Figure 3 The flowchart of step S310 in the illustrated embodiment is shown in an exemplary embodiment. In the above exemplary embodiment, determining the sound material corresponding to each frequency band based on the different frequency band portions in the initial sound resource of the virtual object further includes at least steps S1210 to S1220, which are described in detail below:
[0110] Step S1210: Perform frequency domain analysis on the initial sound resources of the virtual object to determine the frequency bands.
[0111] The server obtains the initial sound resources of the virtual object and performs frequency domain analysis on them to obtain the frequency bands. For example, the server can use spectrogram analysis technology to deconstruct the initial sound resources and obtain the frequency bands. It should be noted that each frequency band can be a Swish band, a Bass band, a Noise band, and a Metallic band. Furthermore, each frequency band has distinct characteristics; for example, the Swish band is longer, and the Metallic band is mainly concentrated in the latter half of the initial sound resource.
[0112] Step S1220: Determine the audio material corresponding to each frequency band.
[0113] The server determines stable, loopable audio materials from each frequency band. For example, the server can use particle synthesis technology to process each frequency band to obtain stable, loopable audio materials within each frequency band.
[0114] As can be seen, the audio procedural generation method in this application can obtain audio materials with stable frequency band components and long-term loopability by performing frequency domain analysis on the initial audio resources of the virtual object and determining the audio materials corresponding to each frequency band component.
[0115] Figure 13 This is a block diagram illustrating a procedural sound generation apparatus according to an exemplary embodiment of this application. This procedural sound generation apparatus can be applied to... Figure 2 The implementation environment shown is not limited to this embodiment. This audio procedural generation device can also be applied to other exemplary implementation environments and specifically configured in other devices.
[0116] like Figure 13 As shown, the exemplary sound procedural generation apparatus 1300 includes: a determining module 1310, a parameter acquiring module 1320, an adjusting module 1330, and a generating module 1340. Specifically:
[0117] The module 1310 is configured to determine the sound material corresponding to each frequency band based on the different frequency bands in the initial sound resource of the virtual object.
[0118] The parameter acquisition module 1320 is configured to acquire sound control parameters for adjusting the initial sound resources in response to manipulation of the virtual object.
[0119] Adjustment module 1330 is configured to adjust the corresponding sound materials for each frequency band according to the sound control parameters.
[0120] The generation module 1340 is configured to generate target sound resources for virtual objects based on the target sound materials after partial adjustments in each frequency band.
[0121] In this exemplary audio programming generation apparatus, the audio material of each frequency band is determined based on the different frequency band portions in the initial audio resource of the virtual object, and in response to the manipulation of the virtual object, audio control parameters for adjusting the initial audio resource are obtained. Then, the audio material corresponding to each frequency band portion is adjusted according to the audio control parameters to programmatically generate the target audio resource of the virtual object. It can be seen that the programmatic generation of the target audio resource of the virtual object in this application is adaptively adjusted according to the manipulation of the virtual object, realizing a higher degree of freedom in the performance of the target audio resource.
[0122] Based on the above exemplary embodiments, the adjustment module 1330 further includes an adjusted sound control parameter determination module and a sound material determination module. Specifically:
[0123] The adjusted sound control parameter determination module is configured to map the sound control parameters to each frequency band and adjust the corresponding sound control parameters for each frequency band to obtain the adjusted sound control parameters for each frequency band.
[0124] The sound material determination module is configured to adjust the sound material in the corresponding frequency band based on the adjusted sound control parameters.
[0125] In this exemplary audio programming generation device, sound control parameters are mapped to various frequency bands, and the corresponding sound control parameters for each frequency band are adjusted to obtain adjusted sound control parameters for each frequency band. The sound material for the corresponding frequency band is then adjusted based on these adjusted sound control parameters. On one hand, by adjusting the corresponding sound control parameters using the preset adjustment parameters for each frequency band, different sound representations of the same sound parameters in different frequency bands are achieved. On the other hand, adjusting the corresponding sound material based on the adjusted sound control parameters for each frequency band enriches the sound performance.
[0126] Based on the above exemplary embodiments, the adjusted sound control parameter determination module further includes a preset adjustment parameter acquisition module and an adjusted sound control parameter acquisition module. Specifically:
[0127] The preset adjustment parameter acquisition module is configured to acquire preset adjustment parameters for each frequency band.
[0128] The adjusted sound control parameter acquisition module is configured to adjust the corresponding sound control parameters according to the preset adjustment parameters of each frequency band, so as to obtain the adjusted sound control parameters corresponding to each frequency band.
[0129] In this exemplary sound programming generation device, preset adjustment parameters for each frequency band are obtained; the corresponding sound control parameters are adjusted according to the preset adjustment parameters for each frequency band to obtain the adjusted sound control parameters for each frequency band, thereby achieving different sound performances for the same sound parameters in each frequency band.
[0130] Based on the above exemplary embodiments, the sound material determination module further includes a preset adjustment curve acquisition module and an adjusted sound material determination module. Specifically:
[0131] The preset adjustment curve acquisition module is configured to acquire the preset adjustment curves of the sound materials corresponding to each frequency band. The preset adjustment curves include the correspondence between preset sound control parameters and preset sound materials.
[0132] The adjusted sound material determination module is configured to determine the corresponding sound material from the preset adjustment curve based on the adjusted sound control parameters, and use the determined sound material as the adjusted sound material for the corresponding frequency band.
[0133] In this exemplary audio programming generation device, preset adjustment curves for audio materials corresponding to each frequency band are obtained. These preset adjustment curves include the correspondence between preset audio control parameters and preset audio materials. Based on the adjusted audio control parameters, the corresponding audio materials are determined from the preset adjustment curves, and these determined audio materials are used as the adjusted audio materials for the corresponding frequency bands. Specifically, by adjusting the corresponding audio materials according to the adjusted audio control parameters for each frequency band, the expressive effects of the audio are enriched.
[0134] Based on the above exemplary embodiments, the parameter acquisition module 1320 further includes a real-time location information acquisition module, a difference smoothing processing module, and a sound control parameter determination module. Specifically:
[0135] The real-time location information acquisition module is configured to acquire the real-time location information of the virtual object in response to the manipulation of the virtual object. The real-time location information is determined based on the movement trajectory of the virtual object.
[0136] The difference smoothing module is configured to perform difference smoothing on real-time location information to obtain simulated location information of virtual objects.
[0137] The sound control parameter determination module is configured to determine sound control parameters based on simulated position information.
[0138] In this exemplary procedural sound generation device, in response to manipulation of a virtual object, real-time position information of the virtual object is acquired, which is determined based on the movement trajectory of the virtual object. The real-time position information is then subjected to interpolation smoothing to obtain simulated position information of the virtual object. Sound control parameters are determined based on this simulated position information. Specifically, high-degree-of-freedom operation methods such as a mouse, gamepad, or motion-sensing device are used to influence the waving motion of the virtual object in real time, thereby achieving corresponding real-time changes in sound performance.
[0139] Based on the above exemplary embodiments, the sound control parameter determination module further includes a position vector determination module, a displacement vector difference determination module, and an angle conversion module. Specifically:
[0140] The position vector determination module is configured to determine the current displacement vector based on simulated position information, and to determine the previous displacement vector whose acquisition time is earlier than the current displacement vector.
[0141] The displacement vector difference determination module is configured to determine the displacement vector difference between the current displacement vector and the previous displacement vector.
[0142] The angle conversion module is configured to perform angle conversion processing on the difference of displacement vectors to obtain the direction angle.
[0143] In this exemplary procedural sound generation device, the current displacement vector is determined based on simulated position information, and the previous displacement vector acquired earlier than the current displacement vector is also determined; the displacement vector difference between the current displacement vector and the previous displacement vector is determined; and the displacement vector difference is processed by angle conversion to obtain the direction angle. Specifically, the simulated position information is used to determine sound control parameters such as angle and direction, and this real-time influence is used to affect the waving motion of the virtual object, thereby achieving real-time changing sound performance.
[0144] Based on the above exemplary embodiments, the determining module 1310 further includes a parsing module and a sound material determining module corresponding to each frequency band. Specifically:
[0145] The parsing module is configured to perform frequency domain analysis on the initial sound resources of the virtual object to determine the frequency bands.
[0146] The module for determining the audio material corresponding to each frequency band is configured to determine the audio material corresponding to each frequency band.
[0147] In this exemplary audio procedural generation device, the initial audio resources of the virtual object are analyzed in the frequency domain to determine each frequency band; the audio material corresponding to each frequency band is determined, and audio material with stable frequency band components and long-term loopability can be obtained.
[0148] It should be noted that the audio programming generation device and the audio programming generation method provided in the above embodiments belong to the same concept. The specific ways in which each module and unit performs its operations have been described in detail in the method embodiments and will not be repeated here. In practical applications, the audio programming generation device provided in the above embodiments can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. This is not a limitation here.
[0149] Embodiments of this application also provide an electronic device, including: one or more processors; and a storage device for storing one or more programs, which, when executed by the one or more processors, cause the electronic device to implement the sound procedural generation method provided in the above embodiments.
[0150] Figure 14 A schematic diagram of a computer system suitable for implementing the embodiments of this application is shown. It should be noted that... Figure 14The computer system 1400 of the electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.
[0151] like Figure 14 As shown, the computer system 1400 includes a Central Processing Unit (CPU) 1401, which can perform various appropriate actions and processes based on programs stored in Read-Only Memory (ROM) 1402 or programs loaded from storage portion 1408 into Random Access Memory (RAM) 1403, such as performing the methods described in the above embodiments. Various programs and data required for system operation are also stored in RAM 1403. The CPU 1401, ROM 1402, and RAM 1403 are interconnected via bus 1404. An Input / Output (I / O) interface 1405 is also connected to bus 1404.
[0152] The following components are connected to I / O interface 1405: an input section 1406 including a keyboard, mouse, etc.; an output section 1407 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 1408 including a hard disk, etc.; and a communication section 1409 including a network interface card such as a LAN (Local Area Network) card, modem, etc. The communication section 1409 performs communication processing via a network such as the Internet. A drive 1410 is also connected to I / O interface 1405 as needed. Removable media 1411, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., are installed on drive 1410 as needed so that computer programs read from them can be installed into storage section 1408 as needed.
[0153] Specifically, according to embodiments of this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program including a computer program for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 1409, and / or installed from removable medium 1411. When the computer program is executed by central processing unit (CPU) 1401, it performs various functions defined in the system of this application.
[0154] It should be noted that the computer-readable medium shown in the embodiments of this application can be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium can be, for example, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), flash memory, optical fiber, portable compact disc read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this application, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying a computer-readable computer program. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media can also be any computer-readable medium other than computer-readable storage media, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The computer program contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to wireless, wired, etc., or any suitable combination thereof.
[0155] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. Each block in a flowchart or block diagram may represent a module, segment, or portion of code, which contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0156] The units described in the embodiments of this application can be implemented in software or hardware, and the described units can also be located in a processor. The names of these units do not necessarily limit the specific unit itself.
[0157] Another aspect of this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the aforementioned procedural sound generation method. This computer-readable storage medium may be included in the electronic device described in the above embodiments, or it may exist independently and not assembled into the electronic device.
[0158] Another aspect of this application provides a computer program product or computer program including 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 procedural sound generation method provided in the various embodiments described above.
[0159] The above content is merely a preferred exemplary embodiment of this application and is not intended to limit the implementation of this application. Those skilled in the art can easily make corresponding modifications or alterations based on the main concept and spirit of this application. Therefore, the scope of protection of this application should be determined by the scope of protection claimed in the claims.
Claims
1. A method for procedurally generating sound, characterized in that, The method comprises: Performing frequency domain analysis on an initial sound resource of a virtual object to determine each frequency band part; determining sound materials corresponding to each frequency band part; wherein the initial sound resource refers to the sound performance of a virtual object used by a virtual character in a game when the virtual object is waved, and the sound materials corresponding to each frequency band part are materials in the frequency band parts that have stable frequency band components and can be recycled, and the sound materials corresponding to each frequency band part have different auditory perceptual characteristics respectively; In response to the control of the virtual object, real-time position information of the virtual object is obtained, and the real-time position information is determined based on the movement track of the virtual object; Performing difference value smoothing processing on the real-time position information to obtain simulated position information of the virtual object, and associating the simulated position information with the weight of the virtual object to realize the inertial performance under different weights; Determining sound control parameters for adjusting the initial sound resource according to the simulated position information; Mapping the sound control parameters to each frequency band part, adjusting the sound control parameters corresponding to each frequency band part, and obtaining adjusted sound control parameters corresponding to each frequency band part; Adjusting the sound materials of the corresponding frequency band parts according to the adjusted sound control parameters; Generating a target sound resource of the virtual object based on the adjusted sound materials of each frequency band part.
2. The method of claim 1, wherein, The step of mapping the sound control parameters to each frequency band part, adjusting the sound control parameters corresponding to each frequency band part, and obtaining adjusted sound control parameters corresponding to each frequency band part comprises: Obtaining preset adjustment parameters of each frequency band part; Adjusting the sound control parameters corresponding to each frequency band part according to the preset adjustment parameters of each frequency band part to obtain adjusted sound control parameters corresponding to each frequency band part.
3. The method of claim 1, wherein, The step of adjusting the sound materials of the corresponding frequency band parts according to the adjusted sound control parameters comprises: Obtaining a preset adjustment curve of the sound materials corresponding to each frequency band part, wherein the preset adjustment curve comprises a corresponding relationship between preset sound control parameters and preset sound materials; Determining the sound materials corresponding to the adjusted sound control parameters from the preset adjustment curve, and taking the determined sound materials as the adjusted sound materials of the corresponding frequency band parts.
4. The method of claim 1, wherein, The sound control parameters comprise a direction angle, and the step of determining the sound control parameters according to the simulated position information comprises: Determining a current displacement vector based on the simulated position information, and determining a previous displacement vector obtained earlier than the current displacement vector; Determining a displacement vector difference between the current displacement vector and the previous displacement vector; Performing angle conversion processing on the displacement vector difference to obtain the direction angle.
5. A sound program generation device characterized by comprising: The device comprises: The determining module is configured to perform frequency domain analysis on the initial sound resource of the virtual object to determine each frequency band part, and determine sound materials corresponding to each frequency band part. The initial sound resource refers to sound performance of a virtual object used by a virtual character in a game when the virtual object is waved. The sound materials corresponding to each frequency band part are materials in each frequency band part with stable frequency band components and cyclic time length. The sound materials corresponding to each frequency band part have different auditory perceptual characteristics. The parameter obtaining module is configured to obtain real-time position information of the virtual object in response to control of the virtual object, determine the real-time position information based on a movement track of the virtual object, perform difference value smoothing processing on the real-time position information to obtain simulated position information of the virtual object, and associate the simulated position information with a weight of the virtual object to realize inertia performance under different weights, and determine sound control parameters for adjusting the initial sound resource according to the simulated position information. The adjusting module is configured to map the sound control parameters to each frequency band part, adjust sound control parameters corresponding to each frequency band part, and obtain adjusted sound control parameters corresponding to each frequency band part, and adjust sound materials of the corresponding frequency band part according to the adjusted sound control parameters. The generating module is configured to generate target sound resources of the virtual object based on the adjusted target sound materials of each frequency band part.
6. An electronic device, comprising: The memory stores computer readable instructions. The processor reads the computer readable instructions stored in the memory to execute the method in any one of claims 1-4. The computer readable instructions stored on the computer readable instructions are executed by the processor of the computer to make the computer execute the method in any one of claims 1-4.
7. A computer-readable storage medium, characterized in that, The computer program is executed by the processor to realize the steps in the method in any one of claims 1-4.
8. A computer program product, characterised in that,
Citation Information
Patent Citations
Audio adjustment method and device and computer readable storage medium
CN113730914A
Systems and methods for simulating sounds of a virtual object using procedural audio
US20180068487A1
