View Full Version : Want to make a DPL(2) downmix. Need InvertAudio()
scharfis_brain
12th October 2005, 17:22
I have the Idea of mixing 6.1 (or less) Separately loaded Audio channels into one channel using AVS.
For this, I need a Audio-Inverter.
(180° phase shift, regardless of freqency)
a frequency-dependant 180°-Phase shift at 7kHz with delayaudio(0,0000714) seems too unstable to me.
Or is the a chance for a function that does this by itself?
Here the equations:
Lt = 1Lf + 0.707Cf + 0Rf + 0.866Lb + 0.683Cb + 0.5Lb
Rt = 0Lf + 0.707Cf + 1Rf - 0.5Lb - 0.683Cb - 0.866Lb
scharfis_brain
12th October 2005, 17:59
function dpl2(clip lf, clip cf, clip rf, clip lb, clip rb)
{
Ltf=mixaudio(lf,cf,1,0.707)
Rtf=mixaudio(rf,cf,1,0.707)
Ltb=mixaudio(lb,rb,0.866,0.5)
Rtb=mixaudio(lb,rb,0.5,0.866).amplify(-1.0)
Lt=mixaudio(Ltf,Ltb)
Rt=mixaudio(Rtf,Rtb)
mergechannels(Lt,Rt)
}
got it myself, finally. works like a charm.
except, that I was too lazy to implement the surroundback (centerback) channel.
IanB
13th October 2005, 09:35
...
Rtb=mixaudio(lb,rb,-0.5,-0.866)
...
scharfis_brain
13th October 2005, 11:53
negative amplify in mixaudio didn't work!
Mug Funky
13th October 2005, 12:36
i thought matrixed surround systems used 90 degree phase shifts? i know the old quad stuff did, and IIRC DPL2 is based off the tate 2 decoder.
i might be completely wrong on this though... i never had enough speakers or outputs or amplifiers to play with this stuff.
IanB
13th October 2005, 13:05
> negative amplify in mixaudio didn't work!
What version AVS are you using? The MixAudio and Amplify code are nearly the same, (mix has an extra add).
What happened?
scharfis_brain
13th October 2005, 13:30
@MugFunky: the 90° - thing is nonsense-IMHO! cause it is freqency dependant and only would introduce a sliiiiight tomporal shift into the back channels.
Simple inverting of the Signals does the job.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.