Audio data processing method, device, storage medium and processor
By obtaining virtual wheel motion parameters and adjusting audio data, the problem of insufficient continuity and consistency of game sound effects is solved, and more realistic game sound effects are achieved and the gaming experience is improved.
Patent Information
- Application Number
- CN202111676733.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-31
- Publication Date
- 2025-05-16
- Estimated Expiration
- 2041-12-31
AI Technical Summary
The game sound effects have poor continuity and consistency in racing games, and cannot effectively fit the movements of vehicles in the game interface.
By responding to the virtual vehicle target operation in the game scene, the motion parameters of the virtual wheel are obtained, and the initial audio data is adjusted based on these parameters, and the target audio data is synthesized to match the vehicle's actions.
It improves the continuity and consistency of the game sound effects, making it better fit the movements of the vehicles in the game interface, thereby improving the gaming experience.
Smart Images

Figure CN114404974B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing, and in particular to an audio data processing method, device, storage medium and processor. Background Art
[0002] In racing games, the sound effects of wheels in different physical states need to be displayed in real time. Appropriate sound effects can not only enhance the player's sense of immersion, but also give the player certain operational prompts during the game.
[0003] In related technologies, the entire racing car is usually simplified into a wheel. During the game, the slip angle or slip speed of the vehicle body is calculated when it turns. When the slip angle or slip speed is greater than the set threshold, the pre-recorded audio sample is played. However, this simple simulation method considers the vehicle as a whole, so the game sound effects have poor continuity and consistency, and cannot fit the technical problem of the vehicle's actions in the game interface well.
[0004] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention
[0005] At least some embodiments of the present invention provide a method, device, storage medium and processor for processing audio data to at least solve the technical problem that game sound effects have poor continuity and consistency and cannot fit the movements of vehicles in the game interface well.
[0006] According to one embodiment of the present invention, a method for processing audio data is provided, comprising: in response to a target operation performed on a virtual vehicle in a game scene, obtaining motion parameters of at least one virtual wheel contained in the virtual vehicle; adjusting target parameters of initial audio data based on the motion parameters to obtain target audio data corresponding to at least one virtual wheel; and synthesizing the target audio data to obtain game audio data corresponding to the target operation.
[0007] Optionally, the motion parameters include: a target slip angle, the initial audio data include: a first layer of data and a second layer of data, the target parameters include: a first volume of the first layer of data and a second volume of the second layer of data, wherein adjusting the target parameters of the initial audio data based on the motion parameters includes: adjusting the first volume based on a first association relationship and the target slip angle, wherein the first association relationship is used to characterize the correspondence between the volume of the first layer of data and the slip angle, and the first layer of data is used to characterize the audio data generated when there is a torque between the suspension shaft of the virtual vehicle and the contact point of at least one virtual wheel; adjusting the second volume based on the second association relationship and the target slip angle, wherein the second association relationship is used to characterize the correspondence between the volume of the second layer of data and the slip angle, and the second layer of data is used to characterize the audio data generated when there is no torque between the shaft and the contact point.
[0008] Optionally, the method further includes: obtaining a third association relationship of the virtual vehicle, wherein the third association relationship is used to characterize the correspondence between the grip and slip angle of the virtual vehicle; determining a target volume curve in the first association relationship; and adjusting the shape of the target curve segment of the first association relationship.
[0009] Optionally, based on the third association relationship, determining the target volume curve in the first association relationship includes: based on the third association relationship, a first preset slip angle and a second preset slip angle, wherein the first preset slip angle is the slip angle corresponding to a grip threshold, the second preset slip angle is the slip angle corresponding to a maximum grip, and the first preset slip angle is greater than the second preset slip angle; based on the first preset slip angle and the second preset slip angle, determining a third preset slip angle, wherein a difference between the first preset slip angle and the second preset slip angle is the same as a difference between the second preset slip angle and the third preset slip angle; determining a volume curve in the second association relationship that is between the first preset slip angle and the third preset slip angle; and adjusting the shape of the volume curve.
[0010] Optionally, the motion parameters include: target pressure in the vertical direction, the target parameters include: target volume, wherein adjusting the target parameters of the initial audio data based on the motion parameters includes: adjusting the target volume based on the target pressure and a fourth association relationship, wherein the fourth association relationship is used to characterize the correspondence between the volume of the initial audio data and the pressure in the vertical direction.
[0011] Optionally, the motion parameters include: a target lateral sliding speed, the target parameters include: a target volume and a target pitch, wherein adjusting the target parameters of the initial audio data based on the motion parameters includes: determining a first material of the ground in the game scene; adjusting the target pitch based on a fifth association relationship corresponding to the first material and the target lateral sliding speed, wherein the fifth association relationship is used to characterize the correspondence between the pitch of the initial audio data and the lateral sliding speed; adjusting the target volume based on a sixth association relationship and the target lateral sliding speed, wherein the sixth association relationship is used to characterize the correspondence between the volume of the initial audio data and the lateral sliding speed.
[0012] Optionally, the target parameter includes: a target spectrum width, wherein adjusting the target parameter of the initial audio data based on the motion parameter includes: adjusting the target spectrum width based on the motion parameter.
[0013] Optionally, the method further includes: determining a second material of at least one virtual wheel; acquiring audio data corresponding to the second material to obtain initial audio data.
[0014] Optionally, synthesizing the target audio data to obtain the game audio data corresponding to the target operation includes: determining the target position of at least one virtual wheel relative to the virtual camera in the game scene; synthesizing the target audio data based on the target position to obtain the game audio data. According to one embodiment of the present invention, an audio data processing device is also provided, including: an acquisition module for acquiring motion parameters of at least one virtual wheel contained in the virtual vehicle in response to a target operation performed on a virtual vehicle in the game scene; an adjustment module for adjusting the target parameters of the initial audio data based on the motion parameters to obtain the target audio data corresponding to the at least one virtual wheel; and a synthesis module for synthesizing the target audio data to obtain the game audio data corresponding to the target operation.
[0015] According to one embodiment of the present invention, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute any of the above-mentioned methods for processing audio data when running.
[0016] According to one embodiment of the present invention, a processor is further provided, and the processor is used to run a program, wherein the program is configured to execute any of the above-mentioned methods for processing audio data when running.
[0017] According to one embodiment of the present invention, there is further provided an electronic device, comprising a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute any of the above-mentioned methods for processing audio data.
[0018] In the above embodiment, in response to the target operation performed on the virtual vehicle in the game scene, the motion parameters of at least one virtual wheel contained in the virtual vehicle are obtained; the target parameters of the initial audio data are adjusted based on the motion parameters to obtain the target audio data corresponding to the at least one virtual wheel, and then the target audio data are synthesized to obtain the game audio data corresponding to the target operation. Instead of playing the recorded audio data after the motion parameters reach the preset threshold, the target audio is obtained by synthesizing the initial audio data based on the real-time target operation and the motion parameters, thereby solving the technical problem that the game sound effects have poor continuity and consistency and cannot fit the vehicle movements in the game interface well, thereby achieving the technical effect of improving the gaming experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0020] Figure 1 It is a hardware structure block diagram of a mobile terminal of an audio data processing method according to an embodiment of the present invention;
[0021] Figure 2 is a flowchart of a method for processing audio data according to one embodiment of the present invention;
[0022] Figure 3 is a schematic diagram of a slip angle according to one embodiment of the present invention;
[0023] Figure 4 is a schematic diagram of the principle of first layered data caused by a virtual wheel suspension according to one embodiment of the present invention;
[0024] Figure 5A is a schematic diagram of a first association relationship according to one embodiment of the present invention;
[0025] Figure 5B is a schematic diagram of a second association relationship according to one embodiment of the present invention;
[0026] Figure 6 is a schematic diagram of a mapping curve of grip force and slip angle according to one embodiment of the present invention;
[0027] Figure 7 is a schematic diagram of another mapping curve of the relationship between grip and slip angle according to one embodiment of the present invention;
[0028] Figure 8 is a graph showing a relationship between a target pressure and a target volume in a vertical direction according to one embodiment of the present invention;
[0029] Fig. 9 is a mapping curve of lateral drift speed and pitch when the ground material is asphalt according to one embodiment of the present invention;
[0030] Fig.10 is a mapping curve between a first volume and a lateral sliding speed according to one embodiment of the present invention;
[0031] Fig.11 is a schematic diagram of a mapping relationship between drift velocity and spectrum width according to one embodiment of the present invention;
[0032] Fig.12 is a structural block diagram of an audio data processing device according to one embodiment of the present invention. DETAILED DESCRIPTION
[0033] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0034] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices. According to one embodiment of the present invention, an embodiment of a method for processing audio data is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that here.
[0035] The method embodiment can be executed in a mobile terminal, a computer terminal or a similar computing device. Taking running on a mobile terminal as an example, the mobile terminal can be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a PDA, a mobile Internet device (MID for short), a PAD, a game console and other terminal devices. Figure 1 FIG. 1 is a hardware structure block diagram of a mobile terminal of an audio data processing method according to an embodiment of the present invention. Figure 1 As shown, the mobile terminal may include one or more ( Figure 1 Only one is shown in the figure) processor 102 (processor 102 may include but is not limited to a central processing unit (CPU), a graphics processing unit (GPU), a digital signal processing (DSP) chip, a microprocessor (MCU), a programmable logic device (FPGA), a neural network processor (NPU), a tensor processor (TPU), an artificial intelligence (AI) type processor, etc.) and a memory 104 for storing data. Optionally, the mobile terminal may also include a transmission device 106 for communication functions, an input and output device 108, and a display device 110. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the mobile terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations shown.
[0036] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the method for processing audio data in the embodiment of the present invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, the above-mentioned method for processing audio data is realized. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the mobile terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0037] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0038] The inputs in the input / output device 108 may come from a plurality of human interface devices (HIDs), such as keyboards and mice, game controllers, and other dedicated game controllers (such as steering wheels, fishing rods, dance mats, remote controls, etc.). In addition to providing input functions, some human interface devices may also provide output functions, such as force feedback and vibration of game controllers, audio output of controllers, etc.
[0039] The display device 110 may be, for example, a head-up display (HUD), a touch-screen liquid crystal display (LCD), and a touch display (also referred to as a "touch screen" or "touch display screen"). The liquid crystal display may enable a user to interact with a user interface of the mobile terminal. In some embodiments, the mobile terminal has a graphical user interface (GUI), and a user may interact with the GUI by finger contacts and / or gestures on a touch-sensitive surface, wherein the human-computer interaction functions here may optionally include the following interactions: creating web pages, drawing, word processing, making electronic documents, games, video conferencing, instant messaging, sending and receiving emails, call interfaces, playing digital videos, playing digital music, and / or web browsing, etc. The executable instructions for executing the above-mentioned human-computer interaction functions are configured / stored in a computer program product or a readable storage medium executable by one or more processors.
[0040] The method for processing audio data in one embodiment of the present disclosure can be run on a local terminal device or a server. When the method for processing audio data is run on a server, the method can be implemented and executed based on a cloud interaction system, wherein the cloud interaction system includes a server and a client device.
[0041] In an optional implementation, various cloud applications can be run under the cloud interaction system, such as cloud games. Taking cloud games as an example, cloud games refer to a game mode based on cloud computing. In the operation mode of cloud games, the operating body of the game program and the main body of the game screen presentation are separated. The storage and operation of the audio data processing method are completed on the cloud game server. The role of the client device is used for data reception, transmission and presentation of the game screen. For example, the client device can be a display device with data transmission function close to the user side, such as a mobile terminal, a TV, a computer, a handheld computer, etc.; but the cloud game server in the cloud is used for information processing. When playing the game, the player operates the client device to send an operation instruction to the cloud game server. The cloud game server runs the game according to the operation instruction, encodes and compresses the game screen and other data, and returns it to the client device through the network. Finally, the client device decodes and outputs the game screen.
[0042] In an optional embodiment, taking a game as an example, a local terminal device stores a game program and is used to present a game screen. The local terminal device is used to interact with the player through a graphical user interface, that is, the game program is downloaded and installed by an electronic device and run conventionally. The local terminal device may provide the graphical user interface to the player in a variety of ways, for example, it may be rendered and displayed on a display screen of the terminal, or provided to the player through a holographic projection. For example, the local terminal device may include a display screen and a processor, the display screen is used to present a graphical user interface, the graphical user interface includes a game screen, and the processor is used to run the game, generate a graphical user interface, and control the display of the graphical user interface on the display screen.
[0043] In a possible implementation, an embodiment of the present invention provides a method for processing audio data, providing a graphical user interface through a terminal device, wherein the terminal device can be the local terminal device mentioned above, or can be a client device in the cloud interaction system mentioned above. Figure 2 is a flowchart of a method for processing audio data according to one embodiment of the present invention. Figure 2 As shown, the method comprises the following steps:
[0044] Step S202, in response to a target operation performed on a virtual vehicle in a game scene, obtaining motion parameters of at least one virtual wheel included in the virtual vehicle.
[0045] Specifically, the target operation can be an operation performed by a game player during a racing game, including but not limited to braking, fast lane change, drifting, etc. The virtual vehicle includes: a physical chassis model, and the physical chassis model has virtual wheels. In addition, the virtual vehicle can have multiple models, and the number of virtual wheels of each model is not necessarily the same. Therefore, the virtual vehicle can have one or more virtual wheels. Motion parameters are parameters that can characterize the driving state of the virtual car, including but not limited to slip angle, vertical downward pressure, and lateral slip speed.
[0046] In an optional embodiment, when a player encounters a lane turn while playing a racing game, he can operate the racing car to drift and quickly pass the turn. At this time, in order to accurately play audio data to the player, the motion parameters of each virtual wheel contained in the vehicle can be obtained in real time, and the initial audio data can be processed for each virtual wheel. The model of the virtual vehicle in the above game scene can include a chassis physical model with four wheels and suspension. Therefore, the parameter values of different parameters carried in the chassis physical model can be directly read to obtain the above motion parameters.
[0047] Step S204: adjusting target parameters of the initial audio data based on the motion parameters to obtain target audio data corresponding to at least one virtual wheel.
[0048] Specifically, the target parameters may include but are not limited to the volume, pitch and spectrum width of the initial audio data. The initial audio data includes initial friction audio data and initial drift audio data. The initial friction audio data may be a recording of the actual vehicle during driving, where there is a torque at the contact point between the suspension shaft and the wheel, causing the wheel rubber to slip periodically sideways. The initial drift audio data may be a recording of the actual vehicle during driving, when the vehicle begins to drift significantly. For example, the volume of the initial friction audio data and the initial drift data in the initial volume data may be adjusted according to the slip angle of the virtual wheel in the virtual vehicle; the volume of the initial audio data may be adjusted by the downward pressure in the vertical direction; the pitch of the initial audio data may be adjusted according to the lateral slip speed and the road material of the driving road; the volume of the initial audio data may be adjusted according to the lateral slip; the high and low cuts of the initial audio data may be adjusted by physical quantities such as the slip angle and the slip speed, so that the sound may be further changed during the drift process, and the change in the spectrum width of the sound under different drift states may be controlled to obtain the corresponding target audio data for each wheel.
[0049] It should be noted that the motion parameters of each virtual wheel may be inconsistent. In this application, the target parameters of the initial audio data are adjusted based on each virtual wheel to obtain the target audio data corresponding to the virtual wheel. In addition, the initial audio data used to generate the target audio data in this application is obtained through actual recording. During the actual recording process, the driver can be required to perform fixed-point drifting actions and record the audio at the end of the drifting process. The recorded audio is then post-processed to obtain the above-mentioned initial audio data. In addition, in this application, by selecting independent motion parameters for each virtual wheel to generate target audio data, players can obtain more reliable wheel status through audio data, thereby achieving the technical effect of improving user experience.
[0050] Step S206, synthesizing the target audio data to obtain game audio data corresponding to the target operation.
[0051] Specifically, during the game, the game screen that the player can see depends on the position and orientation of the virtual camera, and the spatial parameters used for synthesizing the target audio data depend on the position of the virtual wheel relative to the virtual camera. Therefore, when synthesizing the target data, it is necessary to determine the position of the virtual camera of the current game interface, and then determine the relative position of the virtual wheel to obtain the spatial parameters, and use spatialization technology to synthesize the target audio data to obtain game audio data corresponding to the target operation.
[0052] In the above embodiment, in response to the target operation performed on the virtual vehicle in the game scene, the motion parameters of at least one virtual wheel contained in the virtual vehicle are obtained; the target parameters of the initial audio data are adjusted based on the motion parameters to obtain the target audio data corresponding to the at least one virtual wheel, and then the target audio data are synthesized to obtain the game audio data corresponding to the target operation. Instead of playing the recorded audio data after the motion parameters reach the preset threshold, the target audio is obtained by synthesizing the initial audio data based on the real-time target operation and the motion parameters, thereby solving the technical problem that the game sound effects have poor continuity and consistency and cannot fit the vehicle movements in the game interface well, thereby achieving the technical effect of improving the gaming experience.
[0053] Optionally, the motion parameters include: a target slip angle, the initial audio data include: a first layer of data and a second layer of data, the target parameters include: a first volume of the first layer of data and a second volume of the second layer of data, wherein adjusting the target parameters of the initial audio data based on the motion parameters includes: adjusting the first volume based on a first association relationship and the target slip angle, wherein the first association relationship is used to characterize the correspondence between the volume of the first layer of data and the slip angle, and the first layer of data is used to characterize the audio data generated when there is a torque between the suspension shaft of the virtual vehicle and the contact point of at least one virtual wheel; adjusting the second volume based on the second association relationship and the target slip angle, wherein the second association relationship is used to characterize the correspondence between the volume of the second layer of data and the slip angle, and the second layer of data is used to characterize the audio data generated when there is no torque between the shaft and the contact point.
[0054] Specifically, the target slip angle may be a virtual wheel slip angle, that is, a slip angle, which may be the angle between the orientation of the virtual wheel and the speed of the wheel relative to the ground, such as Figure 3 As shown, the rectangular boxes represent the four wheels of the virtual vehicle, the slip angles of the left front wheel are α1, and the left rear wheel is α2. The first layer of data can be the audio data of the scrub (friction) layer, and the second layer of data can be the audio data of the skip (drift) layer. Among them, the first layer of data only corresponds to the front wheels of the virtual wheels. When the front wheels of the virtual wheels are turning, there is a torque at the contact point between the suspended shaft and the virtual wheels, which causes the wheel rubber to slip periodically laterally. The sound has obvious sound characteristics and strong recognition. When the slip angle is small, it is the main sound judgment basis for grip gameplay. The second layer of data corresponds to the sound emitted when the virtual wheels begin to drift obviously, which can be the sound emitted by all virtual wheels, such as Figure 4 As shown, Figure 4 is a schematic diagram of the principle of virtual wheel suspension leading to the first layered data. The first volume may be the volume of the first layered data, and the second volume may be the volume of the second layered data. As shown in FIG5 , the abscissa of FIG5 represents the slip angle, and the ordinate represents the volume, wherein the upper part is a schematic diagram of the first association relationship, and the lower part is a schematic diagram of the second association relationship. Figure 5A and Figure 5BAs shown in the figure, when the virtual vehicle is in a gripping state, when the slip angle of the virtual wheel is within a certain range, the first volume is large, while the second volume is almost 0; when the virtual wheel starts to drift, the virtual wheel slip angle has reached a certain threshold at this time. As the slip angle increases, the first volume begins to decrease, while the second volume begins to increase, reaching the maximum when the slip angle is 1.57rad≈90° (this indicates that the virtual vehicle has been in a completely lateral sliding out of control state) and the first audio data has obvious sound characteristics. When the virtual vehicle goes from walking to drifting, the sound of the front wheel will gradually transition from scrubs layering to skid layering, which is consistent with the actual situation. Therefore, during the game, the player can perceive the slip degree of the virtual wheel according to this sound change feature, judge the state of the virtual vehicle, and thus adjust the operation in time, thereby achieving the technical effect of improving the player's gaming experience. In addition, in the actual game implementation, the game sound effect data can be output to the player in conjunction with the game screen, and the player can be given accurate and stimulating drift feedback.
[0055] It should be noted that in order to pursue more realistic game sound effects, this application adopts a two-layer audio structure. The volume ratio between the two layers is controlled according to the slip angle, thereby forming a continuous transition effect from the scrub layer corresponding to slight slip to the skid layer of full sliding friction, so that the sound remains continuous and changing.
[0056] Optionally, the method also includes: obtaining a third association relationship of the virtual vehicle, wherein the third association relationship is used to characterize the correspondence between the grip and slip angle of the virtual vehicle; based on the third association relationship, determining a target volume curve in the first association relationship; and adjusting the shape of the target curve segment of the first association relationship.
[0057] Specifically, when the virtual vehicle goes from alignment to drifting, the grip of the virtual vehicle will change with the slip angle. Within a certain range, the grip increases with the increase of the slip angle, but after reaching the critical value, the grip will decrease with the increase of the slip angle. From the first association relationship and the second association relationship, it can be known that in the process of the vehicle going from alignment to drifting, the sound of the front wheel of the virtual wheel will gradually transition from the first layer data to the second layer data, and the game player can also judge the status of the current virtual wheel through this sound change during the game. Since multiple types of virtual vehicles can be provided in the game, and the object conditions of each virtual vehicle are different, it is necessary to adjust for each type of virtual vehicle so that the sound change of all virtual wheels sounds consistent. In the present application, the slip angle when the grip is maximum and the critical slip angle at which the grip begins to decrease as the slip angle increases after the grip reaches a maximum value can be determined from the third association relationship. Then, the curve segment of the first association relationship that needs to be adjusted is determined based on the slip angle when the grip is maximum and the critical slip angle, and then the target curve is adjusted based on a preset mapping relationship.
[0058] Optionally, based on the third association relationship, determining the target volume curve in the first association relationship includes: based on the third association relationship, determining a first preset slip angle and a second preset slip angle, wherein the first preset slip angle is the slip angle corresponding to a grip threshold, the second preset slip angle is the slip angle corresponding to a maximum grip, and the first preset slip angle is greater than the second preset slip angle; based on the first preset slip angle and the second preset slip angle, determining a third preset slip angle, wherein a difference between the first preset slip angle and the second preset slip angle is the same as a difference between the second preset slip angle and the third preset slip angle; determining a volume curve in the first association relationship that is between the first preset slip angle and the third preset slip angle to obtain a target volume curve.
[0059] Specifically, during the driving process of the virtual vehicle, Figure 6 As shown in the figure, as the slip angle increases, when the slip angle of the vehicle is the slip angle represented by point B, that is, the second preset slip angle, the grip of the virtual vehicle reaches the maximum; if the slip angle continues to increase, the grip does not increase but decreases. When the slip angle is the slip angle represented by point C, that is, the first slip angle, it reaches the critical point, the virtual vehicle starts to drift, and the grip of the virtual vehicle gradually decreases. Since the difference between the first preset slip angle and the second preset slip angle is the same as the difference between the second preset slip angle and the third preset slip angle, the third preset angle can be calculated based on the first preset angle and the second preset angle to obtain the target volume curve.
[0060] It should be noted that, since the physical conditions of each vehicle are not consistent, the third association relationship of each vehicle is also different. This application needs to confirm the first preset slip angle, the second preset slip angle and the third preset slip angle of the virtual vehicle in order to ensure that the sound effects of different vehicles, that is, the volume curve, remain consistent, so that players can judge the saturation of the current virtual vehicle's grip according to the volume of the first layer during the game to improve the gaming experience. The relationship between the first preset slip angle, the second preset slip angle and the third preset slip angle and the first volume can also be as follows: Figure 7 As shown, the value of the horizontal coordinate of point A is the third preset slip angle, the value of the horizontal coordinate of point B is the second preset slip angle, and the value of the horizontal coordinate of point C is the first preset slip angle.
[0061] Optionally, the motion parameters include: target pressure in the vertical direction, the target parameters include: target volume, wherein adjusting the target parameters of the initial audio data based on the motion parameters includes: adjusting the target volume based on the target pressure and a fourth association relationship, wherein the fourth association relationship is used to characterize the correspondence between the volume of the initial audio data and the pressure in the vertical direction.
[0062] Specifically, when the virtual vehicle is in the air or the virtual wheel is off the ground, the target pressure in the vertical direction of the virtual wheel is 0, and the virtual wheel does not make any noise, so the volume is minimal; when the virtual wheel slides sideways, the noise is completely generated by sliding friction. Therefore, when the target pressure in the vertical direction is larger, the target volume will also increase. The relationship between the target pressure in the vertical direction and the target volume can be shown as follows: Figure 8 As shown. Wherein, the target pressure in the vertical direction can be F tyre_force_y The friction force f affecting the virtual vehicle can be calculated by the dynamic friction coefficient and F tyre_force_y Optionally, the motion parameters include: a target lateral sliding speed, and the target parameters include: a target volume and a target pitch, wherein adjusting the target parameters of the initial audio data based on the motion parameters includes: determining a first material of the ground in the game scene; adjusting the target pitch based on a fifth association relationship corresponding to the first material and the target lateral sliding speed, wherein the fifth association relationship is used to characterize the correspondence between the pitch of the initial audio data and the lateral sliding speed; adjusting the target volume based on a sixth association relationship and the target lateral sliding speed, wherein the sixth association relationship is used to characterize the correspondence between the volume of the initial audio data and the lateral sliding speed.
[0063] Specifically, the lateral slip speed can be the relative motion speed between the wheel and the current driving road surface, which is projected onto the wheel rim normal component to obtain the speed component. The target pitch (Pitch) can be the frequency of the sound of the virtual vehicle when drifting, and the target volume can be the volume of the virtual vehicle when drifting. During the drifting of the virtual vehicle, the target pitch is related to the driving speed of the virtual vehicle. In this application, the target lateral slip speed is used to represent the driving speed of the virtual vehicle. In addition, the target pitch is also related to the ground material. Therefore, before calculating the target pitch, it is necessary to determine the material of the ground and select a mapping curve between the lateral drift speed and the pitch designed based on the first material, such as Fig. 9 As shown, Fig. 9 is the mapping curve between lateral drift speed and pitch when the ground material is asphalt. The above target volume can also be determined by the target lateral slip speed of the virtual vehicle, such as Fig.10 As shown in the figure, tire noise will only start when the lateral sliding speed is greater than 5 miles / h, and a certain dynamic range of volume is given according to different lateral sliding speeds. Fig.10 The schematic diagram is a diagram showing the volume of the first layer data changing with the lateral sliding speed. Optionally, the target parameter includes: a target spectrum width, wherein adjusting the target parameter of the initial audio data based on the motion parameter includes: adjusting the target spectrum width based on the motion parameter.
[0064] Specifically, the spectrum width can be the spectrum width of the audio data of the virtual vehicle when drifting, and the high and low cuts of the material can be adjusted through physical quantities such as the slip angle and the slip speed, so that the sound can be further changed during the drifting process, and the change of the spectrum width of the sound under different drifting states can be controlled. Fig.11 As shown, Fig.11 is the mapping relationship between drift velocity and spectrum width.
[0065] Optionally, the method further includes: determining a second material of at least one virtual wheel; acquiring audio data corresponding to the second material to obtain initial audio data.
[0066] Specifically, different tire materials have a great impact on drifting sounds. In order to better restore the sound effects produced by different tires drifting, this application records audio materials of drifting of multiple tires when recording the initial audio. If the player selects the type of tire during the game, the sound effects generated by the corresponding material will be played for the player. In an optional embodiment, two sets of materials, ordinary tires and semi-slick tires, can be recorded.
[0067] Optionally, synthesizing the target audio data to obtain game audio data corresponding to the target operation includes: determining a target position of at least one virtual wheel relative to a virtual camera in a game scene; and synthesizing the target audio data based on the target position to obtain game audio data.
[0068] Specifically, the game screen that the player can see depends on the position and orientation of the virtual camera, and the spatial parameters used for synthesizing the target audio data depend on the position of the virtual wheel relative to the virtual camera. Therefore, when synthesizing the target data, it is necessary to determine the position of the virtual camera of the current game interface, and then determine the relative position of the virtual wheel to obtain the spatial parameters, and use the spatialization technology to synthesize the target audio data to obtain the game audio data corresponding to the target operation.
[0069] In the present embodiment, a processing device for audio data is also provided, and the device is used to implement the above-mentioned embodiment and preferred implementation mode, and the description has been made no further. As used below, the terms "unit" and "module" can implement a combination of software and / or hardware of a predetermined function. Although the device described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware is also possible and conceived.
[0070] Fig.12 is a structural block diagram of an audio data processing device according to one embodiment of the present invention. Fig.12 As shown, the device comprises:
[0071] The acquisition module 121 is used to acquire motion parameters of at least one virtual wheel included in the virtual vehicle in response to a target operation performed on the virtual vehicle in the game scene.
[0072] The adjustment module 122 is used to adjust the target parameters of the initial audio data based on the motion parameters to obtain target audio data corresponding to at least one virtual wheel.
[0073] The synthesis module 123 is used to synthesize the target audio data to obtain the game audio data corresponding to the target operation.
[0074] In the above embodiment, in response to the target operation performed on the virtual vehicle in the game scene, the motion parameters of at least one virtual wheel contained in the virtual vehicle are obtained; the target parameters of the initial audio data are adjusted based on the motion parameters to obtain the target audio data corresponding to the at least one virtual wheel, and then the target audio data are synthesized to obtain the game audio data corresponding to the target operation. Instead of playing the recorded audio data after the motion parameters reach the preset threshold, the target audio is obtained by synthesizing the initial audio data based on the real-time target operation and the motion parameters, thereby solving the technical problem that the game sound effects have poor continuity and consistency and cannot fit the vehicle movements in the game interface well, thereby achieving the technical effect of improving the gaming experience.
[0075] Optionally, the motion parameters include: a target slip angle, the initial audio data include: a first layered data and a second layered data, the target parameters include: a first volume of the first layered data and a second volume of the second layered data, and the adjustment module includes: a first volume adjustment unit, used to adjust the first volume based on a first association relationship and a target slip angle, wherein the first association relationship is used to characterize the correspondence between the volume of the first layered data and the slip angle, and the first layered data is used to characterize the audio data generated when there is a torque between the suspension shaft of the virtual vehicle and the contact point of at least one virtual wheel; a second volume adjustment unit, used to adjust the second volume based on the second association relationship and the target slip angle, wherein the second association relationship is used to characterize the correspondence between the volume of the second layered data and the slip angle, and the second layered data is used to characterize the audio data generated when there is no torque between the shaft and the contact point.
[0076] Optionally, the device also includes: a third association relationship acquisition module, used to obtain a third association relationship of the virtual vehicle, wherein the third association relationship is used to characterize the correspondence between the grip and slip angle of the virtual vehicle; a target volume curve determination module, used to determine the target volume curve in the first association relationship based on the third association relationship; and a target curve adjustment module, used to adjust the shape of the target curve segment of the first association relationship.
[0077] Optionally, the target curve determination module includes: a first slip angle determination unit, used to determine a first preset slip angle and a second preset slip angle based on a third association relationship, wherein the first preset slip angle is the slip angle corresponding to a grip threshold, the second preset slip angle is the slip angle corresponding to a maximum grip, and the first preset slip angle is greater than the second preset slip angle; a second slip angle determination unit, used to determine a third preset slip angle based on the first preset slip angle and the second preset slip angle, wherein a difference between the first preset slip angle and the second preset slip angle is the same as a difference between the second preset slip angle and the third preset slip angle; and a volume curve determination unit, used to determine a volume curve located between the first preset slip angle and the third preset slip angle in the first association relationship to obtain a target volume curve.
[0078] Optionally, the motion parameters include: target pressure in the vertical direction, the target parameters include: target volume, and the adjustment module also includes: a volume adjustment module based on target pressure, used to adjust the target volume based on the target pressure and a fourth association relationship, wherein the fourth association relationship is used to characterize the correspondence between the volume of the initial audio data and the pressure in the vertical direction.
[0079] Optionally, the motion parameters include: a target lateral slip speed, the target parameters include: a target volume and a target pitch, and the adjustment module also includes: a ground material determination unit, used to determine the first material of the ground in the game scene; a pitch adjustment unit, used to adjust the target pitch based on the fifth association relationship corresponding to the first material and the target lateral slip speed, wherein the fifth association relationship is used to characterize the correspondence between the pitch of the initial audio data and the lateral slip speed when the virtual vehicle is traveling on the ground of the first material; a volume determination unit based on the lateral slip speed, used to adjust the target volume based on the sixth association relationship and the target lateral slip speed, wherein the sixth association relationship is used to characterize the correspondence between the volume of the initial audio data and the lateral slip speed.
[0080] Optionally, the target parameter includes: a target spectrum width, and the adjustment module further includes: a spectrum width adjustment unit, which is used to adjust the target spectrum width based on the motion parameter.
[0081] Optionally, the device also includes: a tire material determination module, used to determine the second material of at least one virtual wheel; and an initial audio acquisition module, used to acquire audio data corresponding to the second material to obtain initial audio data.
[0082] Optionally, the synthesis module includes: a target position determination unit, used to determine the target position of at least one virtual wheel relative to a virtual camera in the game scene; and an audio data acquisition module, used to synthesize target audio data based on the target position to obtain game audio data.
[0083] It should be noted that the above-mentioned units and modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to this: the above-mentioned units and modules are all located in the same processor; or, the above-mentioned units and modules are located in different processors in any combination.
[0084] An embodiment of the present invention further provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.
[0085] Optionally, in this embodiment, the computer-readable storage medium may be configured to store a computer program for performing the following steps:
[0086] S1, in response to a target operation performed on a virtual vehicle in a game scene, obtaining a motion parameter of at least one virtual wheel included in the virtual vehicle;
[0087] S2, adjusting the target parameters of the initial audio data based on the motion parameters to obtain target audio data corresponding to at least one virtual wheel;
[0088] S3, synthesizing the target audio data to obtain game audio data corresponding to the target operation.
[0089] Optionally, in this embodiment, the above-mentioned computer-readable storage medium may include but is not limited to: a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and other media that can store computer programs.
[0090] An embodiment of the present invention further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0091] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0092] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program:
[0093] S1, in response to a target operation performed on a virtual vehicle in a game scene, obtaining a motion parameter of at least one virtual wheel included in the virtual vehicle;
[0094] S2, adjusting the target parameters of the initial audio data based on the motion parameters to obtain target audio data corresponding to at least one virtual wheel;
[0095] S3, synthesizing the target audio data to obtain game audio data corresponding to the target operation.
[0096] Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation modes, and this embodiment will not be described in detail here.
[0097] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0098] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0099] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0100] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0101] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0102] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.
[0103] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A method for processing audio data, characterized in that: include: In response to a target operation performed on a virtual vehicle in a game scene, obtaining a motion parameter of at least one virtual wheel included in the virtual vehicle; Adjusting target parameters of the initial audio data based on the motion parameters to obtain target audio data corresponding to the at least one virtual wheel; synthesizing the target audio data to obtain game audio data corresponding to the target operation; Among them, the motion parameters include: target lateral sliding speed, the target parameters include: target volume and target pitch, and adjusting the target parameters of the initial audio data based on the motion parameters includes: determining the first material of the ground in the game scene; adjusting the target pitch based on the fifth association relationship corresponding to the first material and the target lateral sliding speed, wherein the fifth association relationship is used to characterize the correspondence between the pitch of the initial audio data and the lateral sliding speed; adjusting the target volume based on the sixth association relationship and the target lateral sliding speed, wherein the sixth association relationship is used to characterize the correspondence between the volume of the initial audio data and the lateral sliding speed.
2. The method according to claim 1, characterized in that The motion parameter includes: a target slip angle, the initial audio data includes: first layered data and second layered data, the target parameter includes: a first volume of the first layered data and a second volume of the second layered data, wherein adjusting the target parameter of the initial audio data based on the motion parameter includes: adjusting the first volume based on a first association relationship and the target slip angle, wherein the first association relationship is used to characterize a correspondence between a volume and a slip angle of the first layered data, and the first layered data is used to characterize audio data generated when a torque exists between a rotating shaft of a suspension of the virtual vehicle and a contact point of the at least one virtual wheel; The second volume is adjusted based on a second association relationship and the target slip angle, wherein the second association relationship is used to characterize the correspondence between the volume and the slip angle of the second layered data, and the second layered data is used to characterize the audio data generated when there is no torque between the rotating shaft and the contact point.
3. The method according to claim 2, characterized in that The method further comprises: Acquiring a third association relationship of the virtual vehicle, wherein the third association relationship is used to represent a correspondence between a grip force and a slip angle of the virtual vehicle; Based on the third association relationship, determining a target volume curve in the first association relationship; The shape of the target curve segment is adjusted.
4. The method according to claim 3, characterized in that Based on the third association relationship, determining the target volume curve in the first association relationship includes: Based on the third association relationship, determining a first preset slip angle and a second preset slip angle, wherein the first preset slip angle is a slip angle corresponding to a grip threshold, the second preset slip angle is a slip angle corresponding to a maximum grip, and the first preset slip angle is greater than the second preset slip angle; determining a third preset slip angle based on the first preset slip angle and the second preset slip angle, wherein a difference between the first preset slip angle and the second preset slip angle is the same as a difference between the second preset slip angle and the third preset slip angle; A volume curve located between the first preset sliding angle and the third preset sliding angle in the first association relationship is determined to obtain the target volume curve.
5. The method according to claim 1, characterized in that The motion parameter includes: a target pressure in a vertical direction, and the target parameter includes: a target volume, wherein adjusting the target parameter of the initial audio data based on the motion parameter includes: The target volume is adjusted based on the target pressure and a fourth association relationship, wherein the fourth association relationship is used to characterize a correspondence between the volume of the initial audio data and the pressure in a vertical direction.
6. The method according to claim 1, characterized in that The target parameter includes: a target spectrum width, wherein adjusting the target parameter of the initial audio data based on the motion parameter includes: The target spectrum width is adjusted based on the motion parameter.
7. The method according to claim 1, characterized in that The method further comprises: determining a second material of the at least one virtual wheel; The audio data corresponding to the second material is obtained to obtain the initial audio data.
8. The method according to any one of claims 1 to 7, characterized in that The target audio data is synthesized to obtain game audio data corresponding to the target operation, including: determining a target position of the at least one virtual wheel relative to a virtual camera in the game scene; The target audio data is synthesized based on the target position to obtain the game audio data.
9. An audio data processing device, characterized in that: include: An acquisition module, configured to acquire motion parameters of at least one virtual wheel included in the virtual vehicle in response to a target operation performed on the virtual vehicle in the game scene; an adjustment module, configured to adjust target parameters of the initial audio data based on the motion parameters to obtain target audio data corresponding to the at least one virtual wheel; A synthesis module, used for synthesizing the target audio data to obtain game audio data corresponding to the target operation; Among them, the motion parameters include: target lateral sliding speed, the target parameters include: target volume and target pitch, and the adjustment module is also used to: determine the first material of the ground in the game scene; adjust the target pitch based on the fifth association relationship corresponding to the first material and the target lateral sliding speed, wherein the fifth association relationship is used to characterize the correspondence between the pitch of the initial audio data and the lateral sliding speed; adjust the target volume based on the sixth association relationship and the target lateral sliding speed, wherein the sixth association relationship is used to characterize the correspondence between the volume of the initial audio data and the lateral sliding speed.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program is configured to execute the method for processing audio data as claimed in any one of claims 1 to 8 when executed.
11. A processor, characterized in that: The processor is used to run a program, wherein the program is configured to execute the method for processing audio data described in any one of claims 1 to 8 when running.
12. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to run the computer program to execute the method for processing audio data as claimed in any one of claims 1 to 8.
Citation Information
Patent Citations
Processing device, squealing sound generation method in information processing device, and computer program product
US20070269054A1