Re: Dolby A example (was Re: Has anyone ever used `echos` or `chorus`?)

John Dyson via Sox-users <[email protected]> Thu, 13 Feb 2025 15:32:23 +0000 (UTC)
Newsgroups gmane.comp.audio.sox
Message-ID <[email protected]>
--===============8117234323795632894==
Content-Type: multipart/alternative; 
	boundary="----=_Part_6652006_1756756015.1739460743709"
Content-Length: 13130

------=_Part_6652006_1756756015.1739460743709
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

 About DolbyA:Email me directly at [email protected], and I'll try to h=
elp work through generally how the attack/release works -- but it is very v=
ery nontrivial.
Also, the frequency bands are a little more weird than what is suggested by=
 the bandpasses.=C2=A0=C2=A0 Essentially, the 2.7k->20+k band and the 8.8k-=
>20+k bands are overlapped, so there is very significant interaction in the=
 gain control dynamics.
I'll share a schematic of a DolbyA unit (publically available), where I'll =
explain that the 'diode pairs' aren't really normal rectifiers, but 'ride o=
n the edge' of the nonlinear conduction curve.=C2=A0=C2=A0=C2=A0 Don't even=
 think about DolbySX -- I have detailed information about that also (propri=
etary), but it is far more complex than DolbyA, by an order of magnitude.=
=C2=A0=C2=A0 With a few 'tricks', a reasonable DSP DolbyA decoder can be do=
ne...=C2=A0 (The 'Sony patent' for DolbyA , to me, appears to be defective =
and doesn't describe the very critical attack/release scheme...)=C2=A0=C2=
=A0 Changing the filter parameters dynamically on the Sony scheme just migh=
t be problematic -- so I suggest avoiding that, unless you have some workar=
ounds.=C2=A0 Using the Sony method is beyond my know-how.)

(For DolbyA, the feedback config and the interactions between the bands mak=
e a normal DSP-type implementation 'interesting'.=C2=A0=C2=A0 My decoder on=
ly 'decodes' and doesn't 'encode'.=C2=A0 At the time, I was being a purist,=
 and believed that DolbyA ENCODING should never be done anymore.)

We all know that this discussion goes far beyond the SoX stuff, but maybe t=
he eventual results of the explanation maybe be shared.My guess is that exp=
lanations will take a few iterations -- but once the subtle actions of the =
attack/release mechanism is understood, it will be much easier to move forw=
ard on your own.It took me a few weeks of experimentation with actual Dolby=
A materials to realize that the 'diode detectors' are not just 'detectors'.=
TelcomC4 uses a similar 'riding the edge of the diode I/V curve,' but uses =
only one later.=C2=A0=C2=A0 Unlike DolbyA, the bandpasses for the 'detector=
' are more narrow than the bandpass for each signal band -- but TelcomC4 is=
 yet another matter.
Again -- email me, and usually I am 2-3 days responsive, only because somet=
imes I need to think and refer to my lousy-looking code.(Far beyond DolbyA =
itself, my own decoder does a proprietary mitigation of the AM sidebands cr=
eated by the fast and dense DolbyA gain control, the 'sidebands' historical=
ly=C2=A0 called 'DolbyA Fog' when it appeared in the middle 1960's.)

John

    On Thursday, February 13, 2025 at 09:13:01 AM EST, SoX NG <sox_ng@fastm=
ail.com> wrote: =20
=20
 On 13/02/25 03:04, John Dyson via Sox-users wrote:
> About the DolbyA thing...

All I could find was a mention of "about" 0.1s attack time, apparently=20
the same decay time,

12dB/octave shoulders to the filters (not an mcompand parameter at present;

I dunno what it uses, 6dB per octave seems to be usual)

measuring Ray's graphs in the paper with a ruler, and someone saying that

it gets up to 10dB difference most of the way (which corresponds exactly

to the linear lower section of Ray's graphs) and up to 15dB at 15kHz,

which I took to mean the combined result of the parallel 3kHz and 9kHz=20
filters,

forgot to include the 4db "knees" so that the curves are rounded instead=20
of having corners

and rounded the figures to no decimal places so that each line would fit=20
into 80 chars.

If you have more precise detail about what Dolby A should be, I would be=20
happy

to amend the example so that it's closer. I'll even include decimal=20
places ;-)

Adding a parameter to mcompand to specify the steepness of the filters'=20
shoulders

also seems necessary for this use case, if I can figure out how to do that.

> (Also, the Q values for the band splitter are approx 0.42 for 8.8kHz,=20
> 0.45 for 2.7kHz
 > and apprx 1 or 1.2 for somewhere around 75-80Hz??

Hmm. So filter shoulder steepness would need to be specifiable for each=20
frequency crossover point.


 > Truly encoding/decoding DolbyA materials is a totally different world.

Yes. Emulating existing analog electronics is a totally different world.=20
Csound might be able to help;

it makes SoX look like a handcart, but then their application domains=20
are quite different.


> It is probably very off topic for this mailing list...

Not if it affects needed changes (or, rather extensions) to SoX.

I need to know what people use it for and how it could be improved in=20
the light of that.


 =C2=A0=C2=A0=C2=A0 M



_______________________________________________
Sox-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sox-users
 =20
------=_Part_6652006_1756756015.1739460743709
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<html><head></head><body><div class=3D"ydpe66a44f5yahoo-style-wrap" style=
=3D"font-family:lucida console, sans-serif;font-size:16px;"><div></div>
        <div dir=3D"ltr" data-setdir=3D"false">About DolbyA:</div><div dir=
=3D"ltr" data-setdir=3D"false">Email me directly at [email protected], =
and I'll try to help work through generally how the attack/release works --=
 but it is very very nontrivial.</div><div dir=3D"ltr" data-setdir=3D"false=
"><br></div><div dir=3D"ltr" data-setdir=3D"false">Also, the frequency band=
s are a little more weird than what is suggested by the bandpasses.&nbsp;&n=
bsp; Essentially, the 2.7k-&gt;20+k band and the 8.8k-&gt;20+k bands are ov=
erlapped, so there is very significant interaction in the gain control dyna=
mics.</div><div dir=3D"ltr" data-setdir=3D"false"><br></div><div dir=3D"ltr=
" data-setdir=3D"false">I'll share a schematic of a DolbyA unit (publically=
 available), where I'll explain that the 'diode pairs' aren't really normal=
 rectifiers, but 'ride on the edge' of the nonlinear conduction curve.&nbsp=
;&nbsp;&nbsp; Don't even think about DolbySX -- I have detailed information=
 about that also (proprietary), but it is far more complex than DolbyA, by =
an order of magnitude.&nbsp;&nbsp; With a few 'tricks', a reasonable DSP Do=
lbyA decoder can be done...&nbsp; (The 'Sony patent' for DolbyA , to me, ap=
pears to be defective and doesn't describe the very critical attack/release=
 scheme...)&nbsp;&nbsp; Changing the filter parameters dynamically on the S=
ony scheme just might be problematic -- so I suggest avoiding that, unless =
you have some workarounds.&nbsp; Using the Sony method is beyond my know-ho=
w.)<br></div><div dir=3D"ltr" data-setdir=3D"false"><br></div><div dir=3D"l=
tr" data-setdir=3D"false">(For DolbyA, the feedback config and the interact=
ions between the bands make a normal DSP-type implementation 'interesting'.=
&nbsp;&nbsp; My decoder only 'decodes' and doesn't 'encode'.&nbsp; At the t=
ime, I was being a purist, and believed that DolbyA ENCODING should never b=
e done anymore.)<br></div><div dir=3D"ltr" data-setdir=3D"false"><br></div>=
<div dir=3D"ltr" data-setdir=3D"false">We all know that this discussion goe=
s far beyond the SoX stuff, but maybe the eventual results of the explanati=
on maybe be shared.</div><div dir=3D"ltr" data-setdir=3D"false">My guess is=
 that explanations will take a few iterations -- but once the subtle action=
s of the attack/release mechanism is understood, it will be much easier to =
move forward on your own.</div><div dir=3D"ltr" data-setdir=3D"false">It to=
ok me a few weeks of experimentation with actual DolbyA materials to realiz=
e that the 'diode detectors' are not just 'detectors'.</div><div dir=3D"ltr=
" data-setdir=3D"false">TelcomC4 uses a similar 'riding the edge of the dio=
de I/V curve,' but uses only one later.&nbsp;&nbsp; Unlike DolbyA, the band=
passes for the 'detector' are more narrow than the bandpass for each signal=
 band -- but TelcomC4 is yet another matter.</div><div dir=3D"ltr" data-set=
dir=3D"false"><br></div><div dir=3D"ltr" data-setdir=3D"false">Again -- ema=
il me, and usually I am 2-3 days responsive, only because sometimes I need =
to think and refer to my lousy-looking code.</div><div dir=3D"ltr" data-set=
dir=3D"false">(Far beyond DolbyA itself, my own decoder does a proprietary =
mitigation of the AM sidebands created by the fast and dense DolbyA gain co=
ntrol, the 'sidebands' historically&nbsp; called 'DolbyA Fog' when it appea=
red in the middle 1960's.)<br></div><div dir=3D"ltr" data-setdir=3D"false">=
<br></div><div dir=3D"ltr" data-setdir=3D"false">John</div><div dir=3D"ltr"=
 data-setdir=3D"false"><br></div><div><br></div>
       =20
        </div><div id=3D"yahoo_quoted_9469293705" class=3D"yahoo_quoted">
            <div style=3D"font-family:'Helvetica Neue', Helvetica, Arial, s=
ans-serif;font-size:13px;color:#26282a;">
               =20
                <div>
                        On Thursday, February 13, 2025 at 09:13:01 AM EST, =
SoX NG &lt;[email protected]&gt; wrote:
                    </div>
                    <div><br></div>
                    <div><br></div>
               =20
               =20
                <div><div dir=3D"ltr">On 13/02/25 03:04, John Dyson via Sox=
-users wrote:<br clear=3D"none">&gt; About the DolbyA thing...<br clear=3D"=
none"><br clear=3D"none">All I could find was a mention of "about" 0.1s att=
ack time, apparently <br clear=3D"none">the same decay time,<br clear=3D"no=
ne"><br clear=3D"none">12dB/octave shoulders to the filters (not an mcompan=
d parameter at present;<br clear=3D"none"><br clear=3D"none">I dunno what i=
t uses, 6dB per octave seems to be usual)<br clear=3D"none"><br clear=3D"no=
ne">measuring Ray's graphs in the paper with a ruler, and someone saying th=
at<br clear=3D"none"><br clear=3D"none">it gets up to 10dB difference most =
of the way (which corresponds exactly<br clear=3D"none"><br clear=3D"none">=
to the linear lower section of Ray's graphs) and up to 15dB at 15kHz,<br cl=
ear=3D"none"><br clear=3D"none">which I took to mean the combined result of=
 the parallel 3kHz and 9kHz <br clear=3D"none">filters,<br clear=3D"none"><=
br clear=3D"none">forgot to include the 4db "knees" so that the curves are =
rounded instead <br clear=3D"none">of having corners<br clear=3D"none"><br =
clear=3D"none">and rounded the figures to no decimal places so that each li=
ne would fit <br clear=3D"none">into 80 chars.<br clear=3D"none"><br clear=
=3D"none">If you have more precise detail about what Dolby A should be, I w=
ould be <br clear=3D"none">happy<br clear=3D"none"><br clear=3D"none">to am=
end the example so that it's closer. I'll even include decimal <br clear=3D=
"none">places ;-)<br clear=3D"none"><br clear=3D"none">Adding a parameter t=
o mcompand to specify the steepness of the filters' <br clear=3D"none">shou=
lders<br clear=3D"none"><br clear=3D"none">also seems necessary for this us=
e case, if I can figure out how to do that.<br clear=3D"none"><br clear=3D"=
none">&gt; (Also, the Q values for the band splitter are approx 0.42 for 8.=
8kHz, <br clear=3D"none">&gt; 0.45 for 2.7kHz<br clear=3D"none"> &gt; and a=
pprx 1 or 1.2 for somewhere around 75-80Hz??<br clear=3D"none"><br clear=3D=
"none">Hmm. So filter shoulder steepness would need to be specifiable for e=
ach <br clear=3D"none">frequency crossover point.<br clear=3D"none"><br cle=
ar=3D"none"><br clear=3D"none"> &gt; Truly encoding/decoding DolbyA materia=
ls is a totally different world.<br clear=3D"none"><br clear=3D"none">Yes. =
Emulating existing analog electronics is a totally different world. <br cle=
ar=3D"none">Csound might be able to help;<br clear=3D"none"><br clear=3D"no=
ne">it makes SoX look like a handcart, but then their application domains <=
br clear=3D"none">are quite different.<br clear=3D"none"><br clear=3D"none"=
><br clear=3D"none">&gt; It is probably very off topic for this mailing lis=
t...<br clear=3D"none"><br clear=3D"none">Not if it affects needed changes =
(or, rather extensions) to SoX.<br clear=3D"none"><br clear=3D"none">I need=
 to know what people use it for and how it could be improved in <br clear=
=3D"none">the light of that.<div class=3D"yqt7370940283" id=3D"yqtfd66892">=
<br clear=3D"none"><br clear=3D"none"><br clear=3D"none"> &nbsp;&nbsp;&nbsp=
; M<br clear=3D"none"><br clear=3D"none"><br clear=3D"none"><br clear=3D"no=
ne">_______________________________________________<br clear=3D"none">Sox-u=
sers mailing list<br clear=3D"none"><a shape=3D"rect" ymailto=3D"mailto:Sox=
[email protected]" href=3D"mailto:[email protected]=
t">[email protected]</a><br clear=3D"none"><a shape=3D"rect" =
href=3D"https://lists.sourceforge.net/lists/listinfo/sox-users" target=3D"_=
blank">https://lists.sourceforge.net/lists/listinfo/sox-users</a><br clear=
=3D"none"></div></div></div>
            </div>
        </div></body></html>
------=_Part_6652006_1756756015.1739460743709--


--===============8117234323795632894==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline


--===============8117234323795632894==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Sox-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sox-users

--===============8117234323795632894==--