CN108076415B - Real-time realization method of Doppler sound effect - Google Patents

Real-time realization method of Doppler sound effect Download PDF

Info

Publication number
CN108076415B
CN108076415B CN201611018808.8A CN201611018808A CN108076415B CN 108076415 B CN108076415 B CN 108076415B CN 201611018808 A CN201611018808 A CN 201611018808A CN 108076415 B CN108076415 B CN 108076415B
Authority
CN
China
Prior art keywords
delay
time
sound
formula
filter
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201611018808.8A
Other languages
Chinese (zh)
Other versions
CN108076415A (en
Inventor
陈锴
卢晶
邱小军
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nanjing University
Original Assignee
Nanjing University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nanjing University filed Critical Nanjing University
Priority to CN201611018808.8A priority Critical patent/CN108076415B/en
Publication of CN108076415A publication Critical patent/CN108076415A/en
Application granted granted Critical
Publication of CN108076415B publication Critical patent/CN108076415B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
    • H04R3/00Circuits for transducers, loudspeakers or microphones
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
    • H04R2430/00Signal processing covered by H04R, not provided for in its groups

Landscapes

  • Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Acoustics & Sound (AREA)
  • Signal Processing (AREA)
  • Stereophonic System (AREA)

Abstract

The invention discloses a real-time realization method of Doppler sound effect, which starts from a sound propagation mechanism, calculates the propagation delay from a virtual sound source to a virtual position of a listener, and passes signals through a queue cache and a time-varying sampling filter in real time according to the delay so as to realize the real-time Doppler sound effect, wherein the time-varying filter is from a preset delay filter bank. The real-time realization method of the Doppler sound effect can simulate or reproduce the Doppler sound effect with any displacement change at any time in real time, does not generate data loss, does not introduce signal distortion and distortion because the whole process is linear processing, has higher flexibility and low operation complexity, is very suitable for application occasions of 3D sound effect simulation and sound field restoration, and has larger application prospect.

Description

Real-time realization method of Doppler sound effect
Technical Field
The invention relates to the technical field of electroacoustic, in particular to a real-time realization method of Doppler sound effect.
Background
The doppler effect is a common acoustic phenomenon, and for a listener, the frequency of an acoustic signal changes with the relative speed of motion of a virtual sound source. Specifically, the virtual sound source approaches the listener at a velocity such that the frequency of the acoustic signal perceived by the listener is increased relative to the frequency of the original acoustic signal, and the virtual sound source moves away from the listener at a velocity such that the frequency of the acoustic signal perceived by the listener is decreased relative to the frequency of the original acoustic signal. In the 3D sound effect, in order to reproduce or reconstruct sound in the nature more truly, the real-time implementation of the doppler sound effect becomes a key technology of the 3D sound effect technology. The real-time implementation of the conventional doppler sound effect is usually through the modulation or frequency shift processing, wherein the modulation processing directly changing the sampling rate may bring loss of audio data, destroy the continuity of the original data, and the digital frequency shift processing has poor flexibility, may bring a large extra operation amount, and may introduce signal distortion and distortion.
Disclosure of Invention
The invention provides a real-time realization method of Doppler sound effect, aiming at solving the problems of Doppler sound effect reproduction and reconstruction in sound effect.
The technical scheme of the invention is as follows:
initializing sound velocity, virtual position of listener head, virtual position of virtual sound source and sound signal of virtual sound source in 3D sound effect;
setting track information of the virtual position of a listener changing along with time, and setting track information of the position of a virtual sound source changing along with time;
at a certain time point, calculating the distance from a virtual sound source to the virtual position of the head of a listener, dividing the distance by the sound speed to obtain the transmission delay of the direct sound, and dividing the transmission delay of the direct sound by the sampling period to obtain the number of sampling periods of the transmission delay of the direct sound; the number of sampling cycles of the direct sound transmission delay is composed of an integer and a non-negative pure decimal (namely, a pure decimal equal to or greater than 0), wherein:
1) the integer part corresponds to the time delay of the signal with the sampling period as the minimum unit and is realized through a data buffer queue;
2) the non-negative pure decimal part is realized by a time delay filter corresponding to the time delay of the signal in the sampling period;
selecting a corresponding data buffer queue and a corresponding time delay filter to realize a time-varying filter according to the combination of the direct sound transmission time delay sampling period numbers;
the delay filter is from a preset delay filter bank, and each filter in the delay filter bank corresponds to the processing requirement of a non-negative pure decimal delay sampling period number.
Taking a data frame or a single sampling point as a minimum processing unit, and enabling the current sound signal to pass through a selected time-varying filter to obtain an output signal of the time point;
and connecting the processed signals at each time point in time sequence, and adding gain caused by sound propagation to obtain the sound signal with Doppler sound effect.
A real-time realization method of Doppler sound effect comprises the following steps:
calculating the transmission time delay tau of the direct sound according to the physical distance d from the position of the virtual sound source to the virtual position of the center of the head of the listener, namely
Figure BSA0000136181800000021
Where c is the speed of sound.
Then, the sound signal y (n) arriving at the head of the person from the virtual sound source x (n) is
y(n)=A·x(n)*sinc(n·Ts-τ), (2)
Where A is the attenuation of the sound pressure level due to acoustic propagation, T is the time domain convolutionsIs the sampling period of the signal, sinc (n)·Ts- τ) is a sample time delay representation obtained after a time delay τ of the sampling function sinc (t), the expression of the sampling function sinc (t) being
Figure BSA0000136181800000022
Further, the transmission delay τ can be decomposed into
τ=(p+q)·Ts, (4)
Wherein p is an integer and q is a non-negative pure decimal number, i.e., satisfies
0≤q<1. (5)
Further, by substituting the formula (4) into the formula (2), it is possible to obtain
y(n)=A·x(n-p)*sinc((n-q)·Ts). (6)
Therefore, for any time delay τ, the output signal y (n) can be obtained by equation (6).
Since q is a continuous value, the real-time calculation formula (6) has a large calculation amount, and the value of q is discretized into values at equal intervals
Figure BSA0000136181800000023
Namely, it is
Figure BSA0000136181800000031
Wherein K is a positive integer and represents the discretization precision of q, and K is an integer and satisfies 0 ≦ K < K. The value of K determines the resolution of the displacement of the virtual sound source and also determines the continuity of audio conversion, namely the larger the K is, the higher the delay resolution is, the better the continuity of the audio conversion is, and the better the output tone quality and the Doppler sound effect are.
Further, let
Figure BSA0000136181800000032
Then h isk(n) is a filter coefficient corresponding to different discretized q, and if formula (8) is taken into formula (6), there are
y(n)≈A·x(n-p)*hk(n). (9)
In the formula, any value of k corresponds to a filter hk(n) each filter in the delay filter bank corresponds to the processing requirement of a non-negative pure fractional number of delay sample periods, so that there are K filters h in totalk(n) of (a). The K filters hk(n) are stored as a filter bank, called a delay filter bank. In the real-time calculation process, the system selects a corresponding filter in the time delay filter group according to different discretized q, so that the extra operation amount caused by the filter coefficient in the calculation formula (6) is avoided, and the requirement of real-time processing is met.
Further, according to equation (9), when the virtual sound source is close, τ is gradually decreased, i.e. p is gradually decreased, and the sampling period q is changed, compared with x (n), y (n), the calculation process skips part of the sampling points x (n), so that the frequency of the acoustic signal is increased; according to equation (9), when the virtual sound source is far away, τ is gradually increased, i.e. p is gradually increased, and q sampling period is changed, compared with x (n), the calculation process of y (n) repeats a part of the sampling points of x (n), so that the frequency of the sound signal is reduced.
Preferably, the physical distance d from the virtual sound source to the listener's binaural virtual position is based oniCalculating the transmission time delay tau of the direct sound corresponding to the earsiWherein i is 0, 1, and represents left and right ears, respectively, that is
Figure BSA0000136181800000033
Based on the formula (10), similar formula (4) and formula (9) are respectively carried out on the virtual positions of the virtual sound source reaching the left ear and the right ear, and the processing effect is optimized.
The invention has the advantages of
The invention discloses a real-time realization method of Doppler sound effect, which starts from a sound propagation mechanism, calculates the propagation delay from a virtual sound source to a virtual position of a listener, and passes signals through a queue cache and a time-varying sampling filter in real time according to the delay so as to realize the real-time Doppler sound effect, wherein the time-varying filter is from a preset delay filter bank. The real-time realization method of the Doppler sound effect can simulate or reproduce the Doppler sound effect with any displacement change at any time in real time, does not generate data loss, does not introduce signal distortion and distortion because the whole process is linear processing, has higher flexibility and low operation complexity, is very suitable for application occasions of 3D sound effect simulation and sound field restoration, and has larger application prospect.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a flow chart of a real-time implementation method of Doppler sound effect according to the present invention;
FIG. 2 is a schematic structural diagram of a real-time implementation method of Doppler sound effect according to the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Fig. 1 is a flow chart of a real-time implementation method of doppler sound effect according to the present invention.
In step [101], the delay filter bank (8) is initialized, the sampling rate of the signal is set to 48kHz, the length of K is set to 100, and the length of each filter is set to 100, so that the total data size of the delay filter bank (8) is 10000 data storage units.
In step [102], the sound velocity c, the listener motion trajectory (1), the virtual sound source motion trajectory (2) and the original sound source (9) are initialized.
In step [103], a distance (4) between a virtual sound source position corresponding to the current time point data (sampling data point or sampling data frame) and a virtual position of a listener is calculated, and further, according to the sound velocity and the signal sampling period, a direct sound propagation delay generated by the distance and a sampling period number (5) corresponding to the delay are calculated.
In step [104], the number of sampling periods corresponding to the delay is divided into two parts, an integer part p (6) and a pure fractional part q (7).
In step [105]In (1), integer part of the delay is realized by data queue buffering, i.e. y1(n)=x(n-p)。
In step [106 ]]In the method, according to the value of the pure decimal part q, a proper filter coefficient h is selected and obtained in a time delay filter bank (8)k(n) (12) convolved with the buffered output signal, i.e. y2(n)=hk(n)·y1(n)。
In step [107]In the method, a gain A is calculated according to the distance between the position of the listener and the position of the virtual sound source, and the gain A is calculated (13) to act on the signal, namely, y (n) is A.y2(n)。
In step [108], the current data processing result y (n) is output. Then, the procedure returns to step [103] to prepare for processing the data at the next time point.
The above detailed description is provided for the real-time implementation method of the doppler sound effect provided by the embodiment of the present invention, and for a person skilled in the art, there may be changes in the specific implementation and application scope according to the idea of the embodiment of the present invention, so that the content of the present specification should not be construed as a limitation to the present invention.

Claims (2)

1. A real-time realization method of Doppler sound effect is characterized in that:
at a certain time point, calculating the distance from a virtual sound source to the virtual position of the head of a listener, dividing the distance by the sound speed to obtain the transmission delay of the direct sound, and dividing the transmission delay of the direct sound by the sampling period to obtain the number of sampling periods of the transmission delay of the direct sound; the number of sampling cycles of the direct sound transmission delay is composed of an integer and a non-negative pure decimal number; according to the combination of the transmission delay sampling period number of the direct sound, a sound source signal passes through a data cache queue and selects a corresponding delay filter to realize a time-varying filter, and then gain processing brought by sound propagation is carried out, so that the aim of realizing the Doppler sound effect in real time is fulfilled;
the integral part of the sampling period number of the direct sound transmission delay is realized by a data cache queue corresponding to the pure delay of the signal with the sampling period as the minimum unit;
the non-negative pure decimal part of the sampling period number of the direct sound transmission delay is realized by a delay filter corresponding to the delay of the signal in the sampling period;
the real-time implementation method of the Doppler sound effect specifically comprises the following steps:
calculating the transmission time delay tau of the direct sound according to the physical distance d from the position of the virtual sound source to the virtual position of the center of the head of the listener, namely
Figure FSB0000186825380000011
Wherein c is the speed of sound;
the acoustic signal y (n) arriving at the listener's head from virtual sound source x (n) is then
y(n)=A·x(n)*sinc(n·Ts- τ) formula (2)
Where A is the attenuation of the sound pressure level due to acoustic propagation, T is the time domain convolutionsIs the sampling period of the signal, sinc (n.T)s- τ) is a sample time delay representation obtained after a time delay τ of the sampling function sinc (t), the expression of the sampling function sinc (t) being
Figure FSB0000186825380000012
Further, the transmission delay τ is decomposed into
τ=(p+q)·TsFormula (4)
Wherein p is an integer and q is a non-negative pure decimal number, i.e., satisfies
Q is more than or equal to 0 and less than 1 formula (5)
Further, the formula (4) is substituted into the formula (2) to obtain
y(n)=A·x(n-p)*sinc((n-q)·Ts) Formula (6)
Therefore, for any time delay τ, an output signal y (n) is obtained by the formula (6);
carrying out equidistant discretization on the value of q
Figure FSB0000186825380000021
Namely, it is
Figure FSB0000186825380000022
In the formula, K is a positive integer and represents the discretization precision of q, and K is an integer and satisfies that K is more than or equal to 0 and less than K;
further, let
Figure FSB0000186825380000023
Then h isk(n) is a filter coefficient corresponding to different discretized q, and if formula (8) is taken into formula (6), there are
y(n)≈A·x(n-p)*hk(n) formula (9)
In the formula, any value of k corresponds to a filter hk(n) each filter in the delay filter bank corresponds to the processing requirement of a non-negative pure fractional number of delay sample periods, so that there are K filters h in totalk(n), the K filters hk(n) storing as a filter bank, referred to as a delay filter bank; in the real-time calculation process, the system selects a corresponding filter in a time delay filter bank according to different discretized q;
further, according to the physical distance d from the virtual sound source to the virtual positions of the ears of the listeneriCalculating the transmission time delay tau of the direct sound corresponding to the earsiWherein i is 0, 1, and represents left and right ears, respectively, that is
Figure FSB0000186825380000024
Based on equation (10), the processing of equations (4) and (9) is performed for the virtual positions at which the virtual sound source reaches the left and right ears, respectively.
2. The method for real-time realization of doppler sound effects as claimed in claim 1, wherein: the delay filter is from a preset delay filter bank, and each filter in the delay filter bank corresponds to the processing requirement of a non-negative pure decimal delay sampling period number.
CN201611018808.8A 2016-11-16 2016-11-16 Real-time realization method of Doppler sound effect Active CN108076415B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611018808.8A CN108076415B (en) 2016-11-16 2016-11-16 Real-time realization method of Doppler sound effect

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611018808.8A CN108076415B (en) 2016-11-16 2016-11-16 Real-time realization method of Doppler sound effect

Publications (2)

Publication Number Publication Date
CN108076415A CN108076415A (en) 2018-05-25
CN108076415B true CN108076415B (en) 2020-06-30

Family

ID=62160292

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611018808.8A Active CN108076415B (en) 2016-11-16 2016-11-16 Real-time realization method of Doppler sound effect

Country Status (1)

Country Link
CN (1) CN108076415B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109714697A (en) * 2018-08-06 2019-05-03 上海头趣科技有限公司 The emulation mode and analogue system of three-dimensional sound field Doppler's audio
CN110459220A (en) * 2019-08-26 2019-11-15 杭州涂鸦信息技术有限公司 A kind of voice awakening method and system and readable storage medium storing program for executing, computer

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102130992A (en) * 2011-01-21 2011-07-20 宇龙计算机通信科技(深圳)有限公司 Sound effect processing method and terminal

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100334464C (en) * 2003-06-19 2007-08-29 中国科学院声学研究所 Method for sonar array signal simulation by utilizing interpolation filter
JP4927848B2 (en) * 2005-09-13 2012-05-09 エスアールエス・ラブス・インコーポレーテッド System and method for audio processing
JP4584203B2 (en) * 2006-07-31 2010-11-17 株式会社コナミデジタルエンタテインメント Voice simulation apparatus, voice simulation method, and program
JP5285626B2 (en) * 2007-03-01 2013-09-11 ジェリー・マハバブ Speech spatialization and environmental simulation
KR101512992B1 (en) * 2007-05-22 2015-04-17 코닌클리케 필립스 엔.브이. A device for and a method of processing audio data
TW201325268A (en) * 2011-12-01 2013-06-16 Univ Nat Central Virtual reality sound source localization apparatus
JP5949234B2 (en) * 2012-07-06 2016-07-06 ソニー株式会社 Server, client terminal, and program
US9977644B2 (en) * 2014-07-29 2018-05-22 The University Of North Carolina At Chapel Hill Methods, systems, and computer readable media for conducting interactive sound propagation and rendering for a plurality of sound sources in a virtual environment scene

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102130992A (en) * 2011-01-21 2011-07-20 宇龙计算机通信科技(深圳)有限公司 Sound effect processing method and terminal

Also Published As

Publication number Publication date
CN108076415A (en) 2018-05-25

Similar Documents

Publication Publication Date Title
CA3125228C (en) Method and apparatus for compressing and decompressing a higher order ambisonics representation for a sound field
JP5090436B2 (en) Method and device for efficient binaural sound spatialization within the transform domain
CN102395098B (en) Method of and device for generating 3D sound
CN101253555B (en) Multi-channel acoustic signal processing device and method
CN105580070A (en) Apparatus and method for decoding and encoding an audio signal using adaptive spectral tile selection
US9431987B2 (en) Sound synthesis with fixed partition size convolution of audio signals
WO2021186102A1 (en) Rendering reverberation
CN102349235A (en) Obtaining a desired non-zero phase shift using forward-backward filtering
JP2006222867A (en) Acoustic signal processing device and method thereof
CN108076415B (en) Real-time realization method of Doppler sound effect
CN104978966B (en) Frame losing compensation implementation method and device in audio stream
JP2007534214A (en) Method, apparatus, and system for synthesizing audio performance using convolution at various sample rates
KR101637407B1 (en) Apparatus and method and computer program for generating a stereo output signal for providing additional output channels
CN107995558B (en) Sound effect processing method and device
JP2017111230A5 (en)
CN110890100B (en) Voice enhancement method, multimedia data acquisition method, multimedia data playing method, device and monitoring system
Wang et al. A stereo crosstalk cancellation system based on the common-acoustical pole/zero model
JP7447798B2 (en) Signal processing device and method, and program
JP5051782B2 (en) How to combine speech synthesis and spatialization
JPH11289599A (en) Signal processor, signal processing method and computer-readable recording medium recording signal processing program
CN115462097A (en) Apparatus, method and computer program for enabling rendering of a spatial audio signal
Otani et al. Auditory artifacts due to switching head-related transfer functions of a dynamic virtual auditory display
JP6361874B2 (en) Transfer function approximating device, program thereof and method thereof
JPH1042398A (en) Surround reproducing method and device
JP3409364B2 (en) Sound image localization control device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant