Vehicle sound effect generation method, electronic equipment, vehicle and program product
By simulating the collision of virtual objects in an environmental model within a vehicle, realistic audio signals are generated, solving the problem of insufficient sound effects during vehicle operation and enhancing the driving experience.
Patent Information
- Application Number
- CN202511175471.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-19
- Publication Date
- 2025-12-30
AI Technical Summary
Existing technologies struggle to provide dynamic, realistic, and personalized motion-cue sound effects while the vehicle is in motion, failing to meet consumers' demand for more auditory feedback and impacting driving pleasure.
By controlling the movement of preset virtual objects in an environment model using vehicle motion data, the system simulates collision behavior, generates audio signals, and sends them to speakers. It uses a physics engine and acoustic algorithms to simulate realistic collision sounds and supports user-defined parameters.
It features dynamic, realistic, and personalized motion-sensing sound effects, enhancing the user's driving pleasure.
Smart Images

Figure CN121237102A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of vehicle control technology, and more specifically, to a method for generating vehicle sound effects, electronic devices, vehicles, and computer program products. Background Technology
[0002] With the development of the automotive market, consumer demand for cars has gone beyond their basic transportation function. During driving, users expect more auditory feedback as the vehicle's driving status changes, resulting in a more personalized driving experience and enhanced driving pleasure. Summary of the Invention
[0003] This application provides a method for generating vehicle sound effects, an electronic device, a vehicle, and a computer program product for generating dynamic, realistic, and personalized motion prompt sound effects, thereby enhancing the user's driving pleasure.
[0004] The vehicle sound effect generation method of this application includes controlling a preset virtual object to move in a preset environment model based on vehicle motion data to obtain collision data, the collision data including collisions that have occurred; when the preset virtual object has collided, obtaining an audio signal based on the material data of the preset virtual object and the material data of the preset environment model, and sending the audio signal to a speaker.
[0005] In some implementations, the step of controlling a preset virtual object to move within a preset environment model based on vehicle motion data to obtain collision data includes: processing the preset virtual object based on the vehicle motion data and a preset motion algorithm to obtain motion data of the preset virtual object; and controlling the preset virtual object to move within a preset environment model based on the motion data of the preset virtual object to obtain the collision data.
[0006] In some embodiments, the preset virtual object includes macroscopic objects and microscopic objects, the preset motion algorithm includes Newton-Euler equations and the discrete element method, and the step of calculating and processing the preset virtual object according to the vehicle motion data and the preset motion algorithm to obtain the motion data of the preset virtual object includes: when the preset virtual object is a macroscopic object, calculating and processing the preset virtual object according to the vehicle motion data and the Newton-Euler equations to obtain the motion data of the macroscopic object; when the preset virtual object is a microscopic object, calculating and processing the preset virtual object according to the vehicle motion data and the discrete element method to obtain the motion data of the microscopic object.
[0007] In some implementations, the step of controlling the preset virtual object to move within a preset environment model based on the preset virtual object's motion data to obtain collision data includes: controlling the preset virtual object to move within the preset environment model based on the preset virtual object's motion data; determining whether the preset virtual object collides with the environment model based on the preset virtual object's motion data and the geometric structure of the preset environment model; determining that the collision data indicates a collision has occurred if the preset virtual object collides with the environment model; and determining that the collision data indicates no collision has occurred if the preset virtual object does not collide with the environment model.
[0008] In some embodiments, obtaining the audio signal based on the preset material data of the virtual object and the preset material data of the environment model includes: obtaining the collision point coordinates, relative velocity, and contact surface normal vector of the collision between the preset virtual object and the preset environment model based on the preset material data of the virtual object, the preset material data of the environment model, and a preset energy loss coefficient; and obtaining the audio signal based on the collision point coordinates, the relative velocity, and the contact surface normal vector.
[0009] In some embodiments, obtaining the audio signal based on the preset material data of the virtual object and the preset material data of the environment model includes: obtaining the audio signal based on a preset energy loss coefficient, the preset material data of the virtual object, the acoustic transfer function corresponding to the environment model, the elastic modulus of the environment model, and the damping coefficient of the environment model.
[0010] In some embodiments, the audio signal includes a basic signal and a synthesized signal. The step of obtaining the audio signal based on the preset material data of the virtual object and the preset material data of the environment model, and sending the audio signal to the speaker, includes: when both the material of the preset virtual object and the material of the preset environment model are known materials, obtaining the collision speed and contact area based on the preset material data of the virtual object, the preset material data of the environment model, and a preset energy loss coefficient; obtaining the basic signal based on the collision speed, the contact area, the preset material data of the virtual object, and the preset material data of the environment model, and sending the basic signal to the speaker; when one of the preset material of the virtual object and the preset material of the environment model is unknown, obtaining the acoustic wave equation based on the preset material data of the virtual object and the preset material data of the environment model, and obtaining the characteristic frequency based on the acoustic wave equation; obtaining the synthesized signal by superimposing the characteristic frequency and the basic signal based on the characteristic frequency, and sending the synthesized signal to the speaker.
[0011] In some embodiments, the loudspeaker includes a multi-channel speaker, and the generation method further includes: when the collision point coordinates are within a preset collision range, processing the audio signal according to a preset head-related transfer function to obtain a binaural signal with directional differences, and sending the binaural signal to the multi-channel speaker.
[0012] In some embodiments, the generation method further includes: obtaining user adjustment instructions, and obtaining the preset virtual object and the preset environment model according to the adjustment instructions, wherein the adjustment instructions include the physical properties of the virtual object, the physical properties of the environment model, and the preset sound effect type, and the preset sound effect type corresponds one-to-one with the acoustic transfer function.
[0013] This application also provides an electronic device, which includes a memory and a processor. The memory is configured to store a computer program, and the processor, when executing the computer program, implements the generation method described in any of the above embodiments.
[0014] This application also provides a vehicle that includes the electronic equipment described in any of the above embodiments.
[0015] This application also provides a computer program product having a computer program stored thereon, which, when executed by a processor, implements the generation method described in any of the above embodiments.
[0016] The vehicle sound effect generation method, electronic device, vehicle, and computer program products provided in this application control the movement of a preset virtual object within a preset environmental model using vehicle motion data. The application determines whether the preset virtual object has collided. If a collision has occurred, an audio signal is generated based on the material data of the preset virtual object and the material data of the preset environmental model, and then sent to a speaker. This application can drive a preset virtual object (e.g., a small ball made of stainless steel) to move within a preset environmental model (e.g., a pipe or cavity made of aluminum alloy) using vehicle motion data acquired via a CAN bus or onboard sensors. This causes the virtual object to collide within the environmental model, generating an audio signal, which is then sent to a speaker to achieve dynamic, realistic, and personalized motion-cue sound effects, thereby enhancing the user's driving pleasure.
[0017] Additional aspects and advantages of embodiments of this application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of embodiments of this application. Attached Figure Description
[0018] The above and / or additional aspects and advantages of this application will become apparent and readily understood from the description of the embodiments taken in conjunction with the following drawings, wherein:
[0019] Figure 1 This is a flowchart illustrating a method for generating vehicle sound effects according to some embodiments of this application;
[0020] Figure 2 This is a schematic diagram of the structure of a vehicle sound effect generation device according to some embodiments of this application;
[0021] Figure 3 This is a schematic diagram of the structure of a vehicle sound effect generation device according to other embodiments of this application;
[0022] Figure 4 This is a flowchart illustrating the process of generating vehicle sound effects according to some embodiments of this application, which controls a preset virtual object to move in a preset environment model based on vehicle motion data to obtain collision data.
[0023] Figure 5 This is a flowchart illustrating the process of generating vehicle sound effects according to some embodiments of this application, in which a preset virtual object is calculated and processed based on vehicle motion data and a preset motion algorithm to obtain the motion data of the preset virtual object.
[0024] Figure 6 This is a flowchart illustrating the process of generating vehicle sound effects according to some embodiments of this application, which controls the movement of a preset virtual object in a preset environment model based on the motion data of a preset virtual object to obtain collision data.
[0025] Figure 7 This is a schematic diagram of the process of generating vehicle sound effects in some embodiments of this application, in which, when a preset virtual object has collided, an audio signal is obtained based on the material data of the preset virtual object and the material data of the preset environment model, and the audio signal is sent to a speaker.
[0026] Figure 8 This is a schematic diagram of the process of generating vehicle sound effects in some embodiments of this application, in which, when a preset virtual object has collided, an audio signal is obtained based on the material data of the preset virtual object and the material data of the preset environment model, and the audio signal is sent to a speaker.
[0027] Figure 9 This is a schematic diagram of the process of generating vehicle sound effects in some embodiments of this application, in which, when a preset virtual object has collided, an audio signal is obtained based on the material data of the preset virtual object and the material data of the preset environment model, and the audio signal is sent to a speaker.
[0028] Figure 10 This is a flowchart illustrating a method for generating vehicle sound effects according to some embodiments of this application;
[0029] Figure 11 This is a schematic diagram of a vehicle according to certain embodiments of this application;
[0030] Figure 12 This is a schematic diagram showing the connection state of a computer program product and a processor according to certain embodiments of this application.
[0031] Explanation of key component symbols:
[0032] 100 vehicles;
[0033] Vehicle sound effect generation device 10;
[0034] First, module 11 is obtained; second, module 12 is obtained.
[0035] Processor 20;
[0036] Computer program product 200; Computer program 202;
[0037] Electronic equipment 30. Detailed Implementation
[0038] The embodiments of this application are described in detail below. Examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the embodiments of this application, and should not be construed as limiting the embodiments of this application.
[0039] With the development of the automotive market, consumer demand for cars has gone beyond their mere transportation attributes. During vehicle operation, users expect more auditory feedback as the vehicle's driving status changes, resulting in a more personalized driving experience and enhanced driving pleasure. How to provide users with more auditory feedback to improve driving enjoyment and create a more personalized driving experience has become a pressing problem for those skilled in the art. To address this issue, this application provides a method for generating vehicle sound effects (such as...). Figure 1 As shown), the vehicle sound effect generation device (such as...) Figure 2 As shown), electronic devices (such as) Figure 11 As shown), vehicles (such as) Figure 11 (as shown) and computer program products (such as Figure 12 (As shown).
[0040] Please see Figure 1 and Figure 2 The method for generating vehicle sound effects according to the embodiments of this application includes:
[0041] 03: Based on vehicle motion data, control the movement of preset virtual objects in a preset environment model to obtain collision data, including collisions that have occurred;
[0042] 05: When a preset virtual object has collided with another object, an audio signal is obtained based on the material data of the preset virtual object and the material data of the preset environment model, and the audio signal is sent to the speaker.
[0043] The above-described method for generating vehicle sound effects can be applied to a vehicle sound effect generation device 10. The vehicle sound effect generation device 10 of this application includes a first obtaining module 11 and a second obtaining module 12. The first obtaining module 11 is used to control a preset virtual object to move within a preset environment model based on vehicle motion data, thereby obtaining collision data, which includes data indicating that a collision has occurred. The second obtaining module 12 is used to, when a preset virtual object has collided, obtain an audio signal based on the material data of the preset virtual object and the material data of the preset environment model, and send the audio signal to a speaker.
[0044] Specifically, the vehicle sound effect generation device 10 is a device integrated inside the vehicle. The vehicle sound effect generation device 10 can generate personalized dynamic sound effects based on a physics engine. By collecting real-time vehicle motion data (such as acceleration and bump amplitude), the vehicle sound effect generation device 10 drives preset virtual objects to move within a virtual environment model (such as a pipe model), simulating physical collision behavior, and generating sound signals that conform to physical laws based on the collision events and object material properties, ultimately outputting them to the vehicle's speakers. The vehicle sound effect generation device 10 can achieve dynamic synchronization between sound effects and vehicle motion through a physics engine and supports user-defined extensions of physical parameters.
[0045] More specifically, the first obtaining module 11 is the core module responsible for physical simulation in the vehicle sound effect generation device 10. The first obtaining module 11 receives real-time vehicle motion data, controls the motion trajectory of preset virtual objects (such as small balls) in the environment model (such as pipes and containers), calculates the collision state (including non-collision and collision) between virtual objects and the environment boundary in real time, and outputs collision data containing information such as collision position and intensity.
[0046] More specifically, the second obtaining module 12 is the module responsible for acoustic conversion in the vehicle sound effect generation device 10. After receiving the collision data from the first obtaining module, the second obtaining module 12 combines the acoustic properties of preset virtual object materials (such as metal and rubber) and environmental model materials, and generates an audio signal simulating a real collision through a physical modeling algorithm (such as the discrete element method), and finally sends the signal to the speaker for playback. Its core function is to dynamically synthesize sound with a sense of direction and material characteristics based on physical laws.
[0047] Furthermore, vehicle motion data refers to real-time physical parameters generated by the vehicle during operation (such as acceleration, bump amplitude, steering angular velocity, etc.), collected by sensors and used as system input. It reflects the current actual motion state of the vehicle. Preset virtual objects are three-dimensional models (such as spheres, cubes, etc.) pre-defined in the physics engine, whose trajectories are driven by vehicle motion data. The object's geometry, mass, and other attributes can be customized by the user. Preset environment models refer to the scene models of the virtual object's motion (such as pipes, containers, etc.). Their geometry (such as curvature, boundaries) and physical properties (such as friction coefficient) can be modified through the user interaction module, forming the collision space of the virtual object.
[0048] Furthermore, collision data is collision event information generated by the physics engine, containing key physical parameters such as collision state (occurred / not occurred), collision location, and collision intensity (related to speed and angle). Material data defines the acoustic properties of virtual objects and environment models (such as the crispness of metal and the dullness of rubber). It is converted into the spectral characteristics of sound (frequency distribution, decay rate, etc.) through physical modeling algorithms, directly affecting the realism of the timbre. The audio signal is a waveform signal generated based on collision data and material data using physical acoustic algorithms (such as modal superposition). It needs to be decoded by the in-vehicle audio system before being output as a playable sound wave.
[0049] Further, please refer to Figure 3 , Figure 3 This is a schematic diagram of the architecture of another vehicle sound effect generation device 10 provided in this application. The data interface module is used to acquire vehicle motion data, the user interaction module is used to allow users to input parameters to set virtual objects and virtual environment models, the physics engine simulation module is used to control the movement of preset virtual objects in preset environment models according to vehicle motion data to obtain collision data, and the acoustic generation and output module is used to obtain audio signals according to the material data of preset virtual objects and the material data of preset environment models when preset virtual objects have collided, and send the audio signals to the speakers.
[0050] Understandably, this application provides a method for generating vehicle sound effects. By using vehicle motion data, it controls the movement of a preset virtual object within a preset environmental model, determines whether the virtual object collides, and, if a collision has occurred, generates an audio signal based on the material data of the virtual object and the material data of the preset environmental model. This audio signal is then sent to a speaker. This application can drive a preset virtual object (e.g., a small ball made of stainless steel) to move within a preset environmental model (e.g., a pipe or cavity made of aluminum alloy) based on vehicle motion data acquired via a CAN bus or onboard sensors. This causes the virtual object to collide within the environmental model, generating an audio signal, which is then sent to a speaker to achieve dynamic, realistic, and personalized motion-cue sound effects, thereby enhancing the user's driving experience.
[0051] In some implementations, please refer to Figure 4 03: Based on vehicle motion data, control the movement of preset virtual objects within a preset environment model to obtain collision data, including:
[0052] 031: Based on vehicle motion data and a preset motion algorithm, calculate and process the preset virtual object to obtain the motion data of the preset virtual object;
[0053] 033: Based on the motion data of the preset virtual object, control the preset virtual object to move in the preset environment model to obtain collision data.
[0054] The above-mentioned method for generating vehicle sound effects can be applied to the vehicle sound effect generation device 10. The first obtaining module 11 is also used to calculate and process the preset virtual object according to the vehicle motion data and the preset motion algorithm to obtain the motion data of the preset virtual object; according to the motion data of the preset virtual object, control the preset virtual object to move in the preset environment model to obtain collision data.
[0055] Specifically, vehicle motion data is input into a preset motion algorithm (such as rigid body dynamics equations), which is then solved in real time by the physics engine to output the motion data of the virtual object. For example, when the vehicle makes a sharp turn, the algorithm calculates the centrifugal motion trajectory of the virtual object; when the vehicle passes through a bumpy road, the algorithm generates high-frequency vibration parameters of the virtual object.
[0056] Furthermore, in method 033, the first obtaining module 11 imports the motion data of the virtual object into the environment model (such as a closed pipe) and simulates its motion process through the physics engine: when the virtual object touches the boundary of the environment model, the engine detects the collision point and calculates the collision impulse, and marks the collision data as having occurred. If the object moves freely inside the model, it is marked as not having occurred.
[0057] Please see Figure 5 In some implementations, the preset virtual objects include macroscopic and microscopic objects, and the preset motion algorithm includes Newton-Euler equations and the discrete element method. 031: Based on vehicle motion data and the preset motion algorithm, the preset virtual objects are calculated and processed to obtain the motion data of the preset virtual objects, including:
[0058] 0311: When the preset virtual object is a macroscopic object, the motion data of the macroscopic object is obtained by calculating and processing the preset virtual object based on the vehicle motion data and Newton-Euler equations.
[0059] 0313: When the preset virtual object is a microscopic object, the motion data of the microscopic object is obtained by calculating and processing the preset virtual object based on vehicle motion data and discrete element method.
[0060] The above-mentioned method for generating vehicle sound effects can be applied to the vehicle sound effect generation device 10. The first obtaining module 11 is further used to calculate and process the preset virtual object according to the vehicle motion data and Newton-Euler equations to obtain the motion data of the macroscopic object when the preset virtual object is a macroscopic object; and to calculate and process the preset virtual object according to the vehicle motion data and the discrete element method to obtain the motion data of the microscopic object when the preset virtual object is a microscopic object.
[0061] Specifically, macroscopic objects refer to large-scale virtual objects with definite rigid body properties (such as metal spheres and cubes). Their motion follows the laws of rigid body dynamics, and their motion state is described by macroscopic physical quantities such as linear velocity and angular velocity. They are suitable for simulating overall collision behavior. Microscopic objects refer to virtual objects that need to consider particle-level interactions (such as sand swarms and powder aggregates). Their motion involves microscopic mechanical behaviors such as collisions and friction between discrete particles, and precise motion control needs to be achieved through particle-level dynamic simulation.
[0062] Furthermore, the Newton-Euler equations are the core algorithm of rigid body dynamics, consisting of Newton's second law (describing translation) and Euler's rotation equations (describing rotation). By calculating the relationship between force and torque, the motion parameters such as displacement and velocity of macroscopic objects can be accurately solved. The discrete element method (DEM) is a numerical method based on particle discretization modeling. By calculating the forces (contact forces, adhesive forces, etc.) and trajectories of each particle in a microscopic object, it simulates the collective behavior of particulate matter (such as flow and accumulation).
[0063] Please see Figure 6 In some implementations, 033: Based on the motion data of a preset virtual object, control the preset virtual object to move within a preset environment model to obtain collision data, including:
[0064] 0331: Based on the preset motion data of virtual objects, control the preset virtual objects to move within a preset environment model;
[0065] 0333: Based on the preset motion data of the virtual object and the preset geometric structure of the environment model, determine whether the preset virtual object collides with the environment model;
[0066] 0335: In the event of a collision between a pre-defined virtual object and the environment model, the collision data is determined to indicate that a collision has occurred;
[0067] 0337: If no collision occurs between the preset virtual object and the environment model, the collision data is determined to be no collision.
[0068] The above-mentioned method for generating vehicle sound effects can be applied to the vehicle sound effect generation device 10. The first obtaining module 11 is further used to control the movement of the preset virtual object in the preset environment model according to the preset motion data of the virtual object; determine whether the preset virtual object collides with the environment model according to the preset motion data of the virtual object and the geometric structure of the preset environment model; determine the collision data as having occurred if the preset virtual object collides with the environment model; and determine the collision data as not having occurred if the preset virtual object does not collide with the environment model.
[0069] Specifically, the preset virtual object motion data refers to the dynamic parameters of the object calculated and generated in the previous stage (method 031), which may include, but are not limited to, displacement, velocity, rotation angle, etc. The preset virtual object motion data is used to drive the real-time motion of the virtual object in the environment. The preset environment model is the scene container (such as pipes, uneven surfaces) for the virtual object's motion, and its geometric structure (boundary shape, curvature, aperture, etc.) constitutes the physical space framework for collision detection.
[0070] Furthermore, in step 0331, the motion data of the virtual object (such as velocity vector and rotation) is input into the environment model, which can dynamically drive the object to move according to physical laws. In step 0333, the spatial relationship between the object's motion trajectory and the geometric structure of the environment model (such as pipe bends and container corners) is calculated in real time, and whether contact has occurred can be determined by whether the boundaries intersect.
[0071] Please see Figure 7 In some implementations, 05: Based on preset material data of virtual objects and preset material data of environment models, an audio signal is obtained, including:
[0072] 051: Based on the preset material data of the virtual object, the preset material data of the environment model, and the preset energy loss coefficient, obtain the collision point coordinates, relative velocity, and contact surface normal vector of the preset virtual object colliding with the preset environment model.
[0073] 052: The audio signal is obtained based on the collision point coordinates, relative velocity, and contact surface normal vector.
[0074] The above-mentioned method for generating vehicle sound effects can be applied to the vehicle sound effect generation device 10. The second obtaining module 12 is used to obtain the collision point coordinates, relative velocity, and contact surface normal vector of the collision between the preset virtual object and the preset environment model based on the preset material data of the virtual object, the preset material data of the environment model, and the preset energy loss coefficient; and to obtain the audio signal based on the collision point coordinates, relative velocity, and contact surface normal vector.
[0075] Understandably, the energy loss coefficient is a parameter characterizing the efficiency of converting kinetic energy into sound energy during a collision (value between 0 and 1), determined by internal friction and heat loss within the material (e.g., a loss coefficient of 0.3 between metals results in a sharp sound effect, while a loss coefficient of 0.8 between foams results in a muffled sound effect). The collision point coordinates are the three-dimensional spatial position of the point of contact between the object and the environment model (e.g., the X / Y / Z coordinates of the inner wall of a pipe). These coordinates can be used for spatial localization of the sound source (e.g., a bumpy left front wheel → the collision point is located on the left side of the virtual environment → enhanced stereo left channel). Relative velocity is the velocity vector magnitude (unit: m / s) of the object relative to the contact surface of the environment model at the moment of collision. Relative velocity determines the amplitude of the sound wave (high-speed collision → large amplitude → high volume; low-speed friction → small amplitude → low volume). The contact surface normal vector is the vertical vector at the collision point of the environment model (e.g., the perpendicular line to the tangent plane of the curved surface of the inner wall of a pipe). This vector determines the direction of force decomposition.
[0076] Please see Figure 8 In some implementations, 05: Based on preset material data of virtual objects and preset material data of environment models, an audio signal is obtained, including:
[0077] 053: Based on the preset energy loss coefficient, the preset material data of the virtual object, the acoustic transfer function corresponding to the environment model, the elastic modulus of the environment model, and the damping coefficient of the environment model, the audio signal is obtained.
[0078] The above-mentioned method for generating vehicle sound effects can be applied to the vehicle sound effect generation device 10. The second obtaining module 12 is used to obtain audio signals based on the preset energy loss coefficient, the preset material data of virtual objects, the acoustic transfer function corresponding to the environment model, the elastic modulus of the environment model, and the damping coefficient of the environment model.
[0079] Specifically, the acoustic transfer function describes the sound transmission characteristics of an environment model (such as sound waves reflected from the inner wall of a pipe, cavity resonance effect), and is a predefined sound wave deformation rule (such as high-frequency enhancement corresponding to narrow pipes; low-frequency reverberation corresponding to open containers).
[0080] Furthermore, the elastic modulus and damping coefficient of the environmental model can accurately reproduce material properties in audio signals, improving the realism of the audio signals. For example, when a ball hits a rubber pipe, the rebound velocity of the ball after the collision (approximately 40% of the incident velocity) is calculated based on the elastic modulus (2MPa) and damping coefficient (0.3) of the rubber. At the same time, the acoustic transfer function of the rubber material (low-frequency resonant peak at 200Hz, attenuation slope -12dB / octave) is used to generate a dull "thud" sound.
[0081] Please see Figure 9In some implementations, the audio signal includes a basic signal and a synthesized signal. 05: Based on the preset material data of the virtual object and the preset material data of the environment model, an audio signal is obtained and sent to the speaker, including:
[0082] 054: When the materials of the preset virtual objects and the preset environment model are known, the collision speed and contact area are obtained based on the material data of the preset virtual objects, the material data of the preset environment model, and the preset energy loss coefficient.
[0083] 055: Based on the collision speed, contact area, preset material data of virtual objects, and preset material data of the environment model, a basic signal is obtained and sent to the speaker;
[0084] 056: When there is an unknown material among the preset virtual object material and the preset environment model material, the acoustic wave equation is obtained based on the preset virtual object material data and the preset environment model material data, and the characteristic frequency is obtained based on the acoustic wave equation.
[0085] 057: Based on the characteristic frequency and the fundamental signal, obtain the composite signal after superimposing the characteristic frequency and the fundamental signal, and send the composite signal to the loudspeaker.
[0086] The above-mentioned method for generating vehicle sound effects can be applied to the vehicle sound effect generation device 10. The second obtaining module 12 is used to obtain the collision speed and contact area based on the material data of the preset virtual object, the material data of the preset environment model, and the preset energy loss coefficient when the materials of the preset virtual object and the preset environment model are both known; obtain the basic signal based on the collision speed, contact area, material data of the preset virtual object, and material data of the preset environment model, and send the basic signal to the speaker; when there is an unknown material among the materials of the preset virtual object and the preset environment model, obtain the acoustic wave equation based on the material data of the preset virtual object and the material data of the preset environment model, and obtain the characteristic frequency based on the acoustic wave equation; obtain the synthesized signal after superimposing the characteristic frequency and the basic signal based on the characteristic frequency and the basic signal, and send the synthesized signal to the speaker.
[0087] Specifically, known materials are standard materials pre-stored in the system (such as metals and rubber), whose material data (elastic modulus, density, damping coefficient) and acoustic response rules have been experimentally calibrated and can be directly accessed for acoustic characteristics. Unknown materials are user-defined or non-pre-defined materials (such as new composite materials), and their acoustic behavior needs to be dynamically calculated using their material data.
[0088] Furthermore, for known materials, the second obtaining module 12 quickly generates a basic signal using a pre-trained physical information neural network (inputs are collision velocity, contact area, and material properties; output is a sound pressure time-domain signal). For unknown materials or environmental models with complex geometric structures, the second obtaining module 12 solves the acoustic wave equation using the finite element method, extracts characteristic frequencies (such as the resonance frequency of the air column in the pipe), and superimposes them with the basic signal to obtain a synthesized signal. For example, when a steel ball impacts an aluminum alloy pipe, the physical information neural network generates a short pulse with a main frequency of 3.5 kHz, and the finite element method solves the acoustic wave equation to calculate the 800 Hz resonance peak generated by the pipe cavity, ultimately synthesizing a prompt sound with a metallic texture and slight resonance.
[0089] Furthermore, collision velocity is the relative velocity (m / s) of the virtual objects at the moment of impact, determining the impact intensity of the sound. Contact area is the actual size of the contact surface between the object and the environment model at the time of collision (m²). 2 The acoustic wave equation describes the propagation of sound waves through materials. The fundamental signal is the original sound wave generated by the collision of known materials, containing core parameters such as amplitude and fundamental frequency (e.g., the "clang" sound of metal striking metal). The acoustic wave equation is a partial differential equation describing the propagation of sound waves in materials. It is used to calculate characteristic frequencies (the inherent resonance peaks of the material) using material data (density, elastic modulus). Characteristic frequencies are the main resonance frequencies of the material, obtained by solving the acoustic wave equation. The synthesized signal is the final output signal resulting from the superposition of the fundamental signal and the characteristic frequencies.
[0090] Please combine Figure 10 In some embodiments, the loudspeaker includes a multi-channel speaker, and the generation method further includes:
[0091] 06: When the collision point coordinates are within the preset collision range, the audio signal is processed according to the preset head-related transfer function to obtain binaural signals with directional differences, and the binaural signals are sent to the multi-channel speakers.
[0092] The above-mentioned method for generating vehicle sound effects can be applied to the vehicle sound effect generating device 10. The second obtaining module 12 is also used to process the audio signal according to the preset head-related transfer function when the collision point coordinates are within the preset collision range, to obtain the binaural signal with directional differences, and to send the binaural signal to the multi-channel speaker.
[0093] Understandably, the preset collision range is a pre-defined area. For example, the preset collision range could be set on the passenger's left side. When the collision point is on the passenger's left side, the left ear canal signal in the binaural signal can be enhanced. The head correlation transfer function is used to simulate the human ear's perception of spatial sound sources. Through spectral filtering (such as enhancing high frequencies in the left ear and delaying the right ear), a single sound source is converted into binaural signals with directional differences. The binaural signal is a stereo audio signal obtained after processing by the head correlation transfer function.
[0094] Please combine Figure 10 In some implementations, the generation method further includes:
[0095] 01: Obtain the user's adjustment instructions, and based on the adjustment instructions, obtain the preset virtual objects and preset environment models. The adjustment instructions include the physical properties of the virtual objects, the physical properties of the environment models, and the preset sound effect types. The preset sound effect types correspond one-to-one with the acoustic transfer functions.
[0096] The above-mentioned method for generating vehicle sound effects can be applied to the vehicle sound effect generation device 10. The first obtaining module 11 is also used to obtain the user's adjustment instructions and obtain preset virtual objects and preset environment models according to the adjustment instructions. The adjustment instructions include the physical properties of the virtual objects, the physical properties of the environment models, and preset sound effect types. The preset sound effect types correspond one-to-one with the acoustic transfer functions.
[0097] Understandably, adjustment commands are dynamic control parameters input by the user. These commands include adjusting the physical properties of virtual objects (including the physical properties of common materials such as steel, wood, rubber, and ceramics, such as density, elasticity, and surface roughness). User-defined new materials are also supported, such as carbon fiber with a density of 1800 kg / m³. 3 The system includes features such as an elastic modulus of 230 GPa, physical properties of the environment model (pipe diameter, curvature, cavity partition position; for example, users can change the pipe from a straight cylinder to a spiral structure, which lengthens the ball's movement path, reduces the collision frequency, and slows down the sound effect rhythm), and preset sound effect types (such as the "mechanical" template, which uses a steel ball, aluminum alloy pipe, and high collision energy to generate a sharp, intermittent sound, or the "natural" template, which uses a wooden ball, bamboo pipe, and low friction coefficient to generate a soft, resonant sound).
[0098] In summary, the vehicle sound effect generation method provided in this application controls the movement of a preset virtual object within a preset environment model using vehicle motion data, determines whether the preset virtual object collides, and, if a collision has occurred, generates an audio signal based on the material data of the preset virtual object and the material data of the preset environment model, and sends the audio signal to a speaker. This application can drive a preset virtual object (e.g., a small ball made of stainless steel) to move within a preset environment model (e.g., a pipe or cavity made of aluminum alloy) based on vehicle motion data acquired via a CAN bus or onboard sensors, causing the virtual object to collide within the environment model and generating an audio signal, which is then sent to a speaker to achieve dynamic, realistic, and personalized motion cues, thereby enhancing the user's driving pleasure.
[0099] In some implementations, please refer to Figure 11 This application also provides an electronic device 30, which includes a memory and a processor. The memory is configured to store a computer program, and the processor, when executing the computer program, implements the generation method in any of the above embodiments.
[0100] In some implementations, please refer to Figure 11 This application also provides a vehicle 100, including the electronic device 30 in any of the above embodiments; or, including the vehicle sound effect generating device 10 in any of the above embodiments.
[0101] Please see Figure 12 In some embodiments, this application also provides a computer program product 200, on which a computer program 202 is stored, which, when executed by a processor, implements the generation method in any of the above embodiments.
[0102] For example, when computer program 202 is executed by processor 20, the following generation method is implemented:
[0103] 03: Based on vehicle motion data, control the movement of preset virtual objects in a preset environment model to obtain collision data, which includes collisions that did not occur and collisions that did occur.
[0104] 05: When a preset virtual object has collided with another object, an audio signal is obtained based on the material data of the preset virtual object and the material data of the preset environment model, and the audio signal is sent to the speaker.
[0105] For example, when computer program 202 is executed by processor 20, the following generation method is implemented:
[0106] 031: Based on vehicle motion data and a preset motion algorithm, calculate and process the preset virtual object to obtain the motion data of the preset virtual object;
[0107] 033: Based on the motion data of the preset virtual object, control the preset virtual object to move in the preset environment model to obtain collision data.
[0108] For example, when computer program 202 is executed by processor 20, it can also implement the generation methods in 01, 0311, 0313, 0331, 0333, 0335, 0337, 051, 052, 053, 054, 055, 056, 057 and 06.
[0109] In the computer program product 200 of this application, vehicle motion data is used to control the movement of a preset virtual object within a preset environmental model. The system determines whether the preset virtual object has collided. If a collision has occurred, an audio signal is generated based on the material data of the preset virtual object and the material data of the preset environmental model, and this audio signal is sent to a speaker. This application can drive a preset virtual object (e.g., a small ball made of stainless steel) to move within a preset environmental model (e.g., a pipe or cavity made of aluminum alloy) based on vehicle motion data acquired via a CAN bus or onboard sensors. This causes the virtual object to collide within the environmental model, generating an audio signal, which is then sent to a speaker to achieve dynamic, realistic, and personalized motion cues, thereby enhancing the user's driving experience.
[0110] In the description of this specification, the references to terms such as "some embodiments," "in one example," "exemplarily," etc., indicate that a specific feature, structure, material, or characteristic described in connection with an embodiment or example is included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.
[0111] Any process or method described in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or more executable instructions for implementing a particular logical function or process, and the scope of the preferred embodiments of this application includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the function involved, as will be understood by those skilled in the art to which embodiments of this application pertain.
[0112] Although embodiments of this application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting this application. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of this application.
Claims
1. A method for generating vehicle sound effects, characterized in that, The generation method includes: Based on vehicle motion data, a preset virtual object is controlled to move within a preset environment model to obtain collision data, which includes collisions that have occurred. When the preset virtual object has collided, an audio signal is obtained based on the material data of the preset virtual object and the material data of the preset environment model, and the audio signal is sent to the speaker.
2. The method for generating vehicle sound effects according to claim 1, characterized in that, The step of controlling a preset virtual object to move within a preset environment model based on vehicle motion data to obtain collision data includes: The motion data of the preset virtual object is obtained by calculating and processing the preset virtual object based on the vehicle motion data and the preset motion algorithm. Based on the motion data of the preset virtual object, the preset virtual object is controlled to move within a preset environment model to obtain the collision data.
3. The method for generating vehicle sound effects according to claim 2, characterized in that, The preset virtual objects include macroscopic and microscopic objects, and the preset motion algorithm includes Newton-Euler equations and the discrete element method. The step of calculating and processing the preset virtual objects based on the vehicle motion data and the preset motion algorithm to obtain the motion data of the preset virtual objects includes: When the preset virtual object is a macroscopic object, the motion data of the macroscopic object is obtained by calculating and processing the preset virtual object according to the vehicle motion data and the Newton-Euler equation. When the preset virtual object is a microscopic object, the motion data of the microscopic object is obtained by calculating and processing the preset virtual object based on the vehicle motion data and the discrete element method.
4. The method for generating vehicle sound effects according to claim 2, characterized in that, The step of controlling the movement of the preset virtual object within a preset environment model based on the preset virtual object's motion data to obtain collision data includes: Based on the preset motion data of the virtual object, control the preset virtual object to move within the preset environment model; Based on the motion data of the preset virtual object and the geometric structure of the preset environment model, determine whether the preset virtual object collides with the environment model; In the event that the preset virtual object collides with the environment model, the collision data is determined to indicate that a collision has occurred. If the preset virtual object does not collide with the environment model, the collision data is determined to be that no collision has occurred.
5. The method for generating vehicle sound effects according to claim 1, characterized in that, The step of obtaining the audio signal based on the preset material data of the virtual object and the preset material data of the environment model includes: Based on the material data of the preset virtual object, the material data of the preset environment model, and the preset energy loss coefficient, the collision point coordinates, relative velocity, and contact surface normal vector of the preset virtual object and the preset environment model are obtained. The audio signal is obtained based on the collision point coordinates, the relative velocity, and the contact surface normal vector.
6. The method for generating vehicle sound effects according to claim 1, characterized in that, The step of obtaining the audio signal based on the preset material data of the virtual object and the preset material data of the environment model includes: The audio signal is obtained based on the preset energy loss coefficient, the preset material data of the virtual object, the acoustic transfer function corresponding to the environment model, the elastic modulus of the environment model, and the damping coefficient of the environment model.
7. The method for generating vehicle sound effects according to claim 1, characterized in that, The audio signal includes a basic signal and a synthesized signal. The process of obtaining the audio signal based on the preset material data of the virtual object and the preset material data of the environment model, and then sending the audio signal to the speaker, includes: When the material of the preset virtual object and the material of the preset environment model are both known, the collision speed and contact area are obtained based on the material data of the preset virtual object, the material data of the preset environment model, and the preset energy loss coefficient. The basic signal is obtained based on the collision speed, the contact area, the preset material data of the virtual object, and the preset material data of the environment model, and the basic signal is sent to the speaker. When there is an unknown material among the preset virtual object material and the preset environment model material, the acoustic wave equation is obtained based on the preset virtual object material data and the preset environment model material data, and the characteristic frequency is obtained based on the acoustic wave equation. Based on the characteristic frequency and the fundamental signal, a composite signal is obtained by superimposing the characteristic frequency and the fundamental signal, and the composite signal is sent to the loudspeaker.
8. The method for generating vehicle sound effects according to claim 1, characterized in that, The loudspeaker includes a multi-channel speaker, and the generation method further includes: When the collision point coordinates are within a preset collision range, the audio signal is processed according to a preset head-related transfer function to obtain binaural signals with directional differences, and the binaural signals are sent to the multi-channel speaker.
9. The method for generating vehicle sound effects according to claim 1, characterized in that, The generation method further includes: The system obtains the user's adjustment instructions and, based on these instructions, generates the preset virtual object and the preset environment model. The adjustment instructions include the physical properties of the virtual object, the physical properties of the environment model, and the preset sound effect type. The preset sound effect type corresponds one-to-one with the acoustic transfer function.
10. An electronic device, characterized in that, The electronic device includes a memory and a processor, the memory being configured to store a computer program, and the processor, when executing the computer program, implementing the generation method according to any one of claims 1-9.
11. A vehicle, characterized in that, Includes the electronic device as described in claim 10.
12. A computer program product having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the generation method according to any one of claims 1-9.