Summary of the invention
The object of the present invention is to provide a kind of digital reverberation processor based on time-varying delay-line, reach " sound coloration " adverse effect with the influence that weakens metallic sound to audio, realization is to various musical instruments and the acoustics of voice under different occasions, and the reverberation effect in the various environment of simulation.
In order to achieve the above object, digital reverberation processor based on time-varying delay-line provided by the invention, comprise: adopt delay line and finite impulse response filter that the digital audio and video signals of input is handled and make it comprise discrete echo, it is provided with the adjustable device of corresponding filter gain coefficient simultaneously, is used to improve reverberation in the early stage processing module of described discrete echo; Adopt single pole and low pass wave filter simulated air to the absorption characteristic of the medium-high frequency composition of sound controlling the audio signal bandwidth of described reverberation in early stage processing module output, and the filtration module of the simulated air absorption characteristic of preliminary filtering interfering information; Be connected in the output terminal of the filtration module of described simulated air absorption characteristic, it comprises that a plurality of cascade all-pass filters reach the all-pass filter module based on time-varying delay-line of the output waveform regulator that is connected with corresponding all-pass filter, each all-pass filter is provided with the time-varying delay-line unit that postpones digital audio and video signals, be used for adjusting the amplitude-frequency of digital audio and video signals and the absorption-type wave filter of phase-frequency characteristic according to described time-varying delay-line unit current time-varying delay-line length and reverberation time, the decay factor that is used to provide digital audio and video signals is to adjust with the attenuation units of frequency dependence die-away time and the mirror image gain adjustment unit that gains between being used to regulate the input of all-pass filter unit and export, and each output waveform regulator is used for the waveform envelope attenuation slope of control figure sound signal; Be provided with wave filter and lag line, be connected with described all-pass filter module, by the setting of the delay length of described filter parameter and lag line is revised the high frequency acoustically effective of sound signal and the tone control type absorbing filter of control reverberation die-away time to produce specific amplitude-frequency response; With the all-pass filter cascade of described all-pass filter module based on time-varying delay-line, be used for low pass filter blocks according to the frequency dependence decay that concerns the control figure sound signal of cutoff frequency and distance; Be used for the digital audio and video signals of described all-pass filter module output is decomposed into incoherent left and right sound track signals, and respectively left and right sound track signals is carried out equilibrium treatment, offset the output processing module of being exported after handling through cross-talk according to the left and right sound track signals of head related transfer function after again with equilibrium; Input end is connected with described all-pass filter module output terminal, its output terminal is connected with the input end of described output processing module, be used to utilize external feedback path to increase the echogenic density of digital audio and video signals, it is provided with low-pass filter and regulates the feedback coupling signal processing module of the feedback gain adjustment device of feedback coupling gain.
Preferably, described digital reverberation processor based on time-varying delay-line also comprises the interpolation processing module that is used for the digital audio and video signals of described reverberation in early stage processing module output is carried out interpolation processing, and described interpolation processing module can adopt Lagrangian algorithm that digital audio and video signals is carried out interpolation calculation one time every 12 sampled points.
Preferably, described reverberation in early stage processing module is provided with 6 cascade delay line.
Preferably, described filtration module adopts filter coefficient to be
The single pole and low pass wave filter, wherein,
b
iBe the tap gain coefficient that the adjustable device of respective filter gain coefficient in described reverberation in the early stage processing module is set, m
iBe the delay line length of the corresponding delay line of described reverberation in early stage processing module, k is the number of the adjustable device of described filter gain coefficient.
Preferably, described time-varying delay-line unit is by comprising the low frequency modulations source generator and calculating current time-varying delay-line length calculation unit according to basic delay line length, the default delay degree of depth and the output of described low frequency modulations source generator, described computing unit calculates current time-varying delay-line length according to formula " output of current time-varying delay-line length=basic delay line length+described low frequency modulations source generator of delay degree of depth * ", and described low frequency modulations source generator is output as
Y (1)=0, y (n)=2*cos (ω
0) * y (n-1)-y (n-2) (when n>1), wherein,
f
OscBe oscillation frequency, f
sBe the sample frequency of digital audio and video signals, described low frequency modulations source generator can comprise that also one is used for when described y (n) exceeds [1 ,+1] scope described y (n) being reset to
Reset unit.
Preferably, described absorption-type wave filter is that an amplitude-frequency response is
Wave filter, wherein, m
i(t) be current time-varying delay-line length, T
sBe the sampling period of sound signal, T
rBe frequency dependence reverberation time length.Preferably, described attenuation units basis
Calculate decay factor, wherein, t=m
i* T
s,
m
iBe the length of current time-varying delay-line, V is the volume in room of living in, and A is a surperficial absorptivity of stating the room.
Preferably, described mirror image gain adjustment unit comprises that one is used to regulate the feedback gain adjustment device that forward gain regulator and by the gain that inputs to output is used to adjust the output to the gain of input, described forward gain regulator is identical with the amplitude that described feedback gain adjustment device is regulated, and all less than 1.
Preferably, described output processing module can comprise: be used for digital audio and video signals is passed through
Cross matrix be decomposed into after handling incoherent left and right sound track signals the cross matrix unit, be used for the left and right sound track signals of described cross matrix unit output is carried out equilibrium treatment with the equilibrium treatment unit of the frequency-response characteristic that improves signal and be used for according to function
And
To carrying out respective handling through the left and right sound track signals of equilibrium treatment to eliminate the cross-talk offset unit of cross-talk, wherein, d be head transfer functions between interaural difference, α is the inverse of interaural intensity difference, the effective range of d can be 0.005-1.5ms, and the effective range of α can be 1-10db.
Preferably, described low pass filter blocks is provided with two low-pass filters, and its cutoff frequency is
c
AirBe the velocity of propagation of sound, m
iBe the length of the current time-varying delay-line of the time-varying delay-line unit of described i the all-pass filter that has based on the all-pass filter module of time-varying delay-line, 6 numbers for the all-pass filter of the described mutual series connection that has based on the all-pass filter module of time-varying delay-line.
Preferably, the yield value of the amplitude-frequency response of the low-pass filter of described feedback coupling signal processing module and described feedback gain adjustment device adjusting exists | KFD*H
LP(ej ω) |<1 relation, wherein, | H
LP(e
J ω) | be the amplitude-frequency response of low-pass filter, KFD is the yield value that described feedback gain adjustment device is regulated.
In sum, digital reverberation processor based on time-varying delay-line of the present invention is by adjusting the amplitude-frequency of digital audio and video signals based on the all-pass filter module of time-varying delay-line, phase-frequency characteristic and frequency dependence die-away time, thereby accurately control the reverberation time, echo density, waveform envelope etc., can produce different reverberation effects and tone color variation effect, and weakening metallic sound influence, also can effectively eliminate the adverse effect of " sound coloration " phenomenon simultaneously to audio, and can realize also can simulating the reverberation effect in the various environment to various musical instruments and the acoustics of voice under different occasions.
Embodiment
See also Fig. 1 and Fig. 2, the digital reverberation processor based on time-varying delay-line of the present invention mainly comprises: reverberation in early stage processing module, interpolation processing module, the filtration module of simulated air absorption characteristic, the all-pass filter module based on time-varying delay-line, tone control type absorbing filter, low pass filter blocks, output processing module, feedback coupling signal processing module.
Described reverberation in early stage processing module employing delay line and finite impulse response filter are handled the digital audio and video signals of input and are made it comprise discrete echo, it is provided with the adjustable device of corresponding filter gain coefficient simultaneously, be used to improve described discrete echo, as shown in Figure 1, in the present embodiment, it adopts 6 cascade delay line (DL1-DL6), digital audio and video signals is exportable discrete echo through the processing of passing through finite impulse response filter (FIR) after postponing accordingly again, simultaneously, be provided with corresponding 6 adjustable devices of filter gain coefficient (b1-b6) and regulate the gain coefficient of corresponding FIR to improve discrete echo in early stage.
Described interpolation processing module is used for the digital audio and video signals of described reverberation in early stage processing module output is carried out interpolation processing, it can adopt Lagrangian algorithm that digital audio and video signals is carried out interpolation calculation one time every 12 sampled points, to eliminate the click of digital audio and video signals.
The filtration module of described simulated air absorption characteristic adopt single pole and low pass wave filter simulated air to the absorption characteristic of the medium-high frequency composition of sound to control the audio signal bandwidth of described reverberation in early stage processing module output, and preliminary filtering interfering information, the coefficient of described single-pole filter is according to formula
Calculate, wherein,
b
iBe the tap gain coefficient that the adjustable device of respective filter gain coefficient in described reverberation in the early stage processing module is set, m
iDelay line length for the corresponding delay line of described reverberation in early stage processing module, k is the number of the adjustable device of described filter gain coefficient, the effect of test proves, between the output of the reverberation network that outputs to the later stage that reflects in earlier stage, increase the wave filter of this simulated air absorbing model, the effect of the discrete echo that reflection model generates in early stage is obviously improved, bounce-back sound obviously weakens, and it is more true that echo response sounds.
The described output terminal that is connected in the filtration module of described simulated air absorption characteristic based on the all-pass filter module of time-varying delay-line, it comprises a plurality of cascade all-pass filter (AP1-AP8, wherein, AP5 and AP6 and AP7 form with AP8 and are connected in parallel) and the output waveform regulator (T1-T8) that is connected with corresponding all-pass filter, see also Fig. 3, each all-pass filter is provided with the time-varying delay-line unit that postpones sound signal, be used for adjusting the amplitude-frequency of digital audio and video signals and the absorption-type wave filter of phase-frequency characteristic according to described time-varying delay-line unit current time-varying delay-line length and reverberation time, the decay factor that is used to provide digital audio and video signals is to adjust with the attenuation units of frequency dependence die-away time and the mirror image gain adjustment unit that gains between being used to regulate the input of all-pass filter unit and export, and each output waveform regulator is used for the waveform envelope attenuation slope of control audio signal.
Described time-varying delay-line unit is provided with low frequency modulations source generator and computing unit again; in the prior art; the modulation source sine wave of low frequency modulations source generator normally obtains the data that are pre-existing in the internal memory by the mode of tabling look-up; but this mode can take a large amount of memory headrooms; the resource of waste storer; therefore; in the present embodiment; employing forms the low frequency modulations source generator based on the technology of overflow protection technology and conserve storage; be described low frequency modulations source generator store in advance vectorial a=(a1, a2, a3); wherein, a1=sin (2 π f
Osc/ f
s), a2=2*cos (2 π f
Osc/ f
s), a3=-1, f
OscBe oscillation frequency, f
sSample frequency for digital audio and video signals, after the digital audio and video signals input, described low frequency modulations source generator is triggered, and according to y (0)=a1, y (1)=0, y (n)=a2*y (n-1)+a3*y (n-2) (when n>1) exports corresponding value, simultaneously, described low frequency modulations source generator also is provided with one and is used for when described y (n) exceeds [1 ,+1] scope described y (n) being reset to

Reset unit, described low frequency modulations source generator is exported corresponding reset values simultaneously, because when the low frequency modulations source generator calculates current output valve y (n), because there is round-off error in vectorial a in calculating, these errors will accumulate along with cycle oscillator, can cause system in some frequency instability thus, after described reset unit resets current y (n), can make system that all frequencies are all kept stable, after the corresponding value of low frequency modulations source generator output, described computing unit promptly calculates current time-varying delay-line length according to formula " current time-varying delay-line length is calculated in the output of current time-varying delay-line length=basic delay line length+described low frequency modulations source generator of delay degree of depth * ", wherein, the basic delay line length and the delay degree of depth are all for preestablishing, see also Fig. 4, the time-varying delay-line synoptic diagram that it produces for the time-varying delay-line unit, be that the time-varying delay-line that described time-varying delay-line unit produces changes between the minimum and maximum value that is the center with basic delay line length, i.e. total delay is determined by the basic delay line length and the variable delay degree of depth.Described absorption-type wave filter is that an amplitude-frequency response is
Wave filter, wherein, m
i(t) be current time-varying delay-line length, T
sBe the sampling period of digital audio and video signals, T
rBe frequency dependence reverberation time length, this shows, the amplitude-frequency gain of each frequency of described absorption-type wave filter is proportional to current delay line length, be inversely proportional to the reverberation time of described frequency correspondence, its effect is the waveform density relation of being inversely proportional to that makes the length of time-varying delay-line and digital audio and video signals.The computing formula of the decay factor of the digital audio and video signals that described attenuation units provided is:
Wherein, t=m
i* T
s,
m
iLength for current time-varying delay-line, V is the volume in room of living in, A is the surperficial absorptivity in described room, see also Fig. 4, it is the time function relation figure of sound energy attenuation, because the logarithm value of described decay factor is proportional to the current delay line length of time-varying delay-line unit, therefore the effect of described attenuation units is equivalent to that response is multiplied by the envelope that is exponential damping to system shock, and accurately control signal is in the die-away time of low-frequency range and Mid Frequency.Described mirror image gain adjustment unit comprises that one is used to regulate the feedback gain adjustment device that forward gain regulator and by the gain that inputs to output is used to adjust the output to the gain of input, the forward gain value that described forward gain regulator is regulated is negative real number, the feedback gain value that described feedback gain adjustment device is regulated is an arithmetic number, the value absolute value that both regulated (being amplitude) is identical, and all less than 1, and direction is opposite, because, generally speaking, depth of modulation is dark more, can more effectively avoid the formation of resonant frequency in the high-frequency input signal, suppress " sound coloration " phenomenon, but increase along with depth of modulation, may cause late reverberation modified tone to a certain degree, so in the length that increases a lag line, equivalent reduces the length of another lag line, facts have proved, so can effectively eliminate the adverse effect of " modified tone " that cause by the depth of modulation increase.
The effect of described output waveform regulator (T1-T8) is the waveform envelope attenuation slope of control later stage reflected sound, wherein, and the weight t of output waveform regulator
i(i=1,2 ... 4) with the series arrangement of successively decreasing, all corresponding different reverberation response waveform of each output waveform regulator is by adjusting weight t
i(i=1,2 ... 4) value, can revise the decay envelope of later stage reflected sound, the amplitude of control reverberation surplus customizes the effect that whole reverberation is exported, make whole late reverberation output envelope approach an exponential damping form, so can make the reverberation effect of last output truer more natural.
Described tone control type absorbing filter (X1) is connected with described all-pass filter module, be provided with wave filter and lag line, see also Fig. 6, it is the signal Processing block diagram, described tone control type absorbing filter is by the setting to filter parameter (being the delay length of b7-b10 and lag line DL9), can produce specific amplitude-frequency response, revise the high frequency acoustically effective of sound signal and produce controlled reverberation die-away time.
The all-pass filter cascade of described low pass filter blocks and described all-pass filter module based on time-varying delay-line, be used for the frequency dependence decay that concerns the control figure sound signal according to cutoff frequency and distance, described low pass filter blocks is provided with two low-pass filters (X2 and X3), and its cutoff frequency can be set to
Wherein
c
AirBe the velocity of propagation of sound, m
iLength for the current time-varying delay-line of the time-varying delay-line unit of described i the all-pass filter that has based on the all-pass filter module of time-varying delay-line, 6 numbers for the all-pass filter of the described mutual series connection that has based on the all-pass filter module of time-varying delay-line, the die-away time of medium and low frequency section that so can effective control figure sound signal.
Described output processing module is used for the sound signal of described all-pass filter module output is decomposed into incoherent left and right sound track signals, and respectively left and right sound track signals is carried out equilibrium treatment, exported after again the sound signal after the equilibrium being offset processing through cross-talk, see also Fig. 7, described output processing module comprises cross matrix unit, equilibrium treatment unit and cross-talk offset unit, wherein, described cross matrix unit is used for digital audio and video signals is passed through
Cross matrix be decomposed into incoherent left and right sound track signals eql ' and eqr ' after handling, described equilibrium treatment unit is used for the left and right sound track signals eql ' and the eqr ' of the output of described cross matrix unit are carried out equilibrium treatment to improve the frequency-response characteristic of signal, for example, balanced unit can adopt seven sections balanced devices of a low-frequency range, five Mid Frequencies, a high band to come eql ' and eqr ' equilibrium, make its output eql " and eqr ", wherein, also can regulate the frequency and the gain of each section of seven sections balanced devices.See also Fig. 8 again, it is the structural representation of described cross-talk offset unit, wherein,
D be head transfer functions between interaural difference, α is the inverse of interaural intensity difference, obviously, described cross-talk offset unit is used for according to function
And
Left and right sound track signals eql " and eqr " through equilibrium treatment is carried out respective handling to eliminate cross-talk, and wherein, the effective range of d is 0.005-1.5ms, and the effective range of α is 1-10db.
Described feedback coupling signal processing module (X4 and X5) input end is connected with described all-pass filter module output terminal, its output terminal is connected with the input end of described output processing module, be used to utilize external feedback path to increase the echogenic density of sound signal, the feedback gain adjustment device that it is provided with low-pass filter and regulates the feedback coupling gain, by changing the value of feedback coupling gain KFD (0<KFD<1), adjust the degree of feedback coupling, for any frequency, the amplitude-frequency gain of feedback loop is less than 1, promptly | and KFD*H
LP(e
J ω) |<1, to guarantee the stability of closed-loop system.Make k=|KFD*H
LP(e
J ω) |, 0<k<1, simultaneously, control by changing the k value die-away time of reverberation algorithm, k value and reverberation are proportional die-away time, and when k value during near constant 1, die-away time is longer relatively, when the k value very hour, the decay factor of the minimal attenuation time of reverberation by the attenuation units of described all-pass filter module based on time-varying delay-line determined.So, can adjust reverberation die-away time by changing the k value.And, because during high frequency, because surfacing such as indoor wall and air are all big than low frequency to high frequency absorption, therefore the radio-frequency component in the reverberation is than low-frequency component decay fast (being that radio-frequency component is short die-away time with respect to the reverberation of low-frequency component), therefore in feedback loop, introduce low-pass filter, make that the absolute value of the amplitude-frequency response of low-pass filter reduces along with the increase of frequency, promptly | H
LP(e
J ω) | reduce, the k value reduces accordingly, and reverberation reduces die-away time, thereby realizes the purpose that self-adaptation must be regulated hold time (the high frequency reflectance) of reverberation medium-high frequency composition, can make reverberation effect more fresh and alive.In actual applications, cutoff frequency by the low-pass filter in the feedback path suitably is set and the value of KFD can realize above-mentioned purpose.
In addition, in the present embodiment, for further improving the reverberation effect of the digital audio and video signals of input, also be provided with two controllable delay line unit (DL7 and DL8) and output full gain regulator (APOUT_GAIN_L and APOUT_GAIN_R), wherein, DL7 is connected with X4 with AP6 respectively, DL8 is connected with X5 with AP8 respectively, both delay line lengths set in advance by parameter, and to regulate the length of reverberation time, output full gain regulator can be used for controlling the loudness of final audio output.
In sum, digital reverberation processor based on time-varying delay-line of the present invention passes through the amplitude-frequency based on the all-pass filter module tunable integers word sound signal of time-varying delay-line, phase-frequency characteristic and frequency dependence die-away time, thereby accurately control the reverberation time, echo density, waveform envelope etc., produce different reverberation effects and tone color variation effect, and weakening metallic sound influence, modulate delay line owing to introduce LFO in the all-pass filter module, can effectively eliminate the adverse effect of " sound coloration " phenomenon to audio, adopted simultaneously " two passage virtual surround sounds " technology at output, make output effect produce the stereo spatial sense, realize thus according to real sound field characteristic, produce multiple special reverberation audio, and make tone color natural, plentiful, mellow and full, and the spatial impression that possesses the three-dimensional sound field effect, have again, also be provided with multiple regulator and comprise the adjusting that postpones frequency spectrum to finish, the processing of reverberant sound frequency spectrum, the attenuation characteristic of reverberant sound, the frequency plot characteristic, and the adjusting of the ratio of reverberant sound and direct sound wave or the like, thereby realize also can simulating the reverberation effect in the various environment to various musical instruments and the acoustics of voice under different occasions.