Great work Nick.
Re: the bitrate bloat due to "shaping" - surely the whole point of shaping the noise is so that you can add more of it while maintaining the same level in the audible band? So when you enable shaping, you should also add a threshold shift. (Sorry if you're doing this already!).
Re: lower bitrate than normal FLAC: lossyFLAC uses a different default block size. Sometimes the output is smaller than the default FLAC blocksize, sometimes it's larger - maybe this is what's happening? Overall, what you say is correct: lossy+correction should be larger than lossless, but it would be nice if it wasn't!
Re: transcodability: I tested with mp3 problem samples very early on. It would be worth re-testing with the current version. I found you can't be too aggressive if you want to avoid any audible difference (e.g. -1!), but if "different but not worse" is good enough, you can use normal settings (which at the time was -2!). that horrible "trumpet" sample was quite revealing.
Cheers,
David.
Thanks David, I'm glad you like it!
Re: Bitrate Bloat - I'm not doing that at present as my ears are not really sensitive enough, but if anyone wants to do some testing, I would suggest something along the lines of the following, taking into account the relationship between -snr and -nts:
quality_noise_threshold_shifts : array[1..Quality_Levels] of Integer = (-3,-0,3,6,9,12,15);
quality_signal_to_noise_ratio : array[1..Quality_Levels] of Integer = (24,22,20,19,18,17,16);
So, if I was going to go further, I would initially add 3 to -nts for every 1 taken from -snr, i.e. -8 = -nts 18 -snr 15; -9 = -nts 21 -snr 14; etc.
I tried "-nts 30 -snr 11 -autoshape" and with my problem set it doesn't sound particularly bad - probably a starting point.
Re: Transcodability - lossyWAV does not allow re-processing of an already processed file. I would prefer to keep it that way, although if the 'fact' chunk is removed, the program will not be able to tell the difference.
I found a small bug in the noise shaping code and also some quite nice speedups (approx 7% to 10%), so:
lossyWAV beta v0.9.0 attached to post #1 in this thread.