Skip to main content
Topic: Have a working 'expander' based on DolbyA (not same design) -- works well. (Read 14701 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Minor update to the best ever SW dolbyA compatible decoder.

Reply #150
If you remember the slightly low response around 10kHz in the png file (ends up being about 2dB low at 15kHz.)  I corrected the filter matrix so that it is more accurate.  It is almost ruler flat now between 9k and 21kHz...  That was just a screw-up.  This fix allowed me to remove the 3dB boost at 9kHz for the Dionne Warwick demo song.   It is already near perfect, and getting better.  This is a mighty detailed and somewhat tricky piece of software.

I am glad that the previous version has not be downloaded yet.  This one really corrects a minor nit, but needs to be corrected.

New version of decoder -- just verified the cause of the 44Hz peak - no rolloff

Reply #151
I did some experiments and did a tasteful mild rolloff at 40Hz (typical needed because of severe head-bumps on high speed tape decks).  The peak was practically obliterated and ended up being only about 1dB greater than the real DolbyA.  I am also carefully working on the slight HF issue just above 10kHz.  I think that I have a solution.

The result is a slightly brighter result -- but I still have a day of testing before making the new minor fix (only like 2 lines of code) available.

Yet another update -- better/faster decay time yet accurate

Reply #152
I just found a problem with a 2nd order attack/decay calculation -- which means that in certain kinds of percussive music, that there would be some lingering compression.  For a single decode, the effect wasn't so bad, but for multiple passes of encode (with a real DolbyA) and decode with the earlier version of the processor, there would be an accumulating amount of very slight compression.

This version fixes that problem, and the second order calculation of the decay time is now correct.  All known bugs as of this minute are fixed.  I have some prospective improvements coming, including the input filter that keeps the lowest freqs from being over enahanced, but if that is a problem, just add a 1st order high pass filter at about 40Hz to help, maybe a 2nd order filter at 35Hz might be better -- haven't experimented very much.
Also, the gain control filters have had the nonlinear portion disabled -- so it still has the linear filters meant to limit the sidebands, but the result could be slightly better some time in the future.  ALMOST no-one would got to the lengths that I have gone to so that the quality is as good as it is.   This is very tedious programming -- I have done DSP code in the past, but this is about the most difficult (conversion of complex feedback systems to feedfoward) that I have ever done.

If after a couple of releases back to back, this didn't make a substantial improvement, I would not distribute this.  But his is a very substantial improvement for industrial applications.

Warning about using SOX with the decoder -- but new version also coming soon.

Reply #153
I am getting into the tweaks and tuning towards perfection.  The code is stable now, expecting to make it a real 'release' in a few weeks.

I  have a warning about using SOX...  When you  have a very hot .flac file on input, and you use the technique of using a gain of -6dB before the decoder, and then use '--ingain=6' in the decoder command line -- it is actually better to use the '-v 0.5' switch on SOX instead of 'gain -6.'  I was finding that 'gain -6' doesn't avoid potential mild clipping on input for very hot .flac files.

A new prerelease version coming within a short time!!!

John

New version - very important minor improvements.

Reply #154
his is a really, really good update. I am getting into the tweaks and tuning towards perfection. The code is stable now, expecting to make it a real 'release' in a few weeks. It really needs lots of testing and usage before blessing it. Also, if this idea of errant 'DolbyA' encoding becomes better accepted, I plan to do what is necessary to help transfer some technology to those who can better implement a GUI or plug-in application. This tool is not trivial, especially difficult to make it so very accurate in SW.

Here are the two significant changes:
1) re-instituting the attack prefilter. The attack times are the same, but now the distortion sidebands are minimized before being created, rather than just being postfiltered. This would be most interesting to the 44.1k and 192k users, but the improvement to 48k-96k should be noticeable in this  'easy' sample rate range. I find my VERY difficult material to be improved.
2) better inter-channel timing for attack/decay. Before this correction, the threshold had to be set very accurately to avoid a very minimal phasing on strong 's' sounds. It was noticeable on Scarborough Fair and the Pink Panter theme. Now, changing the threshold over a fairly wide range -- even though incorrect -- should not have as strong a phasing type sound. (It really wasn't 'phasing' but an obvious change in freq resp.)  I don't think that it is quite perfect, but might either be in the material or even in the original encoding.

As recently usual, the location of the decoder is below.  Also, the decoder is attached.  There are updated examples in the online repository also.  Esp listen to how the NR works on Scarborough Fair -- it doesn't get rid of all of the noise (but most/all of the HF hiss), but reclaims the depth and slightly undistorts the bass.  On the Bread example, it is so good as to be emtional.  There are a couple of more -- the Pink Panther actually shows that I might not have gotten the threshold perfect (the transient sounds at the beginning aren't quite 100% stable, but are darned good considering the complexity of the HW to SW conversion.)  When I am finally finished with this, it is going to be perfect -- but is now PROBABLY closer to perfect than a real HW unit.

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

Spectral comparison on the DolbyA compatible decoder, and minor update coming

Reply #155
 just ran a spectrum (one of the easier ways to compare a real DolbyA with the decoder SW), and the results are pretty darned good. The sound quality is almost identical, but with a slight amount of extra clarity(probably partially due to an absolute minimum intermodulation.) These spectrum and waveform results are representative of the next pre-release which is coming out later this afternoon will be dated 06Jul2018. The earlier pre-release which is commonly available has a bit more bass, and very slightly muted very HF -- but is still very close to accurate (this new one is more accurate yet.) Even the waveforms aren't too far off considering that this is a full reimplementation even with a totally different architecture than anything else.

Also, the spectograms look similar -- except for noticeably less obvious distortion and a little less hash. Any of the indications of actual signal are reproduced practically the same as a real unit. However, the hash associated with the real signal is significantly less obvious. That lack of hash is NOT a loss of detail in the sound (once one actually compares the sound qualities.) I didn't include the spectograms -- but listening is a better indicator. I simply like objective verification sometimes :).

I thought that this comparison might be interesting -- and the new version (as shown by the date which will be today on the repository -- maybe tomorrow if emergency) will be uploaded as soon as I fully complete testing.
The .png file is 'Screenshot from 2018-07-06 15-02-32.png' on the repository in previous postings.  It is also included here.

Fewer and fewer nits (there is also a fix for certain 24bit signed integer files that don't follow the recommended
.wav format rules.) These fixes were 'strongly' requested by my recording engineer collaborator, and he is really
doing a great service by demanding high standards for the project.

I'll post an update when the new version is available. This new version is a good thing, but not really as critical as almost any previous update.  The spectrum comparison is probably more interesting/useful than the update unless you really need closer and closer perfection :-).

Last experimental release of the decoder

Reply #156
Future versions will be more formally controlled... Gonna try to keep it free for consumers, but this has been blessed at a first level beyond me now.  Will probably not be posting minor changes as often -- but if there are killer bugs, I'll probably fix them.  This (and many of the previous several versions) are close enough for consumers, but this is better yet.  It has more HF intensity than I like, but it matches better the real units.  The LF has been reigned in to be not just better than 1dB accuracy, but almost immeasurably different!!!  Much of the MF is also pretty close, but the HF seems a bit hot (I mean like a dB -- not huge amounts.)  The distortion (intermod) is as low as I can get it without doing some major heroics -- there are still some very aggressive techniques that aren't published anywhere.

Enjoy.  Just barely got it under the wire today -- personal matter (fell asleep :-)).

John

Usage note on the free version of the DolbyA compatible decoder

Reply #157
There was a minor internal tuning error in the final pre-release, and there really is a 100% workaround.

The error was manifested as a continued almost 'swirl' in the sound caused by fast percussion (cymbals) or very sibilent voices.  The fix is 100% correct, and is being permantently enabled in future versions.  I had thought that I had mitigated by other means (and it did help), but not good enough.  I just noticed the problem re-appearing on some Petula Clark material, and could hear it also on some orchestral stuff (Mancini.)

In the command line, add this switch:  "--ai=med".

Don't use the quotes of course, but they will probably work on Unix style shells, just do the raw -ai=med and add it to the command line.  The position isn't critical as long as the command is associated with the decoder.

You'll notice that the dynamic high end (somewhat reminding of a phasing sound, but not nearly as severe) not occuring when using the switch.

Sorry about the trouble.  Really trying to make a good high quality tool available.

John

 

The 06Jul2018 version of the decoder will the last for a while.

Reply #158
I have been getting a LOT of pressure to consider commercializing the decoder, and this is a good (temporary) cutoff point for the free version.  It has just progressed to a true release quality version with several sound quality improvements being very helpful for a real commerical or archival application.  The free version as of now (which might be updated in the future) is a few (important) notches away from the release version -- but still sounds super good.  I don't have the strength (really, health issues) to try to help people understand the benefit and use of the tool, do the development & releases, and try to add pro usability at the same time.  I have too much work to do, and I must de-emphasize the gratis offering for awhile (until I can do 'right' by my collaborator and those commercial users who are showing interest.)

The consumer give-away side has had lukewarm acceptance even though the decoder is a way for consumers to avoid repurchases in the future if/when corrected releases of pre 1990 material are made.  Some of the truly cheap labels might even be able to afford decoding, because the historical problem has been the conversion to/from digital and the amount of realtime to run an actual DolbyA unit.  The professional version will address those time/cost issues.

Up until now, there hasn't been a really good quality (yet this one is still not easy enough to use & does need usability improvements) DA decoder in the digital domain.  There is at least one other SW decoder, but it doesn't really sound like a DolbyA.  Now with the 'very interesting' interest on the commercial side (I am not handling the commercial discussions, I am just the nerd who is the author/owner, and working to make my collaborator happy and benefit from the tool also) -- I need to focus on the improvements that will move the decoder from being a 'problem solver' to a 'go to tool.'   Historical archives and pro recording engineers have been showing interest, and with the most recent improvements (the release version), there truly is nothing else out that decodes the material as well (clean, clear, accurate and really beautiful sound.)

I am leaving the examples up for a little while longer, and now they use the latest (true release) version of the decoder.  They are truly beautiful, and quite typical of (about 1/2 of) my digital copies of between 1967 and 1990 release material.  The decoder will be available indefinitely -- either on a few forums like this or the Hightail site.  If someone has problems finding the decoder somewhere, just ask me, and I'll make the most recent free version available.

Maybe the frustrated recording 'mastering' engineers who have been told 'just EQ it' will be able to follow through with their real intent of producing quality recordings again!!!   A free update wil very likely happen some time in the future, but the distraction of doing Windows (pre)releases instead of focusing on the actual development work has taken important time away.  The slower and more focused release rate will help with my time management.

If anyone really has a DA decoding quality problem and the current free decoder won't do it correctly -- then let me know, and I'll try to help.  (I don't think that the current free decoder will be inadequate for almost any consumer need -- but never know?!!?!)

PS -- I do apologize for the early attempts at making a decoder work -- it has been a long, frustrating learning curve with several kinds of new algorithms implementing it.   There is a lot of new techniques in the decoder, with a full/complete/dead-on-accurate solution for the feedback to feedforward attack/decay calculations (among other things like that.)

Thanks.
John

Simple example of cleanness & function of compatible decoder.

Reply #159
I was just running some tests of the development copy of the decoder.   Beating on it until it is perfect!!!  (I still plan to do free decoder updates form time to time, perhaps with minor limitations WRT professional version (slower, perhaps quality deviations, processing options, etc) -- I'm just very busy right now.)

Attached are two short demo files -- one is from a CD distributed reference copy, and the other 'bestever' version is decoded by the DolbyA compatible decoder.  The CD version is about the best version of the recording that I have been able to find, except for the DolbyA version that I used for input to the decoder (which is the bestever version.)

So -- I have been doing test comparisons that are absolutely necessary to prove (to me) where/if the decoder has bugs, or needs help/fixes.  Here, I have an example of one of my favorite groups -- ABBA.  They are my favorite from two standpoints, I like their music, and their recordings are good material to test my code.  They have done things to their audio which seems to make them much more difficult to correctly process than 'normal' sources.  It is easy to make ABBA stuff sound bad - so it often requires great care and very good HW/SW to keep from producing more apparent distortion than the source material.

Here, I have two short examples of 'SuperTrouper' -- a relative sound quality basket case, especially when processed by inferior software and HW.   I have a copy that had been decoded from a DolbyA source, and a 2nd copy directly from a Polar CD (the gold standard for ABBA recordings.)   The spectrum of the copies are very similar, except for a few minor oddities, which I modified on purpose to maximize the sound quality for my listening enjoyment (avoid creation of unpleasant audible HF sound distortions.)  Some ABBA recordings have a spectograph noise band at 19.2kHz in the M channel of M+S (odd, huh?), (not sure the cause, maybe something to do with old-fashioned serial data transmission), and I have removed the noise band in the mid (M) channel and an associated distortion/noise band at 1/2 of the frequency.  You can see that noise band in the 'reference' recording, and appears to be on every copy of SuperTrouper that I can find.   If you do a spectral analysis of my decoded verison of the entire song, you might notice 10dB notches at 9.6kHz and 19.2kHz -- and those notches were done on purpose and are totally inaudible.  Many renditions of ABBA recordings have a rough HF sound in them -- and much of it is due to the 19.2kHz noise band interacting with the audio and processing equipment.  If I would have let the 19.2kHz and the associated 9.6kHz noise band through my decoder, it wouldn't have significantly affected the sound for comparison purposes, but I did this recording for myself, and so I wanted the best quality no matter what.

If you listen carefully to the two examples (one is 30 sec of the Polar reference copy, and the other is processed from my DolbyA source material), you'll hear a lot less distortion (intermod) on the decoder 'bestever' copy.  Careful comparisons of the entire song show more distinct separation of the song components (voices/etc), mostly due to the vastly superior intermod characteristics of the compatible decoder.

The Polar version does have a slightly greater amount of compression (pk-rms of 20.17-polar vs 21.61-decoder, and crest 10.19-polar, 12.05-decoder), and the slight amount of compression is noticeable, but doesn't alter the relative clean/distinct separation of the components of the music -- even audible through the 200kbps mp3 encoding.

A longer copy of the demos reside on my repository, SuperTrouper-ReferencePolar.mp3 and SuperTrouper-bestever.mp3.

I tried to make the EQ and channel content as close to the original as possible, but note the very substantial lack of intermod (that rough sound) at the beginning of the song.  Also, listening to the longer copy -- if you do careful A/B comparisons at different positions, listening to different phrases of the music, even if there might be a slightly different content, the various components of the music are more distinct on the 'decoder' version rather than the 'reference' version from the CD distribution.

Even the slightly more distorted CD distribution is very special -- many releases of that ABBA song would have a peak-rms of less than 15dB and/or crest factor less than 5.  The CD copy is especially clean and uncompressed for a commercial copy of the song SuperTrouper.  The copy of the version from the DolbyA compatible decoder (with only some EQ manipulations using SOX) is the clearest/least compressed copy of SuperTrouper that I have ever heard of.  (Kind of sad that it is so difficult to get good copies of such special music -- some songs are less distorted than this, but still there is an over-processed quality to some of their music.)

This decoder (or one of its descendants) is going to be very useful for retrieving archival material with the best quality possible -- and it also sounds pretty good!!!

Repo location with examples and the most recent free version of the decoder:
https://spaces.hightail.com/space/tjUm4ywtDR

PS -- I added some more ABBA examples.  Even though they tend to be a little harsh due to no compression, some of the sound shows more apparent original intent compared to the original CD versions.  UnderAttack is much more interesting sounding (for example.)

John

Important (but not critical) quality fixes for the consumer version of decoder

Reply #160
This release contains 3 fixes based upon the 06jul2018 consumer pre-release.

The three fixes include:
1) mistaken choice of decay calculation feedback input.  Used the non-feedback version, which could cause deferred decay -- leaving more compression than correct.  I have heard negative effects only once, even though there are probably more instances.
2) mistaken choice in feedback calculation, where the gain was calculated based upon the non-feedback version of the signal.  This could create a deferred decay on the right channel.  I have heard this negative effect a couple of times, not realizing that it was because of something so very simple.  I actually thought it to be a characteristic of the recording.
3) error in calculating the gain for HF1 (essentially 9k-20k), the bug was minor (extraneous maximum gain limit based upon the raw HF1 gain level.)  There was no need for that gain limit, and the audible effect of the fix is to mitigate some apparent distortion-like sound and produce clearer, more accurate 9k-20k.

None of the above are very critical -- the bugs are seldom very obvious, except for #3, where the highs will generally be clearer.

The work on the professional version includes many more improvements, but these are bona-fide bugs which should be fixed in any version that people might be using.   I didn't want such simple bugs to have a negative impact, so I created this release.

On a scale of 1...10 for criticality, I'd give it a 5, but there is no real reason not to use this new version.

John

Have some wonderful demos (after decoding only -- sorry.)

Reply #161
I uploaded some wonderful demos -- fairly hard for a real DolbyA to decode nearly as clearly.  I grabbed material which has lots of opportunity for intermodulation, possible stereo image smearing/shift, mirrored (quick echo) voices, and just vocal reproduction in general.  A lot of this older material seems to have significant vocal emphasis -- but I think that you might agree that the sound is pretty good.  In recent days the decoder has gotten more correct LF behavior (so true LF like Scarborough Fair is much better), and also the distortion sidebands as created by a changing gain slew are mostly cancelled now.

I cannot claim that the results are impressive -- but they are darned good.  The decoder really does well considering that some people say that it is impossible. 

The only frustrating thing is that the site that I use limits the mp3 to 200kbits/sec and any mp3 causes a significant loss of the subtle detail.

The full feature and quality decoder will be available sometime in the future.  Right now, the currently available 'free' version still does okay for casual use, but the very enhanced and completed version is very significantly better.  Hopefully, there will be something released as a plugin.

DEMOS:
https://spaces.hightail.com/space/z3H68lAgmJ

John

 

 
SimplePortal 1.0.0 RC1 © 2008-2018