Revised LossyFLAC6_x.m - no pollution of audio data when removing bits, floor rather than round used in determining min_bin.
lossyWAV alpha v0.3.1 attached.
lossyWAV alpha v0.3.1 : WAV file bit depth reduction by 2Bdecided.
Transcoded by Nick.C & Halb27 from a script, www.hydrogenaudio.org
lossyWav usage: <input wav file> <options>
Options:
-1, -2 or -3 quality level (1:overkill, 2:default, 3:compact)
-cbs <n> analysis codec_block_size (512<=n<=4608, default=576 bytes)
(should match codec block size used in target compression codec)
-o <folder> destination folder for the output file
-dither <n> dither selection, 0<=n<=2, default=0. 0=no dither; 1=rectangular
dither; 2=triangular dither.
-clipping <n> clipping prevention selection, 0<=n<=1, default=0. 0=none;
1=fixed clipping prevention amplitude reduction, taking into
account dither amplitude (if any).
-vsfl select variable spreading function lengths
(sfl = number of fft bins averaged during convolution of fft
results. short fft = short sfl, long fft = long sfl)
-wsf select weighted spreading functions.
(weighted average of fft bins during convolution of fft results
weighted towards lower frequency fft bins, 5/8:3/8)
-nts <n> noise_threshold_shift=n (-15.0<=n<=0.0, default -1.5dB)
(reduces overall bits to remove)
-overlap <n> fft_overlap = fft_length/n (2<=n<=8, default=2)
(increases number of fft analyses per codec block)
-skew <n> skew results of fft analyses by n dB (0.0<=n<=12.0, default=0.0)
with a (sin-1) shaping over the frequency range 20Hz to 3.7kHz.
(artificially increase low frequency bins to take into account
higher SNR requirements at low frequencies)
-quiet significantly reduce screen output
-nowarn suppress lossyWAV warnings
-detail enable detailled output mode
Options not yet implemented:
-bitdepth <n> forced output bitdepth (16 or 24)
-flac optimizations for use with FLAC
-wv optimizations for use with wavPack
-tak optimizations for use with TAK
Default noise_threshold_shift magnitude reduced (-3.0db to -1.5db) at the same time as the change from round to floor.
Output now *identical*(!) in terms of bits removed per block.
[edit]Default clipping prevention bug report acted upon - v0.3.1 removed, v0.3.1b below.[/edit]