Skip to main content

Topic: Have a working 'expander' based on DolbyA (not same design) -- works well. (Read 1740 times) previous topic - next topic

0 Members and 2 Guests are viewing this topic.
  • jsdyson
  • [*][*]
Have a working 'expander' based on DolbyA (not same design) -- works well.
Here is a pointer to some examples, plus Linux X86/X86-64 executables.   Will eventually distribute source when I get a few more responses.   Just removed all vestiges of my GP finalizer/expander to avoid distributing more than just the DA-similar acting design.

You'll notice that the quality seems pretty darned good, and have gotten pretty good responses from audio 'listeners' (not just techies.)  This program is NOT meant as a general purpose expander (my other programs do that better), but this seems to do better for a certain subset of recent purchases/downloads.   (The other expander goes far beyond a normal dB/dB thingie, and this one is more of a nonlinear/very limited expansion range of approx 10dB or 15dB depending on audio band.)

https://spaces.hightail.com/space/bOPBXTkeeT

I plan to destroy the examples in a week or so, but will plan to provide Win64 (maybe Win32) command line binaries and a copy of AT LEAST the mainline expansion code.  I might provide the whole thing -- most of the unneeded stuff from the other project has now been removed from all of the codebase.

GOOD LUCK -- and even if you are not interested in my project, the music is generally very pretty (in some cases, better than I have ever heard some of the songs.)

John Dyson


  • mycroft
  • [*]
Re: Have a working 'expander' based on DolbyA (not same design) -- works well.
Reply #1
I'm interested in this expander. But you nowhere provided linux executables.

  • mmrkaic
  • [*]
Re: Have a working 'expander' based on DolbyA (not same design) -- works well.
Reply #2
I'm interested in your work. Could you please describe the algorithm? I'm sure many would like to know.

Thanks in advance.

  • jsdyson
  • [*][*]
Re: Have a working 'expander' based on DolbyA (not same design) -- works well.
Reply #3
Sorry that I did remove the executables a few weeks ago...  I'll put them onto my demo site again within a day or so -- I had made so many updates to the various expander/compressor projects that unless I get feedback, I wasn't going to keep the binaries up to date.   I'll put the pseudo-DolbyA decoder binaries for X86-64 Linux back on my site hopefully tonight (been a little ill, so it might be delayed by a day or so.)   So -- I can immediately provide x86-64 linux binaries for processors with sse3 or newer, and x86-32 binaries for P4 or newer.   This will be for the simple 3.5band expander that happens to help alot of music recently distributed.    Been having troubles sometimes with my builds based upon GCC -- most of my code is better tuned to CLANG/LLVM -- so the 32 bit version might be slgihtly delayed -- not sure yet.   It won't include the larger expander complex that pretty much fully recovers music -- it is really a big program, lots of threads, and lots of options that I haven't really decided on the best tweaks yet.   The simple 3.5 band FIXED expander is only single threaded and can run 10X realtime on an Intel Haswell processor.   Give me until 9 Nov at the latest to redeposit the files, and they'll reside on:

https://spaces.hightail.com/space/bOPBXTkeeT

*NOTE THAT THE SITE ABOVE ALREADY CONTAINS SOME RESULTS OF PROCESSING AND NOISE REDUCTION EXAMPLES.   The README is out of date, but the comments on noise reduction are still accurate.

John Dyson

  • jsdyson
  • [*][*]
Re: Have a working 'expander' based on DbyA (binary available again)
Reply #4
Okay -- lucky day!!!   I just checked, and the status for the simple 'almost-DolbyA-like' decoder is good.   So, double checked the binaries and they appear to work fine and they are stable from the standpoint of no recent changes.   I uploaded my most recent binaries, and they do work on Fedora Linux.  A windows64 version can probably be cobbled together in a few hours if desired at all.   Please don't look for amazing improvement, because the maximum noise reduction is only about 10dB (a little more at 9K+), and the real noise reduction per my measurements is only about 5-7dB.   This expander improves the dynamics a little also -- removes a good part of that nasty compressed sound that is all too common nowadays...   This is NOT the full scale expander, but will improve A LOT of recently released music.   Invoke the expander on the comand line like:

da-avx --threshold=-3.0 <infile.wav >outfile.wav

Read the file damanual.txt on the repository site below for more info:

https://spaces.hightail.com/space/bOPBXTkeeT


  • jsdyson
  • [*][*]
Re: Have a working 'expander' based on DolbyA (not same design) -- works well.
Reply #5
Here is a quick description (sorry if it is difficult to read), about how the expander/recovery code works.


Expander algorithm (rough):


Firstly -- there is a psuedo-DolbyA phase.   It is a 4 band expander with a well specified expansion curve as below
(the input/output are in dB):

  //
  // THIS IS THE BASIC GAIN CURVE IN dB/dB:
  //
  template <typename DT>
   DT fullgf(DT lvl)
   {
      return (DT(-0.0) - (DT(0.046986) * lvl)) - (DT(0.006598) * lvl * lvl);
   }

   //
   // the code below applies limits to fullgf, and expands the nonlinear function beyond its numerical range
   //
   template <typename DT>
   DT fgfe(DT llvl)
   {
      DT gfval = fullgf(llvl);
      DT extgf = Vselect(Vgt(llvl, DT(-7.0)), DT(-0.50000) + (llvl - DT(-7.0)) * DT(0.100), gfval);
      extgf = Vselect(Vlt(llvl, DT(-40.0)), (DT(-9.17736) + (llvl + DT(40.0))* DT(1.0)), extgf);
      extgf = Vmin(extgf, DT(0.0));
      return extgf;
   }

Each channel has this exact same curve -- and is expanded in four bands:  0-80,80-3k,3k-9k,9k-20k, while the actual gains
are calculated from the bands 0-80,80-3k,3k-20k and 9k-20k.   The gain control for 9k-20k is a combination of the measurement
of 3k-20k and 9k-20k measurement ranges.  The resulting gain control is 10dB each for 0-80, 80-3k and 3k-9k, while there is
15dB of gain control available for 9k-20k.

-------------------------------------------------------------------------

Next -- more complicated -- is an 8 band expander with the following ranges:
0-100,100-240,240-600,600-1.2k,1.2k-2.4k,2.4k-5k,5k-10k and 10k-20k.

The expander has a dB linear expansion component that is tunable from 1:1 all the way beyond 1:1.20 or beyond.   The
dB linear attack/decay is fairly slow -- in the range of 40dB/second attack and <1dB/second decay -- but is fully dynamic,
so can be faster or slower.  The decay time is based upon the signal dwell time, and the attack time is based upon the waveshape.

Additionally, there is a true linear expansion component that has faster attack (about 300usec - 1msec, depending on
waveshape and/or frequency band), and a faster decay than the dBlinear measurement (the decay is
between 10msec and >1second -- standard exponential gain decay).  The two linear/dBlinear signal measurement/gain
signals are put together in a 'maximum' operation, where the largest value wins.

Next -- also as calculated from a modified version of the linear level measurement, there is a 'transient' recovery
calculation.  The transient recovery is NOT just a simple high pass filter on the gain control signal, but rather is
a Volterra-like series expansion of the signal level measurement.   This additional measurement is ALSO merged with
the already merged dBlinear and true linear gain control signals. IT IS IMPORTANT TO NOTE THAT ATTEMPTING TO
USE A SIMPLE HIGH PASS FILTER ON THE GAIN MEASUREMENT TO IMPROVE TRANSIENTS
DOES NOT WORK WELL.  The series expansion is critical so that the transients are handled well.


So -- the 'big expander' unit (and three are usually used as described below) provides a fast short term response,
a good longer term response, and a quick transient response to the input (lets say, obnoxiously compressed) signal.
After the signal is modified by the calculated gain control, then 'it sounds better' :-).   Of course, I am careful to anti-alias
and make sure that transitions seldom extend outside of the audio band, and there is some extra filtering going on
to keep things clean.

------------------------------------------------------------------------


We have the psuedo-DolbyA-like processing, and the second -- more complex expander right?  Well, not
quite...  The expanders are put together so that the psuedo-DolbyA-simple expander is first in the chain, then there
are THREE of the complex expanders used.   The complex expanders operate on the following signals:  
LEFT+RIGHT, then BETWEEN-LEFT/RIGHT&MID/SIDE, finally MID/SIDE.  So there are three phases of the big expander used, and the
expansion ratios are set identical.  The only important thing that might be set differently between each of the three
expanders, is that any of the 8 audio bands can be excluded from the gain calculations and SOMETIMES it is beneficial to
exclude 0-100Hz and maybe 100-240Hz.  Usually, if needed, excluding 0-100 is adequate.   The expander also has some
protections in the calculations to keep the gains from being too askew -- thereby maintaining frequency balance.

-----------------------------------------------------------------------

With all of these expander phases (plus there are more math going on in the code -- just too many details right now), some music can
handle perhaps 1:1.30 (dB/dB) expansion, significantly less hiss/noise in older material,  and sound significantly better.  Of course, the dB oriented
expansion ratio doesn't really describe all of the expansion going on -- which can be effectively the dB/dB
ratio + 3-6dB more expansion for transients.   As it is designed, the expander can be incredibly fast (faster than one might expect
an expander should be without distortion) or very smooth and slow.   It follows the signal in a way so that it deals super well with
typical popular music (and seems to be okay for some compressed orchestral stuff also.)

John

  • jsdyson
  • [*][*]
Re: Have a working 'expander' based on DolbyA (not same design) -- works well.
Reply #6
Been re-reviewing some of the expander/recovery code -- and just realized that I left 'training wheels' on the transisent expander code.   I need to do a lot of testing with the improved parameters (that is, disabled training-wheels.)   There is a demo song on the repostory site:   "carptransient-improved.mp3".   It isn't major in the case of this song, but you'll hear an 'openness' that didn't previously exist.  The transient recovery code is now more assertive about gain increases/decreases on its behalf.  (Changes like this are one reason why it is difficult for me to release anything yet...  If I can find collaborators/testers, then I'll have a better chance of releasing the working binaries and probably source code sooner!!!   So -- on the same repository, there is a readme with a notice about the upcoming improvement, but also there is an .mp3 example that shows some progress.

  • jsdyson
  • [*][*]
Re: Have a working 'expander' based on DolbyA (not same design) -- works well.
Reply #7
Regarding the full-scale expander...  I am in the midst of a significant rework to simplify the code for release.   There is A LOT of stuff in there than isn't necessary for music recovery -- e.g. finalizing for music production.  I have decided to split out all of the 'compression' code except for the final stage limiters.  (Yes -- the limiters go far beyond a simple signal limiter), the limiters are almost unnoticeable at even 6dB of limiting in many cases.   I am going to try for a minor architectural change which I believe to be slightly more valid than the current architecture, and also will be faster/more able to support the more advanced transient recovery calculations in realtime.   It will be a week or so to do all of the modifications, but if anyone is REALLY interested in trying the full-scale music recovery software program, I am willing (within a day or two from now) to do a better controlled build for Linux or Windows-64 command line -- and release an end-user viable version of the full-scale expander (the compression/finalizing code will probably be suppressed, however.)   Even the full scale expander requires very few 'tweaks' because it really does follow the music dynamics and nowadays has very little 'ad-hoc' hackery in it.   I hope to be able to at least release the more complete expander in free-binary form and possibly even in source form if I can clean it up.  (I don't want to give away all of the very advanced proprietary code that I have written, but the expander/recovery software itself uses a limited selection of it.)

John

  • jsdyson
  • [*][*]
Re: Have a working 'expander' based on DolbyA (not same design) -- works well.
Reply #8
As an experiment -- proving viability of the full expander WITH NO psuedo-DolbyA processing enabled -- I have deposited some before/after recovery examples.  Currently only one example, but plan to deposit a few more.   These demos show significant improvement (when/if needed.)  I am not claiming perfection -- I am not a mastering engineer, but this might show the usefulness.   I DO INTEND ON RELEASING SOURCE CODE TO THE RECOVERY SOFTWARE.   Just made that decision.   I hope to have a version of the full recovery software available in a week or so -- right now, it is fully functional, but there are TOO MANY OPTIONS (mostly not used), and the command line interface needs to be simplified.  As is, there is little or no need to tune or control the expander/recovery software other than expansion ratio and possibly the transient recovery amount.   This example includes significant transient recovery -- and you can probably tell that it is very functional...   The site below is very safe, and all it contains are raw text or .mp3 files (I am myself very sensitive to security also.)

https://spaces.hightail.com/space/KzA53ZKeFc

Let me know what you think -- any feedback will be used to improve.
John

  • jsdyson
  • [*][*]
Re: Have a working 'expander' based on DolbyA (not same design) -- works well.
Reply #9
There are some more impressive examples on my repository.  Will probably be deleting this one in a few days -- but there is both a really big improvement in dynamics and some noise improvements.   The music is pretty also...  Give me feedback if you see any issues.  Thanks...

Re: Have a working 'expander' based on DolbyA (not same design) -- works well.
Reply #10
Just wanted to say that I am truly fascinated and impressed by what you're doing — it deserves more attention and acclaim. May I suggest that you also share this with tapeheads.net? They comprise a bunch of dedicated tape lovers, and would be most thrilled to know that someone is finally creating a freely accessible software Dolby implementation.

Many thanks, and keep up the great work.

  • jsdyson
  • [*][*]
Re: Have a working 'expander' based on DolbyA (not same design) -- works well.
Reply #11
Thanks for the feedback.   The only thing holding me back from distributing the errsatz-DolbyA source RIGHT NOW (and I don't claim that it is really DolbyA compliant at all -- but it seems to match the DolbyA parameters and seems to MILDLY and CORRECTLY undo a lot of various over-compressed music out there) is that I am still not sure that it is 100% final.   I don't have a github account (yet), and thinking about how to distribute the source responsibly.   I do promise that if someone asks for it, they can have a tar.gz (tar.bz or zip or whatever) image of the tree right now.   It is ugly because I haven't done a housecleaning in a few weeks but I don't want that to get in the way of anyone with immediate need.   Binaries for Linux are online right now in the "musicdata" repository below.  If asked, I can make a Windows64 command line version available in a few days (well under 1wk) -- I have had windows builds running in recent times.  Also, the repository that I have recently talked about in this thread does have a .webm animation (in the "Rawexpandexpamples" repository) of the pseudo-DolbyA-like decoder running with the gains of each of the 4 expansion bands being displayed.   Watching the .webm animation should make one feel like it is damned close if not a reasonably perfect match for decoding some DolbyA material (the gains make a lot of sense, including the high band having 15dB gain change range as would be expected.)

The full-scale recovery software is a little farther away than the errsatz-DolbyA-like decoder because I am still not happy with the CPU usage.  * the math needed to reconstruct the transients is not simple nor is it quick to do...  It is NOT just a peak enhance, but rather a transient reconstruction.   If someone has an immediate need, I can probably put together a USABLE version of the full scale recovery software, but currently will only be usable on a Linux system -- and most usable on a 4 core (or larger) Haswell (or newer) processor.   (Nothing keeps the full scale software from running on Windows -- it is just a lot of work right now to do the re-porting effort.)  It takes approx 3/4 of my 4 core CPU right now to run realtime (that is, the full recovery software.)   The simple errsatz-DolbyA-like expander runs 10X faster than realtime -- I even removed the multi-threading from it because it runs quickly enough.

https://spaces.hightail.com/space/bOPBXTkeeT

https://spaces.hightail.com/space/KzA53ZKeFc


  • john33
  • [*][*][*][*][*]
  • Developer
Re: Have a working 'expander' based on DolbyA (not same design) -- works well.
Reply #12
I am equally fascinated by what you're doing here, although I lack the technical expertise to contribute. When, and if, you reach the point where you would like binaries to be hosted for general consumption, I am happy to offer Rarewares for that purpose. :)
John
----------------------------------------------------------------
My compiles and utilities are at http://www.rarewares.org/

  • jsdyson
  • [*][*]
Re: Have a working 'expander' based on DolbyA (not same design) -- works well.
Reply #13
Wow -- I just made a big mistake in running of some demos...  Happens to prove that the lower speed/higher quality recovery setting is desirable.    Normally, for real-time I use a faster set of transient recovery parameters than for a runoff using the best quality that the recovery software can do.   I forgot to use the maximum quality settings in the current set of demos (on the repo-site),  I FOUND OUT about the incorrect setting BECAUSE my recent listening test was disappointing (that is, of the music that is sitting on the 'Rawexpandexpamples' repository as of approx 13nov at 00:00 USA EST.)   It isn't a disaster, because the music is still improved, but I noticed a SLIGHTLY larger amount of 'surging' than what my high quality results normally show.   So, I am rerunning the demos and will reload the repository by about 10:00AM on 13nov (USA EST.)  The good news is that I ended up (being unaware) recognizing the detectable difference between the high quality and the 'usable' quality settings for the recovery software.   The only reason for using the lower quality setting is that the best quality settings run slower than realtime on my computer.    I TRULY WISH THAT I COULD FIGURE OUT A MATH SHORTCUT SO THAT I COULD MAKE THE RECOVERY SOFTWARE RUN FASTER!!!   The code generated by the compiler is as fast as possible given the instruction set -- but I am going to research the possibility of a faster algorithm (but I doubt it exists.)

  • jsdyson
  • [*][*]
Re: Have a working 'expander' based on DolbyA (not same design) -- works well.
Reply #14
Okay -- i have uploaded the new versions of the files with the correct recovery parameters.   The recovery software can be more aggressive (it is somewhat tunable), but the transient recovery is carefully calculated.   I only used middle level amounts of expansion and a slight boost to the transient recovery.  The only current tunable in the transient recovery is a gain setting parameter.  Of course, the basic expander array also has an expansion ratio.   The demo expansion ratio is a total of 1:1.36 -- which is quite respectably high without seriously bad artifacting.   Also, the transient recovery adds on another 3-6dB (both up and down) of gain change.   These demos are probably a little 'dead' sounding -- normally, I runoff with a set of low pass filters with slight peaking which gives a brighter sound (without over-enhancing the high end.)   I use two sets of filters, plus a brick wall -- the first filter is 2nd order at 9kHz, with a q of 1, and the next filter is a 2nd order at 15kHz with a q of 1.4, and a brickwall at 16kHz.   The actual rolloff doesn't strongly affect the audible region, but tends to sharpen the HF transients -- THESE FILTERS ARE NOT BEING USED FOR DEMO PURPOSES.  It might be desirable for casual listening to add the filters, which will give tigher and some shine to the sound.  (If you choose to use the low pass filters, don't try to get by with a q of 0.707 or somesuch -- that will really soften the sound.)

  • jsdyson
  • [*][*]
Re: Have a working 'expander' based on DolbyA (not same design) -- works well.
Reply #15
Super good news -- the recovery processor and settings is doing a darned good job of beating ABBA into submission.  It still sounds like ABBA, but the severe intensity and loss of individual voices are improved a little.   Like the rest of the demos, I am only leaving them on the repo site for a few days.   Hopefully, within that time, I'll have the recovery processor available in binary form for everyone to try.   Right now, there are still a few tweaks, and literally 50+ command line options which are being removed pretty quickly.   Most of the evil ad-hoc algorithms are going away, and the more 'scientific' algorithms are proving themselves.

If I have an ongoing bugaboo left to resolve, it is the matter of maintaining frequency response balance when running at high expansion ratios.   I do have a current solution that works pretty well, but can lend itself to some mathematical instability.  The current demos are using all of the 'right' settings, and very-little ad-hoc nonsense (other than the frequency response rebalancer.) 

The current recovery processor can actually produce usable results at 1:1.6dB/dB expansion ratio with a full-out transient enhancement of 6dB!!!   Of course, most music does not benefit from so much processing.   I am finding that 1:1.3 with 3-6dB of transient enhancement (all demos are using approx that amount) works pretty well.

Just look at the same sites as before -- with 'abba' in the name, like abba-106-supertrouper.mp3.   I have been pretty generous with the bits on the MP3 compression -- so there should be no quality loss from the flac files that I actually work with.

These demos REALLY DO sound different (and I think -- really tames the  ABBA sound.)

John Dyson

  • krabapple
  • [*][*][*][*][*]
Re: Have a working 'expander' based on DolbyA (not same design) -- works well.
Reply #16
can you describe the characteristics of the *original* (prior to processing) ABBA track?  Is it from CD, if so ,  is it the first CD release, or a remaster, it is from an album or from a greatest hits collection, can you post some objective data about it (DR measurement [crest factor], frequency profile..?)

 

  • jsdyson
  • [*][*]
Re: Have a working 'expander' based on DolbyA (not same design) -- works well.
Reply #17
The originals of ABBA are the best copies that I could find & have collected over these many years.  For example, the original that I used for 'SuperTrouper' sounds a lot like the Polar release, a bit clearer but too restricted/compressed sounding.   I copied that version to digital MANY years ago, and don't even know the manufacturer anymore.   I definitely started with GOOD sounding ABBA copies, but the resulting processed copies are much better (more listenable.)  The American releases of supertrouper in particular often have HORRID intermod at the beginning -- that is what (many years ago) motivated me to find every copy of ABBA that I could find, and try to pull together a nice sounding album for my OWN listening.    Then, eventually (being an Electrical Engineer, Software Developer and DSP developer) decided to do something serious to improve the sound quality of alot of the old music available out there (Including my fairly good --but still not quite right -- ABBA stuff that I have laying around for 10-20yrs.)   I'll plan to deposit 30seconds of one of the unmodified songs corresponding to some of the demo versions to give you an idea of what I started with    Again, the ABBA copies were the VERY BEST that I could find -- and I have been keeping my little 'ABBA hoard' for many years.   Give me a few hours, and I'll deposit a little bit of the original copies that I started with.
I must confess -- the ABBA demos are not the most challenging of the recovery examples - however even though their music is truly beautiful, the recordings sometimes seem overly intense/harsh -- and that is what the recovery software has mitigated.   I have found that there is definitely a 'secret sauce' of some kind that is helping to freshen up my copies of ABBA music -- still not sure what part of the processor is doing the good.    On the other hand, some of the Sergio and/or HerbAlpert music has enough dead time that the noise reduction and other attributes of the recovery software become obvious.  ABBA music GENERALLY does benefit from the operation of the processor, however.  *When I do figure out what aspect of the processor benefits what kind of music, I'll definitely document it.

John

  • jsdyson
  • [*][*]
Re: Have a working 'expander' based on DolbyA (not same design) -- works well.
Reply #18
You asked about some stats of one of the examples -- here I am providing stats from the sox program...  The first one is from the polar disk, the second one is from my old archival copy from many, many years ago (the best one that I have), and the last is the processed copy from the mp3 - the .flac master version of the mp3 isn't very different.   The stats don't really have enough resolution to describe very much.   WRT the frequency range -- I might be able to put together a spectogram of each one -- I'll see if it is very helpful.   One thing that you would notice is that the processed copy chops the audio off at 18kHz - I have a habit of doing so to avoid  the effects of a signal outside the range of normal hearing  (if I don't know where the file will be used.)

[jdyson@JDworkstation a0]$ sox /music/abbaall/polar/ABBA/1980*roup*/*Troup* -t raw /dev/null stats
             Overall     Left      Right
DC offset   0.000126  0.000126  0.000122
Min level  -0.947998 -0.802673 -0.947998
Max level   0.845001  0.845001  0.837646
Pk lev dB      -0.46     -1.46     -0.46
RMS lev dB    -20.29    -20.27    -20.30
RMS Pk dB     -13.53    -13.53    -13.54
RMS Tr dB     -75.36    -75.36    -74.35
Crest factor       -      8.72      9.81
Flat factor     0.00      0.00      0.00
Pk count           2         2         2
Bit-depth      16/16     16/16     16/16
Num samples    11.1M
Length s     251.907
Scale max   1.000000
Window s       0.050
[jdyson@JDworkstation a0]$ sox /music/agflac/raw/106.flac -t wav /dev/null stats
             Overall     Left      Right
DC offset  -0.001000  0.000336 -0.001000
Min level  -0.966064 -0.861938 -0.966064
Max level   0.999969  0.999969  0.999969
Pk lev dB      -0.00     -0.00     -0.00
RMS lev dB    -20.91    -21.34    -20.53
RMS Pk dB     -13.01    -13.83    -13.01
RMS Tr dB     -92.56    -92.56    -92.21
Crest factor       -     11.67     10.62
Flat factor     0.00      0.00      0.00
Pk count           3         2         4
Bit-depth      16/16     16/16     16/16
Num samples    11.2M
Length s     254.198
Scale max   1.000000
Window s       0.050
[jdyson@JDworkstation a0]$ sox abba-106-super* -t wav /dev/null stats
             Overall     Left      Right
DC offset   0.000001  0.000001 -0.000000
Min level  -0.920204 -0.920204 -0.885318
Max level   0.952650  0.952650  0.932306
Pk lev dB      -0.42     -0.42     -0.61
RMS lev dB    -20.75    -20.75    -20.75
RMS Pk dB     -11.64    -11.64    -11.81
RMS Tr dB    -127.93   -121.57   -127.93
Crest factor       -     10.39     10.17
Flat factor     0.00      0.00      0.00
Pk count           2         2         2
Bit-depth      29/29     29/29     29/29
Num samples    12.1M
Length s     252.960
Scale max   1.000000
Window s       0.050

  • krabapple
  • [*][*][*][*][*]
Re: Have a working 'expander' based on DolbyA (not same design) -- works well.
Reply #19
We all lose high frequency hearing as we age -- I certainly have -- but the limit commonly accepted is 20 kHz.  Are you worried about aliasing of >20kHz frequencies into that lower (18-20kHz) range?

This whole project seems...idiosyncratic? 

  • jsdyson
  • [*][*]
Re: Have a working 'expander' based on DolbyA (not same design) -- works well.
Reply #20
My worry about HF is mostly that I am doing nonlinear processing, and I try to minimize intermod/beats/aliasing.   It is mostly superstition that I typically chop off 18kHz -- but it is an attribute of  my scripts and NOT the programs.  It seems like there is very little energy up there.   I'd definitely hesitate chopping off at anything below that -- but truly, if you think that it is a bad idea -- I'll DEFINITELY CONSIDER REVISING THAT DECISION.   (My mind is open!!!)  At 61, I have found that my hearing is gone at about 15kHz, but I can hear just below that...  Perhaps I underestimate what the 'youth' will be missing :-).  (In the olden days, I could do 18-19kHz pretty reliably, and the old 15kHz horizontal sweep on NTSC TV sets often drove me nuts...  No trouble now for many reasons :-)).

Here is the history -- playing with gain control, and recognizing that any time that the gain changes at a rate whose spectrum approaches the audio range, then there'll definitely be some sidebands appear.   I have learned that avoiding (usually minimizing) any kind of sidebands/intermod/aliasing/etc is a very good thing.   However, the real benefit of my habit of chopping at 18kHz in my scripts has little basis in need or fixing any specific problem.   I have run test with my multiband compressor, and during my early design phases, I had recognized the 'hash' that is caused by doing quick gain control. (Some people notice it as a hardened sound.)  Now, I have a method to remove the most obnoxious sidebands, but some of those evil things still happen.  (SO THAT IS MY HISTORY/FEAR OF INTERMOD/ALIASING/BEATS/ETC)  ;)

John  

  • jsdyson
  • [*][*]
Re: Have a working 'expander' based on DolbyA (not same design) -- works well.
Reply #21
We all lose high frequency hearing as we age -- I certainly have -- but the limit commonly accepted is 20 kHz.  Are you worried about aliasing of >20kHz frequencies into that lower (18-20kHz) range?

This whole project seems...idiosyncratic? 
Well -- regarding the 'whole project' being idiosyncratic -- I don't think so.  A lot of people (including non-techies) have mentioned the bad sound on many older (and newer) recordings, and it appears that a lot of 'bad sound' comes from too much dynamic range restriction.  Even if the 'compression'/'limiting' is done perfectly -- and I do have software that can do it without significant distortion products, it still makes the music sound 'tight' or perhaps claustrophobic (sp?).   It has taken me a while to figure out how to undo some of the overly compressed sound (and do it with maximum quality.)   One thing I did learn - much of what makes a compressor work really well is NOT what makes an expander work well.   There are some things that do help (avoidance of intermod products/etc), but other things like tending to use a certain kind of attack/decay algorithm would be wrong for expanders vs. compressors.   I have been getting A LOT of positive feedback from non-techies (less-so from techies who might like that wonderful compressed sound.)   I do NOT claim perfection so far, and in fact just realized that my ABBA demo had too much transient restoration enabled.   I am going to back that off to the theoretically correct value (instead of a boosted value) later on tonight.   Too much compression is 'bad', even though it is very common -- geesh -- I have code that can almost undo the compression in 'Shake it off', even thought the purpose of that would be idiosyncratic :-).

  • jsdyson
  • [*][*]
Re: Have a working 'expander' based on DolbyA (not same design) -- works well.
Reply #22
I have a simple demonstration of the benefit of using a good piece of audio clean-up/recovery software on older (and probably some newer recordings.)   There are two examples on the repository site:  "13.pretty-raw.mp3" and "13.pretty-recoveredB.mp3".   You'll hear a significant decrease in background noise, and more natural (less compressed) dynamics in the recovered version.  Another good comparison would be "03.with-unproc.mp3" and "03.with-recoveredB.mp3".  The difference in realism is significant -- not quite the same as listening to a group in person -- but certainly an improvement!!!   The '03.with-*" version even has defects in the recording, but the improvement is still very worthwhile.   I am not arguing that the correction/improvement/expander software is perfect, but it is eyeopening to hear the comparison.   My little diversion into ABBA has been a pet project for years, and one reason why I got started on this.   I am hoping to donate this technology (not really all that much of an invention -- just a good application of technology) so that we can all benefit, and only need some help with choices on these matters.   REALLY -- do take a listen!!!  Due to security reasons, just don't trust any files any newer than 9:50EST (USA EST) time until I do some probable updates later on.

https://spaces.hightail.com/space/KzA53ZKeFc
  • Last Edit: 13 November, 2017, 10:21:59 PM by jsdyson

  • jsdyson
  • [*][*]
Re: Have a working 'expander' based on DolbyA (not same design) -- works well.
Reply #23
Another enhancement is forthcoming.  I didn't like how the 'latin beat' was sometimes being handled.  This error had to do with the long term attack/release which gives the internal longest-term limit as to how much gain change is allowed.   The gain was allowed to hang too long, which then causes a 'jerking' or 'surging' sound.   The attack/decays are a very careful tradeoff that has to match the ear, and NOT be tuned to each song.  I decided that the conventional fast attack/slow decay in the dB domain is the wrong algorithm for the longer term time constant.   So, I resurrected a dynamic&symmetrical attack/decay which can actually provide long hold times and long attack times (or short attack/hold times) depending on the difference between the current power level and the recent average power level.  So, the filter is both more agile and also filters more (capabiility because the attack/decay is nonlinear.)   I have used that technique for a long time before and it worked well...  However a few weeks ago I removed it because my ears temporarily lost the ability to hear certain defects...  I am currently testing the new code -- but downloaded the new one for comparison:  the old one is 13-pretty-recoveredB-OLDOLD.mp3 and the new one is 13.pretty-recoveredC.mp3.   If you listen carefully, you'll notice the latin beat to have less of a 'surge'.  This result is due to my two-sided attack/decay processing as I described above.  I haven't finalized the tuning, but it is already pretty close to correct -- the way that we hear pretty much defines the parameters, and I had already produced some reasonable nonlinear attack/decay values (not in the units of dB/sec or RC timeconstant, but kind of a dB^2/sec type thing.

  • jsdyson
  • [*][*]
Re: Have a working 'expander' based on DolbyA (not same design) -- works well.
Reply #24
I have been updating the files quite often (the names on previous posts.)  You might have to choose a later filename (e.g. instad of recoveredC for the filename end, it might be recoveredD or recoveredF.)  Always look for the latest file by looking at the end of the filename.  I am making amazing progress on the full scale recovery code -- it has been a lot of work.  I sure hope that this starts a movement where the music industry quits damaging the music with too much processing.  At least, in the meantime, this program and others can help to undo some of the damage (I hope.)

John