Change log beta 1.2.3k RC16: 06/05/2011(Minor) modifications to adaptive noise shaping method.Bug hunting.Slight change to the --spread parameter (related to output of codec-block processing and subsequent spreading function(s)) - now indicates whether the static or dynamic maximum-bits-to-remove limits kicked in during processing (i.e. all FFTs for a particular codec block indicated more bits could be removed but bits-removed was limited to static and dynamic limits).

Change log beta 1.2.3g: 12/04/2011Modifications to adaptive noise shaping method: --warp parameter removed due to complexity of selecting correct value. The value is now frequency dependent to allow for consistency in the portion of the warped spectrum associated with the frequency range of interest (up to 16kHz by default);Modifications made to handling of sample-rates other than 44.1kHz. I realised that as all the testing has pretty much been carried out at that rate then there may be issues with handling other sample-rates. There were. I think that they're now fixed.

Change log beta 1.2.3f: 24/03/2011Modifications to adaptive noise shaping method;Addition of the --static parameter to allow the user to increase the number of (static) minimum-bits-to-keep in the range 7<=n<=16, default=6.

Change log beta 1.2.3d RC5: 28/02/2011Change to parameter limits for -A, --adaptive: now 64<=n<=256;Change to order of lower quality presets:

C, economic, 0.0;

P, portable, -2.5;

X, extraportable, -5.0.

Code tidy up and optimisation.This is release candidate #5 for lossyWAV 1.3.0.

Change log beta 1.2.3c RC4: 22/02/2011Parameter -i, --impulse removed. The shortest FFT (32 samples for 44.1/48kHz input) is now enabled by default for all quality settings, previously for int(q)>0. Can be disabled using --analyses 2 (default number of analyses is now 3).A change to quality preset selection. Parameter -q, --quality will now accept a numeric value in the range -5 to 10 as before but also a short and long preset name as follows:

I, insane, 10.0;

E, extreme, 7.5;

H, high, 5.0;

S, standard, 2.5 [default];

P, portable, 0.0;

N, intermediate, -2.5;

X, extraportable, -5.0.

Code tidy up and optimisation.This is release candidate #4 for lossyWAV 1.3.0.

Change log beta 1.2.3b RC3: 16/02/2011--classic and --altpreset quality systems removed;Fixed noise shaping removed;Adaptive noise shaping now enabled by default. Use --adaptive OFF to disable. Parameter will still take numeric input to set number of taps for FIR filter used.Remapping of quality presets as follows:

-I, --insane = -q 10.0;

-E, --extreme = -q 7.5;

-S, --standard = -q 5.0 [default];

-R, --reasonable = -q 2.5;

-P, --portable = -q 0.0;

-e, --economic = -q -2.5;

-s, --superportable = -q -5.0.

Code tidy up and optimisation.This is release candidate #3 for lossyWAV 1.3.0.

Change log beta 1.2.2x: 05/01/2011Minor changes to the adaptive noise shaping algorithm - now takes into account long FFT analysis results for previous codec-block as well as present codec-block; Changes made to curve which modifies shape of desired filter output per codec-block-channel.

Change log beta 1.2.2n: 21/06/2010Further changes to the adaptive noise shaping algorithm. Modification made to the high frequency portion of the desired shape.

Change log beta 1.2.2m: 17/06/2010Further changes to the adaptive noise shaping algorithm. Now uses the results of both the long and short FFT analyses when determining the desired shape of filter.

Change log beta 1.2.2k: 11/06/2010Desired shape of filter now changes more gradually per codec-block rather than totally;Fix to calculation of frequency distribution to allow more accurate comparison of input and output.

Change log beta 1.2.2a: 26/05/2010Further progress made with SG's adaptive noise shaping method. The --adaptive parameter now takes a parameter (in the range -1<n<1) to allow the warping factor to be changed. Error found and fixed in remove_bits routine (for adaptive-shaping).

Change log beta 1.2.1a: 25/05/2010Further progress made with SG's adaptive noise shaping method. Extremely simplistic psy-model in place. Enable by adding --adaptive to the command line.Post-analysis of the bit-removed audio data can be performed using the --postanalyse parameter in conjunction with the --freqdist parameter.

Change log pre beta 1.2.1a: 17/05/2010Code optimisations;Major part of the implementation of SG's adaptive noise shaping;Modification of fftw_interface unit and FFT handling routines to allow the use of libfftw3f-3.dll as well as libfftw3-3.dll (-F, --fftw <single/double/off>);Implementation of the spectral plot (--freqdist) for input and optionally output audio data.

Identification and adaptation of a psy-model to use in conjunction with the new noise shaping method;

Do I understand correctly what we're aiming for?The noise shaping is so we can add more noise but still hide it, this could give better compression. But with noise shaping, the used codec will have worse compression as a result, which will (partly) eliminate this advantage.It will be interesting to see how much room there is for applying noise shaping before it becomes counter productive.

Right, I've got the guts of SG's adaptive noise shaping (ANS) algorithm working, up to a point. I think that I have the initial state of the FIR filter working but am not sure how to use it - the existing static noise shaping (SNS) algorithm uses an IIR filter.

If anyone with experience of using FIR filters were to offer some hints, that would be very much appreciated.

I've got the optional use of single / double precision FFTW DLLs in place, as well as the spectral plot. After a bit more work on ANS, I will release a beta version and source.

I don't know how much you know and how much you don't know, plus I myself have absolutely no idea what FIR filters are , so I'm not sure if anything I come up with will be of any use, but I'm going to try anyway.

Do I understand correctly what we're aiming for?The noise shaping is so we can add more noise but still hide it, this could give better compression. But with noise shaping, the used codec will have worse compression as a result, which will (partly) eliminate this advantage.

"hiding the noise" and "noise partly eliminates this advantage" sort of contradict each other. If it's properly hidden ("behind the original signal") it will NOT affect the quantized signal's predictability in any significant way. And that's the goal I'd be aiming for.(1) apply psychoacoustic model to determine tolerable noise levels(2) restrict local SNRs not to go below a certain threshold(3) derive noise shaping filter and wasted_bits from the results

#1 makes sure that the noise is below the masking thresholds#2 makes sure that the noise doesn't hurt predictability.

If I understand correctly, dither with noise shaping is tend to be used as the last step of audio processing chain. How worse it could be if dithered before, like lossyWAV with ANS, or the product of CD, and then dither with noise shaping another time at the end of playback side?

They say that a picture is worth a thousand words - the following images indicate that the implementation of SG's adaptive noise shaping method in beta 1.2.2a is pretty much putting the noise where I want it to be, i.e. behind the signal.

If I understand correctly, dither with noise shaping is tend to be used as the last step of audio processing chain.

I don't know. It certainly is a possibility to "work" in 24 bit and do a word length reduction to 16 bit with a dithering noise shaping quantizer so you can create an audio CD for example.

QUOTE (Enig123 @ May 26 2010, 08:57)

How worse it could be if dithered before, like lossyWAV with ANS, or the product of CD, and then dither with noise shaping another time at the end of playback side?

I don't understand. Why would you be dithering at the "end of the playback side"?

As for LossyWav: I think dithering is neither appropriate nor necessary. The probability of the signal being "self-dithering" is very high if a noise shaper is used that "hides the noise behind the signal".

I don't understand. Why would you be dithering at the "end of the playback side"?

As for LossyWav: I think dithering is neither appropriate nor necessary. The probability of the signal being "self-dithering" is very high if a noise shaper is used that "hides the noise behind the signal".

It's possible that "dithering" means something different to you.

For example, playing a "dithered" lossyFLAC with foobar2000 and let the output dithering to 16-bit, which is possible with volue adjustment and the foobar2000 uses float point for internal processing. There will be two dither processings. I wonder if that would cause some negative effect in terms of quality.