Doing so I wanted to try the 128 sample and 512 sample FFT using a full -spf string but with no effect. Are these FFT lengths reserved to -1?
Not any more. I have implemented a "-fft" parameter which takes a 5 character binary numeric input, each character of which corresponds to a specific fft_length, i.e. character 1 > 64 samples, character 2 > 128 samples, etc, character 5 > 1024 samples. So, the default for -2 would be -fft 10101, for -1 would be 10111.
I have also converted the spread and remove_bits procedures to IA-32 / FP assembly, so there's been a bit of a speed up as well. Incidentally, I found out that the size of the data segment for each unit will adversely affect the program speed if not carefully aligned to 8 or 16 byte boundaries (not exactly sure which).
lossyWAV alpha v0.4.2 attached: Superseded.[!--sizeo:1--][span style=\"font-size:8pt;line-height:100%\"][!--/sizeo--]lossyWAV alpha v0.4.2 : WAV file bit depth reduction method by 2Bdecided.
Delphi implementation by Nick.C from a Matlab script, www.hydrogenaudio.org
Usage : lossyWAV <input wav file> <options>
Example : lossyWAV musicfile.wav
Quality Options:
-1 extreme quality [4xFFT] (-cbs 1024 -nts -3.0 -skew 30 -snr 24
-spf 11124-ZZZZZ-11225-11225-11236 -fft 10111)
-2 default quality [3xFFT] (-cbs 1024 -nts -1.5 -skew 24 -snr 18
-spf 11235-ZZZZZ-11336-ZZZZZ-1234D -fft 10101)
-3 compact quality [3xFFT] (-cbs 512 -nts -0.5 -skew 18 -snr 12
-spf 11235-ZZZZZ-11336-ZZZZZ-1234D -fft 10101)
-o <folder> destination folder for the output file
-force forcibly over-write output file if it exists; default=off
Advanced / System Options:
-nts <n> set noise_threshold_shift to n dB (-18dB<=n<=0dB)
(reduces overall bits to remove by 1 bit for every 6.0206dB)
-snr <n> set minimum average signal to added noise ratio to n dB;
(0dB<=n<=48dB)
-skew <n> skew fft analysis results by n dB (0db<=n<=48db) in the
frequency range 20Hz to 3.45kHz
-cbs <n> set codec block size to n samples (512<=n<=4608, n mod 32=0)
-fft <5xchr> select fft lengths to use in analysis (1=on, 0=off)
from 64, 128, 256, 512 & 1024 samples, e.g. 01001 = 128,1024
-overlap enable conservative fft overlap method; default=off
-spf <5x5chr> manually input the 5 spreading functions as 5 x 5 characters;
These correspond to FFTs of 64, 128, 256, 512 & 1024 samples;
e.g. 44444-44444-44444-44444-44444 (Characters must be one of
1 to 9 and A to Z (zero excluded).
-clipping disable clipping prevention by iteration; default=off
-dither dither output using triangular dither; default=off
-quiet significantly reduce screen output
-nowarn suppress lossyWAV warnings
-detail enable detailled output mode
-below set process priority to below normal.
-low set process priority to low.
Special thanks:
Dr. Jean Debord for the use of TPMAT036 uFFT & uTypes units for FFT analysis.
Halb27 @ www.hydrogenaudio.org for donation and maintenance of the wavIO unit.
[/size]As a quick test, I ran my 52 sample set through at "-3 -fft 00100 -skew 36 -cbs 1024", which gives about a 3x speed increase (over -2):
WAV: 121.53MB; FLAC: 68.08MB, 790.6kbps; lossyWAV -2: 44.16MB, 512.8kbps, 46 secs.; lossyWAV -3 -fft 00100 -skew 36 -cbs 1024: 41.30MB, 479.6kbps, 16secs.
Surprisingly(?), this produces output which is satisfactory for my preferred DAP, in a third of the time and 94% of the diskspace.