<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.hydrogenaudio.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Halb27</id>
	<title>Hydrogenaudio Knowledgebase - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.hydrogenaudio.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Halb27"/>
	<link rel="alternate" type="text/html" href="https://wiki.hydrogenaudio.org/index.php?title=Special:Contributions/Halb27"/>
	<updated>2026-04-29T03:43:12Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.44.2</generator>
	<entry>
		<id>https://wiki.hydrogenaudio.org/index.php?title=LossyWAV&amp;diff=18367</id>
		<title>LossyWAV</title>
		<link rel="alternate" type="text/html" href="https://wiki.hydrogenaudio.org/index.php?title=LossyWAV&amp;diff=18367"/>
		<updated>2008-04-13T20:59:17Z</updated>

		<summary type="html">&lt;p&gt;Halb27: /* Quality presets */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Software Infobox&lt;br /&gt;
| name = lossyWAV&lt;br /&gt;
| screenshot = &lt;br /&gt;
| caption = &lt;br /&gt;
| maintainer = [http://www.hydrogenaudio.org/forums/index.php?showuser=42400 Nick.C]&lt;br /&gt;
| stable_release = v0.9.2 RC3&lt;br /&gt;
| preview_release = &lt;br /&gt;
| operating_system = [[Wikipedia:Microsoft Windows|Windows]]&lt;br /&gt;
| use = [[Wikipedia:Digital signal processing|Digital signal processing]]&lt;br /&gt;
| license = [[Wikipedia:GNU Lesser General Public License|GNU LGPL]]&lt;br /&gt;
| website = [http://www.hydrogenaudio.org/forums/index.php?showtopic=56129 Hydrogenaudio]&lt;br /&gt;
}}&lt;br /&gt;
lossyWAV is a new free lossy pre-processor for [[PCM]] audio contained in the [[WAV]] file format. It reduces [[Wikipedia:Audio bit depth|bit depth]] of the input signal, which, when used in conjunction with certain lossless codecs, reduces the bitrate of the encoded file significantly compared to unpreprocessed compression. &lt;br /&gt;
lossyWAV&#039;s primary goal is to maintain [[transparency]] with a high degree of confidence when processing any audio data.&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
lossyFLAC is an idea started by [http://www.hydrogenaudio.org/forums/index.php?showuser=409 2Bdecided] at Hydrogenaudio, utilising the wasted bits feature of the FLAC lossless codec with the aim of transparently reducing audio bit depth (making some lower significant bits (LSB&#039;s) zero), consequently taking advantage of FLAC&#039;s detection of consistently-zeroed lower significant bits within each single frame and significantly increasing coding efficiency.[http://www.hydrogenaudio.org/forums/index.php?s=&amp;amp;showtopic=55522&amp;amp;view=findpost&amp;amp;p=498179] In this way the user can enjoy audio encoded using the same codec (which may be all important from a hardware compatibility perspective) at a reduced bitrate compared to the lossless version.&lt;br /&gt;
&lt;br /&gt;
[http://www.hydrogenaudio.org/forums/index.php?showuser=42400 Nick.C] ported the original [[Wikipedia:MATLAB|MATLAB]] implementation to [[Wikipedia:Borland Delphi|Delphi]] (Many thanks [[Wikipedia:CodeGear|CodeGear]] for Turbo Explorer!!) with a liberal sprinkling of [[Wikipedia:IA-32|IA-32]] and [[Wikipedia:x87|x87]] Assembly Language for speed.&lt;br /&gt;
&lt;br /&gt;
Subsequently, lossyFLAC proved itself to work with other lossless codecs, so the application name was changed to lossyWAV. &lt;br /&gt;
&lt;br /&gt;
Since then, Nick.C has heavily developed and built upon lossyWAV, with valuable tuning performed by [http://www.hydrogenaudio.org/forums/index.php?showuser=25015 halb27] at Hydrogenaudio.&lt;br /&gt;
&lt;br /&gt;
==Indicative bitrate reduction==&lt;br /&gt;
It must be stressed that lossyWAV is a pure [[variable bit rate]] pre-processor. Bits-to-remove from the audio data are calculated on a block-by-block basis (codec-block length = 512 samples, 11.6msec @ 44.1kHz) using overlapping [[fast Fourier transform]] (FFT) analyses of at least two lengths (default quality preset (-2) = 64, 256 &amp;amp; 1024 [[Sampling %28signal processing%29|samples]]). After some manipulation, the results of each FFT analysis for a specific codec-block are then grouped and the minimum value used to determine bits-to-remove for the whole codec-block. Bit removal adds noise to the output, however the added noise has been pre-calculated and its level will be at or below the noise floor of the codec_block in question. Each sample in the codec-block is then rounded such that the first &amp;lt;bits-to-remove&amp;gt; lsb&#039;s are zero. In this way the wasted bits feature of [[FLAC]] et al is exploited.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!lossyWAV Test Set&lt;br /&gt;
!FLAC -8&lt;br /&gt;
!Version&lt;br /&gt;
!lossyWAV -1&lt;br /&gt;
!lossyWAV -2&lt;br /&gt;
!lossyWAV -3&lt;br /&gt;
!lossyWAV -4&lt;br /&gt;
!lossyWAV -5&lt;br /&gt;
!lossyWAV -6&lt;br /&gt;
!lossyWAV -7&lt;br /&gt;
|-&lt;br /&gt;
!10 Album Test Average&lt;br /&gt;
| 850kbps&lt;br /&gt;
| v0.6.7 RC2&lt;br /&gt;
| 494kbps&lt;br /&gt;
| 450kbps&lt;br /&gt;
| 402kbps&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
|-&lt;br /&gt;
!53 sample &amp;quot;problem&amp;quot; set                &lt;br /&gt;
| 784kbps &lt;br /&gt;
| v0.6.7 RC2&lt;br /&gt;
| 558kbps &lt;br /&gt;
| 515kbps &lt;br /&gt;
| 462kbps&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
|-&lt;br /&gt;
!10 Album Test Average&lt;br /&gt;
| 850kbps&lt;br /&gt;
| v0.9.2 RC3&lt;br /&gt;
| 479kbps&lt;br /&gt;
| 425kbps&lt;br /&gt;
| 375kbps&lt;br /&gt;
| 352kbps&lt;br /&gt;
| 334kbps&lt;br /&gt;
| 318kbps&lt;br /&gt;
| 306kbps&lt;br /&gt;
|-&lt;br /&gt;
!53 sample &amp;quot;problem&amp;quot; set                &lt;br /&gt;
| 784kbps &lt;br /&gt;
| v0.9.2 RC3&lt;br /&gt;
| 543kbps &lt;br /&gt;
| 494kbps &lt;br /&gt;
| 433kbps&lt;br /&gt;
| 408kbps&lt;br /&gt;
| 385kbps&lt;br /&gt;
| 365kbps&lt;br /&gt;
| 348kbps&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==File identification==&lt;br /&gt;
lossyWAV-processed WAV files are named with a double filename extension, .lossy.wav, to make them instantly identifiable. e.g. &amp;quot;.lossy.flac&amp;quot; would indicate an audio file which was processed using lossyWAV, and subsequently encoded using FLAC.[http://www.hydrogenaudio.org/forums/index.php?s=&amp;amp;showtopic=55522&amp;amp;view=findpost&amp;amp;p=498559]&lt;br /&gt;
&lt;br /&gt;
From beta v0.6.1, the -correction parameter is used when processing to create a correction file which is named with the .lwcdf.wav double filename extension. When &amp;quot;added&amp;quot; to the corresponding .lossy.wav, using the -merge parameter, the original file will be reconstituted.&lt;br /&gt;
&lt;br /&gt;
Combinations of lossyWAV with each specific encoder are referred to as lossy&#039;&#039;&#039;X&#039;&#039;&#039;, where &#039;&#039;&#039;X&#039;&#039;&#039; is an abbreviation of the lossless codec name. Combination names are listed in the &amp;quot;[[LossyWAV#Known supported codecs|known supported codecs]]&amp;quot; section below.&lt;br /&gt;
&lt;br /&gt;
From beta v0.5.9, lossyWAV inserts a variable-length FACT chunk into the WAV file immediately after the FMT chunk. This takes the form:&amp;lt;pre&amp;gt;fact/&amp;lt;size&amp;gt;/lossyWAV beta vx.y.z : dd/mm/yyyy hh:mm:ss&lt;br /&gt;
-2 -cbs 512 -nts 0.00 -snr 21.00 -skew 36.00&lt;br /&gt;
-spf 22224-22235-22336-12347-12358 -fft 10101&amp;lt;/pre&amp;gt;Where the version, date &amp;amp; time and user settings are copied. Additionally, if a lossyWAV FACT chunk is found in a file, the processing will be halted (exit code = 16) to prevent re-processing of an already processed file.&lt;br /&gt;
&lt;br /&gt;
The -check parameter can be used to determine whether a file has previously been processed without trying to process it, exit code = 16 if already processed; exit code = 0 if not.&lt;br /&gt;
&lt;br /&gt;
==Quality presets==&lt;br /&gt;
*-1: Highest quality preset, disc space-saving alternative to lossless archiving for large audio collections.&lt;br /&gt;
*-2: Default preset; a compromise between -1 and -3.&lt;br /&gt;
*-3: High quality preset for usage on a compatible [[Wikipedia:Digital audio player|DAP]], approx. 400kbps for &amp;quot;normal&amp;quot; music. [http://www.hydrogenaudio.org/forums/index.php?s=&amp;amp;showtopic=56129&amp;amp;view=findpost&amp;amp;p=531316] &lt;br /&gt;
&lt;br /&gt;
All tuning has been performed on quality preset -3 with -2 and -1 being more conservative. Quality preset -3 is generally accepted to be (and from testing so far is) transparent. If you find a track which -3 fails to achieve transparency after processing, please post a sample (no more than 30 seconds) in the development thread.&lt;br /&gt;
&lt;br /&gt;
Apart from the quality presets the -nts (noise threshold shift) parameter is the most important parameter to control quality. Without noise threshold shifting (-nts 0) the number of bits to be removed is computed in a theoretically optimal way. -nts 0 is defaulted when using quality preset -3.&lt;br /&gt;
&lt;br /&gt;
In order to be defensive a negative -nts value can be chosen up to -48. -nts -2 is defaulted when using quality preset -2, and -1 defaults to -nts -4. For archiving purposes and/or very cautious users even more conservative values may be of interest.&lt;br /&gt;
&lt;br /&gt;
Because of internal precautions in addition to 2Bdecided&#039;s principles experience so far tells us that a small positive -nts value keeps the encoding transparent or brings up only subtle differences. This way file size can be decreased.&lt;br /&gt;
&lt;br /&gt;
==Supported input formats==&lt;br /&gt;
*[[WAV]]: 4-bit to 32-bit integer; sample rate &amp;amp;ge; 32kHz [[Pulse Code Modulation|PCM]]. Very high sample rates (&amp;amp;gt;48kHz) have not been extensively tested. Tunings have been focussed on 16-bit, 44.1kHz samples (i.e. [[Wikipedia:Red Book (audio CD standard)|CD]] PCM).&lt;br /&gt;
&lt;br /&gt;
==Codec compatibility==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!Codec&lt;br /&gt;
!Supported&lt;br /&gt;
!Encoder parameters&lt;br /&gt;
!Combination name&lt;br /&gt;
|-&lt;br /&gt;
! [[Apple Lossless]]&lt;br /&gt;
| No&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
|-&lt;br /&gt;
! [[Free Lossless Audio Codec|FLAC]]&lt;br /&gt;
| Yes&lt;br /&gt;
| -&#039;&#039;&#039;5&#039;&#039;&#039; -&#039;&#039;&#039;b&#039;&#039;&#039; 512 --&#039;&#039;&#039;keep-foreign-metadata&#039;&#039;&#039;&lt;br /&gt;
| lossy&#039;&#039;&#039;FLAC&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
! [[Lossless Audio|LA]]&lt;br /&gt;
| No&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
|-&lt;br /&gt;
! [[Lossless Predictive Audio Compression|LPAC]]&lt;br /&gt;
| Yes&lt;br /&gt;
| -&#039;&#039;&#039;b&#039;&#039;&#039;512&lt;br /&gt;
| lossy&#039;&#039;&#039;LPAC&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
! [[Monkey&#039;s Audio]]&lt;br /&gt;
| No&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
|-&lt;br /&gt;
! [[Wikipedia:Audio Lossless Coding|MPEG-4 ALS]]&lt;br /&gt;
| Yes&lt;br /&gt;
| -&#039;&#039;&#039;l&#039;&#039;&#039; -&#039;&#039;&#039;n&#039;&#039;&#039;512&lt;br /&gt;
| lossy&#039;&#039;&#039;ALS&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
! [[OptimFROG]]&lt;br /&gt;
| No&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
|-&lt;br /&gt;
! [[TAK]]&lt;br /&gt;
| Yes&lt;br /&gt;
| -&#039;&#039;&#039;fsl&#039;&#039;&#039;512&lt;br /&gt;
| lossy&#039;&#039;&#039;TAK&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
! [[Wikipedia:TTA (codec)|TTA]]&lt;br /&gt;
| No&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
|-&lt;br /&gt;
! [[WavPack]]&lt;br /&gt;
| Yes&lt;br /&gt;
| --&#039;&#039;&#039;blocksize&#039;&#039;&#039;=512&lt;br /&gt;
| lossy&#039;&#039;&#039;WV&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
! [[Windows Media Audio#Windows Media Audio Lossless|WMA Lossless]]&lt;br /&gt;
| Yes&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| lossy&#039;&#039;&#039;WMALSL&#039;&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
There is also [http://www.hometheaterhifi.com/volume_8_4/dvd-benchmark-part-6-dvd-audio-11-2001.html#Meridian%20Lossless%20Packing%20(MLP)%20in%20a%20Nutshell evidence] &amp;amp;mdash; so-called &amp;quot;Bit Shifting&amp;quot; &amp;amp;mdash; to suggest that lossyWAV may work with [[Wikipedia:Meridian Lossless Packing|MLP]], but this remains untested due to prohibitive prices of encoders.&lt;br /&gt;
&lt;br /&gt;
A comparison of portable media players is [[Wikipedia:Comparison of portable media players#Audio Formats|here]], which shows FLAC and WMA Lossless compatibility among listed players.&lt;br /&gt;
Any player supported by [http://www.rockbox.org Rockbox] can use FLAC or WavPack files after installing Rockbox.&lt;br /&gt;
&lt;br /&gt;
==Using lossyWAV==&lt;br /&gt;
===Application settings===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
lossyWAV v0.9.2 RC3, Copyright (C) 2007,2008 Nick Currie.&lt;br /&gt;
lossyWAV is issued with NO WARRANTY WHATSOEVER and is free software.&lt;br /&gt;
&lt;br /&gt;
Usage   : lossyWAV &amp;lt;input wav file&amp;gt; &amp;lt;options&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example : lossyWAV musicfile.wav&lt;br /&gt;
&lt;br /&gt;
Quality Options:&lt;br /&gt;
&lt;br /&gt;
-1/1a/1b       quality preset 1, circa 480kbps for 44.1khz, 2ch;&lt;br /&gt;
-2/2a/2b/2c    quality preset 2, circa 425kbps for 44.1khz, 2ch [default];&lt;br /&gt;
-3/3a/3b/3c    quality preset 3, circa 375kbps for 44.1khz, 2ch;&lt;br /&gt;
-4/4a/4b/4c    quality preset 4, circa 350kbps for 44.1khz, 2ch;&lt;br /&gt;
-5/5a/5b/5c    quality preset 5, circa 335kbps for 44.1khz, 2ch;&lt;br /&gt;
-6/6a/6b/6c    quality preset 6, circa 320kbps for 44.1khz, 2ch;&lt;br /&gt;
-7/7a/7b/7c    quality preset 7, circa 305kbps for 44.1khz, 2ch;&lt;br /&gt;
               [a/b/c = 1/2/3 extra FFT analyses; default=3,2,2,2,2,2,2(max=5)]&lt;br /&gt;
&lt;br /&gt;
Standard Options:&lt;br /&gt;
&lt;br /&gt;
-o &amp;lt;folder&amp;gt;   destination folder for the output file(s).&lt;br /&gt;
-nts &amp;lt;n&amp;gt;      set noise_threshold_shift to n dB (-48.0dB&amp;lt;=n&amp;lt;=+36.0dB);&lt;br /&gt;
              (-ve values reduce bits to remove, +ve values increase).&lt;br /&gt;
-snr &amp;lt;n&amp;gt;      set minimum average signal to added noise ratio to n dB;&lt;br /&gt;
              (0.0dB&amp;lt;=n&amp;lt;=48.0dB) Increasing value reduces bits to remove.&lt;br /&gt;
-force        forcibly over-write output file if it exists; default=off.&lt;br /&gt;
-check        check if WAV file has already been processed; default=off.&lt;br /&gt;
              errorlevel=16 if already processed, 0 if not.&lt;br /&gt;
-noclips      set allowable number of clips per channel per codec block to 0;&lt;br /&gt;
              default= -1=0,-2=1,-3=2,-4=3,-5=4,-6=5,-7=6.&lt;br /&gt;
-correction   write correction file while processing WAV file; default=off.&lt;br /&gt;
-merge        merge existing lossy.wav and lwcdf.wav files.&lt;br /&gt;
-scale &amp;lt;n&amp;gt;    scaling factor from WaveGain / etc; default = 1.000000.&lt;br /&gt;
&lt;br /&gt;
System Options:&lt;br /&gt;
&lt;br /&gt;
-quiet        significantly reduce screen output.&lt;br /&gt;
-nowarn       suppress lossyWAV warnings.&lt;br /&gt;
-detail       enable detailed output mode&lt;br /&gt;
&lt;br /&gt;
-below        set process priority to below normal.&lt;br /&gt;
-low          set process priority to low.&lt;br /&gt;
&lt;br /&gt;
Special thanks:&lt;br /&gt;
&lt;br /&gt;
David Robinson for the method itself and motivation to implement it.&lt;br /&gt;
Don Cross for the original Pascal source for the FFT algorithm used.&lt;br /&gt;
Horst Albrecht for valuable tuning input and feedback.&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Example Foobar2000 converter settings===&lt;br /&gt;
[[Image:Foobar2000_Converter_Settings.PNG]]&lt;br /&gt;
&lt;br /&gt;
===Example flossy3.bat file called from Foobar2000===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@echo off&lt;br /&gt;
z:\bin\lossyWAV %1 %3 %4 %5 %6 %7 %8 %9 -below -nowarn -quiet&lt;br /&gt;
z:\bin\flac.exe -5 -f -b 512 &amp;quot;%~N1.lossy.wav&amp;quot; -o&amp;quot;%~N2.flac&amp;quot; &lt;br /&gt;
del &amp;quot;%~N1.lossy.wav&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Frequently asked questions==&lt;br /&gt;
*&#039;&#039;&#039;Question:&#039;&#039;&#039; Is it [[Variable Bitrate|VBR]]?&lt;br /&gt;
*&#039;&#039;&#039;Short answer:&#039;&#039;&#039; Yes.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Question:&#039;&#039;&#039; Is it [[transparency|transparent]]?&lt;br /&gt;
*&#039;&#039;&#039;Short answer:&#039;&#039;&#039; Almost certainly.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Question:&#039;&#039;&#039; Is it [[lossless]]?&lt;br /&gt;
*&#039;&#039;&#039;Short answer:&#039;&#039;&#039; No.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Question:&#039;&#039;&#039; Will it ever have a [[Constant Bitrate|CBR]] mode?&lt;br /&gt;
*&#039;&#039;&#039;Short answer:&#039;&#039;&#039; No.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Question:&#039;&#039;&#039; Why should I use this?&lt;br /&gt;
*&#039;&#039;&#039;Answer:&#039;&#039;&#039;&lt;br /&gt;
:*high quality&lt;br /&gt;
:*extremely low chance of audible [[artifact|artefacts]]&lt;br /&gt;
:*reasonable [[bitrate]]s&lt;br /&gt;
:*usable with unmodified, established lossless formats.&lt;br /&gt;
&lt;br /&gt;
==External links==&lt;br /&gt;
*[http://www.hydrogenaudio.org/forums/index.php?showtopic=56129 Current development thread] You will find the latest release candidate and latest beta version in post #1 of this thread.&lt;br /&gt;
*[http://www.hydrogenaudio.org/forums/index.php?showtopic=55522&amp;amp;st=0 Original lossyFLAC thread] Where David Robinson (Replay Gain developer) introduces the method and a MATLAB implementation.&lt;br /&gt;
&lt;br /&gt;
[[Category:Software]]&lt;br /&gt;
[[Category:Encoder/Decoder]]&lt;br /&gt;
[[Category:Lossy]]&lt;/div&gt;</summary>
		<author><name>Halb27</name></author>
	</entry>
	<entry>
		<id>https://wiki.hydrogenaudio.org/index.php?title=LossyWAV&amp;diff=18168</id>
		<title>LossyWAV</title>
		<link rel="alternate" type="text/html" href="https://wiki.hydrogenaudio.org/index.php?title=LossyWAV&amp;diff=18168"/>
		<updated>2008-01-13T22:59:11Z</updated>

		<summary type="html">&lt;p&gt;Halb27: /* Quality presets */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Software Infobox&lt;br /&gt;
| name = lossyWAV&lt;br /&gt;
| screenshot = &lt;br /&gt;
| caption = &lt;br /&gt;
| maintainer = [http://www.hydrogenaudio.org/forums/index.php?showuser=42400 Nick.C]&lt;br /&gt;
| stable_release = v0.6.4 RC1&lt;br /&gt;
| preview_release = &lt;br /&gt;
| operating_system = [[Wikipedia:MS-DOS|MS-DOS]]&lt;br /&gt;
| use = [[Wikipedia:Digital signal processing|Digital signal processing]]&lt;br /&gt;
| license = [[Wikipedia:LGPL|LGPL license]]&lt;br /&gt;
| website = [http://www.hydrogenaudio.org/forums/index.php?showtopic=56129 Hydrogenaudio]&lt;br /&gt;
}}&lt;br /&gt;
lossyWAV is a new free lossy pre-processor for [[PCM]] audio contained in the [[WAV]] file format. It reduces [[Wikipedia:Audio bit depth|bit depth]] of the input signal, which, when used in conjunction with certain lossless codecs, reduces the bitrate of the encoded file significantly compared to unpreprocessed compression. &lt;br /&gt;
lossyWAV&#039;s primary goal is to maintain [[transparency]] with a high degree of confidence when processing any audio data.&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
lossyFLAC is an idea started by [http://www.hydrogenaudio.org/forums/index.php?showuser=409 2Bdecided] at hydrogenaudio, utilising the wasted bits feature of the FLAC lossless codec with the aim of transparently reducing audio bit depth (making some lower significant bits (LSB&#039;s) zero), consequently taking advantage of FLAC&#039;s detection of consistently zeroed lower significant bits within each single frame and significantly increasing coding efficiency.[http://www.hydrogenaudio.org/forums/index.php?s=&amp;amp;showtopic=55522&amp;amp;view=findpost&amp;amp;p=498179] In this way the user can enjoy audio encoded using the same codec (which may be all important from a hardware compatibility perspective) at a reduced bitrate compared to the lossless version.&lt;br /&gt;
&lt;br /&gt;
[http://www.hydrogenaudio.org/forums/index.php?showuser=42400 Nick.C] ported the original [[Wikipedia:MATLAB|MATLAB]] implementation to [[Wikipedia:Borland Delphi|Delphi]] (Many thanks [[Wikipedia:CodeGear|CodeGear]] for Turbo Explorer!!) with a liberal sprinkling of [[Wikipedia:IA-32|IA-32]] and [[Wikipedia:x87|x87]] Assembly Language for speed.&lt;br /&gt;
&lt;br /&gt;
Subsequently, lossyFLAC proved itself to work with other lossless codecs, so the application name was changed to lossyWAV. &lt;br /&gt;
&lt;br /&gt;
Since then, Nick.C has heavily developed and built upon lossyWAV, with valuable tuning performed by [http://www.hydrogenaudio.org/forums/index.php?showuser=25015 halb27] at hydrogenaudio.&lt;br /&gt;
&lt;br /&gt;
==Indicative bitrate reduction==&lt;br /&gt;
It must be stressed that lossyWAV is a pure [[Wikipedia:variable bit rate|variable bit rate]] pre-processor. Bits-to-remove from the audio data are calculated on a block-by-block basis (default codec-block length = 512 samples) using overlapping [[Wikipedia:fast Fourier transform|fast Fourier transform]] (FFT) analyses of at least two lengths (default = 64 &amp;amp; 1024 [[Wikipedia:Sampling %28signal processing%29|samples]]). After some manipulation, the results of each FFT analysis for a specific codec-block are then grouped and the minimum value used to determine bits-to-remove for the whole codec-block. Each sample in the codec-block is then rounded such that the first &amp;lt;bits-to-remove&amp;gt; LSB&#039;s are zero. In this way the wasted bits feature of [[Wikipedia:FLAC|FLAC]] et al is exploited.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|+ &#039;&#039;&#039;Conversion using lossyWAV beta v0.5.8, [[Wikipedia:FLAC|FLAC]] -8&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
!lossyWAV Test Set&lt;br /&gt;
!FLAC -8&lt;br /&gt;
!lossyWAV -1&lt;br /&gt;
!lossyWAV -2&lt;br /&gt;
!lossyWAV -3&lt;br /&gt;
|-&lt;br /&gt;
!10 Album Test Average                                &lt;br /&gt;
| 850kbps &lt;br /&gt;
| 480kbps &lt;br /&gt;
| 426kbps &lt;br /&gt;
| 376kbps&lt;br /&gt;
|-&lt;br /&gt;
!53 sample &amp;quot;problem&amp;quot; set                &lt;br /&gt;
| 784kbps &lt;br /&gt;
| 543kbps &lt;br /&gt;
| 491kbps &lt;br /&gt;
| 434kbps&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|+ &#039;&#039;&#039;Large Foobar2000 Conversion: (lossyWAV (beta v0.6.2) -3; [[Wikipedia:FLAC|FLAC]] -5 -b 512)&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
!Album&lt;br /&gt;
!FLAC -8&lt;br /&gt;
!lossyWAV -3&lt;br /&gt;
|-&lt;br /&gt;
!3686 Tracks; 290 Discs; 100913MB &amp;gt; 42391MB (42%)&lt;br /&gt;
| 884kbps &lt;br /&gt;
| 371kbps &lt;br /&gt;
|}&lt;br /&gt;
The 3686 track conversion took 7 hours 15 minutes on an Intel C2D @ 3GHZ, 2GB RAM.&lt;br /&gt;
&lt;br /&gt;
==File identification==&lt;br /&gt;
lossyWAV-processed WAV files are named with a double filename extension, .lossy.wav, to make them instantly identifiable. e.g. &amp;quot;.lossy.flac&amp;quot; would indicate an audio file which was processed using lossyWAV, and subsequently encoded using FLAC.[http://www.hydrogenaudio.org/forums/index.php?s=&amp;amp;showtopic=55522&amp;amp;view=findpost&amp;amp;p=498559]&lt;br /&gt;
&lt;br /&gt;
From beta v0.6.1, the -correction parameter is used when processing to create a correction file which is named with the .lwcdf.wav double filename extension. When &amp;quot;added&amp;quot; to the corresponding .lossy.wav, using a not yet implemented parameter of lossyWAV, the original file will be reconstituted.&lt;br /&gt;
&lt;br /&gt;
Combinations of lossyWAV with each specific encoder are referred to as lossy&#039;&#039;&#039;X&#039;&#039;&#039;, where &#039;&#039;&#039;X&#039;&#039;&#039; is an abbreviation of the lossless codec name. Combination names are listed in the &amp;quot;[[LossyWAV#Known supported codecs|known supported codecs]]&amp;quot; section below.&lt;br /&gt;
&lt;br /&gt;
From beta v0.5.9, lossyWAV inserts a variable length FACT chunk into the WAV file immediately after the FMT chunk. This takes the form:&amp;lt;pre&amp;gt;fact/&amp;lt;size&amp;gt;/lossyWAV beta vx.y.z : dd/mm/yyyy hh:mm:ss&lt;br /&gt;
-2 -cbs 512 -nts 0.00 -snr 21.00 -skew 36.00&lt;br /&gt;
-spf 22224-22235-22336-12347-12358 -fft 10101&amp;lt;/pre&amp;gt;Where the version, date &amp;amp; time and user settings are copied. Additionally, if a lossyWAV FACT chunk is found in a file, the processing will be halted (exit code = 16) to prevent re-processing of an already processed file.&lt;br /&gt;
&lt;br /&gt;
The -check parameter can be used to determine whether a file has previously been processed without trying to process it, exit code = 16 if already processed; exit code = 0 if not.&lt;br /&gt;
&lt;br /&gt;
==Quality presets==&lt;br /&gt;
*-1: Highest quality preset, disc space-saving alternative to lossless archiving for large audio collections.&lt;br /&gt;
*-2: Default preset; a compromise between -1 and -3.&lt;br /&gt;
*-3: High quality preset for usage on a compatible [[Wikipedia:Digital audio player|DAP]], approx. 370kbps for &amp;quot;normal&amp;quot; music. [http://www.hydrogenaudio.org/forums/index.php?s=&amp;amp;showtopic=56129&amp;amp;view=findpost&amp;amp;p=531316] &lt;br /&gt;
&lt;br /&gt;
All tuning has been performed on quality preset -3 with -2 and -1 being more conservative. Quality preset -3 is generally accepted to be (and from testing so far is) transparent. If you find a track which -3 fails to achieve transparency after processing, please post a sample (no more than 30 seconds) in the development thread.&lt;br /&gt;
&lt;br /&gt;
Apart from the quality presets the -nts (noise threshold shift) parameter is the most important parameter to control quality. Without noise threshold shifting (-nts 0) the number of bits to be removed is computed in a theoretically optimal way. -nts 0 is defaulted when using quality preset -3.&lt;br /&gt;
&lt;br /&gt;
In order to be defensive a negative -nts value can be chosen up to -48. -nts -2 is defaulted when using quality preset -2, and -1 defaults to -nts -4. For archiving purposes and/or very cautious users even more conservative values may be of interest.&lt;br /&gt;
&lt;br /&gt;
Because of internal precautions in addition to 2Bdecided&#039;s principles experience so far tells us that a small positive -nts value keeps the encoding transparent or brings up only subtle differences. This way file size can be decreased. A -nts value of more than 10  however is not recommended.&lt;br /&gt;
&lt;br /&gt;
==Supported input formats==&lt;br /&gt;
*[[WAV]]: 16-bit, 24-bit; sample rate &amp;amp;ge; 32kHz [[Pulse Code Modulation|PCM]]. Very high sample rates (&amp;amp;gt;48kHz) have not been extensively tested. Tunings have been focussed on 16-bit, 44.1kHz samples (i.e. [[Wikipedia:Red Book (audio CD standard)|CD]] PCM).&lt;br /&gt;
&lt;br /&gt;
==Codec compatibility==&lt;br /&gt;
===Known supported codecs===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|+ &#039;&#039;&#039;Recommended settings&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
!Codec&lt;br /&gt;
!lossyWAV parameters&lt;br /&gt;
!Encoder parameters&lt;br /&gt;
!Combination name&lt;br /&gt;
|-&lt;br /&gt;
![[Free Lossless Audio Codec|FLAC]]&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| -&#039;&#039;&#039;5&#039;&#039;&#039; -&#039;&#039;&#039;b&#039;&#039;&#039; 512 --&#039;&#039;&#039;keep-foreign-metadata&#039;&#039;&#039;[http://www.hydrogenaudio.org/forums/index.php?s=&amp;amp;showtopic=56129&amp;amp;view=findpost&amp;amp;p=533689]&lt;br /&gt;
|lossy&#039;&#039;&#039;FLAC&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
![[Wikipedia:Lossless Predictive Audio Compression|LPAC]]&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| -&#039;&#039;&#039;b&#039;&#039;&#039;512&lt;br /&gt;
|lossy&#039;&#039;&#039;LPAC&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
![[Wikipedia:Audio Lossless Coding|MPEG-4 ALS]]&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| -&#039;&#039;&#039;l&#039;&#039;&#039; -&#039;&#039;&#039;n&#039;&#039;&#039;512&lt;br /&gt;
|lossy&#039;&#039;&#039;ALS&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
![[TAK]]&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| -&#039;&#039;&#039;fsl&#039;&#039;&#039;512&lt;br /&gt;
|lossy&#039;&#039;&#039;TAK&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
![[WavPack]]&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| --&#039;&#039;&#039;blocksize&#039;&#039;&#039;=512&lt;br /&gt;
|lossy&#039;&#039;&#039;WV&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
![[Wikipedia:Windows Media Audio#Windows Media Audio Lossless|WMA Lossless]]&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
|lossy&#039;&#039;&#039;WMALSL&#039;&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
There is also [http://www.hometheaterhifi.com/volume_8_4/dvd-benchmark-part-6-dvd-audio-11-2001.html#Meridian%20Lossless%20Packing%20(MLP)%20in%20a%20Nutshell evidence] &amp;amp;mdash; so-called &amp;quot;Bit Shifting&amp;quot; &amp;amp;mdash; to suggest that lossyWAV may work with [[Wikipedia:Meridian Lossless Packing|MLP]], but this remains untested due to prohibitive prices of encoders.&lt;br /&gt;
&lt;br /&gt;
A comparison of portable media players is [[Wikipedia:Comparison of portable media players#Audio Formats|here]], which shows FLAC and WMA Lossless compatibility among listed players.&lt;br /&gt;
Any player supported by [http://www.rockbox.org Rockbox] can use FLAC or wavPack files after installing Rockbox.&lt;br /&gt;
&lt;br /&gt;
===Known unsupported codecs===&lt;br /&gt;
*[[ALAC]]&lt;br /&gt;
*[[Lossless Audio|LA]]&lt;br /&gt;
*[[Monkey&#039;s Audio]]&lt;br /&gt;
*[[OptimFROG]]&lt;br /&gt;
*[[TTA]]&lt;br /&gt;
&lt;br /&gt;
==Using lossyWAV==&lt;br /&gt;
===Application settings===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
lossyWAV v0.6.4 RC1, Copyright (C) 2007,2008 Nick Currie. Portions (C) 1996&lt;br /&gt;
Don Cross. lossyWAV is issued with NO WARRANTY WHATSOEVER and is free software.&lt;br /&gt;
&lt;br /&gt;
Usage   : lossyWAV &amp;lt;input wav file&amp;gt; &amp;lt;options&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example : lossyWAV musicfile.wav&lt;br /&gt;
&lt;br /&gt;
Quality Options:&lt;br /&gt;
&lt;br /&gt;
-1            highest quality preset, circa 480kbps for 44.1khz, 2ch;&lt;br /&gt;
-2            default settings, circa 425kbps for 44.1khz, 2ch;&lt;br /&gt;
-3            DAP preset, circa 370kbps for 44.1khz, 2ch.&lt;br /&gt;
&lt;br /&gt;
Standard Options:&lt;br /&gt;
&lt;br /&gt;
-o &amp;lt;folder&amp;gt;   destination folder for the output file(s).&lt;br /&gt;
-nts &amp;lt;n&amp;gt;      set noise_threshold_shift to n dB (-48.0dB&amp;lt;=n&amp;lt;=+12.0dB);&lt;br /&gt;
              (-ve values reduce bits to remove, +ve values increase).&lt;br /&gt;
-snr &amp;lt;n&amp;gt;      set minimum average signal to added noise ratio to n dB;&lt;br /&gt;
              (0.0dB&amp;lt;=n&amp;lt;=48.0dB) Increasing value reduces bits to remove.&lt;br /&gt;
-force        forcibly over-write output file if it exists; default=off.&lt;br /&gt;
-check        check if WAV file has already been processed. default=off;&lt;br /&gt;
              errorlevel=16 if already processed, 0 if not.&lt;br /&gt;
-correction   write correction file while processing WAV file. default=off;&lt;br /&gt;
&lt;br /&gt;
System Options:&lt;br /&gt;
&lt;br /&gt;
-quiet        significantly reduce screen output.&lt;br /&gt;
-nowarn       suppress lossyWAV warnings.&lt;br /&gt;
&lt;br /&gt;
-below        set process priority to below normal.&lt;br /&gt;
-low          set process priority to low.&lt;br /&gt;
&lt;br /&gt;
Special thanks:&lt;br /&gt;
&lt;br /&gt;
David Robinson for the method itself and motivation to implement it.&lt;br /&gt;
Don Cross for the original Pascal source for the FFT algorithm used.&lt;br /&gt;
Halb27 @ www.hydrogenaudio.org for valuable tuning input and feedback.&amp;lt;/pre&amp;gt;&lt;br /&gt;
===Example Foobar2000 converter settings===&lt;br /&gt;
[[Image:Foobar2000_Converter_Settings.PNG]]&lt;br /&gt;
&lt;br /&gt;
===Example flossy3.bat file called from Foobar2000===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@echo off&lt;br /&gt;
c:\data_nic\bin\lossyWAV %1 %3 %4 %5 %6 %7 %8 %9 -below -nowarn -quiet&lt;br /&gt;
c:\data_nic\bin\flac.exe -5 -f -b 512 &amp;quot;%~N1.lossy.wav&amp;quot; -o&amp;quot;%~N2.flac&amp;quot; &lt;br /&gt;
del &amp;quot;%~N1.lossy.wav&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Frequently asked questions==&lt;br /&gt;
*&#039;&#039;&#039;Question:&#039;&#039;&#039; Is it [[Variable Bitrate|VBR]]?&lt;br /&gt;
*&#039;&#039;&#039;Short answer:&#039;&#039;&#039; Yes.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Question:&#039;&#039;&#039; Is it [[transparency|transparent]]?&lt;br /&gt;
*&#039;&#039;&#039;Short answer:&#039;&#039;&#039; Almost certainly.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Question:&#039;&#039;&#039; Is it [[lossless]]?&lt;br /&gt;
*&#039;&#039;&#039;Short answer:&#039;&#039;&#039; No.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Question:&#039;&#039;&#039; Why should I use this?&lt;br /&gt;
*&#039;&#039;&#039;Answer:&#039;&#039;&#039;&lt;br /&gt;
:*high quality&lt;br /&gt;
:*extremely low chance of audible [[artifact|artefacts]]&lt;br /&gt;
:*reasonable [[bitrate]]s&lt;br /&gt;
:*usable with unmodified, established lossless formats.&lt;br /&gt;
&lt;br /&gt;
==Current test settings==&lt;br /&gt;
No current test settings&lt;br /&gt;
&lt;br /&gt;
==External links==&lt;br /&gt;
*[http://www.hydrogenaudio.org/forums/index.php?showtopic=60379 lossyWAV v0.6.4 RC1 issue thread]&lt;br /&gt;
*[http://www.hydrogenaudio.org/forums/index.php?showtopic=56129 Current development thread] You will find the latest version and last stable version in post #1 of this thread.&lt;br /&gt;
*[http://www.hydrogenaudio.org/forums/index.php?showtopic=55522&amp;amp;st=0 Original lossyFLAC thread] Where David Robinson (Replaygain developer) introduces the method and a Matlab implementation.&lt;br /&gt;
&lt;br /&gt;
[[Category:Software]]&lt;br /&gt;
[[Category:Encoder/Decoder]]&lt;br /&gt;
[[Category:Lossy]]&lt;/div&gt;</summary>
		<author><name>Halb27</name></author>
	</entry>
	<entry>
		<id>https://wiki.hydrogenaudio.org/index.php?title=LossyWAV&amp;diff=18167</id>
		<title>LossyWAV</title>
		<link rel="alternate" type="text/html" href="https://wiki.hydrogenaudio.org/index.php?title=LossyWAV&amp;diff=18167"/>
		<updated>2008-01-13T22:56:22Z</updated>

		<summary type="html">&lt;p&gt;Halb27: /* Quality presets */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Software Infobox&lt;br /&gt;
| name = lossyWAV&lt;br /&gt;
| screenshot = &lt;br /&gt;
| caption = &lt;br /&gt;
| maintainer = [http://www.hydrogenaudio.org/forums/index.php?showuser=42400 Nick.C]&lt;br /&gt;
| stable_release = v0.6.4 RC1&lt;br /&gt;
| preview_release = &lt;br /&gt;
| operating_system = [[Wikipedia:MS-DOS|MS-DOS]]&lt;br /&gt;
| use = [[Wikipedia:Digital signal processing|Digital signal processing]]&lt;br /&gt;
| license = [[Wikipedia:LGPL|LGPL license]]&lt;br /&gt;
| website = [http://www.hydrogenaudio.org/forums/index.php?showtopic=56129 Hydrogenaudio]&lt;br /&gt;
}}&lt;br /&gt;
lossyWAV is a new free lossy pre-processor for [[PCM]] audio contained in the [[WAV]] file format. It reduces [[Wikipedia:Audio bit depth|bit depth]] of the input signal, which, when used in conjunction with certain lossless codecs, reduces the bitrate of the encoded file significantly compared to unpreprocessed compression. &lt;br /&gt;
lossyWAV&#039;s primary goal is to maintain [[transparency]] with a high degree of confidence when processing any audio data.&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
lossyFLAC is an idea started by [http://www.hydrogenaudio.org/forums/index.php?showuser=409 2Bdecided] at hydrogenaudio, utilising the wasted bits feature of the FLAC lossless codec with the aim of transparently reducing audio bit depth (making some lower significant bits (LSB&#039;s) zero), consequently taking advantage of FLAC&#039;s detection of consistently zeroed lower significant bits within each single frame and significantly increasing coding efficiency.[http://www.hydrogenaudio.org/forums/index.php?s=&amp;amp;showtopic=55522&amp;amp;view=findpost&amp;amp;p=498179] In this way the user can enjoy audio encoded using the same codec (which may be all important from a hardware compatibility perspective) at a reduced bitrate compared to the lossless version.&lt;br /&gt;
&lt;br /&gt;
[http://www.hydrogenaudio.org/forums/index.php?showuser=42400 Nick.C] ported the original [[Wikipedia:MATLAB|MATLAB]] implementation to [[Wikipedia:Borland Delphi|Delphi]] (Many thanks [[Wikipedia:CodeGear|CodeGear]] for Turbo Explorer!!) with a liberal sprinkling of [[Wikipedia:IA-32|IA-32]] and [[Wikipedia:x87|x87]] Assembly Language for speed.&lt;br /&gt;
&lt;br /&gt;
Subsequently, lossyFLAC proved itself to work with other lossless codecs, so the application name was changed to lossyWAV. &lt;br /&gt;
&lt;br /&gt;
Since then, Nick.C has heavily developed and built upon lossyWAV, with valuable tuning performed by [http://www.hydrogenaudio.org/forums/index.php?showuser=25015 halb27] at hydrogenaudio.&lt;br /&gt;
&lt;br /&gt;
==Indicative bitrate reduction==&lt;br /&gt;
It must be stressed that lossyWAV is a pure [[Wikipedia:variable bit rate|variable bit rate]] pre-processor. Bits-to-remove from the audio data are calculated on a block-by-block basis (default codec-block length = 512 samples) using overlapping [[Wikipedia:fast Fourier transform|fast Fourier transform]] (FFT) analyses of at least two lengths (default = 64 &amp;amp; 1024 [[Wikipedia:Sampling %28signal processing%29|samples]]). After some manipulation, the results of each FFT analysis for a specific codec-block are then grouped and the minimum value used to determine bits-to-remove for the whole codec-block. Each sample in the codec-block is then rounded such that the first &amp;lt;bits-to-remove&amp;gt; LSB&#039;s are zero. In this way the wasted bits feature of [[Wikipedia:FLAC|FLAC]] et al is exploited.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|+ &#039;&#039;&#039;Conversion using lossyWAV beta v0.5.8, [[Wikipedia:FLAC|FLAC]] -8&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
!lossyWAV Test Set&lt;br /&gt;
!FLAC -8&lt;br /&gt;
!lossyWAV -1&lt;br /&gt;
!lossyWAV -2&lt;br /&gt;
!lossyWAV -3&lt;br /&gt;
|-&lt;br /&gt;
!10 Album Test Average                                &lt;br /&gt;
| 850kbps &lt;br /&gt;
| 480kbps &lt;br /&gt;
| 426kbps &lt;br /&gt;
| 376kbps&lt;br /&gt;
|-&lt;br /&gt;
!53 sample &amp;quot;problem&amp;quot; set                &lt;br /&gt;
| 784kbps &lt;br /&gt;
| 543kbps &lt;br /&gt;
| 491kbps &lt;br /&gt;
| 434kbps&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|+ &#039;&#039;&#039;Large Foobar2000 Conversion: (lossyWAV (beta v0.6.2) -3; [[Wikipedia:FLAC|FLAC]] -5 -b 512)&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
!Album&lt;br /&gt;
!FLAC -8&lt;br /&gt;
!lossyWAV -3&lt;br /&gt;
|-&lt;br /&gt;
!3686 Tracks; 290 Discs; 100913MB &amp;gt; 42391MB (42%)&lt;br /&gt;
| 884kbps &lt;br /&gt;
| 371kbps &lt;br /&gt;
|}&lt;br /&gt;
The 3686 track conversion took 7 hours 15 minutes on an Intel C2D @ 3GHZ, 2GB RAM.&lt;br /&gt;
&lt;br /&gt;
==File identification==&lt;br /&gt;
lossyWAV-processed WAV files are named with a double filename extension, .lossy.wav, to make them instantly identifiable. e.g. &amp;quot;.lossy.flac&amp;quot; would indicate an audio file which was processed using lossyWAV, and subsequently encoded using FLAC.[http://www.hydrogenaudio.org/forums/index.php?s=&amp;amp;showtopic=55522&amp;amp;view=findpost&amp;amp;p=498559]&lt;br /&gt;
&lt;br /&gt;
From beta v0.6.1, the -correction parameter is used when processing to create a correction file which is named with the .lwcdf.wav double filename extension. When &amp;quot;added&amp;quot; to the corresponding .lossy.wav, using a not yet implemented parameter of lossyWAV, the original file will be reconstituted.&lt;br /&gt;
&lt;br /&gt;
Combinations of lossyWAV with each specific encoder are referred to as lossy&#039;&#039;&#039;X&#039;&#039;&#039;, where &#039;&#039;&#039;X&#039;&#039;&#039; is an abbreviation of the lossless codec name. Combination names are listed in the &amp;quot;[[LossyWAV#Known supported codecs|known supported codecs]]&amp;quot; section below.&lt;br /&gt;
&lt;br /&gt;
From beta v0.5.9, lossyWAV inserts a variable length FACT chunk into the WAV file immediately after the FMT chunk. This takes the form:&amp;lt;pre&amp;gt;fact/&amp;lt;size&amp;gt;/lossyWAV beta vx.y.z : dd/mm/yyyy hh:mm:ss&lt;br /&gt;
-2 -cbs 512 -nts 0.00 -snr 21.00 -skew 36.00&lt;br /&gt;
-spf 22224-22235-22336-12347-12358 -fft 10101&amp;lt;/pre&amp;gt;Where the version, date &amp;amp; time and user settings are copied. Additionally, if a lossyWAV FACT chunk is found in a file, the processing will be halted (exit code = 16) to prevent re-processing of an already processed file.&lt;br /&gt;
&lt;br /&gt;
The -check parameter can be used to determine whether a file has previously been processed without trying to process it, exit code = 16 if already processed; exit code = 0 if not.&lt;br /&gt;
&lt;br /&gt;
==Quality presets==&lt;br /&gt;
*-1: Highest quality preset, disc space-saving alternative to lossless archiving for large audio collections.&lt;br /&gt;
*-2: Default preset; a compromise between -1 and -3.&lt;br /&gt;
*-3: High quality preset for usage on a compatible [[Wikipedia:Digital audio player|DAP]], approx. 370kbps for &amp;quot;normal&amp;quot; music. [http://www.hydrogenaudio.org/forums/index.php?s=&amp;amp;showtopic=56129&amp;amp;view=findpost&amp;amp;p=531316] &lt;br /&gt;
&lt;br /&gt;
All tuning has been performed on quality preset -3 with -2 and -1 being more conservative. Quality preset -3 is generally accepted to be (and from testing so far is) transparent. If you find a track which -3 fails to achieve transparency after processing, please post a sample (no more than 30 seconds) in the development thread.&lt;br /&gt;
&lt;br /&gt;
Apart from the quality presets the -nts (noise threshold shift) parameter is the most important parameter to control quality. Without noise threshold shifting (-nts 0) the number of bits to be removed is computed in a theoretically optimal way. -nts 0 is defaulted when using quality preset -3.&lt;br /&gt;
&lt;br /&gt;
In order to be more cautious a negative -nts value can be chosen up to -48. -nts -2 is defaulted when using quality preset -2, and -1 defaults to -nts -4. For archiving purposes and/or very cautious users even more conservative values may be of interest.&lt;br /&gt;
&lt;br /&gt;
Because of internal precautions in addition to 2Bdecided&#039;s principles experience so far tells us that a small positive -nts value keeps the encoding transparent or brings up only subtle differences. This brings file size down a bit. A -nts value of more than 10  however is not recommended.&lt;br /&gt;
&lt;br /&gt;
==Supported input formats==&lt;br /&gt;
*[[WAV]]: 16-bit, 24-bit; sample rate &amp;amp;ge; 32kHz [[Pulse Code Modulation|PCM]]. Very high sample rates (&amp;amp;gt;48kHz) have not been extensively tested. Tunings have been focussed on 16-bit, 44.1kHz samples (i.e. [[Wikipedia:Red Book (audio CD standard)|CD]] PCM).&lt;br /&gt;
&lt;br /&gt;
==Codec compatibility==&lt;br /&gt;
===Known supported codecs===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|+ &#039;&#039;&#039;Recommended settings&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
!Codec&lt;br /&gt;
!lossyWAV parameters&lt;br /&gt;
!Encoder parameters&lt;br /&gt;
!Combination name&lt;br /&gt;
|-&lt;br /&gt;
![[Free Lossless Audio Codec|FLAC]]&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| -&#039;&#039;&#039;5&#039;&#039;&#039; -&#039;&#039;&#039;b&#039;&#039;&#039; 512 --&#039;&#039;&#039;keep-foreign-metadata&#039;&#039;&#039;[http://www.hydrogenaudio.org/forums/index.php?s=&amp;amp;showtopic=56129&amp;amp;view=findpost&amp;amp;p=533689]&lt;br /&gt;
|lossy&#039;&#039;&#039;FLAC&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
![[Wikipedia:Lossless Predictive Audio Compression|LPAC]]&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| -&#039;&#039;&#039;b&#039;&#039;&#039;512&lt;br /&gt;
|lossy&#039;&#039;&#039;LPAC&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
![[Wikipedia:Audio Lossless Coding|MPEG-4 ALS]]&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| -&#039;&#039;&#039;l&#039;&#039;&#039; -&#039;&#039;&#039;n&#039;&#039;&#039;512&lt;br /&gt;
|lossy&#039;&#039;&#039;ALS&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
![[TAK]]&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| -&#039;&#039;&#039;fsl&#039;&#039;&#039;512&lt;br /&gt;
|lossy&#039;&#039;&#039;TAK&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
![[WavPack]]&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| --&#039;&#039;&#039;blocksize&#039;&#039;&#039;=512&lt;br /&gt;
|lossy&#039;&#039;&#039;WV&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
![[Wikipedia:Windows Media Audio#Windows Media Audio Lossless|WMA Lossless]]&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
|lossy&#039;&#039;&#039;WMALSL&#039;&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
There is also [http://www.hometheaterhifi.com/volume_8_4/dvd-benchmark-part-6-dvd-audio-11-2001.html#Meridian%20Lossless%20Packing%20(MLP)%20in%20a%20Nutshell evidence] &amp;amp;mdash; so-called &amp;quot;Bit Shifting&amp;quot; &amp;amp;mdash; to suggest that lossyWAV may work with [[Wikipedia:Meridian Lossless Packing|MLP]], but this remains untested due to prohibitive prices of encoders.&lt;br /&gt;
&lt;br /&gt;
A comparison of portable media players is [[Wikipedia:Comparison of portable media players#Audio Formats|here]], which shows FLAC and WMA Lossless compatibility among listed players.&lt;br /&gt;
Any player supported by [http://www.rockbox.org Rockbox] can use FLAC or wavPack files after installing Rockbox.&lt;br /&gt;
&lt;br /&gt;
===Known unsupported codecs===&lt;br /&gt;
*[[ALAC]]&lt;br /&gt;
*[[Lossless Audio|LA]]&lt;br /&gt;
*[[Monkey&#039;s Audio]]&lt;br /&gt;
*[[OptimFROG]]&lt;br /&gt;
*[[TTA]]&lt;br /&gt;
&lt;br /&gt;
==Using lossyWAV==&lt;br /&gt;
===Application settings===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
lossyWAV v0.6.4 RC1, Copyright (C) 2007,2008 Nick Currie. Portions (C) 1996&lt;br /&gt;
Don Cross. lossyWAV is issued with NO WARRANTY WHATSOEVER and is free software.&lt;br /&gt;
&lt;br /&gt;
Usage   : lossyWAV &amp;lt;input wav file&amp;gt; &amp;lt;options&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example : lossyWAV musicfile.wav&lt;br /&gt;
&lt;br /&gt;
Quality Options:&lt;br /&gt;
&lt;br /&gt;
-1            highest quality preset, circa 480kbps for 44.1khz, 2ch;&lt;br /&gt;
-2            default settings, circa 425kbps for 44.1khz, 2ch;&lt;br /&gt;
-3            DAP preset, circa 370kbps for 44.1khz, 2ch.&lt;br /&gt;
&lt;br /&gt;
Standard Options:&lt;br /&gt;
&lt;br /&gt;
-o &amp;lt;folder&amp;gt;   destination folder for the output file(s).&lt;br /&gt;
-nts &amp;lt;n&amp;gt;      set noise_threshold_shift to n dB (-48.0dB&amp;lt;=n&amp;lt;=+12.0dB);&lt;br /&gt;
              (-ve values reduce bits to remove, +ve values increase).&lt;br /&gt;
-snr &amp;lt;n&amp;gt;      set minimum average signal to added noise ratio to n dB;&lt;br /&gt;
              (0.0dB&amp;lt;=n&amp;lt;=48.0dB) Increasing value reduces bits to remove.&lt;br /&gt;
-force        forcibly over-write output file if it exists; default=off.&lt;br /&gt;
-check        check if WAV file has already been processed. default=off;&lt;br /&gt;
              errorlevel=16 if already processed, 0 if not.&lt;br /&gt;
-correction   write correction file while processing WAV file. default=off;&lt;br /&gt;
&lt;br /&gt;
System Options:&lt;br /&gt;
&lt;br /&gt;
-quiet        significantly reduce screen output.&lt;br /&gt;
-nowarn       suppress lossyWAV warnings.&lt;br /&gt;
&lt;br /&gt;
-below        set process priority to below normal.&lt;br /&gt;
-low          set process priority to low.&lt;br /&gt;
&lt;br /&gt;
Special thanks:&lt;br /&gt;
&lt;br /&gt;
David Robinson for the method itself and motivation to implement it.&lt;br /&gt;
Don Cross for the original Pascal source for the FFT algorithm used.&lt;br /&gt;
Halb27 @ www.hydrogenaudio.org for valuable tuning input and feedback.&amp;lt;/pre&amp;gt;&lt;br /&gt;
===Example Foobar2000 converter settings===&lt;br /&gt;
[[Image:Foobar2000_Converter_Settings.PNG]]&lt;br /&gt;
&lt;br /&gt;
===Example flossy3.bat file called from Foobar2000===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@echo off&lt;br /&gt;
c:\data_nic\bin\lossyWAV %1 %3 %4 %5 %6 %7 %8 %9 -below -nowarn -quiet&lt;br /&gt;
c:\data_nic\bin\flac.exe -5 -f -b 512 &amp;quot;%~N1.lossy.wav&amp;quot; -o&amp;quot;%~N2.flac&amp;quot; &lt;br /&gt;
del &amp;quot;%~N1.lossy.wav&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Frequently asked questions==&lt;br /&gt;
*&#039;&#039;&#039;Question:&#039;&#039;&#039; Is it [[Variable Bitrate|VBR]]?&lt;br /&gt;
*&#039;&#039;&#039;Short answer:&#039;&#039;&#039; Yes.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Question:&#039;&#039;&#039; Is it [[transparency|transparent]]?&lt;br /&gt;
*&#039;&#039;&#039;Short answer:&#039;&#039;&#039; Almost certainly.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Question:&#039;&#039;&#039; Is it [[lossless]]?&lt;br /&gt;
*&#039;&#039;&#039;Short answer:&#039;&#039;&#039; No.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Question:&#039;&#039;&#039; Why should I use this?&lt;br /&gt;
*&#039;&#039;&#039;Answer:&#039;&#039;&#039;&lt;br /&gt;
:*high quality&lt;br /&gt;
:*extremely low chance of audible [[artifact|artefacts]]&lt;br /&gt;
:*reasonable [[bitrate]]s&lt;br /&gt;
:*usable with unmodified, established lossless formats.&lt;br /&gt;
&lt;br /&gt;
==Current test settings==&lt;br /&gt;
No current test settings&lt;br /&gt;
&lt;br /&gt;
==External links==&lt;br /&gt;
*[http://www.hydrogenaudio.org/forums/index.php?showtopic=60379 lossyWAV v0.6.4 RC1 issue thread]&lt;br /&gt;
*[http://www.hydrogenaudio.org/forums/index.php?showtopic=56129 Current development thread] You will find the latest version and last stable version in post #1 of this thread.&lt;br /&gt;
*[http://www.hydrogenaudio.org/forums/index.php?showtopic=55522&amp;amp;st=0 Original lossyFLAC thread] Where David Robinson (Replaygain developer) introduces the method and a Matlab implementation.&lt;br /&gt;
&lt;br /&gt;
[[Category:Software]]&lt;br /&gt;
[[Category:Encoder/Decoder]]&lt;br /&gt;
[[Category:Lossy]]&lt;/div&gt;</summary>
		<author><name>Halb27</name></author>
	</entry>
	<entry>
		<id>https://wiki.hydrogenaudio.org/index.php?title=LossyWAV&amp;diff=18119</id>
		<title>LossyWAV</title>
		<link rel="alternate" type="text/html" href="https://wiki.hydrogenaudio.org/index.php?title=LossyWAV&amp;diff=18119"/>
		<updated>2008-01-03T21:34:57Z</updated>

		<summary type="html">&lt;p&gt;Halb27: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Software Infobox&lt;br /&gt;
| name = lossyWAV&lt;br /&gt;
| screenshot = &lt;br /&gt;
| caption = &lt;br /&gt;
| maintainer = [http://www.hydrogenaudio.org/forums/index.php?showuser=42400 Nick.C]&lt;br /&gt;
| stable_release = beta v0.6.1&lt;br /&gt;
| preview_release = &lt;br /&gt;
| operating_system = [[Wikipedia:MS-DOS|MS-DOS]]&lt;br /&gt;
| use = [[Wikipedia:Digital signal processing|Digital signal processing]]&lt;br /&gt;
| license = [[Wikipedia:LGPL|LGPL license]]&lt;br /&gt;
| website = [http://www.hydrogenaudio.org/forums/index.php?showtopic=56129 Hydrogenaudio]&lt;br /&gt;
}}&lt;br /&gt;
lossyWAV is a lossy pre-processor for [[PCM]] audio contained in the [[WAV]] file format. It reduces [[Wikipedia:Audio bit depth|bit depth]] of the input signal, which, when used in conjunction with certain lossless codecs, reduces the bitrate of the encoded file significantly compared to unpreprocessed compression. &lt;br /&gt;
lossyWAV&#039;s primary goal is to maintain [[transparency]] with a high degree of confidence when processing any audio data.&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
lossyFLAC is an idea started by [http://www.hydrogenaudio.org/forums/index.php?showuser=409 2Bdecided] at hydrogenaudio, utilising the wasted bits feature of the FLAC lossless codec with the aim of transparently reducing audio bit depth (making some lower significant bits (LSB&#039;s) zero), consequently taking advantage of FLAC&#039;s detection of consistently zeroed lower significant bits within each single frame and significantly increasing coding efficiency.[http://www.hydrogenaudio.org/forums/index.php?s=&amp;amp;showtopic=55522&amp;amp;view=findpost&amp;amp;p=498179] In this way the user can enjoy audio encoded using the same codec (which may be all important from a hardware compatibility perspective) at a reduced bitrate compared to the lossless version.&lt;br /&gt;
&lt;br /&gt;
[http://www.hydrogenaudio.org/forums/index.php?showuser=42400 Nick.C] ported the original [[Wikipedia:MATLAB|MATLAB]] implementation to [[Wikipedia:Borland Delphi|Delphi]] (Many thanks [[Wikipedia:CodeGear|CodeGear]] for Turbo Explorer!!) with a liberal sprinkling of [[Wikipedia:IA-32|IA-32]] and [[Wikipedia:x87|x87]] Assembly Language for speed.&lt;br /&gt;
&lt;br /&gt;
Subsequently, lossyFLAC proved itself to work with other lossless codecs, so the application name was changed to lossyWAV. &lt;br /&gt;
&lt;br /&gt;
Since then, Nick.C has heavily developed and built upon lossyWAV, with valuable tuning performed by [http://www.hydrogenaudio.org/forums/index.php?showuser=25015 halb27] at hydrogenaudio.&lt;br /&gt;
&lt;br /&gt;
==File Identification==&lt;br /&gt;
lossyWAV-processed WAV files are named with a double filename extension, .lossy.wav, to make them instantly identifiable. e.g. &amp;quot;.lossy.flac&amp;quot; would indicate an audio file which was processed using lossyWAV, and subsequently encoded using FLAC.[http://www.hydrogenaudio.org/forums/index.php?s=&amp;amp;showtopic=55522&amp;amp;view=findpost&amp;amp;p=498559]&lt;br /&gt;
&lt;br /&gt;
From beta v0.6.1, the -correction parameter is used when processing to create a correction file which is named with the .lwcdf.wav double filename extension. When &amp;quot;added&amp;quot; to the corresponding .lossy.wav, using a not yet implemented parameter of lossyWAV, the original file will be reconstituted.&lt;br /&gt;
&lt;br /&gt;
Combinations of lossyWAV with each specific encoder are referred to as lossy&#039;&#039;&#039;X&#039;&#039;&#039;, where &#039;&#039;&#039;X&#039;&#039;&#039; is an abbreviation of the lossless codec name. Combination names are listed in the &amp;quot;[[LossyWAV#Known supported codecs|known supported codecs]]&amp;quot; section below.&lt;br /&gt;
&lt;br /&gt;
From v0.5.9, lossyWAV inserts a variable length FACT chunk into the WAV file immediately after the FMT chunk. This takes the form:&amp;lt;pre&amp;gt;fact/&amp;lt;size&amp;gt;/lossyWAV beta vx.y.z : dd/mm/yyyy hh:mm:ss&lt;br /&gt;
-2 -cbs 512 -nts 0.00 -snr 21.00 -skew 36.00&lt;br /&gt;
-spf 22224-22235-22336-12347-12358 -fft 10101&amp;lt;/pre&amp;gt;Where the version, date &amp;amp; time and user settings are copied. Additionally, if a lossyWAV FACT chunk is found in a file, the processing will be halted (exit code = 16) to prevent re-processing of an already processed file.&lt;br /&gt;
&lt;br /&gt;
The -check parameter can be used to determine whether a file has previously been processed without trying to process it, exit code = 16 if already processed; exit code = 0 if not.&lt;br /&gt;
&lt;br /&gt;
==Presets==&lt;br /&gt;
*-1: Highest quality preset, disc space-saving alternative to lossless archiving for large audio collections.&lt;br /&gt;
*-2: Default preset; a compromise between -1 and -3.&lt;br /&gt;
*-3: High quality preset for usage on a compatible [[Wikipedia:Digital audio player|DAP]], approx. 370kbps for &amp;quot;normal&amp;quot; music. [http://www.hydrogenaudio.org/forums/index.php?s=&amp;amp;showtopic=56129&amp;amp;view=findpost&amp;amp;p=531316] &lt;br /&gt;
&lt;br /&gt;
All tuning has been performed on quality preset -3 with -2 and -1 being more conservative. Quality preset -3 is generally accepted to be (and from testing so far is) transparent. If you find a track which -3 fails to achieve transparency after processing, please post a sample (no more than 30 seconds) in the development thread.&lt;br /&gt;
&lt;br /&gt;
Apart from the quality presets the -nts (noise threshold shift) parameter is the most important parameter to control quality. Without noise threshold shifting (-nts 0) the number of bits to be removed is computed in a theoretically optimal way. -nts 0 is defaulted when using quality preset -2.&lt;br /&gt;
&lt;br /&gt;
In order to be more cautious a negative -nts value can be chosen up to -48. -nts -3 is defaulted when using quality preset -1. For archiving purposes and/or very cautious users even more conservative values may be of interest.&lt;br /&gt;
&lt;br /&gt;
Because of internal precautions in addition to 2Bdecided&#039;s principles experience so far tells us that a small positive -nts value doesn&#039;t keep the encodings from being transparent. That&#039;s why -nts 3 is defaulted when using quality preset -3. A more aggressive value may be welcome for a user who wants to keep average bitrate down a bit more. The higher the -nts value however the more probable is a situation where lossyWAV is not transparent any more. A -nts value of more than 10 is not recommended though even with a value of ~10 transparency is achieved usually.&lt;br /&gt;
&lt;br /&gt;
==Supported input formats==&lt;br /&gt;
*[[WAV]]: 16-bit, 24-bit; sample rate &amp;amp;ge; 32kHz [[Pulse Code Modulation|PCM]]. Very high sample rates (&amp;amp;gt;48kHz) have not been extensively tested. Tunings have been focussed on 16-bit, 44.1kHz samples (i.e. [[Wikipedia:Red Book (audio CD standard)|CD]] PCM).&lt;br /&gt;
&lt;br /&gt;
==Codec Compatibility==&lt;br /&gt;
===Known supported codecs===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|+ &#039;&#039;&#039;Recommended settings&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
!Codec&lt;br /&gt;
!lossyWAV parameters&lt;br /&gt;
!Encoder parameters&lt;br /&gt;
!Combination name&lt;br /&gt;
|-&lt;br /&gt;
![[Free Lossless Audio Codec|FLAC]]&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| -&#039;&#039;&#039;3&#039;&#039;&#039; -&#039;&#039;&#039;m&#039;&#039;&#039; -&#039;&#039;&#039;e&#039;&#039;&#039; -&#039;&#039;&#039;r&#039;&#039;&#039; 2 -&#039;&#039;&#039;b&#039;&#039;&#039; 512 --&#039;&#039;&#039;keep-foreign-metadata&#039;&#039;&#039;[http://www.hydrogenaudio.org/forums/index.php?s=&amp;amp;showtopic=56129&amp;amp;view=findpost&amp;amp;p=533689]&lt;br /&gt;
|lossy&#039;&#039;&#039;FLAC&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
![[Wikipedia:Lossless Predictive Audio Compression|LPAC]]&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| -&#039;&#039;&#039;b&#039;&#039;&#039;512&lt;br /&gt;
|lossy&#039;&#039;&#039;LPAC&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
![[Wikipedia:Audio Lossless Coding|MPEG-4 ALS]]&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| -&#039;&#039;&#039;l&#039;&#039;&#039; -&#039;&#039;&#039;n&#039;&#039;&#039;512&lt;br /&gt;
|lossy&#039;&#039;&#039;ALS&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
![[TAK]]&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| -&#039;&#039;&#039;fsl&#039;&#039;&#039;512&lt;br /&gt;
|lossy&#039;&#039;&#039;TAK&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
![[WavPack]]&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| --&#039;&#039;&#039;blocksize&#039;&#039;&#039;=512&lt;br /&gt;
|lossy&#039;&#039;&#039;WV&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
![[Wikipedia:Windows Media Audio#Windows Media Audio Lossless|WMA Lossless]]&lt;br /&gt;
| -&#039;&#039;&#039;wmalsl&#039;&#039;&#039; (same as -&#039;&#039;&#039;cbs&#039;&#039;&#039; 2048)&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
|lossy&#039;&#039;&#039;WMALSL&#039;&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
There is also [http://www.hometheaterhifi.com/volume_8_4/dvd-benchmark-part-6-dvd-audio-11-2001.html#Meridian%20Lossless%20Packing%20(MLP)%20in%20a%20Nutshell evidence] &amp;amp;mdash; so-called &amp;quot;Bit Shifting&amp;quot; &amp;amp;mdash; to suggest that lossyWAV may work with [[Wikipedia:Meridian Lossless Packing|MLP]], but this remains untested due to prohibitive prices of encoders.&lt;br /&gt;
&lt;br /&gt;
A comparison of portable media players is [[Wikipedia:Comparison of portable media players#Audio Formats|here]], which shows FLAC and WMA Lossless compatibility among listed players.&lt;br /&gt;
Any player supported by [http://www.rockbox.org Rockbox] can use FLAC or wavPack files after installing Rockbox.&lt;br /&gt;
&lt;br /&gt;
===Known unsupported codecs===&lt;br /&gt;
*[[ALAC]]&lt;br /&gt;
*[[Lossless Audio|LA]]&lt;br /&gt;
*[[Monkey&#039;s Audio]]&lt;br /&gt;
*[[OptimFROG]]&lt;br /&gt;
*[[TTA]]&lt;br /&gt;
&lt;br /&gt;
==lossyWAV application settings==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
lossyWAV beta v0.6.1 : WAV file bit depth reduction method by 2Bdecided.&lt;br /&gt;
Delphi implementation by Nick.C from a Matlab script, www.hydrogenaudio.org&lt;br /&gt;
&lt;br /&gt;
Usage   : lossyWAV &amp;lt;input wav file&amp;gt; &amp;lt;options&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example : lossyWAV musicfile.wav&lt;br /&gt;
&lt;br /&gt;
Quality Options:&lt;br /&gt;
&lt;br /&gt;
-1            extreme settings [4xFFT] (-cbs 512 -nts -3.0 -skew 36 -snr 21&lt;br /&gt;
              -spf 22224-22225-11235-11246-12358 -fft 11011)&lt;br /&gt;
-2            default settings [3xFFT] (-cbs 512 -nts  0.0 -skew 36 -snr 21&lt;br /&gt;
              -spf 22224-22235-22346-12347-12358 -fft 10101)&lt;br /&gt;
-3            compact settings [2xFFT] (-cbs 512 -nts +3.0 -skew 36 -snr 21&lt;br /&gt;
              -spf 22224-22235-22347-22358-2246C -fft 10001)&lt;br /&gt;
&lt;br /&gt;
Standard Options:&lt;br /&gt;
&lt;br /&gt;
-o &amp;lt;folder&amp;gt;   destination folder for the output file&lt;br /&gt;
-nts &amp;lt;n&amp;gt;      set noise_threshold_shift to n dB (-48.0dB&amp;lt;=n&amp;lt;=+48.0dB)&lt;br /&gt;
              (-ve values reduce bits to remove, +ve values increase)&lt;br /&gt;
-force        forcibly over-write output file if it exists; default=off&lt;br /&gt;
-check        check if WAV file has already been processed. default=off;&lt;br /&gt;
              errorlevel=16 if already processed, 0 if not.&lt;br /&gt;
-correction   write correction file while processing WAV file. default=off;&lt;br /&gt;
&lt;br /&gt;
Codec Specific Options:&lt;br /&gt;
&lt;br /&gt;
-wmalsl       optimise internal settings for WMA Lossless codec; default=off&lt;br /&gt;
&lt;br /&gt;
Advanced / System Options:&lt;br /&gt;
&lt;br /&gt;
-snr &amp;lt;n&amp;gt;      set minimum average signal to added noise ratio to n dB;&lt;br /&gt;
              (-215.0dB&amp;lt;=n&amp;lt;=48.0dB) Increasing value reduces bits to remove.&lt;br /&gt;
-skew &amp;lt;n&amp;gt;     skew fft analysis results by n dB (0.0db&amp;lt;=n&amp;lt;=48.0db) in the&lt;br /&gt;
              frequency range 20Hz to 3.45kHz&lt;br /&gt;
-spf &amp;lt;5x5hex&amp;gt; manually input the 5 spreading functions as 5 x 5 characters;&lt;br /&gt;
              These correspond to FFTs of 64, 128, 256, 512 &amp;amp; 1024 samples;&lt;br /&gt;
              e.g. 22235-22236-22347-22358-2246C (Characters must be one of&lt;br /&gt;
              1 to 9 and A to F (zero excluded).&lt;br /&gt;
-fft &amp;lt;5xbin&amp;gt;  select fft lengths to use in analysis, using binary switching,&lt;br /&gt;
              from 64, 128, 256, 512 &amp;amp; 1024 samples, e.g. 01001 = 128,1024&lt;br /&gt;
-cbs &amp;lt;n&amp;gt;      set codec block size to n samples (512&amp;lt;=n&amp;lt;=4608, n mod 32=0)&lt;br /&gt;
&lt;br /&gt;
-quiet        significantly reduce screen output&lt;br /&gt;
-nowarn       suppress lossyWAV warnings&lt;br /&gt;
-detail       enable detailled output mode&lt;br /&gt;
&lt;br /&gt;
-below        set process priority to below normal.&lt;br /&gt;
-low          set process priority to low.&lt;br /&gt;
&lt;br /&gt;
Special thanks:&lt;br /&gt;
&lt;br /&gt;
David Robinson for the method itself and motivation to implement it in Delphi.&lt;br /&gt;
Dr. Jean Debord for the use of TPMAT036 uFFT &amp;amp; uTypes units for FFT analysis.&lt;br /&gt;
Halb27 @ www.hydrogenaudio.org for donation and maintenance of the wavIO unit.&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Indicative Bitrate Reduction==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|+ &#039;&#039;&#039;Conversion using lossyWAV beta v0.5.8, [[Wikipedia:FLAC|FLAC]] -8&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
!lossyWAV Test Set&lt;br /&gt;
!FLAC -8&lt;br /&gt;
!lossyWAV -1&lt;br /&gt;
!lossyWAV -2&lt;br /&gt;
!lossyWAV -3&lt;br /&gt;
|-&lt;br /&gt;
!10 Album Test Average                                &lt;br /&gt;
| 850kbps &lt;br /&gt;
| 480kbps &lt;br /&gt;
| 426kbps &lt;br /&gt;
| 376kbps&lt;br /&gt;
|-&lt;br /&gt;
!53 sample &amp;quot;problem&amp;quot; set                &lt;br /&gt;
| 784kbps &lt;br /&gt;
| 543kbps &lt;br /&gt;
| 491kbps &lt;br /&gt;
| 434kbps&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|+ &#039;&#039;&#039;Large Foobar2000 Conversion: (lossyWAV -3; [[Wikipedia:FLAC|FLAC]] -3 -m -e -r 2 -b 512)&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
!Album&lt;br /&gt;
!FLAC -8&lt;br /&gt;
!lossyWAV -1&lt;br /&gt;
!lossyWAV -2&lt;br /&gt;
!lossyWAV -3&lt;br /&gt;
|-&lt;br /&gt;
!3283 Tracks; 258 Discs; 87.2GB&amp;gt;36.8GB  &lt;br /&gt;
| 880kbps &lt;br /&gt;
| N/A &lt;br /&gt;
| N/A&lt;br /&gt;
| 371kbps &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Using lossyWAV==&lt;br /&gt;
===Example Foobar2000 Converter Settings===&lt;br /&gt;
[[Image:Foobar2000_Converter_Settings.PNG]]&lt;br /&gt;
&lt;br /&gt;
===Example flossy.bat file called from Foobar2000===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@echo off&lt;br /&gt;
c:\data_nic\bin\lossyWAV %1 %3 %4 %5 %6 %7 %8 %9 -below -nowarn -quiet&lt;br /&gt;
c:\data_nic\bin\flac.exe -8 -f -b 512 &amp;quot;%~N1.lossy.wav&amp;quot; -o&amp;quot;%~N2.flac&amp;quot; &lt;br /&gt;
del &amp;quot;%~N1.lossy.wav&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Frequently asked questions==&lt;br /&gt;
*&#039;&#039;&#039;Question:&#039;&#039;&#039; Is it [[Variable Bitrate|VBR]]?&lt;br /&gt;
*&#039;&#039;&#039;Short answer:&#039;&#039;&#039; Yes.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Question:&#039;&#039;&#039; Is it [[transparency|transparent]]?&lt;br /&gt;
*&#039;&#039;&#039;Short answer:&#039;&#039;&#039; Almost certainly.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Question:&#039;&#039;&#039; Is it [[lossless]]?&lt;br /&gt;
*&#039;&#039;&#039;Short answer:&#039;&#039;&#039; No.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Question:&#039;&#039;&#039; Why should I use this?&lt;br /&gt;
*&#039;&#039;&#039;Answer:&#039;&#039;&#039;&lt;br /&gt;
:*high quality&lt;br /&gt;
:*extremely low chance of audible [[artifact|artefacts]]&lt;br /&gt;
:*reasonable [[bitrate]]s&lt;br /&gt;
:*usable with unmodified, established lossless formats.&lt;br /&gt;
&lt;br /&gt;
==Current Test Settings==&lt;br /&gt;
No current test settings&lt;br /&gt;
&lt;br /&gt;
==External links==&lt;br /&gt;
*[http://www.hydrogenaudio.org/forums/index.php?showtopic=56129 Current development thread] You will find the latest version and last stable version in post #1 of this thread.&lt;br /&gt;
*[http://www.hydrogenaudio.org/forums/index.php?showtopic=55522&amp;amp;st=0 Original lossyFLAC thread] Where David Robinson (Replaygain developer) introduces the method and a Matlab implementation.&lt;br /&gt;
&lt;br /&gt;
[[Category:Software]]&lt;br /&gt;
[[Category:Encoder/Decoder]]&lt;br /&gt;
[[Category:Lossy]]&lt;/div&gt;</summary>
		<author><name>Halb27</name></author>
	</entry>
	<entry>
		<id>https://wiki.hydrogenaudio.org/index.php?title=LossyWAV&amp;diff=18118</id>
		<title>LossyWAV</title>
		<link rel="alternate" type="text/html" href="https://wiki.hydrogenaudio.org/index.php?title=LossyWAV&amp;diff=18118"/>
		<updated>2008-01-03T21:33:53Z</updated>

		<summary type="html">&lt;p&gt;Halb27: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Software Infobox&lt;br /&gt;
| name = lossyWAV&lt;br /&gt;
| screenshot = &lt;br /&gt;
| caption = &lt;br /&gt;
| maintainer = [http://www.hydrogenaudio.org/forums/index.php?showuser=42400 Nick.C]&lt;br /&gt;
| stable_release = beta v0.6.1&lt;br /&gt;
| preview_release = &lt;br /&gt;
| operating_system = [[Wikipedia:MS-DOS|MS-DOS]]&lt;br /&gt;
| use = [[Wikipedia:Digital signal processing|Digital signal processing]]&lt;br /&gt;
| license = [[Wikipedia:LGPL|LGPL license]]&lt;br /&gt;
| website = [http://www.hydrogenaudio.org/forums/index.php?showtopic=56129 Hydrogenaudio]&lt;br /&gt;
}}&lt;br /&gt;
lossyWAV is a lossy pre-processor for [[PCM]] audio contained in the [[WAV]] file format. It reduces [[Wikipedia:Audio bit depth|bit depth]] of the input signal, which, when used in conjunction with certain lossless codecs, reduces the bitrate of the encoded file significantly compared to unpreprocessed compression. &lt;br /&gt;
lossyWAV&#039;s primary goal is to maintain [[transparency]] with a high degree of confidence when processing any audio data.&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
lossyFLAC is an idea started by [http://www.hydrogenaudio.org/forums/index.php?showuser=409 2Bdecided] at hydrogenaudio, utilising the wasted bits feature of the FLAC lossless codec with the aim of transparently reducing audio bit depth (making some lower significant bits (LSB&#039;s) zero), consequently taking advantage of FLAC&#039;s detection of consistently zeroed lower significant bits within each single frame and significantly increasing coding efficiency.[http://www.hydrogenaudio.org/forums/index.php?s=&amp;amp;showtopic=55522&amp;amp;view=findpost&amp;amp;p=498179] In this way the user can enjoy audio encoded using the same codec (which may be all important from a hardware compatibility perspective) at a reduced bitrate compared to the lossless version.&lt;br /&gt;
&lt;br /&gt;
[http://www.hydrogenaudio.org/forums/index.php?showuser=42400 Nick.C] ported the original [[Wikipedia:MATLAB|MATLAB]] implementation to [[Wikipedia:Borland Delphi|Delphi]] (Many thanks [[Wikipedia:CodeGear|CodeGear]] for Turbo Explorer!!) with a liberal sprinkling of [[Wikipedia:IA-32|IA-32]] and [[Wikipedia:x87|x87]] Assembly Language for speed.&lt;br /&gt;
&lt;br /&gt;
Subsequently, lossyFLAC proved itself to work with other lossless codecs, so the application name was changed to lossyWAV. &lt;br /&gt;
&lt;br /&gt;
Since then, Nick.C has heavily developed and built upon lossyWAV, with valuable tuning performed by [http://www.hydrogenaudio.org/forums/index.php?showuser=25015 halb27] at hydrogenaudio.&lt;br /&gt;
&lt;br /&gt;
==File Identification==&lt;br /&gt;
lossyWAV-processed WAV files are named with a double filename extension, .lossy.wav, to make them instantly identifiable. e.g. &amp;quot;.lossy.flac&amp;quot; would indicate an audio file which was processed using lossyWAV, and subsequently encoded using FLAC.[http://www.hydrogenaudio.org/forums/index.php?s=&amp;amp;showtopic=55522&amp;amp;view=findpost&amp;amp;p=498559]&lt;br /&gt;
&lt;br /&gt;
From beta v0.6.1, the -correction parameter is used when processing to create a correction file which is named with the .lwcdf.wav double filename extension. When &amp;quot;added&amp;quot; to the corresponding .lossy.wav, using a not yet implemented parameter of lossyWAV, the original file will be reconstituted.&lt;br /&gt;
&lt;br /&gt;
Combinations of lossyWAV with each specific encoder are referred to as lossy&#039;&#039;&#039;X&#039;&#039;&#039;, where &#039;&#039;&#039;X&#039;&#039;&#039; is an abbreviation of the lossless codec name. Combination names are listed in the &amp;quot;[[LossyWAV#Known supported codecs|known supported codecs]]&amp;quot; section below.&lt;br /&gt;
&lt;br /&gt;
From v0.5.9, lossyWAV inserts a variable length FACT chunk into the WAV file immediately after the FMT chunk. This takes the form:&amp;lt;pre&amp;gt;fact/&amp;lt;size&amp;gt;/lossyWAV beta vx.y.z : dd/mm/yyyy hh:mm:ss&lt;br /&gt;
-2 -cbs 512 -nts 0.00 -snr 21.00 -skew 36.00&lt;br /&gt;
-spf 22224-22235-22336-12347-12358 -fft 10101&amp;lt;/pre&amp;gt;Where the version, date &amp;amp; time and user settings are copied. Additionally, if a lossyWAV FACT chunk is found in a file, the processing will be halted (exit code = 16) to prevent re-processing of an already processed file.&lt;br /&gt;
&lt;br /&gt;
The -check parameter can be used to determine whether a file has previously been processed without trying to process it, exit code = 16 if already processed; exit code = 0 if not.&lt;br /&gt;
&lt;br /&gt;
==Presets==&lt;br /&gt;
*-1: Highest quality preset, disc space-saving alternative to lossless archiving for large audio collections.&lt;br /&gt;
*-2: Default preset; a compromise between -1 and -3.&lt;br /&gt;
*-3: High quality preset for usage on a compatible [[Wikipedia:Digital audio player|DAP]], approx. 370kbps for &amp;quot;normal&amp;quot; music. [http://www.hydrogenaudio.org/forums/index.php?s=&amp;amp;showtopic=56129&amp;amp;view=findpost&amp;amp;p=531316] &lt;br /&gt;
&lt;br /&gt;
All tuning has been performed on quality preset -3 with -2 and -1 being more conservative. Quality preset -3 is generally accepted to be (and from testing so far is) transparent. If you find a track which -3 fails to achieve transparency after processing, please post a sample (no more than 30 seconds) in the development thread.&lt;br /&gt;
&lt;br /&gt;
Apart from the quality presets the -nts (noise threshold shift) parameter is the most important parameter to control quality. Without noise threshold shifting (-nts 0) the number of bits to be removed is computed in a theoretically optimal way. -nts 0 is defaulted when using quality preset -2.&lt;br /&gt;
&lt;br /&gt;
In order to be more cautious a negative -nts value can be chosen up to -48. -nts -3 is defaulted when using quality preset -1. For archiving purposes and/or very cautious users even more conservative values may be of interest.&lt;br /&gt;
&lt;br /&gt;
Because of internal precautions in addition to 2Bdecided&#039;s principles experience so far tells us that a small positive -nts value doesn&#039;t keep the encodings from being transparent. That&#039;s why -nts 3 is defaulted when using quality preset -3. A more aggressive value may be welcome for a user who wants to keep average bitrate down a bit more. The higher the -nts value however the more probable is a situation where lossyWAV is not transparent any more. A -nts value of more than 10 is not recommended though even with a value of ~10 transparency is achieved usually.&lt;br /&gt;
&lt;br /&gt;
==Supported input formats==&lt;br /&gt;
*[[WAV]]: 16-bit, 24-bit; sample rate &amp;amp;ge; 32kHz [[Pulse Code Modulation|PCM]]. Very high sample rates (&amp;amp;gt;48kHz) have not been extensively tested. Tunings have been focussed on 16-bit, 44.1kHz samples (i.e. [[Wikipedia:Red Book (audio CD standard)|CD]] PCM).&lt;br /&gt;
&lt;br /&gt;
==Codec Compatibility==&lt;br /&gt;
===Known supported codecs===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|+ &#039;&#039;&#039;Recommended settings&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
!Codec&lt;br /&gt;
!lossyWAV parameters&lt;br /&gt;
!Encoder parameters&lt;br /&gt;
!Combination name&lt;br /&gt;
|-&lt;br /&gt;
![[Free Lossless Audio Codec|FLAC]]&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| -&#039;&#039;&#039;3&#039;&#039;&#039; -&#039;&#039;&#039;m&#039;&#039;&#039; -&#039;&#039;&#039;e&#039;&#039;&#039; -&#039;&#039;&#039;r&#039;&#039;&#039; 2 -&#039;&#039;&#039;b&#039;&#039;&#039; 512 --&#039;&#039;&#039;keep-foreign-metadata&#039;&#039;&#039;[http://www.hydrogenaudio.org/forums/index.php?s=&amp;amp;showtopic=56129&amp;amp;view=findpost&amp;amp;p=533689]&lt;br /&gt;
|lossy&#039;&#039;&#039;FLAC&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
![[Wikipedia:Lossless Predictive Audio Compression|LPAC]]&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| -&#039;&#039;&#039;b&#039;&#039;&#039;512&lt;br /&gt;
|lossy&#039;&#039;&#039;LPAC&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
![[Wikipedia:Audio Lossless Coding|MPEG-4 ALS]]&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| -&#039;&#039;&#039;l&#039;&#039;&#039; -&#039;&#039;&#039;n&#039;&#039;&#039;512&lt;br /&gt;
|lossy&#039;&#039;&#039;ALS&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
![[TAK]]&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| -&#039;&#039;&#039;fsl&#039;&#039;&#039;512&lt;br /&gt;
|lossy&#039;&#039;&#039;TAK&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
![[WavPack]]&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| --&#039;&#039;&#039;blocksize&#039;&#039;&#039;=512&lt;br /&gt;
|lossy&#039;&#039;&#039;WV&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
![[Wikipedia:Windows Media Audio#Windows Media Audio Lossless|WMA Lossless]]&lt;br /&gt;
| -&#039;&#039;&#039;wmalsl&#039;&#039;&#039; (same as -&#039;&#039;&#039;cbs&#039;&#039;&#039; 2048)&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
|lossy&#039;&#039;&#039;WMALSL&#039;&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
There is also [http://www.hometheaterhifi.com/volume_8_4/dvd-benchmark-part-6-dvd-audio-11-2001.html#Meridian%20Lossless%20Packing%20(MLP)%20in%20a%20Nutshell evidence] &amp;amp;mdash; so-called &amp;quot;Bit Shifting&amp;quot; &amp;amp;mdash; to suggest that lossyWAV may work with [[Wikipedia:Meridian Lossless Packing|MLP]], but this remains untested due to prohibitive prices of encoders.&lt;br /&gt;
&lt;br /&gt;
A comparison of portable media players is [[Wikipedia:Comparison of portable media players#Audio Formats|here]], which shows FLAC and WMA Lossless compatibility among listed players.&lt;br /&gt;
Any player supported by [http://www.rockbox.org Rockbox] can use FLAC or wavPack files after installing Rockbox.&lt;br /&gt;
&lt;br /&gt;
===Known unsupported codecs===&lt;br /&gt;
*[[ALAC]]&lt;br /&gt;
*[[Lossless Audio|LA]]&lt;br /&gt;
*[[Monkey&#039;s Audio]]&lt;br /&gt;
*[[OptimFROG]]&lt;br /&gt;
*[[TTA]]&lt;br /&gt;
&lt;br /&gt;
==lossyWAV application settings==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
lossyWAV beta v0.6.1 : WAV file bit depth reduction method by 2Bdecided.&lt;br /&gt;
Delphi implementation by Nick.C from a Matlab script, www.hydrogenaudio.org&lt;br /&gt;
&lt;br /&gt;
Usage   : lossyWAV &amp;lt;input wav file&amp;gt; &amp;lt;options&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example : lossyWAV musicfile.wav&lt;br /&gt;
&lt;br /&gt;
Quality Options:&lt;br /&gt;
&lt;br /&gt;
-1            extreme settings [4xFFT] (-cbs 512 -nts -3.0 -skew 36 -snr 21&lt;br /&gt;
              -spf 22224-22225-11235-11246-12358 -fft 11011)&lt;br /&gt;
-2            default settings [3xFFT] (-cbs 512 -nts  0.0 -skew 36 -snr 21&lt;br /&gt;
              -spf 22224-22235-22346-12347-12358 -fft 10101)&lt;br /&gt;
-3            compact settings [2xFFT] (-cbs 512 -nts +3.0 -skew 36 -snr 21&lt;br /&gt;
              -spf 22224-22235-22347-22358-2246C -fft 10001)&lt;br /&gt;
&lt;br /&gt;
Standard Options:&lt;br /&gt;
&lt;br /&gt;
-o &amp;lt;folder&amp;gt;   destination folder for the output file&lt;br /&gt;
-nts &amp;lt;n&amp;gt;      set noise_threshold_shift to n dB (-48.0dB&amp;lt;=n&amp;lt;=+48.0dB)&lt;br /&gt;
              (-ve values reduce bits to remove, +ve values increase)&lt;br /&gt;
-force        forcibly over-write output file if it exists; default=off&lt;br /&gt;
-check        check if WAV file has already been processed. default=off;&lt;br /&gt;
              errorlevel=16 if already processed, 0 if not.&lt;br /&gt;
-correction   write correction file while processing WAV file. default=off;&lt;br /&gt;
&lt;br /&gt;
Codec Specific Options:&lt;br /&gt;
&lt;br /&gt;
-wmalsl       optimise internal settings for WMA Lossless codec; default=off&lt;br /&gt;
&lt;br /&gt;
Advanced / System Options:&lt;br /&gt;
&lt;br /&gt;
-snr &amp;lt;n&amp;gt;      set minimum average signal to added noise ratio to n dB;&lt;br /&gt;
              (-215.0dB&amp;lt;=n&amp;lt;=48.0dB) Increasing value reduces bits to remove.&lt;br /&gt;
-skew &amp;lt;n&amp;gt;     skew fft analysis results by n dB (0.0db&amp;lt;=n&amp;lt;=48.0db) in the&lt;br /&gt;
              frequency range 20Hz to 3.45kHz&lt;br /&gt;
-spf &amp;lt;5x5hex&amp;gt; manually input the 5 spreading functions as 5 x 5 characters;&lt;br /&gt;
              These correspond to FFTs of 64, 128, 256, 512 &amp;amp; 1024 samples;&lt;br /&gt;
              e.g. 22235-22236-22347-22358-2246C (Characters must be one of&lt;br /&gt;
              1 to 9 and A to F (zero excluded).&lt;br /&gt;
-fft &amp;lt;5xbin&amp;gt;  select fft lengths to use in analysis, using binary switching,&lt;br /&gt;
              from 64, 128, 256, 512 &amp;amp; 1024 samples, e.g. 01001 = 128,1024&lt;br /&gt;
-cbs &amp;lt;n&amp;gt;      set codec block size to n samples (512&amp;lt;=n&amp;lt;=4608, n mod 32=0)&lt;br /&gt;
&lt;br /&gt;
-quiet        significantly reduce screen output&lt;br /&gt;
-nowarn       suppress lossyWAV warnings&lt;br /&gt;
-detail       enable detailled output mode&lt;br /&gt;
&lt;br /&gt;
-below        set process priority to below normal.&lt;br /&gt;
-low          set process priority to low.&lt;br /&gt;
&lt;br /&gt;
Special thanks:&lt;br /&gt;
&lt;br /&gt;
David Robinson for the method itself and motivation to implement it in Delphi.&lt;br /&gt;
Dr. Jean Debord for the use of TPMAT036 uFFT &amp;amp; uTypes units for FFT analysis.&lt;br /&gt;
Halb27 @ www.hydrogenaudio.org for donation and maintenance of the wavIO unit.&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Indicative Bitrate Reduction==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|+ &#039;&#039;&#039;Conversion using lossyWAV beta v0.5.8, [[Wikipedia:FLAC|FLAC]] -8&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
!lossyWAV Test Set&lt;br /&gt;
!FLAC -8&lt;br /&gt;
!lossyWAV -1&lt;br /&gt;
!lossyWAV -2&lt;br /&gt;
!lossyWAV -3&lt;br /&gt;
|-&lt;br /&gt;
!10 Album Test Average                                &lt;br /&gt;
| 850kbps &lt;br /&gt;
| 480kbps &lt;br /&gt;
| 426kbps &lt;br /&gt;
| 376kbps&lt;br /&gt;
|-&lt;br /&gt;
!53 sample &amp;quot;problem&amp;quot; set                &lt;br /&gt;
| 784kbps &lt;br /&gt;
| 543kbps &lt;br /&gt;
| 491kbps &lt;br /&gt;
| 434kbps&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|+ &#039;&#039;&#039;Large Foobar2000 Conversion: (lossyWAV -3; [[Wikipedia:FLAC|FLAC]] -3 -m -e -r 2 -b 512)&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
!Album&lt;br /&gt;
!FLAC -8&lt;br /&gt;
!lossyWAV -1&lt;br /&gt;
!lossyWAV -2&lt;br /&gt;
!lossyWAV -3&lt;br /&gt;
|-&lt;br /&gt;
!3283 Tracks; 258 Discs; 87.2GB&amp;gt;36.8GB  &lt;br /&gt;
| 880kbps &lt;br /&gt;
| N/A &lt;br /&gt;
| N/A&lt;br /&gt;
| 371kbps &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Using lossyWAV==&lt;br /&gt;
===Example Foobar2000 Converter Settings===&lt;br /&gt;
[[Image:Foobar2000_Converter_Settings.PNG]]&lt;br /&gt;
&lt;br /&gt;
===Example flossy.bat file called from Foobar2000===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@echo off&lt;br /&gt;
c:\data_nic\bin\lossyWAV %1 %3 %4 %5 %6 %7 %8 %9 -below -nowarn -quiet&lt;br /&gt;
c:\data_nic\bin\flac.exe -8 -f -b 512 &amp;quot;%~N1.lossy.wav&amp;quot; -o&amp;quot;%~N2.flac&amp;quot; &lt;br /&gt;
del &amp;quot;%~N1.lossy.wav&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Frequently asked questions==&lt;br /&gt;
*&#039;&#039;&#039;Question:&#039;&#039;&#039; Is it [[Variable Bitrate|VBR]]?&lt;br /&gt;
*&#039;&#039;&#039;Short answer:&#039;&#039;&#039; Yes.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Question:&#039;&#039;&#039; Is it [[transparency|transparent]]?&lt;br /&gt;
*&#039;&#039;&#039;Short answer:&#039;&#039;&#039; Almost certainly.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Question:&#039;&#039;&#039; Is it [[lossless]]?&lt;br /&gt;
*&#039;&#039;&#039;Short answer:&#039;&#039;&#039; No.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Question:&#039;&#039;&#039; Why should I use this?&lt;br /&gt;
*&#039;&#039;&#039;Answer:&#039;&#039;&#039;&lt;br /&gt;
:*high quality&lt;br /&gt;
:*extremely low chance of audible [[artifact|artefacts]]&lt;br /&gt;
:*reasonable [[bitrate]]s&lt;br /&gt;
:*usable with unmodified, established lossless formats.&lt;br /&gt;
&lt;br /&gt;
==Current Test Settings==&lt;br /&gt;
No current test settings&lt;br /&gt;
&lt;br /&gt;
==External links==&lt;br /&gt;
*[http://www.hydrogenaudio.org/forums/index.php?showtopic=56129 Current development thread] You will find the latest version and last stable version in post #1 of this thread.&lt;br /&gt;
*[http://www.hydrogenaudio.org/forums/index.php?showtopic=55522&amp;amp;st=0 Original lossyFLAC thread] Where David Robinson (Replaygain developer) introduces the method and a Matlab implementation.&lt;br /&gt;
&lt;br /&gt;
[[Category:Software]]&lt;br /&gt;
[[Category:Encoder/Decoder]]&lt;br /&gt;
[[Category:Lossy]]&lt;br /&gt;
[[Category:Lossy codecs]]&lt;/div&gt;</summary>
		<author><name>Halb27</name></author>
	</entry>
	<entry>
		<id>https://wiki.hydrogenaudio.org/index.php?title=LossyWAV&amp;diff=18117</id>
		<title>LossyWAV</title>
		<link rel="alternate" type="text/html" href="https://wiki.hydrogenaudio.org/index.php?title=LossyWAV&amp;diff=18117"/>
		<updated>2008-01-03T21:31:48Z</updated>

		<summary type="html">&lt;p&gt;Halb27: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Software Infobox&lt;br /&gt;
| name = lossyWAV&lt;br /&gt;
| screenshot = &lt;br /&gt;
| caption = &lt;br /&gt;
| maintainer = [http://www.hydrogenaudio.org/forums/index.php?showuser=42400 Nick.C]&lt;br /&gt;
| stable_release = beta v0.6.1&lt;br /&gt;
| preview_release = &lt;br /&gt;
| operating_system = [[Wikipedia:MS-DOS|MS-DOS]]&lt;br /&gt;
| use = [[Wikipedia:Digital signal processing|Digital signal processing]]&lt;br /&gt;
| license = [[Wikipedia:LGPL|LGPL license]]&lt;br /&gt;
| website = [http://www.hydrogenaudio.org/forums/index.php?showtopic=56129 Hydrogenaudio]&lt;br /&gt;
}}&lt;br /&gt;
lossyWAV is a lossy pre-processor for [[PCM]] audio contained in the [[WAV]] file format. It reduces [[Wikipedia:Audio bit depth|bit depth]] of the input signal, which, when used in conjunction with certain lossless codecs, reduces the bitrate of the encoded file significantly compared to unpreprocessed compression. &lt;br /&gt;
lossyWAV&#039;s primary goal is to maintain [[transparency]] with a high degree of confidence when processing any audio data.&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
lossyFLAC is an idea started by [http://www.hydrogenaudio.org/forums/index.php?showuser=409 2Bdecided] at hydrogenaudio, utilising the wasted bits feature of the FLAC lossless codec with the aim of transparently reducing audio bit depth (making some lower significant bits (LSB&#039;s) zero), consequently taking advantage of FLAC&#039;s detection of consistently zeroed lower significant bits within each single frame and significantly increasing coding efficiency.[http://www.hydrogenaudio.org/forums/index.php?s=&amp;amp;showtopic=55522&amp;amp;view=findpost&amp;amp;p=498179] In this way the user can enjoy audio encoded using the same codec (which may be all important from a hardware compatibility perspective) at a reduced bitrate compared to the lossless version.&lt;br /&gt;
&lt;br /&gt;
[http://www.hydrogenaudio.org/forums/index.php?showuser=42400 Nick.C] ported the original [[Wikipedia:MATLAB|MATLAB]] implementation to [[Wikipedia:Borland Delphi|Delphi]] (Many thanks [[Wikipedia:CodeGear|CodeGear]] for Turbo Explorer!!) with a liberal sprinkling of [[Wikipedia:IA-32|IA-32]] and [[Wikipedia:x87|x87]] Assembly Language for speed.&lt;br /&gt;
&lt;br /&gt;
Subsequently, lossyFLAC proved itself to work with other lossless codecs, so the application name was changed to lossyWAV. &lt;br /&gt;
&lt;br /&gt;
Since then, Nick.C has heavily developed and built upon lossyWAV, with valuable tuning performed by [http://www.hydrogenaudio.org/forums/index.php?showuser=25015 halb27] at hydrogenaudio.&lt;br /&gt;
&lt;br /&gt;
==File Identification==&lt;br /&gt;
lossyWAV-processed WAV files are named with a double filename extension, .lossy.wav, to make them instantly identifiable. e.g. &amp;quot;.lossy.flac&amp;quot; would indicate an audio file which was processed using lossyWAV, and subsequently encoded using FLAC.[http://www.hydrogenaudio.org/forums/index.php?s=&amp;amp;showtopic=55522&amp;amp;view=findpost&amp;amp;p=498559]&lt;br /&gt;
&lt;br /&gt;
From beta v0.6.1, the -correction parameter is used when processing to create a correction file which is named with the .lwcdf.wav double filename extension. When &amp;quot;added&amp;quot; to the corresponding .lossy.wav, using a not yet implemented parameter of lossyWAV, the original file will be reconstituted.&lt;br /&gt;
&lt;br /&gt;
Combinations of lossyWAV with each specific encoder are referred to as lossy&#039;&#039;&#039;X&#039;&#039;&#039;, where &#039;&#039;&#039;X&#039;&#039;&#039; is an abbreviation of the lossless codec name. Combination names are listed in the &amp;quot;[[LossyWAV#Known supported codecs|known supported codecs]]&amp;quot; section below.&lt;br /&gt;
&lt;br /&gt;
From v0.5.9, lossyWAV inserts a variable length FACT chunk into the WAV file immediately after the FMT chunk. This takes the form:&amp;lt;pre&amp;gt;fact/&amp;lt;size&amp;gt;/lossyWAV beta vx.y.z : dd/mm/yyyy hh:mm:ss&lt;br /&gt;
-2 -cbs 512 -nts 0.00 -snr 21.00 -skew 36.00&lt;br /&gt;
-spf 22224-22235-22336-12347-12358 -fft 10101&amp;lt;/pre&amp;gt;Where the version, date &amp;amp; time and user settings are copied. Additionally, if a lossyWAV FACT chunk is found in a file, the processing will be halted (exit code = 16) to prevent re-processing of an already processed file.&lt;br /&gt;
&lt;br /&gt;
The -check parameter can be used to determine whether a file has previously been processed without trying to process it, exit code = 16 if already processed; exit code = 0 if not.&lt;br /&gt;
&lt;br /&gt;
==Presets==&lt;br /&gt;
*-1: Highest quality preset, disc space-saving alternative to lossless archiving for large audio collections.&lt;br /&gt;
*-2: Default preset; a compromise between -1 and -3.&lt;br /&gt;
*-3: High quality preset for usage on a compatible [[Wikipedia:Digital audio player|DAP]], approx. 370kbps for &amp;quot;normal&amp;quot; music. [http://www.hydrogenaudio.org/forums/index.php?s=&amp;amp;showtopic=56129&amp;amp;view=findpost&amp;amp;p=531316] &lt;br /&gt;
&lt;br /&gt;
All tuning has been performed on quality preset -3 with -2 and -1 being more conservative. Quality preset -3 is generally accepted to be (and from testing so far is) transparent. If you find a track which -3 fails to achieve transparency after processing, please post a sample (no more than 30 seconds) in the development thread.&lt;br /&gt;
&lt;br /&gt;
Apart from the quality presets the -nts (noise threshold shift) parameter is the most important parameter to control quality. Without noise threshold shifting (-nts 0) the number of bits to be removed is computed in a theoretically optimal way. -nts 0 is defaulted when using quality preset -2.&lt;br /&gt;
&lt;br /&gt;
In order to be more cautious a negative -nts value can be chosen up to -48. -nts -3 is defaulted when using quality preset -1. For archiving purposes and/or very cautious users even more conservative values may be of interest.&lt;br /&gt;
&lt;br /&gt;
Because of internal precautions in addition to 2Bdecided&#039;s principles experience so far tells us that a small positive -nts value doesn&#039;t keep the encodings from being transparent. That&#039;s why -nts 3 is defaulted when using quality preset -3. A more aggressive value may be welcome for a user who wants to keep average bitrate down a bit more. The higher the -nts value however the more probable is a situation where lossyWAV is not transparent any more. A -nts value of more than 10 is not recommended though even with a value of ~10 transparency is achieved usually.&lt;br /&gt;
&lt;br /&gt;
==Supported input formats==&lt;br /&gt;
*[[WAV]]: 16-bit, 24-bit; sample rate &amp;amp;ge; 32kHz [[Pulse Code Modulation|PCM]]. Very high sample rates (&amp;amp;gt;48kHz) have not been extensively tested. Tunings have been focussed on 16-bit, 44.1kHz samples (i.e. [[Wikipedia:Red Book (audio CD standard)|CD]] PCM).&lt;br /&gt;
&lt;br /&gt;
==Codec Compatibility==&lt;br /&gt;
===Known supported codecs===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|+ &#039;&#039;&#039;Recommended settings&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
!Codec&lt;br /&gt;
!lossyWAV parameters&lt;br /&gt;
!Encoder parameters&lt;br /&gt;
!Combination name&lt;br /&gt;
|-&lt;br /&gt;
![[Free Lossless Audio Codec|FLAC]]&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| -&#039;&#039;&#039;3&#039;&#039;&#039; -&#039;&#039;&#039;m&#039;&#039;&#039; -&#039;&#039;&#039;e&#039;&#039;&#039; -&#039;&#039;&#039;r&#039;&#039;&#039; 2 -&#039;&#039;&#039;b&#039;&#039;&#039; 512 --&#039;&#039;&#039;keep-foreign-metadata&#039;&#039;&#039;[http://www.hydrogenaudio.org/forums/index.php?s=&amp;amp;showtopic=56129&amp;amp;view=findpost&amp;amp;p=533689]&lt;br /&gt;
|lossy&#039;&#039;&#039;FLAC&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
![[Wikipedia:Lossless Predictive Audio Compression|LPAC]]&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| -&#039;&#039;&#039;b&#039;&#039;&#039;512&lt;br /&gt;
|lossy&#039;&#039;&#039;LPAC&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
![[Wikipedia:Audio Lossless Coding|MPEG-4 ALS]]&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| -&#039;&#039;&#039;l&#039;&#039;&#039; -&#039;&#039;&#039;n&#039;&#039;&#039;512&lt;br /&gt;
|lossy&#039;&#039;&#039;ALS&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
![[TAK]]&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| -&#039;&#039;&#039;fsl&#039;&#039;&#039;512&lt;br /&gt;
|lossy&#039;&#039;&#039;TAK&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
![[WavPack]]&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| --&#039;&#039;&#039;blocksize&#039;&#039;&#039;=512&lt;br /&gt;
|lossy&#039;&#039;&#039;WV&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
![[Wikipedia:Windows Media Audio#Windows Media Audio Lossless|WMA Lossless]]&lt;br /&gt;
| -&#039;&#039;&#039;wmalsl&#039;&#039;&#039; (same as -&#039;&#039;&#039;cbs&#039;&#039;&#039; 2048)&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
|lossy&#039;&#039;&#039;WMALSL&#039;&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
There is also [http://www.hometheaterhifi.com/volume_8_4/dvd-benchmark-part-6-dvd-audio-11-2001.html#Meridian%20Lossless%20Packing%20(MLP)%20in%20a%20Nutshell evidence] &amp;amp;mdash; so-called &amp;quot;Bit Shifting&amp;quot; &amp;amp;mdash; to suggest that lossyWAV may work with [[Wikipedia:Meridian Lossless Packing|MLP]], but this remains untested due to prohibitive prices of encoders.&lt;br /&gt;
&lt;br /&gt;
A comparison of portable media players is [[Wikipedia:Comparison of portable media players#Audio Formats|here]], which shows FLAC and WMA Lossless compatibility among listed players.&lt;br /&gt;
Any player supported by [http://www.rockbox.org Rockbox] can use FLAC or wavPack files after installing Rockbox.&lt;br /&gt;
&lt;br /&gt;
===Known unsupported codecs===&lt;br /&gt;
*[[ALAC]]&lt;br /&gt;
*[[Lossless Audio|LA]]&lt;br /&gt;
*[[Monkey&#039;s Audio]]&lt;br /&gt;
*[[OptimFROG]]&lt;br /&gt;
*[[TTA]]&lt;br /&gt;
&lt;br /&gt;
==lossyWAV application settings==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
lossyWAV beta v0.6.1 : WAV file bit depth reduction method by 2Bdecided.&lt;br /&gt;
Delphi implementation by Nick.C from a Matlab script, www.hydrogenaudio.org&lt;br /&gt;
&lt;br /&gt;
Usage   : lossyWAV &amp;lt;input wav file&amp;gt; &amp;lt;options&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example : lossyWAV musicfile.wav&lt;br /&gt;
&lt;br /&gt;
Quality Options:&lt;br /&gt;
&lt;br /&gt;
-1            extreme settings [4xFFT] (-cbs 512 -nts -3.0 -skew 36 -snr 21&lt;br /&gt;
              -spf 22224-22225-11235-11246-12358 -fft 11011)&lt;br /&gt;
-2            default settings [3xFFT] (-cbs 512 -nts  0.0 -skew 36 -snr 21&lt;br /&gt;
              -spf 22224-22235-22346-12347-12358 -fft 10101)&lt;br /&gt;
-3            compact settings [2xFFT] (-cbs 512 -nts +3.0 -skew 36 -snr 21&lt;br /&gt;
              -spf 22224-22235-22347-22358-2246C -fft 10001)&lt;br /&gt;
&lt;br /&gt;
Standard Options:&lt;br /&gt;
&lt;br /&gt;
-o &amp;lt;folder&amp;gt;   destination folder for the output file&lt;br /&gt;
-nts &amp;lt;n&amp;gt;      set noise_threshold_shift to n dB (-48.0dB&amp;lt;=n&amp;lt;=+48.0dB)&lt;br /&gt;
              (-ve values reduce bits to remove, +ve values increase)&lt;br /&gt;
-force        forcibly over-write output file if it exists; default=off&lt;br /&gt;
-check        check if WAV file has already been processed. default=off;&lt;br /&gt;
              errorlevel=16 if already processed, 0 if not.&lt;br /&gt;
-correction   write correction file while processing WAV file. default=off;&lt;br /&gt;
&lt;br /&gt;
Codec Specific Options:&lt;br /&gt;
&lt;br /&gt;
-wmalsl       optimise internal settings for WMA Lossless codec; default=off&lt;br /&gt;
&lt;br /&gt;
Advanced / System Options:&lt;br /&gt;
&lt;br /&gt;
-snr &amp;lt;n&amp;gt;      set minimum average signal to added noise ratio to n dB;&lt;br /&gt;
              (-215.0dB&amp;lt;=n&amp;lt;=48.0dB) Increasing value reduces bits to remove.&lt;br /&gt;
-skew &amp;lt;n&amp;gt;     skew fft analysis results by n dB (0.0db&amp;lt;=n&amp;lt;=48.0db) in the&lt;br /&gt;
              frequency range 20Hz to 3.45kHz&lt;br /&gt;
-spf &amp;lt;5x5hex&amp;gt; manually input the 5 spreading functions as 5 x 5 characters;&lt;br /&gt;
              These correspond to FFTs of 64, 128, 256, 512 &amp;amp; 1024 samples;&lt;br /&gt;
              e.g. 22235-22236-22347-22358-2246C (Characters must be one of&lt;br /&gt;
              1 to 9 and A to F (zero excluded).&lt;br /&gt;
-fft &amp;lt;5xbin&amp;gt;  select fft lengths to use in analysis, using binary switching,&lt;br /&gt;
              from 64, 128, 256, 512 &amp;amp; 1024 samples, e.g. 01001 = 128,1024&lt;br /&gt;
-cbs &amp;lt;n&amp;gt;      set codec block size to n samples (512&amp;lt;=n&amp;lt;=4608, n mod 32=0)&lt;br /&gt;
&lt;br /&gt;
-quiet        significantly reduce screen output&lt;br /&gt;
-nowarn       suppress lossyWAV warnings&lt;br /&gt;
-detail       enable detailled output mode&lt;br /&gt;
&lt;br /&gt;
-below        set process priority to below normal.&lt;br /&gt;
-low          set process priority to low.&lt;br /&gt;
&lt;br /&gt;
Special thanks:&lt;br /&gt;
&lt;br /&gt;
David Robinson for the method itself and motivation to implement it in Delphi.&lt;br /&gt;
Dr. Jean Debord for the use of TPMAT036 uFFT &amp;amp; uTypes units for FFT analysis.&lt;br /&gt;
Halb27 @ www.hydrogenaudio.org for donation and maintenance of the wavIO unit.&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Indicative Bitrate Reduction==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|+ &#039;&#039;&#039;Conversion using lossyWAV beta v0.5.8, [[Wikipedia:FLAC|FLAC]] -8&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
!lossyWAV Test Set&lt;br /&gt;
!FLAC -8&lt;br /&gt;
!lossyWAV -1&lt;br /&gt;
!lossyWAV -2&lt;br /&gt;
!lossyWAV -3&lt;br /&gt;
|-&lt;br /&gt;
!10 Album Test Average                                &lt;br /&gt;
| 850kbps &lt;br /&gt;
| 480kbps &lt;br /&gt;
| 426kbps &lt;br /&gt;
| 376kbps&lt;br /&gt;
|-&lt;br /&gt;
!53 sample &amp;quot;problem&amp;quot; set                &lt;br /&gt;
| 784kbps &lt;br /&gt;
| 543kbps &lt;br /&gt;
| 491kbps &lt;br /&gt;
| 434kbps&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|+ &#039;&#039;&#039;Large Foobar2000 Conversion: (lossyWAV -3; [[Wikipedia:FLAC|FLAC]] -3 -m -e -r 2 -b 512)&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
!Album&lt;br /&gt;
!FLAC -8&lt;br /&gt;
!lossyWAV -1&lt;br /&gt;
!lossyWAV -2&lt;br /&gt;
!lossyWAV -3&lt;br /&gt;
|-&lt;br /&gt;
!3283 Tracks; 258 Discs; 87.2GB&amp;gt;36.8GB  &lt;br /&gt;
| 880kbps &lt;br /&gt;
| N/A &lt;br /&gt;
| N/A&lt;br /&gt;
| 371kbps &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Using lossyWAV==&lt;br /&gt;
===Example Foobar2000 Converter Settings===&lt;br /&gt;
[[Image:Foobar2000_Converter_Settings.PNG]]&lt;br /&gt;
&lt;br /&gt;
===Example flossy.bat file called from Foobar2000===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@echo off&lt;br /&gt;
c:\data_nic\bin\lossyWAV %1 %3 %4 %5 %6 %7 %8 %9 -below -nowarn -quiet&lt;br /&gt;
c:\data_nic\bin\flac.exe -8 -f -b 512 &amp;quot;%~N1.lossy.wav&amp;quot; -o&amp;quot;%~N2.flac&amp;quot; &lt;br /&gt;
del &amp;quot;%~N1.lossy.wav&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Frequently asked questions==&lt;br /&gt;
*&#039;&#039;&#039;Question:&#039;&#039;&#039; Is it [[Variable Bitrate|VBR]]?&lt;br /&gt;
*&#039;&#039;&#039;Short answer:&#039;&#039;&#039; Yes.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Question:&#039;&#039;&#039; Is it [[transparency|transparent]]?&lt;br /&gt;
*&#039;&#039;&#039;Short answer:&#039;&#039;&#039; Almost certainly.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Question:&#039;&#039;&#039; Is it [[lossless]]?&lt;br /&gt;
*&#039;&#039;&#039;Short answer:&#039;&#039;&#039; No.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Question:&#039;&#039;&#039; Why should I use this?&lt;br /&gt;
*&#039;&#039;&#039;Answer:&#039;&#039;&#039;&lt;br /&gt;
:*high quality&lt;br /&gt;
:*extremely low chance of audible [[artifact|artefacts]]&lt;br /&gt;
:*reasonable [[bitrate]]s&lt;br /&gt;
:*usable with unmodified, established lossless formats.&lt;br /&gt;
&lt;br /&gt;
==Current Test Settings==&lt;br /&gt;
No current test settings&lt;br /&gt;
&lt;br /&gt;
==External links==&lt;br /&gt;
*[http://www.hydrogenaudio.org/forums/index.php?showtopic=56129 Current development thread] You will find the latest version and last stable version in post #1 of this thread.&lt;br /&gt;
*[http://www.hydrogenaudio.org/forums/index.php?showtopic=55522&amp;amp;st=0 Original lossyFLAC thread] Where David Robinson (Replaygain developer) introduces the method and a Matlab implementation.&lt;br /&gt;
&lt;br /&gt;
[[Category:Software]]&lt;br /&gt;
[[Category:Encoder/Decoder]]&lt;br /&gt;
[[Category:Lossy]]&lt;/div&gt;</summary>
		<author><name>Halb27</name></author>
	</entry>
	<entry>
		<id>https://wiki.hydrogenaudio.org/index.php?title=LossyWAV&amp;diff=18116</id>
		<title>LossyWAV</title>
		<link rel="alternate" type="text/html" href="https://wiki.hydrogenaudio.org/index.php?title=LossyWAV&amp;diff=18116"/>
		<updated>2008-01-03T21:30:25Z</updated>

		<summary type="html">&lt;p&gt;Halb27: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Software Infobox&lt;br /&gt;
| name = lossyWAV&lt;br /&gt;
| screenshot = &lt;br /&gt;
| caption = &lt;br /&gt;
| maintainer = [http://www.hydrogenaudio.org/forums/index.php?showuser=42400 Nick.C]&lt;br /&gt;
| stable_release = beta v0.6.1&lt;br /&gt;
| preview_release = &lt;br /&gt;
| operating_system = [[Wikipedia:MS-DOS|MS-DOS]]&lt;br /&gt;
| use = [[Wikipedia:Digital signal processing|Digital signal processing]]&lt;br /&gt;
| license = [[Wikipedia:LGPL|LGPL license]]&lt;br /&gt;
| website = [http://www.hydrogenaudio.org/forums/index.php?showtopic=56129 Hydrogenaudio]&lt;br /&gt;
}}&lt;br /&gt;
lossyWAV is a lossy pre-processor for [[PCM]] audio contained in the [[WAV]] file format. It reduces [[Wikipedia:Audio bit depth|bit depth]] of the input signal, which, when used in conjunction with certain lossless codecs, reduces the bitrate of the encoded file significantly compared to unpreprocessed compression. &lt;br /&gt;
lossyWAV&#039;s primary goal is to maintain [[transparency]] with a high degree of confidence when processing any audio data.&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
lossyFLAC is an idea started by [http://www.hydrogenaudio.org/forums/index.php?showuser=409 2Bdecided] at hydrogenaudio, utilising the wasted bits feature of the FLAC lossless codec with the aim of transparently reducing audio bit depth (making some lower significant bits (LSB&#039;s) zero), consequently taking advantage of FLAC&#039;s detection of consistently zeroed lower significant bits within each single frame and significantly increasing coding efficiency.[http://www.hydrogenaudio.org/forums/index.php?s=&amp;amp;showtopic=55522&amp;amp;view=findpost&amp;amp;p=498179] In this way the user can enjoy audio encoded using the same codec (which may be all important from a hardware compatibility perspective) at a reduced bitrate compared to the lossless version.&lt;br /&gt;
&lt;br /&gt;
[http://www.hydrogenaudio.org/forums/index.php?showuser=42400 Nick.C] ported the original [[Wikipedia:MATLAB|MATLAB]] implementation to [[Wikipedia:Borland Delphi|Delphi]] (Many thanks [[Wikipedia:CodeGear|CodeGear]] for Turbo Explorer!!) with a liberal sprinkling of [[Wikipedia:IA-32|IA-32]] and [[Wikipedia:x87|x87]] Assembly Language for speed.&lt;br /&gt;
&lt;br /&gt;
Subsequently, lossyFLAC proved itself to work with other lossless codecs, so the application name was changed to lossyWAV. &lt;br /&gt;
&lt;br /&gt;
Since then, Nick.C has heavily developed and built upon lossyWAV, with valuable tuning performed by [http://www.hydrogenaudio.org/forums/index.php?showuser=25015 halb27] at hydrogenaudio.&lt;br /&gt;
&lt;br /&gt;
==File Identification==&lt;br /&gt;
lossyWAV-processed WAV files are named with a double filename extension, .lossy.wav, to make them instantly identifiable. e.g. &amp;quot;.lossy.flac&amp;quot; would indicate an audio file which was processed using lossyWAV, and subsequently encoded using FLAC.[http://www.hydrogenaudio.org/forums/index.php?s=&amp;amp;showtopic=55522&amp;amp;view=findpost&amp;amp;p=498559]&lt;br /&gt;
&lt;br /&gt;
From beta v0.6.1, the -correction parameter is used when processing to create a correction file which is named with the .lwcdf.wav double filename extension. When &amp;quot;added&amp;quot; to the corresponding .lossy.wav, using a not yet implemented parameter of lossyWAV, the original file will be reconstituted.&lt;br /&gt;
&lt;br /&gt;
Combinations of lossyWAV with each specific encoder are referred to as lossy&#039;&#039;&#039;X&#039;&#039;&#039;, where &#039;&#039;&#039;X&#039;&#039;&#039; is an abbreviation of the lossless codec name. Combination names are listed in the &amp;quot;[[LossyWAV#Known supported codecs|known supported codecs]]&amp;quot; section below.&lt;br /&gt;
&lt;br /&gt;
From v0.5.9, lossyWAV inserts a variable length FACT chunk into the WAV file immediately after the FMT chunk. This takes the form:&amp;lt;pre&amp;gt;fact/&amp;lt;size&amp;gt;/lossyWAV beta vx.y.z : dd/mm/yyyy hh:mm:ss&lt;br /&gt;
-2 -cbs 512 -nts 0.00 -snr 21.00 -skew 36.00&lt;br /&gt;
-spf 22224-22235-22336-12347-12358 -fft 10101&amp;lt;/pre&amp;gt;Where the version, date &amp;amp; time and user settings are copied. Additionally, if a lossyWAV FACT chunk is found in a file, the processing will be halted (exit code = 16) to prevent re-processing of an already processed file.&lt;br /&gt;
&lt;br /&gt;
The -check parameter can be used to determine whether a file has previously been processed without trying to process it, exit code = 16 if already processed; exit code = 0 if not.&lt;br /&gt;
&lt;br /&gt;
==Presets==&lt;br /&gt;
*-1: Highest quality preset, disc space-saving alternative to lossless archiving for large audio collections.&lt;br /&gt;
*-2: Default preset; a compromise between -1 and -3.&lt;br /&gt;
*-3: High quality preset for usage on a compatible [[Wikipedia:Digital audio player|DAP]], approx. 370kbps for &amp;quot;normal&amp;quot; music. [http://www.hydrogenaudio.org/forums/index.php?s=&amp;amp;showtopic=56129&amp;amp;view=findpost&amp;amp;p=531316] &lt;br /&gt;
&lt;br /&gt;
All tuning has been performed on quality preset -3 with -2 and -1 being more conservative. Quality preset -3 is generally accepted to be (and from testing so far is) transparent. If you find a track which -3 fails to achieve transparency after processing, please post a sample (no more than 30 seconds) in the development thread.&lt;br /&gt;
&lt;br /&gt;
Apart from the quality presets the -nts (noise threshold shift) parameter is the most important parameter to control quality. Without noise threshold shifting (-nts 0) the number of bits to be removed is computed in a theoretically optimal way. -nts 0 is defaulted when using quality preset -2.&lt;br /&gt;
&lt;br /&gt;
In order to be more cautious a negative -nts value can be chosen up to -48. -nts -3 is defaulted when using quality preset -1. For archiving purposes and/or very cautious users even more conservative values may be of interest.&lt;br /&gt;
&lt;br /&gt;
Because of internal precautions in addition to 2Bdecided&#039;s principles experience so far tells us that a small positive -nts value doesn&#039;t keep the encodings from being transparent. That&#039;s why -nts 3 is defaulted when using quality preset -3. A more aggressive value may be welcome for a user who wants to keep average bitrate down a bit more. The higher the -nts value however the more probable is a situation where lossyWAV is not transparent any more. A -nts value of more than 10 is not recommended though even with a value of ~10 transparency is achieved usually.&lt;br /&gt;
&lt;br /&gt;
==Supported input formats==&lt;br /&gt;
*[[WAV]]: 16-bit, 24-bit; sample rate &amp;amp;ge; 32kHz [[Pulse Code Modulation|PCM]]. Very high sample rates (&amp;amp;gt;48kHz) have not been extensively tested. Tunings have been focussed on 16-bit, 44.1kHz samples (i.e. [[Wikipedia:Red Book (audio CD standard)|CD]] PCM).&lt;br /&gt;
&lt;br /&gt;
==Codec Compatibility==&lt;br /&gt;
===Known supported codecs===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|+ &#039;&#039;&#039;Recommended settings&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
!Codec&lt;br /&gt;
!lossyWAV parameters&lt;br /&gt;
!Encoder parameters&lt;br /&gt;
!Combination name&lt;br /&gt;
|-&lt;br /&gt;
![[Free Lossless Audio Codec|FLAC]]&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| -&#039;&#039;&#039;3&#039;&#039;&#039; -&#039;&#039;&#039;m&#039;&#039;&#039; -&#039;&#039;&#039;e&#039;&#039;&#039; -&#039;&#039;&#039;r&#039;&#039;&#039; 2 -&#039;&#039;&#039;b&#039;&#039;&#039; 512 --&#039;&#039;&#039;keep-foreign-metadata&#039;&#039;&#039;[http://www.hydrogenaudio.org/forums/index.php?s=&amp;amp;showtopic=56129&amp;amp;view=findpost&amp;amp;p=533689]&lt;br /&gt;
|lossy&#039;&#039;&#039;FLAC&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
![[Wikipedia:Lossless Predictive Audio Compression|LPAC]]&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| -&#039;&#039;&#039;b&#039;&#039;&#039;512&lt;br /&gt;
|lossy&#039;&#039;&#039;LPAC&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
![[Wikipedia:Audio Lossless Coding|MPEG-4 ALS]]&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| -&#039;&#039;&#039;l&#039;&#039;&#039; -&#039;&#039;&#039;n&#039;&#039;&#039;512&lt;br /&gt;
|lossy&#039;&#039;&#039;ALS&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
![[TAK]]&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| -&#039;&#039;&#039;fsl&#039;&#039;&#039;512&lt;br /&gt;
|lossy&#039;&#039;&#039;TAK&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
![[WavPack]]&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| --&#039;&#039;&#039;blocksize&#039;&#039;&#039;=512&lt;br /&gt;
|lossy&#039;&#039;&#039;WV&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
![[Wikipedia:Windows Media Audio#Windows Media Audio Lossless|WMA Lossless]]&lt;br /&gt;
| -&#039;&#039;&#039;wmalsl&#039;&#039;&#039; (same as -&#039;&#039;&#039;cbs&#039;&#039;&#039; 2048)&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
|lossy&#039;&#039;&#039;WMALSL&#039;&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
There is also [http://www.hometheaterhifi.com/volume_8_4/dvd-benchmark-part-6-dvd-audio-11-2001.html#Meridian%20Lossless%20Packing%20(MLP)%20in%20a%20Nutshell evidence] &amp;amp;mdash; so-called &amp;quot;Bit Shifting&amp;quot; &amp;amp;mdash; to suggest that lossyWAV may work with [[Wikipedia:Meridian Lossless Packing|MLP]], but this remains untested due to prohibitive prices of encoders.&lt;br /&gt;
&lt;br /&gt;
A comparison of portable media players is [[Wikipedia:Comparison of portable media players#Audio Formats|here]], which shows FLAC and WMA Lossless compatibility among listed players.&lt;br /&gt;
Any player supported by [http://www.rockbox.org Rockbox] can use FLAC or wavPack files after installing Rockbox.&lt;br /&gt;
&lt;br /&gt;
===Known unsupported codecs===&lt;br /&gt;
*[[ALAC]]&lt;br /&gt;
*[[Lossless Audio|LA]]&lt;br /&gt;
*[[Monkey&#039;s Audio]]&lt;br /&gt;
*[[OptimFROG]]&lt;br /&gt;
*[[TTA]]&lt;br /&gt;
&lt;br /&gt;
==lossyWAV application settings==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
lossyWAV beta v0.6.1 : WAV file bit depth reduction method by 2Bdecided.&lt;br /&gt;
Delphi implementation by Nick.C from a Matlab script, www.hydrogenaudio.org&lt;br /&gt;
&lt;br /&gt;
Usage   : lossyWAV &amp;lt;input wav file&amp;gt; &amp;lt;options&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example : lossyWAV musicfile.wav&lt;br /&gt;
&lt;br /&gt;
Quality Options:&lt;br /&gt;
&lt;br /&gt;
-1            extreme settings [4xFFT] (-cbs 512 -nts -3.0 -skew 36 -snr 21&lt;br /&gt;
              -spf 22224-22225-11235-11246-12358 -fft 11011)&lt;br /&gt;
-2            default settings [3xFFT] (-cbs 512 -nts  0.0 -skew 36 -snr 21&lt;br /&gt;
              -spf 22224-22235-22346-12347-12358 -fft 10101)&lt;br /&gt;
-3            compact settings [2xFFT] (-cbs 512 -nts +3.0 -skew 36 -snr 21&lt;br /&gt;
              -spf 22224-22235-22347-22358-2246C -fft 10001)&lt;br /&gt;
&lt;br /&gt;
Standard Options:&lt;br /&gt;
&lt;br /&gt;
-o &amp;lt;folder&amp;gt;   destination folder for the output file&lt;br /&gt;
-nts &amp;lt;n&amp;gt;      set noise_threshold_shift to n dB (-48.0dB&amp;lt;=n&amp;lt;=+48.0dB)&lt;br /&gt;
              (-ve values reduce bits to remove, +ve values increase)&lt;br /&gt;
-force        forcibly over-write output file if it exists; default=off&lt;br /&gt;
-check        check if WAV file has already been processed. default=off;&lt;br /&gt;
              errorlevel=16 if already processed, 0 if not.&lt;br /&gt;
-correction   write correction file while processing WAV file. default=off;&lt;br /&gt;
&lt;br /&gt;
Codec Specific Options:&lt;br /&gt;
&lt;br /&gt;
-wmalsl       optimise internal settings for WMA Lossless codec; default=off&lt;br /&gt;
&lt;br /&gt;
Advanced / System Options:&lt;br /&gt;
&lt;br /&gt;
-snr &amp;lt;n&amp;gt;      set minimum average signal to added noise ratio to n dB;&lt;br /&gt;
              (-215.0dB&amp;lt;=n&amp;lt;=48.0dB) Increasing value reduces bits to remove.&lt;br /&gt;
-skew &amp;lt;n&amp;gt;     skew fft analysis results by n dB (0.0db&amp;lt;=n&amp;lt;=48.0db) in the&lt;br /&gt;
              frequency range 20Hz to 3.45kHz&lt;br /&gt;
-spf &amp;lt;5x5hex&amp;gt; manually input the 5 spreading functions as 5 x 5 characters;&lt;br /&gt;
              These correspond to FFTs of 64, 128, 256, 512 &amp;amp; 1024 samples;&lt;br /&gt;
              e.g. 22235-22236-22347-22358-2246C (Characters must be one of&lt;br /&gt;
              1 to 9 and A to F (zero excluded).&lt;br /&gt;
-fft &amp;lt;5xbin&amp;gt;  select fft lengths to use in analysis, using binary switching,&lt;br /&gt;
              from 64, 128, 256, 512 &amp;amp; 1024 samples, e.g. 01001 = 128,1024&lt;br /&gt;
-cbs &amp;lt;n&amp;gt;      set codec block size to n samples (512&amp;lt;=n&amp;lt;=4608, n mod 32=0)&lt;br /&gt;
&lt;br /&gt;
-quiet        significantly reduce screen output&lt;br /&gt;
-nowarn       suppress lossyWAV warnings&lt;br /&gt;
-detail       enable detailled output mode&lt;br /&gt;
&lt;br /&gt;
-below        set process priority to below normal.&lt;br /&gt;
-low          set process priority to low.&lt;br /&gt;
&lt;br /&gt;
Special thanks:&lt;br /&gt;
&lt;br /&gt;
David Robinson for the method itself and motivation to implement it in Delphi.&lt;br /&gt;
Dr. Jean Debord for the use of TPMAT036 uFFT &amp;amp; uTypes units for FFT analysis.&lt;br /&gt;
Halb27 @ www.hydrogenaudio.org for donation and maintenance of the wavIO unit.&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Indicative Bitrate Reduction==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|+ &#039;&#039;&#039;Conversion using lossyWAV beta v0.5.8, [[Wikipedia:FLAC|FLAC]] -8&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
!lossyWAV Test Set&lt;br /&gt;
!FLAC -8&lt;br /&gt;
!lossyWAV -1&lt;br /&gt;
!lossyWAV -2&lt;br /&gt;
!lossyWAV -3&lt;br /&gt;
|-&lt;br /&gt;
!10 Album Test Average                                &lt;br /&gt;
| 850kbps &lt;br /&gt;
| 480kbps &lt;br /&gt;
| 426kbps &lt;br /&gt;
| 376kbps&lt;br /&gt;
|-&lt;br /&gt;
!53 sample &amp;quot;problem&amp;quot; set                &lt;br /&gt;
| 784kbps &lt;br /&gt;
| 543kbps &lt;br /&gt;
| 491kbps &lt;br /&gt;
| 434kbps&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|+ &#039;&#039;&#039;Large Foobar2000 Conversion: (lossyWAV -3; [[Wikipedia:FLAC|FLAC]] -3 -m -e -r 2 -b 512)&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
!Album&lt;br /&gt;
!FLAC -8&lt;br /&gt;
!lossyWAV -1&lt;br /&gt;
!lossyWAV -2&lt;br /&gt;
!lossyWAV -3&lt;br /&gt;
|-&lt;br /&gt;
!3283 Tracks; 258 Discs; 87.2GB&amp;gt;36.8GB  &lt;br /&gt;
| 880kbps &lt;br /&gt;
| N/A &lt;br /&gt;
| N/A&lt;br /&gt;
| 371kbps &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Using lossyWAV==&lt;br /&gt;
===Example Foobar2000 Converter Settings===&lt;br /&gt;
[[Image:Foobar2000_Converter_Settings.PNG]]&lt;br /&gt;
&lt;br /&gt;
===Example flossy.bat file called from Foobar2000===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@echo off&lt;br /&gt;
c:\data_nic\bin\lossyWAV %1 %3 %4 %5 %6 %7 %8 %9 -below -nowarn -quiet&lt;br /&gt;
c:\data_nic\bin\flac.exe -8 -f -b 512 &amp;quot;%~N1.lossy.wav&amp;quot; -o&amp;quot;%~N2.flac&amp;quot; &lt;br /&gt;
del &amp;quot;%~N1.lossy.wav&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Frequently asked questions==&lt;br /&gt;
*&#039;&#039;&#039;Question:&#039;&#039;&#039; Is it [[Variable Bitrate|VBR]]?&lt;br /&gt;
*&#039;&#039;&#039;Short answer:&#039;&#039;&#039; Yes.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Question:&#039;&#039;&#039; Is it [[transparency|transparent]]?&lt;br /&gt;
*&#039;&#039;&#039;Short answer:&#039;&#039;&#039; Almost certainly.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Question:&#039;&#039;&#039; Is it [[lossless]]?&lt;br /&gt;
*&#039;&#039;&#039;Short answer:&#039;&#039;&#039; No.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Question:&#039;&#039;&#039; Why should I use this?&lt;br /&gt;
*&#039;&#039;&#039;Answer:&#039;&#039;&#039;&lt;br /&gt;
:*high quality&lt;br /&gt;
:*extremely low chance of audible [[artifact|artefacts]]&lt;br /&gt;
:*reasonable [[bitrate]]s&lt;br /&gt;
:*usable with unmodified, established lossless formats.&lt;br /&gt;
&lt;br /&gt;
==Current Test Settings==&lt;br /&gt;
No current test settings&lt;br /&gt;
&lt;br /&gt;
==External links==&lt;br /&gt;
*[http://www.hydrogenaudio.org/forums/index.php?showtopic=56129 Current development thread] You will find the latest version and last stable version in post #1 of this thread.&lt;br /&gt;
*[http://www.hydrogenaudio.org/forums/index.php?showtopic=55522&amp;amp;st=0 Original lossyFLAC thread] Where David Robinson (Replaygain developer) introduces the method and a Matlab implementation.&lt;br /&gt;
&lt;br /&gt;
[[Category:Software]]&lt;br /&gt;
[[Category:Encoder/Decoder]]&lt;/div&gt;</summary>
		<author><name>Halb27</name></author>
	</entry>
	<entry>
		<id>https://wiki.hydrogenaudio.org/index.php?title=LossyWAV&amp;diff=18115</id>
		<title>LossyWAV</title>
		<link rel="alternate" type="text/html" href="https://wiki.hydrogenaudio.org/index.php?title=LossyWAV&amp;diff=18115"/>
		<updated>2008-01-03T21:19:39Z</updated>

		<summary type="html">&lt;p&gt;Halb27: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Software Infobox&lt;br /&gt;
| name = lossyWAV&lt;br /&gt;
| screenshot = &lt;br /&gt;
| caption = &lt;br /&gt;
| maintainer = [http://www.hydrogenaudio.org/forums/index.php?showuser=42400 Nick.C]&lt;br /&gt;
| stable_release = beta v0.6.1&lt;br /&gt;
| preview_release = &lt;br /&gt;
| operating_system = [[Wikipedia:MS-DOS|MS-DOS]]&lt;br /&gt;
| use = [[Wikipedia:Digital signal processing|Digital signal processing]]&lt;br /&gt;
| license = [[Wikipedia:LGPL|LGPL license]]&lt;br /&gt;
| website = [http://www.hydrogenaudio.org/forums/index.php?showtopic=56129 Hydrogenaudio]&lt;br /&gt;
}}&lt;br /&gt;
lossyWAV is a lossy pre-processor for [[PCM]] audio contained in the [[WAV]] file format. It reduces [[Wikipedia:Audio bit depth|bit depth]] of the input signal, which, when used in conjunction with certain lossless codecs, reduces the bitrate of the encoded file significantly compared to unpreprocessed compression. &lt;br /&gt;
lossyWAV&#039;s primary goal is to maintain [[transparency]] with a high degree of confidence when processing any audio data.&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
lossyFLAC is an idea started by [http://www.hydrogenaudio.org/forums/index.php?showuser=409 2Bdecided] at hydrogenaudio, utilising the wasted bits feature of the FLAC lossless codec with the aim of transparently reducing audio bit depth (making some lower significant bits (LSB&#039;s) zero), consequently taking advantage of FLAC&#039;s detection of consistently zeroed lower significant bits within each single frame and significantly increasing coding efficiency.[http://www.hydrogenaudio.org/forums/index.php?s=&amp;amp;showtopic=55522&amp;amp;view=findpost&amp;amp;p=498179] In this way the user can enjoy audio encoded using the same codec (which may be all important from a hardware compatibility perspective) at a reduced bitrate compared to the lossless version.&lt;br /&gt;
&lt;br /&gt;
[http://www.hydrogenaudio.org/forums/index.php?showuser=42400 Nick.C] ported the original [[Wikipedia:MATLAB|MATLAB]] implementation to [[Wikipedia:Borland Delphi|Delphi]] (Many thanks [[Wikipedia:CodeGear|CodeGear]] for Turbo Explorer!!) with a liberal sprinkling of [[Wikipedia:IA-32|IA-32]] and [[Wikipedia:x87|x87]] Assembly Language for speed.&lt;br /&gt;
&lt;br /&gt;
Subsequently, lossyFLAC proved itself to work with other lossless codecs, so the application name was changed to lossyWAV. &lt;br /&gt;
&lt;br /&gt;
Since then, Nick.C has heavily developed and built upon lossyWAV, with valuable tuning performed by [http://www.hydrogenaudio.org/forums/index.php?showuser=25015 halb27] at hydrogenaudio.&lt;br /&gt;
&lt;br /&gt;
==File Identification==&lt;br /&gt;
lossyWAV-processed WAV files are named with a double filename extension, .lossy.wav, to make them instantly identifiable. e.g. &amp;quot;.lossy.flac&amp;quot; would indicate an audio file which was processed using lossyWAV, and subsequently encoded using FLAC.[http://www.hydrogenaudio.org/forums/index.php?s=&amp;amp;showtopic=55522&amp;amp;view=findpost&amp;amp;p=498559]&lt;br /&gt;
&lt;br /&gt;
From beta v0.6.1, the -correction parameter is used when processing to create a correction file which is named with the .lwcdf.wav double filename extension. When &amp;quot;added&amp;quot; to the corresponding .lossy.wav, using a not yet implemented parameter of lossyWAV, the original file will be reconstituted.&lt;br /&gt;
&lt;br /&gt;
Combinations of lossyWAV with each specific encoder are referred to as lossy&#039;&#039;&#039;X&#039;&#039;&#039;, where &#039;&#039;&#039;X&#039;&#039;&#039; is an abbreviation of the lossless codec name. Combination names are listed in the &amp;quot;[[LossyWAV#Known supported codecs|known supported codecs]]&amp;quot; section below.&lt;br /&gt;
&lt;br /&gt;
From v0.5.9, lossyWAV inserts a variable length FACT chunk into the WAV file immediately after the FMT chunk. This takes the form:&amp;lt;pre&amp;gt;fact/&amp;lt;size&amp;gt;/lossyWAV beta vx.y.z : dd/mm/yyyy hh:mm:ss&lt;br /&gt;
-2 -cbs 512 -nts 0.00 -snr 21.00 -skew 36.00&lt;br /&gt;
-spf 22224-22235-22336-12347-12358 -fft 10101&amp;lt;/pre&amp;gt;Where the version, date &amp;amp; time and user settings are copied. Additionally, if a lossyWAV FACT chunk is found in a file, the processing will be halted (exit code = 16) to prevent re-processing of an already processed file.&lt;br /&gt;
&lt;br /&gt;
The -check parameter can be used to determine whether a file has previously been processed without trying to process it, exit code = 16 if already processed; exit code = 0 if not.&lt;br /&gt;
&lt;br /&gt;
==Presets==&lt;br /&gt;
*-1: Highest quality preset, disc space-saving alternative to lossless archiving for large audio collections.&lt;br /&gt;
*-2: Default preset; a compromise between -1 and -3.&lt;br /&gt;
*-3: High quality preset for usage on a compatible [[Wikipedia:Digital audio player|DAP]], approx. 370kbps for &amp;quot;normal&amp;quot; music. [http://www.hydrogenaudio.org/forums/index.php?s=&amp;amp;showtopic=56129&amp;amp;view=findpost&amp;amp;p=531316] &lt;br /&gt;
&lt;br /&gt;
All tuning has been performed on quality preset -3 with -2 and -1 being more conservative. Quality preset -3 is generally accepted to be (and from testing so far is) transparent. If you find a track which -3 fails to achieve transparency after processing, please post a sample (no more than 30 seconds) in the development thread.&lt;br /&gt;
&lt;br /&gt;
Apart from the quality presets the -nts (noise threshold shift) parameter is the most important parameter to control quality. Without noise threshold shifting (-nts 0) the number of bits to be removed is computed in a theoretically optimal way. -nts 0 is defaulted when using quality preset -2.&lt;br /&gt;
&lt;br /&gt;
In order to be more cautious a negative -nts value can be chosen up to -48. -nts -3 is defaulted when using quality preset -1. For archiving purposes and/or very cautious users even more conservative values may be of interest.&lt;br /&gt;
&lt;br /&gt;
Because of internal precautions in addition to 2Bdecided&#039;s principles experience so far tells us that a small positive -nts value doesn&#039;t keep the encodings from being transparent. That&#039;s why -nts 3 is defaulted when using quality preset -3. A more aggressive value may be welcome for a user who wants to keep average bitrate down a bit more. The higher the -nts value however the more probable is a situation where lossyWAV is not transparent any more. A -nts value of more than 10 is not recommended though even with a value of ~10 transparency is achieved usually.&lt;br /&gt;
&lt;br /&gt;
==Supported input formats==&lt;br /&gt;
*[[WAV]]: 16-bit, 24-bit; sample rate &amp;amp;ge; 32kHz [[Pulse Code Modulation|PCM]]. Very high sample rates (&amp;amp;gt;48kHz) have not been extensively tested. Tunings have been focussed on 16-bit, 44.1kHz samples (i.e. [[Wikipedia:Red Book (audio CD standard)|CD]] PCM).&lt;br /&gt;
&lt;br /&gt;
==Codec Compatibility==&lt;br /&gt;
===Known supported codecs===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|+ &#039;&#039;&#039;Recommended settings&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
!Codec&lt;br /&gt;
!lossyWAV parameters&lt;br /&gt;
!Encoder parameters&lt;br /&gt;
!Combination name&lt;br /&gt;
|-&lt;br /&gt;
![[Free Lossless Audio Codec|FLAC]]&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| -&#039;&#039;&#039;3&#039;&#039;&#039; -&#039;&#039;&#039;m&#039;&#039;&#039; -&#039;&#039;&#039;e&#039;&#039;&#039; -&#039;&#039;&#039;r&#039;&#039;&#039; 2 -&#039;&#039;&#039;b&#039;&#039;&#039; 512 --&#039;&#039;&#039;keep-foreign-metadata&#039;&#039;&#039;[http://www.hydrogenaudio.org/forums/index.php?s=&amp;amp;showtopic=56129&amp;amp;view=findpost&amp;amp;p=533689]&lt;br /&gt;
|lossy&#039;&#039;&#039;FLAC&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
![[Wikipedia:Lossless Predictive Audio Compression|LPAC]]&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| -&#039;&#039;&#039;b&#039;&#039;&#039;512&lt;br /&gt;
|lossy&#039;&#039;&#039;LPAC&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
![[Wikipedia:Audio Lossless Coding|MPEG-4 ALS]]&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| -&#039;&#039;&#039;l&#039;&#039;&#039; -&#039;&#039;&#039;n&#039;&#039;&#039;512&lt;br /&gt;
|lossy&#039;&#039;&#039;ALS&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
![[TAK]]&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| -&#039;&#039;&#039;fsl&#039;&#039;&#039;512&lt;br /&gt;
|lossy&#039;&#039;&#039;TAK&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
![[WavPack]]&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| --&#039;&#039;&#039;blocksize&#039;&#039;&#039;=512&lt;br /&gt;
|lossy&#039;&#039;&#039;WV&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
![[Wikipedia:Windows Media Audio#Windows Media Audio Lossless|WMA Lossless]]&lt;br /&gt;
| -&#039;&#039;&#039;wmalsl&#039;&#039;&#039; (same as -&#039;&#039;&#039;cbs&#039;&#039;&#039; 2048)&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
|lossy&#039;&#039;&#039;WMALSL&#039;&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
There is also [http://www.hometheaterhifi.com/volume_8_4/dvd-benchmark-part-6-dvd-audio-11-2001.html#Meridian%20Lossless%20Packing%20(MLP)%20in%20a%20Nutshell evidence] &amp;amp;mdash; so-called &amp;quot;Bit Shifting&amp;quot; &amp;amp;mdash; to suggest that lossyWAV may work with [[Wikipedia:Meridian Lossless Packing|MLP]], but this remains untested due to prohibitive prices of encoders.&lt;br /&gt;
&lt;br /&gt;
A comparison of portable media players is [[Wikipedia:Comparison of portable media players#Audio Formats|here]], which shows FLAC and WMA Lossless compatibility among listed players.&lt;br /&gt;
Any player supported by [http://www.rockbox.org Rockbox] can use FLAC or wavPack files after installing Rockbox.&lt;br /&gt;
&lt;br /&gt;
===Known unsupported codecs===&lt;br /&gt;
*[[ALAC]]&lt;br /&gt;
*[[Lossless Audio|LA]]&lt;br /&gt;
*[[Monkey&#039;s Audio]]&lt;br /&gt;
*[[OptimFROG]]&lt;br /&gt;
*[[TTA]]&lt;br /&gt;
&lt;br /&gt;
==lossyWAV application settings==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
lossyWAV beta v0.6.1 : WAV file bit depth reduction method by 2Bdecided.&lt;br /&gt;
Delphi implementation by Nick.C from a Matlab script, www.hydrogenaudio.org&lt;br /&gt;
&lt;br /&gt;
Usage   : lossyWAV &amp;lt;input wav file&amp;gt; &amp;lt;options&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example : lossyWAV musicfile.wav&lt;br /&gt;
&lt;br /&gt;
Quality Options:&lt;br /&gt;
&lt;br /&gt;
-1            extreme settings [4xFFT] (-cbs 512 -nts -3.0 -skew 36 -snr 21&lt;br /&gt;
              -spf 22224-22225-11235-11246-12358 -fft 11011)&lt;br /&gt;
-2            default settings [3xFFT] (-cbs 512 -nts  0.0 -skew 36 -snr 21&lt;br /&gt;
              -spf 22224-22235-22346-12347-12358 -fft 10101)&lt;br /&gt;
-3            compact settings [2xFFT] (-cbs 512 -nts +3.0 -skew 36 -snr 21&lt;br /&gt;
              -spf 22224-22235-22347-22358-2246C -fft 10001)&lt;br /&gt;
&lt;br /&gt;
Standard Options:&lt;br /&gt;
&lt;br /&gt;
-o &amp;lt;folder&amp;gt;   destination folder for the output file&lt;br /&gt;
-nts &amp;lt;n&amp;gt;      set noise_threshold_shift to n dB (-48.0dB&amp;lt;=n&amp;lt;=+48.0dB)&lt;br /&gt;
              (-ve values reduce bits to remove, +ve values increase)&lt;br /&gt;
-force        forcibly over-write output file if it exists; default=off&lt;br /&gt;
-check        check if WAV file has already been processed. default=off;&lt;br /&gt;
              errorlevel=16 if already processed, 0 if not.&lt;br /&gt;
-correction   write correction file while processing WAV file. default=off;&lt;br /&gt;
&lt;br /&gt;
Codec Specific Options:&lt;br /&gt;
&lt;br /&gt;
-wmalsl       optimise internal settings for WMA Lossless codec; default=off&lt;br /&gt;
&lt;br /&gt;
Advanced / System Options:&lt;br /&gt;
&lt;br /&gt;
-snr &amp;lt;n&amp;gt;      set minimum average signal to added noise ratio to n dB;&lt;br /&gt;
              (-215.0dB&amp;lt;=n&amp;lt;=48.0dB) Increasing value reduces bits to remove.&lt;br /&gt;
-skew &amp;lt;n&amp;gt;     skew fft analysis results by n dB (0.0db&amp;lt;=n&amp;lt;=48.0db) in the&lt;br /&gt;
              frequency range 20Hz to 3.45kHz&lt;br /&gt;
-spf &amp;lt;5x5hex&amp;gt; manually input the 5 spreading functions as 5 x 5 characters;&lt;br /&gt;
              These correspond to FFTs of 64, 128, 256, 512 &amp;amp; 1024 samples;&lt;br /&gt;
              e.g. 22235-22236-22347-22358-2246C (Characters must be one of&lt;br /&gt;
              1 to 9 and A to F (zero excluded).&lt;br /&gt;
-fft &amp;lt;5xbin&amp;gt;  select fft lengths to use in analysis, using binary switching,&lt;br /&gt;
              from 64, 128, 256, 512 &amp;amp; 1024 samples, e.g. 01001 = 128,1024&lt;br /&gt;
-cbs &amp;lt;n&amp;gt;      set codec block size to n samples (512&amp;lt;=n&amp;lt;=4608, n mod 32=0)&lt;br /&gt;
&lt;br /&gt;
-quiet        significantly reduce screen output&lt;br /&gt;
-nowarn       suppress lossyWAV warnings&lt;br /&gt;
-detail       enable detailled output mode&lt;br /&gt;
&lt;br /&gt;
-below        set process priority to below normal.&lt;br /&gt;
-low          set process priority to low.&lt;br /&gt;
&lt;br /&gt;
Special thanks:&lt;br /&gt;
&lt;br /&gt;
David Robinson for the method itself and motivation to implement it in Delphi.&lt;br /&gt;
Dr. Jean Debord for the use of TPMAT036 uFFT &amp;amp; uTypes units for FFT analysis.&lt;br /&gt;
Halb27 @ www.hydrogenaudio.org for donation and maintenance of the wavIO unit.&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Indicative Bitrate Reduction==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|+ &#039;&#039;&#039;Conversion using lossyWAV beta v0.5.8, [[Wikipedia:FLAC|FLAC]] -8&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
!lossyWAV Test Set&lt;br /&gt;
!FLAC -8&lt;br /&gt;
!lossyWAV -1&lt;br /&gt;
!lossyWAV -2&lt;br /&gt;
!lossyWAV -3&lt;br /&gt;
|-&lt;br /&gt;
!10 Album Test Average                                &lt;br /&gt;
| 850kbps &lt;br /&gt;
| 480kbps &lt;br /&gt;
| 426kbps &lt;br /&gt;
| 376kbps&lt;br /&gt;
|-&lt;br /&gt;
!53 sample &amp;quot;problem&amp;quot; set                &lt;br /&gt;
| 784kbps &lt;br /&gt;
| 543kbps &lt;br /&gt;
| 491kbps &lt;br /&gt;
| 434kbps&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|+ &#039;&#039;&#039;Large Foobar2000 Conversion: (lossyWAV -3; [[Wikipedia:FLAC|FLAC]] -3 -m -e -r 2 -b 512)&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
!Album&lt;br /&gt;
!FLAC -8&lt;br /&gt;
!lossyWAV -1&lt;br /&gt;
!lossyWAV -2&lt;br /&gt;
!lossyWAV -3&lt;br /&gt;
|-&lt;br /&gt;
!3283 Tracks; 258 Discs; 87.2GB&amp;gt;36.8GB  &lt;br /&gt;
| 880kbps &lt;br /&gt;
| N/A &lt;br /&gt;
| N/A&lt;br /&gt;
| 371kbps &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Using lossyWAV==&lt;br /&gt;
===Example Foobar2000 Converter Settings===&lt;br /&gt;
[[Image:Foobar2000_Converter_Settings.PNG]]&lt;br /&gt;
&lt;br /&gt;
===Example flossy.bat file called from Foobar2000===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@echo off&lt;br /&gt;
c:\data_nic\bin\lossyWAV %1 %3 %4 %5 %6 %7 %8 %9 -below -nowarn -quiet&lt;br /&gt;
c:\data_nic\bin\flac.exe -8 -f -b 512 &amp;quot;%~N1.lossy.wav&amp;quot; -o&amp;quot;%~N2.flac&amp;quot; &lt;br /&gt;
del &amp;quot;%~N1.lossy.wav&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Frequently asked questions==&lt;br /&gt;
*&#039;&#039;&#039;Question:&#039;&#039;&#039; Is it [[Variable Bitrate|VBR]]?&lt;br /&gt;
*&#039;&#039;&#039;Short answer:&#039;&#039;&#039; Yes.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Question:&#039;&#039;&#039; Is it [[transparency|transparent]]?&lt;br /&gt;
*&#039;&#039;&#039;Short answer:&#039;&#039;&#039; Almost certainly.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Question:&#039;&#039;&#039; Is it [[lossless]]?&lt;br /&gt;
*&#039;&#039;&#039;Short answer:&#039;&#039;&#039; No.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Question:&#039;&#039;&#039; Why should I use this?&lt;br /&gt;
*&#039;&#039;&#039;Answer:&#039;&#039;&#039;&lt;br /&gt;
:*high quality&lt;br /&gt;
:*extremely low chance of audible [[artifact|artefacts]]&lt;br /&gt;
:*reasonable [[bitrate]]s&lt;br /&gt;
:*usable with unmodified, established lossless formats.&lt;br /&gt;
&lt;br /&gt;
==Current Test Settings==&lt;br /&gt;
No current test settings&lt;br /&gt;
&lt;br /&gt;
==External links==&lt;br /&gt;
*[http://www.hydrogenaudio.org/forums/index.php?showtopic=56129 Current development thread] You will find the latest version and last stable version in post #1 of this thread.&lt;br /&gt;
*[http://www.hydrogenaudio.org/forums/index.php?showtopic=55522&amp;amp;st=0 Original lossyFLAC thread] Where David Robinson (Replaygain developer) introduces the method and a Matlab implementation.&lt;/div&gt;</summary>
		<author><name>Halb27</name></author>
	</entry>
	<entry>
		<id>https://wiki.hydrogenaudio.org/index.php?title=LossyWAV&amp;diff=18114</id>
		<title>LossyWAV</title>
		<link rel="alternate" type="text/html" href="https://wiki.hydrogenaudio.org/index.php?title=LossyWAV&amp;diff=18114"/>
		<updated>2008-01-03T21:17:04Z</updated>

		<summary type="html">&lt;p&gt;Halb27: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Software Infobox&lt;br /&gt;
| name = lossyWAV&lt;br /&gt;
| screenshot = &lt;br /&gt;
| caption = &lt;br /&gt;
| maintainer = [http://www.hydrogenaudio.org/forums/index.php?showuser=42400 Nick.C]&lt;br /&gt;
| stable_release = beta v0.6.1&lt;br /&gt;
| preview_release = &lt;br /&gt;
| operating_system = [[Wikipedia:MS-DOS|MS-DOS]]&lt;br /&gt;
| use = Encoder/Decoder&lt;br /&gt;
| license = [[Wikipedia:LGPL|LGPL license]]&lt;br /&gt;
| website = [http://www.hydrogenaudio.org/forums/index.php?showtopic=56129 Hydrogenaudio]&lt;br /&gt;
}}&lt;br /&gt;
lossyWAV is a lossy pre-processor for [[PCM]] audio contained in the [[WAV]] file format. It reduces [[Wikipedia:Audio bit depth|bit depth]] of the input signal, which, when used in conjunction with certain lossless codecs, reduces the bitrate of the encoded file significantly compared to unpreprocessed compression. &lt;br /&gt;
lossyWAV&#039;s primary goal is to maintain [[transparency]] with a high degree of confidence when processing any audio data.&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
lossyFLAC is an idea started by [http://www.hydrogenaudio.org/forums/index.php?showuser=409 2Bdecided] at hydrogenaudio, utilising the wasted bits feature of the FLAC lossless codec with the aim of transparently reducing audio bit depth (making some lower significant bits (LSB&#039;s) zero), consequently taking advantage of FLAC&#039;s detection of consistently zeroed lower significant bits within each single frame and significantly increasing coding efficiency.[http://www.hydrogenaudio.org/forums/index.php?s=&amp;amp;showtopic=55522&amp;amp;view=findpost&amp;amp;p=498179] In this way the user can enjoy audio encoded using the same codec (which may be all important from a hardware compatibility perspective) at a reduced bitrate compared to the lossless version.&lt;br /&gt;
&lt;br /&gt;
[http://www.hydrogenaudio.org/forums/index.php?showuser=42400 Nick.C] ported the original [[Wikipedia:MATLAB|MATLAB]] implementation to [[Wikipedia:Borland Delphi|Delphi]] (Many thanks [[Wikipedia:CodeGear|CodeGear]] for Turbo Explorer!!) with a liberal sprinkling of [[Wikipedia:IA-32|IA-32]] and [[Wikipedia:x87|x87]] Assembly Language for speed.&lt;br /&gt;
&lt;br /&gt;
Subsequently, lossyFLAC proved itself to work with other lossless codecs, so the application name was changed to lossyWAV. &lt;br /&gt;
&lt;br /&gt;
Since then, Nick.C has heavily developed and built upon lossyWAV, with valuable tuning performed by [http://www.hydrogenaudio.org/forums/index.php?showuser=25015 halb27] at hydrogenaudio.&lt;br /&gt;
&lt;br /&gt;
==File Identification==&lt;br /&gt;
lossyWAV-processed WAV files are named with a double filename extension, .lossy.wav, to make them instantly identifiable. e.g. &amp;quot;.lossy.flac&amp;quot; would indicate an audio file which was processed using lossyWAV, and subsequently encoded using FLAC.[http://www.hydrogenaudio.org/forums/index.php?s=&amp;amp;showtopic=55522&amp;amp;view=findpost&amp;amp;p=498559]&lt;br /&gt;
&lt;br /&gt;
From beta v0.6.1, the -correction parameter is used when processing to create a correction file which is named with the .lwcdf.wav double filename extension. When &amp;quot;added&amp;quot; to the corresponding .lossy.wav, using a not yet implemented parameter of lossyWAV, the original file will be reconstituted.&lt;br /&gt;
&lt;br /&gt;
Combinations of lossyWAV with each specific encoder are referred to as lossy&#039;&#039;&#039;X&#039;&#039;&#039;, where &#039;&#039;&#039;X&#039;&#039;&#039; is an abbreviation of the lossless codec name. Combination names are listed in the &amp;quot;[[LossyWAV#Known supported codecs|known supported codecs]]&amp;quot; section below.&lt;br /&gt;
&lt;br /&gt;
From v0.5.9, lossyWAV inserts a variable length FACT chunk into the WAV file immediately after the FMT chunk. This takes the form:&amp;lt;pre&amp;gt;fact/&amp;lt;size&amp;gt;/lossyWAV beta vx.y.z : dd/mm/yyyy hh:mm:ss&lt;br /&gt;
-2 -cbs 512 -nts 0.00 -snr 21.00 -skew 36.00&lt;br /&gt;
-spf 22224-22235-22336-12347-12358 -fft 10101&amp;lt;/pre&amp;gt;Where the version, date &amp;amp; time and user settings are copied. Additionally, if a lossyWAV FACT chunk is found in a file, the processing will be halted (exit code = 16) to prevent re-processing of an already processed file.&lt;br /&gt;
&lt;br /&gt;
The -check parameter can be used to determine whether a file has previously been processed without trying to process it, exit code = 16 if already processed; exit code = 0 if not.&lt;br /&gt;
&lt;br /&gt;
==Presets==&lt;br /&gt;
*-1: Highest quality preset, disc space-saving alternative to lossless archiving for large audio collections.&lt;br /&gt;
*-2: Default preset; a compromise between -1 and -3.&lt;br /&gt;
*-3: High quality preset for usage on a compatible [[Wikipedia:Digital audio player|DAP]], approx. 370kbps for &amp;quot;normal&amp;quot; music. [http://www.hydrogenaudio.org/forums/index.php?s=&amp;amp;showtopic=56129&amp;amp;view=findpost&amp;amp;p=531316] &lt;br /&gt;
&lt;br /&gt;
All tuning has been performed on quality preset -3 with -2 and -1 being more conservative. Quality preset -3 is generally accepted to be (and from testing so far is) transparent. If you find a track which -3 fails to achieve transparency after processing, please post a sample (no more than 30 seconds) in the development thread.&lt;br /&gt;
&lt;br /&gt;
Apart from the quality presets the -nts (noise threshold shift) parameter is the most important parameter to control quality. Without noise threshold shifting (-nts 0) the number of bits to be removed is computed in a theoretically optimal way. -nts 0 is defaulted when using quality preset -2.&lt;br /&gt;
&lt;br /&gt;
In order to be more cautious a negative -nts value can be chosen up to -48. -nts -3 is defaulted when using quality preset -1. For archiving purposes and/or very cautious users even more conservative values may be of interest.&lt;br /&gt;
&lt;br /&gt;
Because of internal precautions in addition to 2Bdecided&#039;s principles experience so far tells us that a small positive -nts value doesn&#039;t keep the encodings from being transparent. That&#039;s why -nts 3 is defaulted when using quality preset -3. A more aggressive value may be welcome for a user who wants to keep average bitrate down a bit more. The higher the -nts value however the more probable is a situation where lossyWAV is not transparent any more. A -nts value of more than 10 is not recommended though even with a value of ~10 transparency is achieved usually.&lt;br /&gt;
&lt;br /&gt;
==Supported input formats==&lt;br /&gt;
*[[WAV]]: 16-bit, 24-bit; sample rate &amp;amp;ge; 32kHz [[Pulse Code Modulation|PCM]]. Very high sample rates (&amp;amp;gt;48kHz) have not been extensively tested. Tunings have been focussed on 16-bit, 44.1kHz samples (i.e. [[Wikipedia:Red Book (audio CD standard)|CD]] PCM).&lt;br /&gt;
&lt;br /&gt;
==Codec Compatibility==&lt;br /&gt;
===Known supported codecs===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|+ &#039;&#039;&#039;Recommended settings&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
!Codec&lt;br /&gt;
!lossyWAV parameters&lt;br /&gt;
!Encoder parameters&lt;br /&gt;
!Combination name&lt;br /&gt;
|-&lt;br /&gt;
![[Free Lossless Audio Codec|FLAC]]&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| -&#039;&#039;&#039;3&#039;&#039;&#039; -&#039;&#039;&#039;m&#039;&#039;&#039; -&#039;&#039;&#039;e&#039;&#039;&#039; -&#039;&#039;&#039;r&#039;&#039;&#039; 2 -&#039;&#039;&#039;b&#039;&#039;&#039; 512 --&#039;&#039;&#039;keep-foreign-metadata&#039;&#039;&#039;[http://www.hydrogenaudio.org/forums/index.php?s=&amp;amp;showtopic=56129&amp;amp;view=findpost&amp;amp;p=533689]&lt;br /&gt;
|lossy&#039;&#039;&#039;FLAC&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
![[Wikipedia:Lossless Predictive Audio Compression|LPAC]]&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| -&#039;&#039;&#039;b&#039;&#039;&#039;512&lt;br /&gt;
|lossy&#039;&#039;&#039;LPAC&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
![[Wikipedia:Audio Lossless Coding|MPEG-4 ALS]]&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| -&#039;&#039;&#039;l&#039;&#039;&#039; -&#039;&#039;&#039;n&#039;&#039;&#039;512&lt;br /&gt;
|lossy&#039;&#039;&#039;ALS&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
![[TAK]]&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| -&#039;&#039;&#039;fsl&#039;&#039;&#039;512&lt;br /&gt;
|lossy&#039;&#039;&#039;TAK&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
![[WavPack]]&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| --&#039;&#039;&#039;blocksize&#039;&#039;&#039;=512&lt;br /&gt;
|lossy&#039;&#039;&#039;WV&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
![[Wikipedia:Windows Media Audio#Windows Media Audio Lossless|WMA Lossless]]&lt;br /&gt;
| -&#039;&#039;&#039;wmalsl&#039;&#039;&#039; (same as -&#039;&#039;&#039;cbs&#039;&#039;&#039; 2048)&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
|lossy&#039;&#039;&#039;WMALSL&#039;&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
There is also [http://www.hometheaterhifi.com/volume_8_4/dvd-benchmark-part-6-dvd-audio-11-2001.html#Meridian%20Lossless%20Packing%20(MLP)%20in%20a%20Nutshell evidence] &amp;amp;mdash; so-called &amp;quot;Bit Shifting&amp;quot; &amp;amp;mdash; to suggest that lossyWAV may work with [[Wikipedia:Meridian Lossless Packing|MLP]], but this remains untested due to prohibitive prices of encoders.&lt;br /&gt;
&lt;br /&gt;
A comparison of portable media players is [[Wikipedia:Comparison of portable media players#Audio Formats|here]], which shows FLAC and WMA Lossless compatibility among listed players.&lt;br /&gt;
Any player supported by [http://www.rockbox.org Rockbox] can use FLAC or wavPack files after installing Rockbox.&lt;br /&gt;
&lt;br /&gt;
===Known unsupported codecs===&lt;br /&gt;
*[[ALAC]]&lt;br /&gt;
*[[Lossless Audio|LA]]&lt;br /&gt;
*[[Monkey&#039;s Audio]]&lt;br /&gt;
*[[OptimFROG]]&lt;br /&gt;
*[[TTA]]&lt;br /&gt;
&lt;br /&gt;
==lossyWAV application settings==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
lossyWAV beta v0.6.1 : WAV file bit depth reduction method by 2Bdecided.&lt;br /&gt;
Delphi implementation by Nick.C from a Matlab script, www.hydrogenaudio.org&lt;br /&gt;
&lt;br /&gt;
Usage   : lossyWAV &amp;lt;input wav file&amp;gt; &amp;lt;options&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example : lossyWAV musicfile.wav&lt;br /&gt;
&lt;br /&gt;
Quality Options:&lt;br /&gt;
&lt;br /&gt;
-1            extreme settings [4xFFT] (-cbs 512 -nts -3.0 -skew 36 -snr 21&lt;br /&gt;
              -spf 22224-22225-11235-11246-12358 -fft 11011)&lt;br /&gt;
-2            default settings [3xFFT] (-cbs 512 -nts  0.0 -skew 36 -snr 21&lt;br /&gt;
              -spf 22224-22235-22346-12347-12358 -fft 10101)&lt;br /&gt;
-3            compact settings [2xFFT] (-cbs 512 -nts +3.0 -skew 36 -snr 21&lt;br /&gt;
              -spf 22224-22235-22347-22358-2246C -fft 10001)&lt;br /&gt;
&lt;br /&gt;
Standard Options:&lt;br /&gt;
&lt;br /&gt;
-o &amp;lt;folder&amp;gt;   destination folder for the output file&lt;br /&gt;
-nts &amp;lt;n&amp;gt;      set noise_threshold_shift to n dB (-48.0dB&amp;lt;=n&amp;lt;=+48.0dB)&lt;br /&gt;
              (-ve values reduce bits to remove, +ve values increase)&lt;br /&gt;
-force        forcibly over-write output file if it exists; default=off&lt;br /&gt;
-check        check if WAV file has already been processed. default=off;&lt;br /&gt;
              errorlevel=16 if already processed, 0 if not.&lt;br /&gt;
-correction   write correction file while processing WAV file. default=off;&lt;br /&gt;
&lt;br /&gt;
Codec Specific Options:&lt;br /&gt;
&lt;br /&gt;
-wmalsl       optimise internal settings for WMA Lossless codec; default=off&lt;br /&gt;
&lt;br /&gt;
Advanced / System Options:&lt;br /&gt;
&lt;br /&gt;
-snr &amp;lt;n&amp;gt;      set minimum average signal to added noise ratio to n dB;&lt;br /&gt;
              (-215.0dB&amp;lt;=n&amp;lt;=48.0dB) Increasing value reduces bits to remove.&lt;br /&gt;
-skew &amp;lt;n&amp;gt;     skew fft analysis results by n dB (0.0db&amp;lt;=n&amp;lt;=48.0db) in the&lt;br /&gt;
              frequency range 20Hz to 3.45kHz&lt;br /&gt;
-spf &amp;lt;5x5hex&amp;gt; manually input the 5 spreading functions as 5 x 5 characters;&lt;br /&gt;
              These correspond to FFTs of 64, 128, 256, 512 &amp;amp; 1024 samples;&lt;br /&gt;
              e.g. 22235-22236-22347-22358-2246C (Characters must be one of&lt;br /&gt;
              1 to 9 and A to F (zero excluded).&lt;br /&gt;
-fft &amp;lt;5xbin&amp;gt;  select fft lengths to use in analysis, using binary switching,&lt;br /&gt;
              from 64, 128, 256, 512 &amp;amp; 1024 samples, e.g. 01001 = 128,1024&lt;br /&gt;
-cbs &amp;lt;n&amp;gt;      set codec block size to n samples (512&amp;lt;=n&amp;lt;=4608, n mod 32=0)&lt;br /&gt;
&lt;br /&gt;
-quiet        significantly reduce screen output&lt;br /&gt;
-nowarn       suppress lossyWAV warnings&lt;br /&gt;
-detail       enable detailled output mode&lt;br /&gt;
&lt;br /&gt;
-below        set process priority to below normal.&lt;br /&gt;
-low          set process priority to low.&lt;br /&gt;
&lt;br /&gt;
Special thanks:&lt;br /&gt;
&lt;br /&gt;
David Robinson for the method itself and motivation to implement it in Delphi.&lt;br /&gt;
Dr. Jean Debord for the use of TPMAT036 uFFT &amp;amp; uTypes units for FFT analysis.&lt;br /&gt;
Halb27 @ www.hydrogenaudio.org for donation and maintenance of the wavIO unit.&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Indicative Bitrate Reduction==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|+ &#039;&#039;&#039;Conversion using lossyWAV beta v0.5.8, [[Wikipedia:FLAC|FLAC]] -8&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
!lossyWAV Test Set&lt;br /&gt;
!FLAC -8&lt;br /&gt;
!lossyWAV -1&lt;br /&gt;
!lossyWAV -2&lt;br /&gt;
!lossyWAV -3&lt;br /&gt;
|-&lt;br /&gt;
!10 Album Test Average                                &lt;br /&gt;
| 850kbps &lt;br /&gt;
| 480kbps &lt;br /&gt;
| 426kbps &lt;br /&gt;
| 376kbps&lt;br /&gt;
|-&lt;br /&gt;
!53 sample &amp;quot;problem&amp;quot; set                &lt;br /&gt;
| 784kbps &lt;br /&gt;
| 543kbps &lt;br /&gt;
| 491kbps &lt;br /&gt;
| 434kbps&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|+ &#039;&#039;&#039;Large Foobar2000 Conversion: (lossyWAV -3; [[Wikipedia:FLAC|FLAC]] -3 -m -e -r 2 -b 512)&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
!Album&lt;br /&gt;
!FLAC -8&lt;br /&gt;
!lossyWAV -1&lt;br /&gt;
!lossyWAV -2&lt;br /&gt;
!lossyWAV -3&lt;br /&gt;
|-&lt;br /&gt;
!3283 Tracks; 258 Discs; 87.2GB&amp;gt;36.8GB  &lt;br /&gt;
| 880kbps &lt;br /&gt;
| N/A &lt;br /&gt;
| N/A&lt;br /&gt;
| 371kbps &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Using lossyWAV==&lt;br /&gt;
===Example Foobar2000 Converter Settings===&lt;br /&gt;
[[Image:Foobar2000_Converter_Settings.PNG]]&lt;br /&gt;
&lt;br /&gt;
===Example flossy.bat file called from Foobar2000===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@echo off&lt;br /&gt;
c:\data_nic\bin\lossyWAV %1 %3 %4 %5 %6 %7 %8 %9 -below -nowarn -quiet&lt;br /&gt;
c:\data_nic\bin\flac.exe -8 -f -b 512 &amp;quot;%~N1.lossy.wav&amp;quot; -o&amp;quot;%~N2.flac&amp;quot; &lt;br /&gt;
del &amp;quot;%~N1.lossy.wav&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Frequently asked questions==&lt;br /&gt;
*&#039;&#039;&#039;Question:&#039;&#039;&#039; Is it [[Variable Bitrate|VBR]]?&lt;br /&gt;
*&#039;&#039;&#039;Short answer:&#039;&#039;&#039; Yes.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Question:&#039;&#039;&#039; Is it [[transparency|transparent]]?&lt;br /&gt;
*&#039;&#039;&#039;Short answer:&#039;&#039;&#039; Almost certainly.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Question:&#039;&#039;&#039; Is it [[lossless]]?&lt;br /&gt;
*&#039;&#039;&#039;Short answer:&#039;&#039;&#039; No.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Question:&#039;&#039;&#039; Why should I use this?&lt;br /&gt;
*&#039;&#039;&#039;Answer:&#039;&#039;&#039;&lt;br /&gt;
:*high quality&lt;br /&gt;
:*extremely low chance of audible [[artifact|artefacts]]&lt;br /&gt;
:*reasonable [[bitrate]]s&lt;br /&gt;
:*usable with unmodified, established lossless formats.&lt;br /&gt;
&lt;br /&gt;
==Current Test Settings==&lt;br /&gt;
No current test settings&lt;br /&gt;
&lt;br /&gt;
==External links==&lt;br /&gt;
*[http://www.hydrogenaudio.org/forums/index.php?showtopic=56129 Current development thread] You will find the latest version and last stable version in post #1 of this thread.&lt;br /&gt;
*[http://www.hydrogenaudio.org/forums/index.php?showtopic=55522&amp;amp;st=0 Original lossyFLAC thread] Where David Robinson (Replaygain developer) introduces the method and a Matlab implementation.&lt;/div&gt;</summary>
		<author><name>Halb27</name></author>
	</entry>
	<entry>
		<id>https://wiki.hydrogenaudio.org/index.php?title=LossyWAV&amp;diff=18113</id>
		<title>LossyWAV</title>
		<link rel="alternate" type="text/html" href="https://wiki.hydrogenaudio.org/index.php?title=LossyWAV&amp;diff=18113"/>
		<updated>2008-01-03T21:15:08Z</updated>

		<summary type="html">&lt;p&gt;Halb27: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Software Infobox&lt;br /&gt;
| name = lossyWAV&lt;br /&gt;
| screenshot = &lt;br /&gt;
| caption = &lt;br /&gt;
| maintainer = [http://www.hydrogenaudio.org/forums/index.php?showuser=42400 Nick.C]&lt;br /&gt;
| stable_release = beta v0.6.1&lt;br /&gt;
| preview_release = &lt;br /&gt;
| operating_system = [[Wikipedia:MS-DOS|MS-DOS]]&lt;br /&gt;
| use = Encoder/Decoder [[Wikipedia:Digital signal processing|Digital signal processing]]&lt;br /&gt;
| license = [[Wikipedia:LGPL|LGPL license]]&lt;br /&gt;
| website = [http://www.hydrogenaudio.org/forums/index.php?showtopic=56129 Hydrogenaudio]&lt;br /&gt;
}}&lt;br /&gt;
lossyWAV is a lossy pre-processor for [[PCM]] audio contained in the [[WAV]] file format. It reduces [[Wikipedia:Audio bit depth|bit depth]] of the input signal, which, when used in conjunction with certain lossless codecs, reduces the bitrate of the encoded file significantly compared to unpreprocessed compression. &lt;br /&gt;
lossyWAV&#039;s primary goal is to maintain [[transparency]] with a high degree of confidence when processing any audio data.&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
lossyFLAC is an idea started by [http://www.hydrogenaudio.org/forums/index.php?showuser=409 2Bdecided] at hydrogenaudio, utilising the wasted bits feature of the FLAC lossless codec with the aim of transparently reducing audio bit depth (making some lower significant bits (LSB&#039;s) zero), consequently taking advantage of FLAC&#039;s detection of consistently zeroed lower significant bits within each single frame and significantly increasing coding efficiency.[http://www.hydrogenaudio.org/forums/index.php?s=&amp;amp;showtopic=55522&amp;amp;view=findpost&amp;amp;p=498179] In this way the user can enjoy audio encoded using the same codec (which may be all important from a hardware compatibility perspective) at a reduced bitrate compared to the lossless version.&lt;br /&gt;
&lt;br /&gt;
[http://www.hydrogenaudio.org/forums/index.php?showuser=42400 Nick.C] ported the original [[Wikipedia:MATLAB|MATLAB]] implementation to [[Wikipedia:Borland Delphi|Delphi]] (Many thanks [[Wikipedia:CodeGear|CodeGear]] for Turbo Explorer!!) with a liberal sprinkling of [[Wikipedia:IA-32|IA-32]] and [[Wikipedia:x87|x87]] Assembly Language for speed.&lt;br /&gt;
&lt;br /&gt;
Subsequently, lossyFLAC proved itself to work with other lossless codecs, so the application name was changed to lossyWAV. &lt;br /&gt;
&lt;br /&gt;
Since then, Nick.C has heavily developed and built upon lossyWAV, with valuable tuning performed by [http://www.hydrogenaudio.org/forums/index.php?showuser=25015 halb27] at hydrogenaudio.&lt;br /&gt;
&lt;br /&gt;
==File Identification==&lt;br /&gt;
lossyWAV-processed WAV files are named with a double filename extension, .lossy.wav, to make them instantly identifiable. e.g. &amp;quot;.lossy.flac&amp;quot; would indicate an audio file which was processed using lossyWAV, and subsequently encoded using FLAC.[http://www.hydrogenaudio.org/forums/index.php?s=&amp;amp;showtopic=55522&amp;amp;view=findpost&amp;amp;p=498559]&lt;br /&gt;
&lt;br /&gt;
From beta v0.6.1, the -correction parameter is used when processing to create a correction file which is named with the .lwcdf.wav double filename extension. When &amp;quot;added&amp;quot; to the corresponding .lossy.wav, using a not yet implemented parameter of lossyWAV, the original file will be reconstituted.&lt;br /&gt;
&lt;br /&gt;
Combinations of lossyWAV with each specific encoder are referred to as lossy&#039;&#039;&#039;X&#039;&#039;&#039;, where &#039;&#039;&#039;X&#039;&#039;&#039; is an abbreviation of the lossless codec name. Combination names are listed in the &amp;quot;[[LossyWAV#Known supported codecs|known supported codecs]]&amp;quot; section below.&lt;br /&gt;
&lt;br /&gt;
From v0.5.9, lossyWAV inserts a variable length FACT chunk into the WAV file immediately after the FMT chunk. This takes the form:&amp;lt;pre&amp;gt;fact/&amp;lt;size&amp;gt;/lossyWAV beta vx.y.z : dd/mm/yyyy hh:mm:ss&lt;br /&gt;
-2 -cbs 512 -nts 0.00 -snr 21.00 -skew 36.00&lt;br /&gt;
-spf 22224-22235-22336-12347-12358 -fft 10101&amp;lt;/pre&amp;gt;Where the version, date &amp;amp; time and user settings are copied. Additionally, if a lossyWAV FACT chunk is found in a file, the processing will be halted (exit code = 16) to prevent re-processing of an already processed file.&lt;br /&gt;
&lt;br /&gt;
The -check parameter can be used to determine whether a file has previously been processed without trying to process it, exit code = 16 if already processed; exit code = 0 if not.&lt;br /&gt;
&lt;br /&gt;
==Presets==&lt;br /&gt;
*-1: Highest quality preset, disc space-saving alternative to lossless archiving for large audio collections.&lt;br /&gt;
*-2: Default preset; a compromise between -1 and -3.&lt;br /&gt;
*-3: High quality preset for usage on a compatible [[Wikipedia:Digital audio player|DAP]], approx. 370kbps for &amp;quot;normal&amp;quot; music. [http://www.hydrogenaudio.org/forums/index.php?s=&amp;amp;showtopic=56129&amp;amp;view=findpost&amp;amp;p=531316] &lt;br /&gt;
&lt;br /&gt;
All tuning has been performed on quality preset -3 with -2 and -1 being more conservative. Quality preset -3 is generally accepted to be (and from testing so far is) transparent. If you find a track which -3 fails to achieve transparency after processing, please post a sample (no more than 30 seconds) in the development thread.&lt;br /&gt;
&lt;br /&gt;
Apart from the quality presets the -nts (noise threshold shift) parameter is the most important parameter to control quality. Without noise threshold shifting (-nts 0) the number of bits to be removed is computed in a theoretically optimal way. -nts 0 is defaulted when using quality preset -2.&lt;br /&gt;
&lt;br /&gt;
In order to be more cautious a negative -nts value can be chosen up to -48. -nts -3 is defaulted when using quality preset -1. For archiving purposes and/or very cautious users even more conservative values may be of interest.&lt;br /&gt;
&lt;br /&gt;
Because of internal precautions in addition to 2Bdecided&#039;s principles experience so far tells us that a small positive -nts value doesn&#039;t keep the encodings from being transparent. That&#039;s why -nts 3 is defaulted when using quality preset -3. A more aggressive value may be welcome for a user who wants to keep average bitrate down a bit more. The higher the -nts value however the more probable is a situation where lossyWAV is not transparent any more. A -nts value of more than 10 is not recommended though even with a value of ~10 transparency is achieved usually.&lt;br /&gt;
&lt;br /&gt;
==Supported input formats==&lt;br /&gt;
*[[WAV]]: 16-bit, 24-bit; sample rate &amp;amp;ge; 32kHz [[Pulse Code Modulation|PCM]]. Very high sample rates (&amp;amp;gt;48kHz) have not been extensively tested. Tunings have been focussed on 16-bit, 44.1kHz samples (i.e. [[Wikipedia:Red Book (audio CD standard)|CD]] PCM).&lt;br /&gt;
&lt;br /&gt;
==Codec Compatibility==&lt;br /&gt;
===Known supported codecs===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|+ &#039;&#039;&#039;Recommended settings&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
!Codec&lt;br /&gt;
!lossyWAV parameters&lt;br /&gt;
!Encoder parameters&lt;br /&gt;
!Combination name&lt;br /&gt;
|-&lt;br /&gt;
![[Free Lossless Audio Codec|FLAC]]&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| -&#039;&#039;&#039;3&#039;&#039;&#039; -&#039;&#039;&#039;m&#039;&#039;&#039; -&#039;&#039;&#039;e&#039;&#039;&#039; -&#039;&#039;&#039;r&#039;&#039;&#039; 2 -&#039;&#039;&#039;b&#039;&#039;&#039; 512 --&#039;&#039;&#039;keep-foreign-metadata&#039;&#039;&#039;[http://www.hydrogenaudio.org/forums/index.php?s=&amp;amp;showtopic=56129&amp;amp;view=findpost&amp;amp;p=533689]&lt;br /&gt;
|lossy&#039;&#039;&#039;FLAC&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
![[Wikipedia:Lossless Predictive Audio Compression|LPAC]]&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| -&#039;&#039;&#039;b&#039;&#039;&#039;512&lt;br /&gt;
|lossy&#039;&#039;&#039;LPAC&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
![[Wikipedia:Audio Lossless Coding|MPEG-4 ALS]]&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| -&#039;&#039;&#039;l&#039;&#039;&#039; -&#039;&#039;&#039;n&#039;&#039;&#039;512&lt;br /&gt;
|lossy&#039;&#039;&#039;ALS&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
![[TAK]]&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| -&#039;&#039;&#039;fsl&#039;&#039;&#039;512&lt;br /&gt;
|lossy&#039;&#039;&#039;TAK&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
![[WavPack]]&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| --&#039;&#039;&#039;blocksize&#039;&#039;&#039;=512&lt;br /&gt;
|lossy&#039;&#039;&#039;WV&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
![[Wikipedia:Windows Media Audio#Windows Media Audio Lossless|WMA Lossless]]&lt;br /&gt;
| -&#039;&#039;&#039;wmalsl&#039;&#039;&#039; (same as -&#039;&#039;&#039;cbs&#039;&#039;&#039; 2048)&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
|lossy&#039;&#039;&#039;WMALSL&#039;&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
There is also [http://www.hometheaterhifi.com/volume_8_4/dvd-benchmark-part-6-dvd-audio-11-2001.html#Meridian%20Lossless%20Packing%20(MLP)%20in%20a%20Nutshell evidence] &amp;amp;mdash; so-called &amp;quot;Bit Shifting&amp;quot; &amp;amp;mdash; to suggest that lossyWAV may work with [[Wikipedia:Meridian Lossless Packing|MLP]], but this remains untested due to prohibitive prices of encoders.&lt;br /&gt;
&lt;br /&gt;
A comparison of portable media players is [[Wikipedia:Comparison of portable media players#Audio Formats|here]], which shows FLAC and WMA Lossless compatibility among listed players.&lt;br /&gt;
Any player supported by [http://www.rockbox.org Rockbox] can use FLAC or wavPack files after installing Rockbox.&lt;br /&gt;
&lt;br /&gt;
===Known unsupported codecs===&lt;br /&gt;
*[[ALAC]]&lt;br /&gt;
*[[Lossless Audio|LA]]&lt;br /&gt;
*[[Monkey&#039;s Audio]]&lt;br /&gt;
*[[OptimFROG]]&lt;br /&gt;
*[[TTA]]&lt;br /&gt;
&lt;br /&gt;
==lossyWAV application settings==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
lossyWAV beta v0.6.1 : WAV file bit depth reduction method by 2Bdecided.&lt;br /&gt;
Delphi implementation by Nick.C from a Matlab script, www.hydrogenaudio.org&lt;br /&gt;
&lt;br /&gt;
Usage   : lossyWAV &amp;lt;input wav file&amp;gt; &amp;lt;options&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example : lossyWAV musicfile.wav&lt;br /&gt;
&lt;br /&gt;
Quality Options:&lt;br /&gt;
&lt;br /&gt;
-1            extreme settings [4xFFT] (-cbs 512 -nts -3.0 -skew 36 -snr 21&lt;br /&gt;
              -spf 22224-22225-11235-11246-12358 -fft 11011)&lt;br /&gt;
-2            default settings [3xFFT] (-cbs 512 -nts  0.0 -skew 36 -snr 21&lt;br /&gt;
              -spf 22224-22235-22346-12347-12358 -fft 10101)&lt;br /&gt;
-3            compact settings [2xFFT] (-cbs 512 -nts +3.0 -skew 36 -snr 21&lt;br /&gt;
              -spf 22224-22235-22347-22358-2246C -fft 10001)&lt;br /&gt;
&lt;br /&gt;
Standard Options:&lt;br /&gt;
&lt;br /&gt;
-o &amp;lt;folder&amp;gt;   destination folder for the output file&lt;br /&gt;
-nts &amp;lt;n&amp;gt;      set noise_threshold_shift to n dB (-48.0dB&amp;lt;=n&amp;lt;=+48.0dB)&lt;br /&gt;
              (-ve values reduce bits to remove, +ve values increase)&lt;br /&gt;
-force        forcibly over-write output file if it exists; default=off&lt;br /&gt;
-check        check if WAV file has already been processed. default=off;&lt;br /&gt;
              errorlevel=16 if already processed, 0 if not.&lt;br /&gt;
-correction   write correction file while processing WAV file. default=off;&lt;br /&gt;
&lt;br /&gt;
Codec Specific Options:&lt;br /&gt;
&lt;br /&gt;
-wmalsl       optimise internal settings for WMA Lossless codec; default=off&lt;br /&gt;
&lt;br /&gt;
Advanced / System Options:&lt;br /&gt;
&lt;br /&gt;
-snr &amp;lt;n&amp;gt;      set minimum average signal to added noise ratio to n dB;&lt;br /&gt;
              (-215.0dB&amp;lt;=n&amp;lt;=48.0dB) Increasing value reduces bits to remove.&lt;br /&gt;
-skew &amp;lt;n&amp;gt;     skew fft analysis results by n dB (0.0db&amp;lt;=n&amp;lt;=48.0db) in the&lt;br /&gt;
              frequency range 20Hz to 3.45kHz&lt;br /&gt;
-spf &amp;lt;5x5hex&amp;gt; manually input the 5 spreading functions as 5 x 5 characters;&lt;br /&gt;
              These correspond to FFTs of 64, 128, 256, 512 &amp;amp; 1024 samples;&lt;br /&gt;
              e.g. 22235-22236-22347-22358-2246C (Characters must be one of&lt;br /&gt;
              1 to 9 and A to F (zero excluded).&lt;br /&gt;
-fft &amp;lt;5xbin&amp;gt;  select fft lengths to use in analysis, using binary switching,&lt;br /&gt;
              from 64, 128, 256, 512 &amp;amp; 1024 samples, e.g. 01001 = 128,1024&lt;br /&gt;
-cbs &amp;lt;n&amp;gt;      set codec block size to n samples (512&amp;lt;=n&amp;lt;=4608, n mod 32=0)&lt;br /&gt;
&lt;br /&gt;
-quiet        significantly reduce screen output&lt;br /&gt;
-nowarn       suppress lossyWAV warnings&lt;br /&gt;
-detail       enable detailled output mode&lt;br /&gt;
&lt;br /&gt;
-below        set process priority to below normal.&lt;br /&gt;
-low          set process priority to low.&lt;br /&gt;
&lt;br /&gt;
Special thanks:&lt;br /&gt;
&lt;br /&gt;
David Robinson for the method itself and motivation to implement it in Delphi.&lt;br /&gt;
Dr. Jean Debord for the use of TPMAT036 uFFT &amp;amp; uTypes units for FFT analysis.&lt;br /&gt;
Halb27 @ www.hydrogenaudio.org for donation and maintenance of the wavIO unit.&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Indicative Bitrate Reduction==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|+ &#039;&#039;&#039;Conversion using lossyWAV beta v0.5.8, [[Wikipedia:FLAC|FLAC]] -8&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
!lossyWAV Test Set&lt;br /&gt;
!FLAC -8&lt;br /&gt;
!lossyWAV -1&lt;br /&gt;
!lossyWAV -2&lt;br /&gt;
!lossyWAV -3&lt;br /&gt;
|-&lt;br /&gt;
!10 Album Test Average                                &lt;br /&gt;
| 850kbps &lt;br /&gt;
| 480kbps &lt;br /&gt;
| 426kbps &lt;br /&gt;
| 376kbps&lt;br /&gt;
|-&lt;br /&gt;
!53 sample &amp;quot;problem&amp;quot; set                &lt;br /&gt;
| 784kbps &lt;br /&gt;
| 543kbps &lt;br /&gt;
| 491kbps &lt;br /&gt;
| 434kbps&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|+ &#039;&#039;&#039;Large Foobar2000 Conversion: (lossyWAV -3; [[Wikipedia:FLAC|FLAC]] -3 -m -e -r 2 -b 512)&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
!Album&lt;br /&gt;
!FLAC -8&lt;br /&gt;
!lossyWAV -1&lt;br /&gt;
!lossyWAV -2&lt;br /&gt;
!lossyWAV -3&lt;br /&gt;
|-&lt;br /&gt;
!3283 Tracks; 258 Discs; 87.2GB&amp;gt;36.8GB  &lt;br /&gt;
| 880kbps &lt;br /&gt;
| N/A &lt;br /&gt;
| N/A&lt;br /&gt;
| 371kbps &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Using lossyWAV==&lt;br /&gt;
===Example Foobar2000 Converter Settings===&lt;br /&gt;
[[Image:Foobar2000_Converter_Settings.PNG]]&lt;br /&gt;
&lt;br /&gt;
===Example flossy.bat file called from Foobar2000===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@echo off&lt;br /&gt;
c:\data_nic\bin\lossyWAV %1 %3 %4 %5 %6 %7 %8 %9 -below -nowarn -quiet&lt;br /&gt;
c:\data_nic\bin\flac.exe -8 -f -b 512 &amp;quot;%~N1.lossy.wav&amp;quot; -o&amp;quot;%~N2.flac&amp;quot; &lt;br /&gt;
del &amp;quot;%~N1.lossy.wav&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Frequently asked questions==&lt;br /&gt;
*&#039;&#039;&#039;Question:&#039;&#039;&#039; Is it [[Variable Bitrate|VBR]]?&lt;br /&gt;
*&#039;&#039;&#039;Short answer:&#039;&#039;&#039; Yes.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Question:&#039;&#039;&#039; Is it [[transparency|transparent]]?&lt;br /&gt;
*&#039;&#039;&#039;Short answer:&#039;&#039;&#039; Almost certainly.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Question:&#039;&#039;&#039; Is it [[lossless]]?&lt;br /&gt;
*&#039;&#039;&#039;Short answer:&#039;&#039;&#039; No.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Question:&#039;&#039;&#039; Why should I use this?&lt;br /&gt;
*&#039;&#039;&#039;Answer:&#039;&#039;&#039;&lt;br /&gt;
:*high quality&lt;br /&gt;
:*extremely low chance of audible [[artifact|artefacts]]&lt;br /&gt;
:*reasonable [[bitrate]]s&lt;br /&gt;
:*usable with unmodified, established lossless formats.&lt;br /&gt;
&lt;br /&gt;
==Current Test Settings==&lt;br /&gt;
No current test settings&lt;br /&gt;
&lt;br /&gt;
==External links==&lt;br /&gt;
*[http://www.hydrogenaudio.org/forums/index.php?showtopic=56129 Current development thread] You will find the latest version and last stable version in post #1 of this thread.&lt;br /&gt;
*[http://www.hydrogenaudio.org/forums/index.php?showtopic=55522&amp;amp;st=0 Original lossyFLAC thread] Where David Robinson (Replaygain developer) introduces the method and a Matlab implementation.&lt;/div&gt;</summary>
		<author><name>Halb27</name></author>
	</entry>
	<entry>
		<id>https://wiki.hydrogenaudio.org/index.php?title=LossyWAV&amp;diff=18111</id>
		<title>LossyWAV</title>
		<link rel="alternate" type="text/html" href="https://wiki.hydrogenaudio.org/index.php?title=LossyWAV&amp;diff=18111"/>
		<updated>2008-01-03T21:02:34Z</updated>

		<summary type="html">&lt;p&gt;Halb27: /* Presets */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Software Infobox&lt;br /&gt;
| name = lossyWAV&lt;br /&gt;
| screenshot = &lt;br /&gt;
| caption = &lt;br /&gt;
| maintainer = [http://www.hydrogenaudio.org/forums/index.php?showuser=42400 Nick.C]&lt;br /&gt;
| stable_release = beta v0.6.1&lt;br /&gt;
| preview_release = &lt;br /&gt;
| operating_system = [[Wikipedia:MS-DOS|MS-DOS]]&lt;br /&gt;
| use = [[Wikipedia:Digital signal processing|Digital signal processing]]&lt;br /&gt;
| license = [[Wikipedia:LGPL|LGPL license]]&lt;br /&gt;
| website = [http://www.hydrogenaudio.org/forums/index.php?showtopic=56129 Hydrogenaudio]&lt;br /&gt;
}}&lt;br /&gt;
lossyWAV is a lossy pre-processor for [[PCM]] audio contained in the [[WAV]] file format. It reduces [[Wikipedia:Audio bit depth|bit depth]] of the input signal, which, when used in conjunction with certain lossless codecs, reduces the bitrate of the encoded file significantly compared to unpreprocessed compression. &lt;br /&gt;
lossyWAV&#039;s primary goal is to maintain [[transparency]] with a high degree of confidence when processing any audio data.&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
lossyFLAC is an idea started by [http://www.hydrogenaudio.org/forums/index.php?showuser=409 2Bdecided] at hydrogenaudio, utilising the wasted bits feature of the FLAC lossless codec with the aim of transparently reducing audio bit depth (making some lower significant bits (LSB&#039;s) zero), consequently taking advantage of FLAC&#039;s detection of consistently zeroed lower significant bits within each single frame and significantly increasing coding efficiency.[http://www.hydrogenaudio.org/forums/index.php?s=&amp;amp;showtopic=55522&amp;amp;view=findpost&amp;amp;p=498179] In this way the user can enjoy audio encoded using the same codec (which may be all important from a hardware compatibility perspective) at a reduced bitrate compared to the lossless version.&lt;br /&gt;
&lt;br /&gt;
[http://www.hydrogenaudio.org/forums/index.php?showuser=42400 Nick.C] ported the original [[Wikipedia:MATLAB|MATLAB]] implementation to [[Wikipedia:Borland Delphi|Delphi]] (Many thanks [[Wikipedia:CodeGear|CodeGear]] for Turbo Explorer!!) with a liberal sprinkling of [[Wikipedia:IA-32|IA-32]] and [[Wikipedia:x87|x87]] Assembly Language for speed.&lt;br /&gt;
&lt;br /&gt;
Subsequently, lossyFLAC proved itself to work with other lossless codecs, so the application name was changed to lossyWAV. &lt;br /&gt;
&lt;br /&gt;
Since then, Nick.C has heavily developed and built upon lossyWAV, with valuable tuning performed by [http://www.hydrogenaudio.org/forums/index.php?showuser=25015 halb27] at hydrogenaudio.&lt;br /&gt;
&lt;br /&gt;
==File Identification==&lt;br /&gt;
lossyWAV-processed WAV files are named with a double filename extension, .lossy.wav, to make them instantly identifiable. e.g. &amp;quot;.lossy.flac&amp;quot; would indicate an audio file which was processed using lossyWAV, and subsequently encoded using FLAC.[http://www.hydrogenaudio.org/forums/index.php?s=&amp;amp;showtopic=55522&amp;amp;view=findpost&amp;amp;p=498559]&lt;br /&gt;
&lt;br /&gt;
From beta v0.6.1, the -correction parameter is used when processing to create a correction file which is named with the .lwcdf.wav double filename extension. When &amp;quot;added&amp;quot; to the corresponding .lossy.wav, using a not yet implemented parameter of lossyWAV, the original file will be reconstituted.&lt;br /&gt;
&lt;br /&gt;
Combinations of lossyWAV with each specific encoder are referred to as lossy&#039;&#039;&#039;X&#039;&#039;&#039;, where &#039;&#039;&#039;X&#039;&#039;&#039; is an abbreviation of the lossless codec name. Combination names are listed in the &amp;quot;[[LossyWAV#Known supported codecs|known supported codecs]]&amp;quot; section below.&lt;br /&gt;
&lt;br /&gt;
From v0.5.9, lossyWAV inserts a variable length FACT chunk into the WAV file immediately after the FMT chunk. This takes the form:&amp;lt;pre&amp;gt;fact/&amp;lt;size&amp;gt;/lossyWAV beta vx.y.z : dd/mm/yyyy hh:mm:ss&lt;br /&gt;
-2 -cbs 512 -nts 0.00 -snr 21.00 -skew 36.00&lt;br /&gt;
-spf 22224-22235-22336-12347-12358 -fft 10101&amp;lt;/pre&amp;gt;Where the version, date &amp;amp; time and user settings are copied. Additionally, if a lossyWAV FACT chunk is found in a file, the processing will be halted (exit code = 16) to prevent re-processing of an already processed file.&lt;br /&gt;
&lt;br /&gt;
The -check parameter can be used to determine whether a file has previously been processed without trying to process it, exit code = 16 if already processed; exit code = 0 if not.&lt;br /&gt;
&lt;br /&gt;
==Presets==&lt;br /&gt;
*-1: Highest quality preset, disc space-saving alternative to lossless archiving for large audio collections.&lt;br /&gt;
*-2: Default preset; a compromise between -1 and -3.&lt;br /&gt;
*-3: High quality preset for usage on a compatible [[Wikipedia:Digital audio player|DAP]], approx. 370kbps for &amp;quot;normal&amp;quot; music. [http://www.hydrogenaudio.org/forums/index.php?s=&amp;amp;showtopic=56129&amp;amp;view=findpost&amp;amp;p=531316] &lt;br /&gt;
&lt;br /&gt;
All tuning has been performed on quality preset -3 with -2 and -1 being more conservative. Quality preset -3 is generally accepted to be (and from testing so far is) transparent. If you find a track which -3 fails to achieve transparency after processing, please post a sample (no more than 30 seconds) in the development thread.&lt;br /&gt;
&lt;br /&gt;
Apart from the quality presets the -nts (noise threshold shift) parameter is the most important parameter to control quality. Without noise threshold shifting (-nts 0) the number of bits to be removed is computed in a theoretically optimal way. -nts 0 is defaulted when using quality preset -2.&lt;br /&gt;
&lt;br /&gt;
In order to be more cautious a negative -nts value can be chosen up to -48. -nts -3 is defaulted when using quality preset -1. For archiving purposes and/or very cautious users even more conservative values may be of interest.&lt;br /&gt;
&lt;br /&gt;
Because of internal precautions in addition to 2Bdecided&#039;s principles experience so far tells us that a small positive -nts value doesn&#039;t keep the encodings from being transparent. That&#039;s why -nts 3 is defaulted when using quality preset -3. A more aggressive value may be welcome for a user who wants to keep average bitrate down a bit more. The higher the -nts value however the more probable is a situation where lossyWAV is not transparent any more. A -nts value of more than 10 is not recommended though even with a value of ~10 transparency is achieved usually.&lt;br /&gt;
&lt;br /&gt;
==Supported input formats==&lt;br /&gt;
*[[WAV]]: 16-bit, 24-bit; sample rate &amp;amp;ge; 32kHz [[Pulse Code Modulation|PCM]]. Very high sample rates (&amp;amp;gt;48kHz) have not been extensively tested. Tunings have been focussed on 16-bit, 44.1kHz samples (i.e. [[Wikipedia:Red Book (audio CD standard)|CD]] PCM).&lt;br /&gt;
&lt;br /&gt;
==Codec Compatibility==&lt;br /&gt;
===Known supported codecs===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|+ &#039;&#039;&#039;Recommended settings&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
!Codec&lt;br /&gt;
!lossyWAV parameters&lt;br /&gt;
!Encoder parameters&lt;br /&gt;
!Combination name&lt;br /&gt;
|-&lt;br /&gt;
![[Free Lossless Audio Codec|FLAC]]&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| -&#039;&#039;&#039;3&#039;&#039;&#039; -&#039;&#039;&#039;m&#039;&#039;&#039; -&#039;&#039;&#039;e&#039;&#039;&#039; -&#039;&#039;&#039;r&#039;&#039;&#039; 2 -&#039;&#039;&#039;b&#039;&#039;&#039; 512 --&#039;&#039;&#039;keep-foreign-metadata&#039;&#039;&#039;[http://www.hydrogenaudio.org/forums/index.php?s=&amp;amp;showtopic=56129&amp;amp;view=findpost&amp;amp;p=533689]&lt;br /&gt;
|lossy&#039;&#039;&#039;FLAC&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
![[Wikipedia:Lossless Predictive Audio Compression|LPAC]]&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| -&#039;&#039;&#039;b&#039;&#039;&#039;512&lt;br /&gt;
|lossy&#039;&#039;&#039;LPAC&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
![[Wikipedia:Audio Lossless Coding|MPEG-4 ALS]]&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| -&#039;&#039;&#039;l&#039;&#039;&#039; -&#039;&#039;&#039;n&#039;&#039;&#039;512&lt;br /&gt;
|lossy&#039;&#039;&#039;ALS&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
![[TAK]]&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| -&#039;&#039;&#039;fsl&#039;&#039;&#039;512&lt;br /&gt;
|lossy&#039;&#039;&#039;TAK&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
![[WavPack]]&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| --&#039;&#039;&#039;blocksize&#039;&#039;&#039;=512&lt;br /&gt;
|lossy&#039;&#039;&#039;WV&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
![[Wikipedia:Windows Media Audio#Windows Media Audio Lossless|WMA Lossless]]&lt;br /&gt;
| -&#039;&#039;&#039;wmalsl&#039;&#039;&#039; (same as -&#039;&#039;&#039;cbs&#039;&#039;&#039; 2048)&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
|lossy&#039;&#039;&#039;WMALSL&#039;&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
There is also [http://www.hometheaterhifi.com/volume_8_4/dvd-benchmark-part-6-dvd-audio-11-2001.html#Meridian%20Lossless%20Packing%20(MLP)%20in%20a%20Nutshell evidence] &amp;amp;mdash; so-called &amp;quot;Bit Shifting&amp;quot; &amp;amp;mdash; to suggest that lossyWAV may work with [[Wikipedia:Meridian Lossless Packing|MLP]], but this remains untested due to prohibitive prices of encoders.&lt;br /&gt;
&lt;br /&gt;
A comparison of portable media players is [[Wikipedia:Comparison of portable media players#Audio Formats|here]], which shows FLAC and WMA Lossless compatibility among listed players.&lt;br /&gt;
Any player supported by [http://www.rockbox.org Rockbox] can use FLAC or wavPack files after installing Rockbox.&lt;br /&gt;
&lt;br /&gt;
===Known unsupported codecs===&lt;br /&gt;
*[[ALAC]]&lt;br /&gt;
*[[Lossless Audio|LA]]&lt;br /&gt;
*[[Monkey&#039;s Audio]]&lt;br /&gt;
*[[OptimFROG]]&lt;br /&gt;
*[[TTA]]&lt;br /&gt;
&lt;br /&gt;
==lossyWAV application settings==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
lossyWAV beta v0.6.0 : WAV file bit depth reduction method by 2Bdecided.&lt;br /&gt;
Delphi implementation by Nick.C from a Matlab script, www.hydrogenaudio.org&lt;br /&gt;
&lt;br /&gt;
Usage   : lossyWAV &amp;lt;input wav file&amp;gt; &amp;lt;options&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example : lossyWAV musicfile.wav&lt;br /&gt;
&lt;br /&gt;
Quality Options:&lt;br /&gt;
&lt;br /&gt;
-1            extreme settings [4xFFT] (-cbs 512 -nts -3.0 -skew 36 -snr 21&lt;br /&gt;
              -spf 22224-22225-11235-11246-12358 -fft 11011)&lt;br /&gt;
-2            default settings [3xFFT] (-cbs 512 -nts  0.0 -skew 36 -snr 21&lt;br /&gt;
              -spf 22224-22235-22346-12347-12358 -fft 10101)&lt;br /&gt;
-3            compact settings [2xFFT] (-cbs 512 -nts +3.0 -skew 36 -snr 21&lt;br /&gt;
              -spf 22224-22235-22347-22358-2246C -fft 10001)&lt;br /&gt;
&lt;br /&gt;
Standard Options:&lt;br /&gt;
&lt;br /&gt;
-o &amp;lt;folder&amp;gt;   destination folder for the output file&lt;br /&gt;
-nts &amp;lt;n&amp;gt;      set noise_threshold_shift to n dB (-48.0dB&amp;lt;=n&amp;lt;=+48.0dB)&lt;br /&gt;
              (-ve values reduce bits to remove, +ve values increase)&lt;br /&gt;
-force        forcibly over-write output file if it exists; default=off&lt;br /&gt;
-check        check if WAV file has already been processed. default=off;&lt;br /&gt;
              errorlevel=16 if already processed, 0 if not.&lt;br /&gt;
&lt;br /&gt;
Codec Specific Options:&lt;br /&gt;
&lt;br /&gt;
-wmalsl       optimise internal settings for WMA Lossless codec; default=off&lt;br /&gt;
&lt;br /&gt;
Advanced / System Options:&lt;br /&gt;
&lt;br /&gt;
-shaping      enable fixed shaping using bit_removal difference of previous&lt;br /&gt;
              samples [value = brd(-1)/4]; default=off&lt;br /&gt;
-snr &amp;lt;n&amp;gt;      set minimum average signal to added noise ratio to n dB;&lt;br /&gt;
              (-215.0dB&amp;lt;=n&amp;lt;=48.0dB) Increasing value reduces bits to remove.&lt;br /&gt;
-skew &amp;lt;n&amp;gt;     skew fft analysis results by n dB (0.0db&amp;lt;=n&amp;lt;=48.0db) in the&lt;br /&gt;
              frequency range 20Hz to 3.45kHz&lt;br /&gt;
-spf &amp;lt;5x5hex&amp;gt; manually input the 5 spreading functions as 5 x 5 characters;&lt;br /&gt;
              These correspond to FFTs of 64, 128, 256, 512 &amp;amp; 1024 samples;&lt;br /&gt;
              e.g. 22235-22236-22347-22358-2246C (Characters must be one of&lt;br /&gt;
              1 to 9 and A to F (zero excluded).&lt;br /&gt;
-fft &amp;lt;5xbin&amp;gt;  select fft lengths to use in analysis, using binary switching,&lt;br /&gt;
              from 64, 128, 256, 512 &amp;amp; 1024 samples, e.g. 01001 = 128,1024&lt;br /&gt;
-cbs &amp;lt;n&amp;gt;      set codec block size to n samples (512&amp;lt;=n&amp;lt;=4608, n mod 32=0)&lt;br /&gt;
&lt;br /&gt;
-quiet        significantly reduce screen output&lt;br /&gt;
-nowarn       suppress lossyWAV warnings&lt;br /&gt;
-detail       enable detailled output mode&lt;br /&gt;
&lt;br /&gt;
-below        set process priority to below normal.&lt;br /&gt;
-low          set process priority to low.&lt;br /&gt;
&lt;br /&gt;
Special thanks:&lt;br /&gt;
&lt;br /&gt;
David Robinson for the method itself and motivation to implement it in Delphi.&lt;br /&gt;
Dr. Jean Debord for the use of TPMAT036 uFFT &amp;amp; uTypes units for FFT analysis.&lt;br /&gt;
Halb27 @ www.hydrogenaudio.org for donation and maintenance of the wavIO unit.&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Indicative Bitrate Reduction==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|+ &#039;&#039;&#039;Conversion using lossyWAV beta v0.5.8, [[Wikipedia:FLAC|FLAC]] -8&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
!lossyWAV Test Set&lt;br /&gt;
!FLAC -8&lt;br /&gt;
!lossyWAV -1&lt;br /&gt;
!lossyWAV -2&lt;br /&gt;
!lossyWAV -3&lt;br /&gt;
|-&lt;br /&gt;
!10 Album Test Average                                &lt;br /&gt;
| 850kbps &lt;br /&gt;
| 480kbps &lt;br /&gt;
| 426kbps &lt;br /&gt;
| 376kbps&lt;br /&gt;
|-&lt;br /&gt;
!53 sample &amp;quot;problem&amp;quot; set                &lt;br /&gt;
| 784kbps &lt;br /&gt;
| 543kbps &lt;br /&gt;
| 491kbps &lt;br /&gt;
| 434kbps&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|+ &#039;&#039;&#039;Large Foobar2000 Conversion: (lossyWAV -3; [[Wikipedia:FLAC|FLAC]] -3 -m -e -r 2 -b 512)&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
!Album&lt;br /&gt;
!FLAC -8&lt;br /&gt;
!lossyWAV -1&lt;br /&gt;
!lossyWAV -2&lt;br /&gt;
!lossyWAV -3&lt;br /&gt;
|-&lt;br /&gt;
!3283 Tracks; 258 Discs; 87.2GB&amp;gt;36.8GB  &lt;br /&gt;
| 880kbps &lt;br /&gt;
| N/A &lt;br /&gt;
| N/A&lt;br /&gt;
| 371kbps &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Using lossyWAV==&lt;br /&gt;
===Example Foobar2000 Converter Settings===&lt;br /&gt;
[[Image:Foobar2000_Converter_Settings.PNG]]&lt;br /&gt;
&lt;br /&gt;
===Example flossy.bat file called from Foobar2000===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@echo off&lt;br /&gt;
c:\data_nic\bin\lossyWAV %1 %3 %4 %5 %6 %7 %8 %9 -below -nowarn -quiet&lt;br /&gt;
c:\data_nic\bin\flac.exe -8 -f -b 512 &amp;quot;%~N1.lossy.wav&amp;quot; -o&amp;quot;%~N2.flac&amp;quot; &lt;br /&gt;
del &amp;quot;%~N1.lossy.wav&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Frequently asked questions==&lt;br /&gt;
*&#039;&#039;&#039;Question:&#039;&#039;&#039; Is it [[Variable Bitrate|VBR]]?&lt;br /&gt;
*&#039;&#039;&#039;Short answer:&#039;&#039;&#039; Yes.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Question:&#039;&#039;&#039; Is it [[transparency|transparent]]?&lt;br /&gt;
*&#039;&#039;&#039;Short answer:&#039;&#039;&#039; Almost certainly.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Question:&#039;&#039;&#039; Is it [[lossless]]?&lt;br /&gt;
*&#039;&#039;&#039;Short answer:&#039;&#039;&#039; No.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Question:&#039;&#039;&#039; Why should I use this?&lt;br /&gt;
*&#039;&#039;&#039;Answer:&#039;&#039;&#039;&lt;br /&gt;
:*high quality&lt;br /&gt;
:*extremely low chance of audible [[artifact|artefacts]]&lt;br /&gt;
:*reasonable [[bitrate]]s&lt;br /&gt;
:*usable with unmodified, established lossless formats.&lt;br /&gt;
&lt;br /&gt;
==Current Test Settings==&lt;br /&gt;
No current test settings&lt;br /&gt;
&lt;br /&gt;
==External links==&lt;br /&gt;
*[http://www.hydrogenaudio.org/forums/index.php?showtopic=56129 Current development thread] You will find the latest version and last stable version in post #1 of this thread.&lt;br /&gt;
*[http://www.hydrogenaudio.org/forums/index.php?showtopic=55522&amp;amp;st=0 Original lossyFLAC thread] Where David Robinson (Replaygain developer) introduces the method and a Matlab implementation.&lt;/div&gt;</summary>
		<author><name>Halb27</name></author>
	</entry>
	<entry>
		<id>https://wiki.hydrogenaudio.org/index.php?title=LossyWAV&amp;diff=18110</id>
		<title>LossyWAV</title>
		<link rel="alternate" type="text/html" href="https://wiki.hydrogenaudio.org/index.php?title=LossyWAV&amp;diff=18110"/>
		<updated>2008-01-03T21:01:32Z</updated>

		<summary type="html">&lt;p&gt;Halb27: /* Presets */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Software Infobox&lt;br /&gt;
| name = lossyWAV&lt;br /&gt;
| screenshot = &lt;br /&gt;
| caption = &lt;br /&gt;
| maintainer = [http://www.hydrogenaudio.org/forums/index.php?showuser=42400 Nick.C]&lt;br /&gt;
| stable_release = beta v0.6.1&lt;br /&gt;
| preview_release = &lt;br /&gt;
| operating_system = [[Wikipedia:MS-DOS|MS-DOS]]&lt;br /&gt;
| use = [[Wikipedia:Digital signal processing|Digital signal processing]]&lt;br /&gt;
| license = [[Wikipedia:LGPL|LGPL license]]&lt;br /&gt;
| website = [http://www.hydrogenaudio.org/forums/index.php?showtopic=56129 Hydrogenaudio]&lt;br /&gt;
}}&lt;br /&gt;
lossyWAV is a lossy pre-processor for [[PCM]] audio contained in the [[WAV]] file format. It reduces [[Wikipedia:Audio bit depth|bit depth]] of the input signal, which, when used in conjunction with certain lossless codecs, reduces the bitrate of the encoded file significantly compared to unpreprocessed compression. &lt;br /&gt;
lossyWAV&#039;s primary goal is to maintain [[transparency]] with a high degree of confidence when processing any audio data.&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
lossyFLAC is an idea started by [http://www.hydrogenaudio.org/forums/index.php?showuser=409 2Bdecided] at hydrogenaudio, utilising the wasted bits feature of the FLAC lossless codec with the aim of transparently reducing audio bit depth (making some lower significant bits (LSB&#039;s) zero), consequently taking advantage of FLAC&#039;s detection of consistently zeroed lower significant bits within each single frame and significantly increasing coding efficiency.[http://www.hydrogenaudio.org/forums/index.php?s=&amp;amp;showtopic=55522&amp;amp;view=findpost&amp;amp;p=498179] In this way the user can enjoy audio encoded using the same codec (which may be all important from a hardware compatibility perspective) at a reduced bitrate compared to the lossless version.&lt;br /&gt;
&lt;br /&gt;
[http://www.hydrogenaudio.org/forums/index.php?showuser=42400 Nick.C] ported the original [[Wikipedia:MATLAB|MATLAB]] implementation to [[Wikipedia:Borland Delphi|Delphi]] (Many thanks [[Wikipedia:CodeGear|CodeGear]] for Turbo Explorer!!) with a liberal sprinkling of [[Wikipedia:IA-32|IA-32]] and [[Wikipedia:x87|x87]] Assembly Language for speed.&lt;br /&gt;
&lt;br /&gt;
Subsequently, lossyFLAC proved itself to work with other lossless codecs, so the application name was changed to lossyWAV. &lt;br /&gt;
&lt;br /&gt;
Since then, Nick.C has heavily developed and built upon lossyWAV, with valuable tuning performed by [http://www.hydrogenaudio.org/forums/index.php?showuser=25015 halb27] at hydrogenaudio.&lt;br /&gt;
&lt;br /&gt;
==File Identification==&lt;br /&gt;
lossyWAV-processed WAV files are named with a double filename extension, .lossy.wav, to make them instantly identifiable. e.g. &amp;quot;.lossy.flac&amp;quot; would indicate an audio file which was processed using lossyWAV, and subsequently encoded using FLAC.[http://www.hydrogenaudio.org/forums/index.php?s=&amp;amp;showtopic=55522&amp;amp;view=findpost&amp;amp;p=498559]&lt;br /&gt;
&lt;br /&gt;
From beta v0.6.1, the -correction parameter is used when processing to create a correction file which is named with the .lwcdf.wav double filename extension. When &amp;quot;added&amp;quot; to the corresponding .lossy.wav, using a not yet implemented parameter of lossyWAV, the original file will be reconstituted.&lt;br /&gt;
&lt;br /&gt;
Combinations of lossyWAV with each specific encoder are referred to as lossy&#039;&#039;&#039;X&#039;&#039;&#039;, where &#039;&#039;&#039;X&#039;&#039;&#039; is an abbreviation of the lossless codec name. Combination names are listed in the &amp;quot;[[LossyWAV#Known supported codecs|known supported codecs]]&amp;quot; section below.&lt;br /&gt;
&lt;br /&gt;
From v0.5.9, lossyWAV inserts a variable length FACT chunk into the WAV file immediately after the FMT chunk. This takes the form:&amp;lt;pre&amp;gt;fact/&amp;lt;size&amp;gt;/lossyWAV beta vx.y.z : dd/mm/yyyy hh:mm:ss&lt;br /&gt;
-2 -cbs 512 -nts 0.00 -snr 21.00 -skew 36.00&lt;br /&gt;
-spf 22224-22235-22336-12347-12358 -fft 10101&amp;lt;/pre&amp;gt;Where the version, date &amp;amp; time and user settings are copied. Additionally, if a lossyWAV FACT chunk is found in a file, the processing will be halted (exit code = 16) to prevent re-processing of an already processed file.&lt;br /&gt;
&lt;br /&gt;
The -check parameter can be used to determine whether a file has previously been processed without trying to process it, exit code = 16 if already processed; exit code = 0 if not.&lt;br /&gt;
&lt;br /&gt;
==Presets==&lt;br /&gt;
*-1: Highest quality preset, disc space-saving alternative to lossless archiving for large audio collections.&lt;br /&gt;
*-2: Default preset; a compromise between -1 and -3.&lt;br /&gt;
*-3: High quality preset for usage on a compatible [[Wikipedia:Digital audio player|DAP]], approx. 370kbps for &amp;quot;normal&amp;quot; music. [http://www.hydrogenaudio.org/forums/index.php?s=&amp;amp;showtopic=56129&amp;amp;view=findpost&amp;amp;p=531316] &lt;br /&gt;
&lt;br /&gt;
All tuning has been performed on quality preset -3 with -2 and -1 being more conservative. Quality preset -3 is generally accepted to be (and from testing so far is) transparent. If you find a track which -3 fails to achieve transparency after processing, please post a sample (no more than 30 seconds) in the development thread.&lt;br /&gt;
&lt;br /&gt;
Apart from the quality presets the -nts (noise threshold shift) parameter is the most important parameter to control quality. Without noise threshold shifting (-nts 0) the number of bits to be removed is computed in a theoretically optimal way. -nts 0 is defaulted when using quality preset -2.&lt;br /&gt;
&lt;br /&gt;
In order to be more cautious a negative -nts value can be chosen up to -48. -nts -3 is defaulted when using quality preset -1. For archiving purposes and/or very cautious users even more conservative values may be of interest.&lt;br /&gt;
&lt;br /&gt;
Because of internal precautions in addition to 2Bdecided&#039;s principles experience so far tells us that a small positive -nts value doesn&#039;t keep the encodings from being transparent. That&#039;s why -nts 3 is defaulted when using quality preset -3. A more aggressive value may be welcome for a user who wants to keep average bitrate down a bit more. The higher the -nts value however the more probable is the arrival of a situation where lossyWAV is not transparent any more. A -nts value of more than 10 is not recommended though even with a value of ~10 transparency is achieved usually.&lt;br /&gt;
&lt;br /&gt;
==Supported input formats==&lt;br /&gt;
*[[WAV]]: 16-bit, 24-bit; sample rate &amp;amp;ge; 32kHz [[Pulse Code Modulation|PCM]]. Very high sample rates (&amp;amp;gt;48kHz) have not been extensively tested. Tunings have been focussed on 16-bit, 44.1kHz samples (i.e. [[Wikipedia:Red Book (audio CD standard)|CD]] PCM).&lt;br /&gt;
&lt;br /&gt;
==Codec Compatibility==&lt;br /&gt;
===Known supported codecs===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|+ &#039;&#039;&#039;Recommended settings&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
!Codec&lt;br /&gt;
!lossyWAV parameters&lt;br /&gt;
!Encoder parameters&lt;br /&gt;
!Combination name&lt;br /&gt;
|-&lt;br /&gt;
![[Free Lossless Audio Codec|FLAC]]&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| -&#039;&#039;&#039;3&#039;&#039;&#039; -&#039;&#039;&#039;m&#039;&#039;&#039; -&#039;&#039;&#039;e&#039;&#039;&#039; -&#039;&#039;&#039;r&#039;&#039;&#039; 2 -&#039;&#039;&#039;b&#039;&#039;&#039; 512 --&#039;&#039;&#039;keep-foreign-metadata&#039;&#039;&#039;[http://www.hydrogenaudio.org/forums/index.php?s=&amp;amp;showtopic=56129&amp;amp;view=findpost&amp;amp;p=533689]&lt;br /&gt;
|lossy&#039;&#039;&#039;FLAC&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
![[Wikipedia:Lossless Predictive Audio Compression|LPAC]]&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| -&#039;&#039;&#039;b&#039;&#039;&#039;512&lt;br /&gt;
|lossy&#039;&#039;&#039;LPAC&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
![[Wikipedia:Audio Lossless Coding|MPEG-4 ALS]]&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| -&#039;&#039;&#039;l&#039;&#039;&#039; -&#039;&#039;&#039;n&#039;&#039;&#039;512&lt;br /&gt;
|lossy&#039;&#039;&#039;ALS&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
![[TAK]]&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| -&#039;&#039;&#039;fsl&#039;&#039;&#039;512&lt;br /&gt;
|lossy&#039;&#039;&#039;TAK&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
![[WavPack]]&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| --&#039;&#039;&#039;blocksize&#039;&#039;&#039;=512&lt;br /&gt;
|lossy&#039;&#039;&#039;WV&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
![[Wikipedia:Windows Media Audio#Windows Media Audio Lossless|WMA Lossless]]&lt;br /&gt;
| -&#039;&#039;&#039;wmalsl&#039;&#039;&#039; (same as -&#039;&#039;&#039;cbs&#039;&#039;&#039; 2048)&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
|lossy&#039;&#039;&#039;WMALSL&#039;&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
There is also [http://www.hometheaterhifi.com/volume_8_4/dvd-benchmark-part-6-dvd-audio-11-2001.html#Meridian%20Lossless%20Packing%20(MLP)%20in%20a%20Nutshell evidence] &amp;amp;mdash; so-called &amp;quot;Bit Shifting&amp;quot; &amp;amp;mdash; to suggest that lossyWAV may work with [[Wikipedia:Meridian Lossless Packing|MLP]], but this remains untested due to prohibitive prices of encoders.&lt;br /&gt;
&lt;br /&gt;
A comparison of portable media players is [[Wikipedia:Comparison of portable media players#Audio Formats|here]], which shows FLAC and WMA Lossless compatibility among listed players.&lt;br /&gt;
Any player supported by [http://www.rockbox.org Rockbox] can use FLAC or wavPack files after installing Rockbox.&lt;br /&gt;
&lt;br /&gt;
===Known unsupported codecs===&lt;br /&gt;
*[[ALAC]]&lt;br /&gt;
*[[Lossless Audio|LA]]&lt;br /&gt;
*[[Monkey&#039;s Audio]]&lt;br /&gt;
*[[OptimFROG]]&lt;br /&gt;
*[[TTA]]&lt;br /&gt;
&lt;br /&gt;
==lossyWAV application settings==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
lossyWAV beta v0.6.0 : WAV file bit depth reduction method by 2Bdecided.&lt;br /&gt;
Delphi implementation by Nick.C from a Matlab script, www.hydrogenaudio.org&lt;br /&gt;
&lt;br /&gt;
Usage   : lossyWAV &amp;lt;input wav file&amp;gt; &amp;lt;options&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example : lossyWAV musicfile.wav&lt;br /&gt;
&lt;br /&gt;
Quality Options:&lt;br /&gt;
&lt;br /&gt;
-1            extreme settings [4xFFT] (-cbs 512 -nts -3.0 -skew 36 -snr 21&lt;br /&gt;
              -spf 22224-22225-11235-11246-12358 -fft 11011)&lt;br /&gt;
-2            default settings [3xFFT] (-cbs 512 -nts  0.0 -skew 36 -snr 21&lt;br /&gt;
              -spf 22224-22235-22346-12347-12358 -fft 10101)&lt;br /&gt;
-3            compact settings [2xFFT] (-cbs 512 -nts +3.0 -skew 36 -snr 21&lt;br /&gt;
              -spf 22224-22235-22347-22358-2246C -fft 10001)&lt;br /&gt;
&lt;br /&gt;
Standard Options:&lt;br /&gt;
&lt;br /&gt;
-o &amp;lt;folder&amp;gt;   destination folder for the output file&lt;br /&gt;
-nts &amp;lt;n&amp;gt;      set noise_threshold_shift to n dB (-48.0dB&amp;lt;=n&amp;lt;=+48.0dB)&lt;br /&gt;
              (-ve values reduce bits to remove, +ve values increase)&lt;br /&gt;
-force        forcibly over-write output file if it exists; default=off&lt;br /&gt;
-check        check if WAV file has already been processed. default=off;&lt;br /&gt;
              errorlevel=16 if already processed, 0 if not.&lt;br /&gt;
&lt;br /&gt;
Codec Specific Options:&lt;br /&gt;
&lt;br /&gt;
-wmalsl       optimise internal settings for WMA Lossless codec; default=off&lt;br /&gt;
&lt;br /&gt;
Advanced / System Options:&lt;br /&gt;
&lt;br /&gt;
-shaping      enable fixed shaping using bit_removal difference of previous&lt;br /&gt;
              samples [value = brd(-1)/4]; default=off&lt;br /&gt;
-snr &amp;lt;n&amp;gt;      set minimum average signal to added noise ratio to n dB;&lt;br /&gt;
              (-215.0dB&amp;lt;=n&amp;lt;=48.0dB) Increasing value reduces bits to remove.&lt;br /&gt;
-skew &amp;lt;n&amp;gt;     skew fft analysis results by n dB (0.0db&amp;lt;=n&amp;lt;=48.0db) in the&lt;br /&gt;
              frequency range 20Hz to 3.45kHz&lt;br /&gt;
-spf &amp;lt;5x5hex&amp;gt; manually input the 5 spreading functions as 5 x 5 characters;&lt;br /&gt;
              These correspond to FFTs of 64, 128, 256, 512 &amp;amp; 1024 samples;&lt;br /&gt;
              e.g. 22235-22236-22347-22358-2246C (Characters must be one of&lt;br /&gt;
              1 to 9 and A to F (zero excluded).&lt;br /&gt;
-fft &amp;lt;5xbin&amp;gt;  select fft lengths to use in analysis, using binary switching,&lt;br /&gt;
              from 64, 128, 256, 512 &amp;amp; 1024 samples, e.g. 01001 = 128,1024&lt;br /&gt;
-cbs &amp;lt;n&amp;gt;      set codec block size to n samples (512&amp;lt;=n&amp;lt;=4608, n mod 32=0)&lt;br /&gt;
&lt;br /&gt;
-quiet        significantly reduce screen output&lt;br /&gt;
-nowarn       suppress lossyWAV warnings&lt;br /&gt;
-detail       enable detailled output mode&lt;br /&gt;
&lt;br /&gt;
-below        set process priority to below normal.&lt;br /&gt;
-low          set process priority to low.&lt;br /&gt;
&lt;br /&gt;
Special thanks:&lt;br /&gt;
&lt;br /&gt;
David Robinson for the method itself and motivation to implement it in Delphi.&lt;br /&gt;
Dr. Jean Debord for the use of TPMAT036 uFFT &amp;amp; uTypes units for FFT analysis.&lt;br /&gt;
Halb27 @ www.hydrogenaudio.org for donation and maintenance of the wavIO unit.&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Indicative Bitrate Reduction==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|+ &#039;&#039;&#039;Conversion using lossyWAV beta v0.5.8, [[Wikipedia:FLAC|FLAC]] -8&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
!lossyWAV Test Set&lt;br /&gt;
!FLAC -8&lt;br /&gt;
!lossyWAV -1&lt;br /&gt;
!lossyWAV -2&lt;br /&gt;
!lossyWAV -3&lt;br /&gt;
|-&lt;br /&gt;
!10 Album Test Average                                &lt;br /&gt;
| 850kbps &lt;br /&gt;
| 480kbps &lt;br /&gt;
| 426kbps &lt;br /&gt;
| 376kbps&lt;br /&gt;
|-&lt;br /&gt;
!53 sample &amp;quot;problem&amp;quot; set                &lt;br /&gt;
| 784kbps &lt;br /&gt;
| 543kbps &lt;br /&gt;
| 491kbps &lt;br /&gt;
| 434kbps&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|+ &#039;&#039;&#039;Large Foobar2000 Conversion: (lossyWAV -3; [[Wikipedia:FLAC|FLAC]] -3 -m -e -r 2 -b 512)&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
!Album&lt;br /&gt;
!FLAC -8&lt;br /&gt;
!lossyWAV -1&lt;br /&gt;
!lossyWAV -2&lt;br /&gt;
!lossyWAV -3&lt;br /&gt;
|-&lt;br /&gt;
!3283 Tracks; 258 Discs; 87.2GB&amp;gt;36.8GB  &lt;br /&gt;
| 880kbps &lt;br /&gt;
| N/A &lt;br /&gt;
| N/A&lt;br /&gt;
| 371kbps &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Using lossyWAV==&lt;br /&gt;
===Example Foobar2000 Converter Settings===&lt;br /&gt;
[[Image:Foobar2000_Converter_Settings.PNG]]&lt;br /&gt;
&lt;br /&gt;
===Example flossy.bat file called from Foobar2000===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@echo off&lt;br /&gt;
c:\data_nic\bin\lossyWAV %1 %3 %4 %5 %6 %7 %8 %9 -below -nowarn -quiet&lt;br /&gt;
c:\data_nic\bin\flac.exe -8 -f -b 512 &amp;quot;%~N1.lossy.wav&amp;quot; -o&amp;quot;%~N2.flac&amp;quot; &lt;br /&gt;
del &amp;quot;%~N1.lossy.wav&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Frequently asked questions==&lt;br /&gt;
*&#039;&#039;&#039;Question:&#039;&#039;&#039; Is it [[Variable Bitrate|VBR]]?&lt;br /&gt;
*&#039;&#039;&#039;Short answer:&#039;&#039;&#039; Yes.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Question:&#039;&#039;&#039; Is it [[transparency|transparent]]?&lt;br /&gt;
*&#039;&#039;&#039;Short answer:&#039;&#039;&#039; Almost certainly.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Question:&#039;&#039;&#039; Is it [[lossless]]?&lt;br /&gt;
*&#039;&#039;&#039;Short answer:&#039;&#039;&#039; No.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Question:&#039;&#039;&#039; Why should I use this?&lt;br /&gt;
*&#039;&#039;&#039;Answer:&#039;&#039;&#039;&lt;br /&gt;
:*high quality&lt;br /&gt;
:*extremely low chance of audible [[artifact|artefacts]]&lt;br /&gt;
:*reasonable [[bitrate]]s&lt;br /&gt;
:*usable with unmodified, established lossless formats.&lt;br /&gt;
&lt;br /&gt;
==Current Test Settings==&lt;br /&gt;
No current test settings&lt;br /&gt;
&lt;br /&gt;
==External links==&lt;br /&gt;
*[http://www.hydrogenaudio.org/forums/index.php?showtopic=56129 Current development thread] You will find the latest version and last stable version in post #1 of this thread.&lt;br /&gt;
*[http://www.hydrogenaudio.org/forums/index.php?showtopic=55522&amp;amp;st=0 Original lossyFLAC thread] Where David Robinson (Replaygain developer) introduces the method and a Matlab implementation.&lt;/div&gt;</summary>
		<author><name>Halb27</name></author>
	</entry>
	<entry>
		<id>https://wiki.hydrogenaudio.org/index.php?title=LossyWAV&amp;diff=18108</id>
		<title>LossyWAV</title>
		<link rel="alternate" type="text/html" href="https://wiki.hydrogenaudio.org/index.php?title=LossyWAV&amp;diff=18108"/>
		<updated>2008-01-03T20:56:40Z</updated>

		<summary type="html">&lt;p&gt;Halb27: /* Presets */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Software Infobox&lt;br /&gt;
| name = lossyWAV&lt;br /&gt;
| screenshot = &lt;br /&gt;
| caption = &lt;br /&gt;
| maintainer = [http://www.hydrogenaudio.org/forums/index.php?showuser=42400 Nick.C]&lt;br /&gt;
| stable_release = beta v0.6.1&lt;br /&gt;
| preview_release = &lt;br /&gt;
| operating_system = [[Wikipedia:MS-DOS|MS-DOS]]&lt;br /&gt;
| use = [[Wikipedia:Digital signal processing|Digital signal processing]]&lt;br /&gt;
| license = [[Wikipedia:LGPL|LGPL license]]&lt;br /&gt;
| website = [http://www.hydrogenaudio.org/forums/index.php?showtopic=56129 Hydrogenaudio]&lt;br /&gt;
}}&lt;br /&gt;
lossyWAV is a lossy pre-processor for [[PCM]] audio contained in the [[WAV]] file format. It reduces [[Wikipedia:Audio bit depth|bit depth]] of the input signal, which, when used in conjunction with certain lossless codecs, reduces the bitrate of the encoded file significantly compared to unpreprocessed compression. &lt;br /&gt;
lossyWAV&#039;s primary goal is to maintain [[transparency]] with a high degree of confidence when processing any audio data.&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
lossyFLAC is an idea started by [http://www.hydrogenaudio.org/forums/index.php?showuser=409 2Bdecided] at hydrogenaudio, utilising the wasted bits feature of the FLAC lossless codec with the aim of transparently reducing audio bit depth (making some lower significant bits (LSB&#039;s) zero), consequently taking advantage of FLAC&#039;s detection of consistently zeroed lower significant bits within each single frame and significantly increasing coding efficiency.[http://www.hydrogenaudio.org/forums/index.php?s=&amp;amp;showtopic=55522&amp;amp;view=findpost&amp;amp;p=498179] In this way the user can enjoy audio encoded using the same codec (which may be all important from a hardware compatibility perspective) at a reduced bitrate compared to the lossless version.&lt;br /&gt;
&lt;br /&gt;
[http://www.hydrogenaudio.org/forums/index.php?showuser=42400 Nick.C] ported the original [[Wikipedia:MATLAB|MATLAB]] implementation to [[Wikipedia:Borland Delphi|Delphi]] (Many thanks [[Wikipedia:CodeGear|CodeGear]] for Turbo Explorer!!) with a liberal sprinkling of [[Wikipedia:IA-32|IA-32]] and [[Wikipedia:x87|x87]] Assembly Language for speed.&lt;br /&gt;
&lt;br /&gt;
Subsequently, lossyFLAC proved itself to work with other lossless codecs, so the application name was changed to lossyWAV. &lt;br /&gt;
&lt;br /&gt;
Since then, Nick.C has heavily developed and built upon lossyWAV, with valuable tuning performed by [http://www.hydrogenaudio.org/forums/index.php?showuser=25015 halb27] at hydrogenaudio.&lt;br /&gt;
&lt;br /&gt;
==File Identification==&lt;br /&gt;
lossyWAV-processed WAV files are named with a double filename extension, .lossy.wav, to make them instantly identifiable. e.g. &amp;quot;.lossy.flac&amp;quot; would indicate an audio file which was processed using lossyWAV, and subsequently encoded using FLAC.[http://www.hydrogenaudio.org/forums/index.php?s=&amp;amp;showtopic=55522&amp;amp;view=findpost&amp;amp;p=498559]&lt;br /&gt;
&lt;br /&gt;
From beta v0.6.1, the -correction parameter is used when processing to create a correction file which is named with the .lwcdf.wav double filename extension. When &amp;quot;added&amp;quot; to the corresponding .lossy.wav, using a not yet implemented parameter of lossyWAV, the original file will be reconstituted.&lt;br /&gt;
&lt;br /&gt;
Combinations of lossyWAV with each specific encoder are referred to as lossy&#039;&#039;&#039;X&#039;&#039;&#039;, where &#039;&#039;&#039;X&#039;&#039;&#039; is an abbreviation of the lossless codec name. Combination names are listed in the &amp;quot;[[LossyWAV#Known supported codecs|known supported codecs]]&amp;quot; section below.&lt;br /&gt;
&lt;br /&gt;
From v0.5.9, lossyWAV inserts a variable length FACT chunk into the WAV file immediately after the FMT chunk. This takes the form:&amp;lt;pre&amp;gt;fact/&amp;lt;size&amp;gt;/lossyWAV beta vx.y.z : dd/mm/yyyy hh:mm:ss&lt;br /&gt;
-2 -cbs 512 -nts 0.00 -snr 21.00 -skew 36.00&lt;br /&gt;
-spf 22224-22235-22336-12347-12358 -fft 10101&amp;lt;/pre&amp;gt;Where the version, date &amp;amp; time and user settings are copied. Additionally, if a lossyWAV FACT chunk is found in a file, the processing will be halted (exit code = 16) to prevent re-processing of an already processed file.&lt;br /&gt;
&lt;br /&gt;
The -check parameter can be used to determine whether a file has previously been processed without trying to process it, exit code = 16 if already processed; exit code = 0 if not.&lt;br /&gt;
&lt;br /&gt;
==Presets==&lt;br /&gt;
*-1: Highest quality preset, disc space-saving alternative to lossless archiving for large audio collections.&lt;br /&gt;
*-2: Default preset; a compromise between -1 and -3.&lt;br /&gt;
*-3: High quality preset for usage on a compatible [[Wikipedia:Digital audio player|DAP]], approx. 370kbps for &amp;quot;normal&amp;quot; music. [http://www.hydrogenaudio.org/forums/index.php?s=&amp;amp;showtopic=56129&amp;amp;view=findpost&amp;amp;p=531316] &lt;br /&gt;
&lt;br /&gt;
All tuning has been performed on quality preset -3 with -2 and -1 being more conservative. Quality preset -3 is generally accepted to be (and from testing so far is) transparent. If you find a track which -3 fails to achieve transparency after processing, please post a sample (no more than 30 seconds) in the development thread.&lt;br /&gt;
&lt;br /&gt;
Apart from the quality presets the -nts (noise threshold shift) parameter is the most important parameter to control quality. Without noise threshold shifting (-nts 0) the number of bits to be removed is computed in a theoretically optimal way. -nts 0 is defaulted when using quality preset -2.&lt;br /&gt;
&lt;br /&gt;
In order to be more cautious a negative -nts value can be chosen up to -48. -nts -3 is defaulted when using quality preset -1. For archiving purposes and/or very cautious users even more conservative values may be of interest.&lt;br /&gt;
&lt;br /&gt;
Because of internal precautions in addition to 2Bdecided&#039;s principles experience so far tells us that a small positive -nts value doesn&#039;t keep the encodings from being transparent. That&#039;s why -nts 3 is defaulted when using quality preset -3. A more aggressive value may be welcome for a user who wants to keep average bitrate down a bit more. The higher the -nts value however the more probable is the arrival of a situation where lossyWAV is not transparent any more. A -nts value of more than 10 is not recommended though even with a value of ~10 transparency is achieved most usually.&lt;br /&gt;
&lt;br /&gt;
==Supported input formats==&lt;br /&gt;
*[[WAV]]: 16-bit, 24-bit; sample rate &amp;amp;ge; 32kHz [[Pulse Code Modulation|PCM]]. Very high sample rates (&amp;amp;gt;48kHz) have not been extensively tested. Tunings have been focussed on 16-bit, 44.1kHz samples (i.e. [[Wikipedia:Red Book (audio CD standard)|CD]] PCM).&lt;br /&gt;
&lt;br /&gt;
==Codec Compatibility==&lt;br /&gt;
===Known supported codecs===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|+ &#039;&#039;&#039;Recommended settings&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
!Codec&lt;br /&gt;
!lossyWAV parameters&lt;br /&gt;
!Encoder parameters&lt;br /&gt;
!Combination name&lt;br /&gt;
|-&lt;br /&gt;
![[Free Lossless Audio Codec|FLAC]]&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| -&#039;&#039;&#039;3&#039;&#039;&#039; -&#039;&#039;&#039;m&#039;&#039;&#039; -&#039;&#039;&#039;e&#039;&#039;&#039; -&#039;&#039;&#039;r&#039;&#039;&#039; 2 -&#039;&#039;&#039;b&#039;&#039;&#039; 512 --&#039;&#039;&#039;keep-foreign-metadata&#039;&#039;&#039;[http://www.hydrogenaudio.org/forums/index.php?s=&amp;amp;showtopic=56129&amp;amp;view=findpost&amp;amp;p=533689]&lt;br /&gt;
|lossy&#039;&#039;&#039;FLAC&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
![[Wikipedia:Lossless Predictive Audio Compression|LPAC]]&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| -&#039;&#039;&#039;b&#039;&#039;&#039;512&lt;br /&gt;
|lossy&#039;&#039;&#039;LPAC&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
![[Wikipedia:Audio Lossless Coding|MPEG-4 ALS]]&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| -&#039;&#039;&#039;l&#039;&#039;&#039; -&#039;&#039;&#039;n&#039;&#039;&#039;512&lt;br /&gt;
|lossy&#039;&#039;&#039;ALS&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
![[TAK]]&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| -&#039;&#039;&#039;fsl&#039;&#039;&#039;512&lt;br /&gt;
|lossy&#039;&#039;&#039;TAK&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
![[WavPack]]&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| --&#039;&#039;&#039;blocksize&#039;&#039;&#039;=512&lt;br /&gt;
|lossy&#039;&#039;&#039;WV&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
![[Wikipedia:Windows Media Audio#Windows Media Audio Lossless|WMA Lossless]]&lt;br /&gt;
| -&#039;&#039;&#039;wmalsl&#039;&#039;&#039; (same as -&#039;&#039;&#039;cbs&#039;&#039;&#039; 2048)&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
|lossy&#039;&#039;&#039;WMALSL&#039;&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
There is also [http://www.hometheaterhifi.com/volume_8_4/dvd-benchmark-part-6-dvd-audio-11-2001.html#Meridian%20Lossless%20Packing%20(MLP)%20in%20a%20Nutshell evidence] &amp;amp;mdash; so-called &amp;quot;Bit Shifting&amp;quot; &amp;amp;mdash; to suggest that lossyWAV may work with [[Wikipedia:Meridian Lossless Packing|MLP]], but this remains untested due to prohibitive prices of encoders.&lt;br /&gt;
&lt;br /&gt;
A comparison of portable media players is [[Wikipedia:Comparison of portable media players#Audio Formats|here]], which shows FLAC and WMA Lossless compatibility among listed players.&lt;br /&gt;
Any player supported by [http://www.rockbox.org Rockbox] can use FLAC or wavPack files after installing Rockbox.&lt;br /&gt;
&lt;br /&gt;
===Known unsupported codecs===&lt;br /&gt;
*[[ALAC]]&lt;br /&gt;
*[[Lossless Audio|LA]]&lt;br /&gt;
*[[Monkey&#039;s Audio]]&lt;br /&gt;
*[[OptimFROG]]&lt;br /&gt;
*[[TTA]]&lt;br /&gt;
&lt;br /&gt;
==lossyWAV application settings==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
lossyWAV beta v0.6.0 : WAV file bit depth reduction method by 2Bdecided.&lt;br /&gt;
Delphi implementation by Nick.C from a Matlab script, www.hydrogenaudio.org&lt;br /&gt;
&lt;br /&gt;
Usage   : lossyWAV &amp;lt;input wav file&amp;gt; &amp;lt;options&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example : lossyWAV musicfile.wav&lt;br /&gt;
&lt;br /&gt;
Quality Options:&lt;br /&gt;
&lt;br /&gt;
-1            extreme settings [4xFFT] (-cbs 512 -nts -3.0 -skew 36 -snr 21&lt;br /&gt;
              -spf 22224-22225-11235-11246-12358 -fft 11011)&lt;br /&gt;
-2            default settings [3xFFT] (-cbs 512 -nts  0.0 -skew 36 -snr 21&lt;br /&gt;
              -spf 22224-22235-22346-12347-12358 -fft 10101)&lt;br /&gt;
-3            compact settings [2xFFT] (-cbs 512 -nts +3.0 -skew 36 -snr 21&lt;br /&gt;
              -spf 22224-22235-22347-22358-2246C -fft 10001)&lt;br /&gt;
&lt;br /&gt;
Standard Options:&lt;br /&gt;
&lt;br /&gt;
-o &amp;lt;folder&amp;gt;   destination folder for the output file&lt;br /&gt;
-nts &amp;lt;n&amp;gt;      set noise_threshold_shift to n dB (-48.0dB&amp;lt;=n&amp;lt;=+48.0dB)&lt;br /&gt;
              (-ve values reduce bits to remove, +ve values increase)&lt;br /&gt;
-force        forcibly over-write output file if it exists; default=off&lt;br /&gt;
-check        check if WAV file has already been processed. default=off;&lt;br /&gt;
              errorlevel=16 if already processed, 0 if not.&lt;br /&gt;
&lt;br /&gt;
Codec Specific Options:&lt;br /&gt;
&lt;br /&gt;
-wmalsl       optimise internal settings for WMA Lossless codec; default=off&lt;br /&gt;
&lt;br /&gt;
Advanced / System Options:&lt;br /&gt;
&lt;br /&gt;
-shaping      enable fixed shaping using bit_removal difference of previous&lt;br /&gt;
              samples [value = brd(-1)/4]; default=off&lt;br /&gt;
-snr &amp;lt;n&amp;gt;      set minimum average signal to added noise ratio to n dB;&lt;br /&gt;
              (-215.0dB&amp;lt;=n&amp;lt;=48.0dB) Increasing value reduces bits to remove.&lt;br /&gt;
-skew &amp;lt;n&amp;gt;     skew fft analysis results by n dB (0.0db&amp;lt;=n&amp;lt;=48.0db) in the&lt;br /&gt;
              frequency range 20Hz to 3.45kHz&lt;br /&gt;
-spf &amp;lt;5x5hex&amp;gt; manually input the 5 spreading functions as 5 x 5 characters;&lt;br /&gt;
              These correspond to FFTs of 64, 128, 256, 512 &amp;amp; 1024 samples;&lt;br /&gt;
              e.g. 22235-22236-22347-22358-2246C (Characters must be one of&lt;br /&gt;
              1 to 9 and A to F (zero excluded).&lt;br /&gt;
-fft &amp;lt;5xbin&amp;gt;  select fft lengths to use in analysis, using binary switching,&lt;br /&gt;
              from 64, 128, 256, 512 &amp;amp; 1024 samples, e.g. 01001 = 128,1024&lt;br /&gt;
-cbs &amp;lt;n&amp;gt;      set codec block size to n samples (512&amp;lt;=n&amp;lt;=4608, n mod 32=0)&lt;br /&gt;
&lt;br /&gt;
-quiet        significantly reduce screen output&lt;br /&gt;
-nowarn       suppress lossyWAV warnings&lt;br /&gt;
-detail       enable detailled output mode&lt;br /&gt;
&lt;br /&gt;
-below        set process priority to below normal.&lt;br /&gt;
-low          set process priority to low.&lt;br /&gt;
&lt;br /&gt;
Special thanks:&lt;br /&gt;
&lt;br /&gt;
David Robinson for the method itself and motivation to implement it in Delphi.&lt;br /&gt;
Dr. Jean Debord for the use of TPMAT036 uFFT &amp;amp; uTypes units for FFT analysis.&lt;br /&gt;
Halb27 @ www.hydrogenaudio.org for donation and maintenance of the wavIO unit.&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Indicative Bitrate Reduction==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|+ &#039;&#039;&#039;Conversion using lossyWAV beta v0.5.8, [[Wikipedia:FLAC|FLAC]] -8&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
!lossyWAV Test Set&lt;br /&gt;
!FLAC -8&lt;br /&gt;
!lossyWAV -1&lt;br /&gt;
!lossyWAV -2&lt;br /&gt;
!lossyWAV -3&lt;br /&gt;
|-&lt;br /&gt;
!10 Album Test Average                                &lt;br /&gt;
| 850kbps &lt;br /&gt;
| 480kbps &lt;br /&gt;
| 426kbps &lt;br /&gt;
| 376kbps&lt;br /&gt;
|-&lt;br /&gt;
!53 sample &amp;quot;problem&amp;quot; set                &lt;br /&gt;
| 784kbps &lt;br /&gt;
| 543kbps &lt;br /&gt;
| 491kbps &lt;br /&gt;
| 434kbps&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|+ &#039;&#039;&#039;Large Foobar2000 Conversion: (lossyWAV -3; [[Wikipedia:FLAC|FLAC]] -3 -m -e -r 2 -b 512)&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
!Album&lt;br /&gt;
!FLAC -8&lt;br /&gt;
!lossyWAV -1&lt;br /&gt;
!lossyWAV -2&lt;br /&gt;
!lossyWAV -3&lt;br /&gt;
|-&lt;br /&gt;
!3283 Tracks; 258 Discs; 87.2GB&amp;gt;36.8GB  &lt;br /&gt;
| 880kbps &lt;br /&gt;
| N/A &lt;br /&gt;
| N/A&lt;br /&gt;
| 371kbps &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Using lossyWAV==&lt;br /&gt;
===Example Foobar2000 Converter Settings===&lt;br /&gt;
[[Image:Foobar2000_Converter_Settings.PNG]]&lt;br /&gt;
&lt;br /&gt;
===Example flossy.bat file called from above converter settings===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@echo off&lt;br /&gt;
c:\data_nic\bin\lossyWAV %1 %3 %4 %5 %6 %7 %8 %9 -below -nowarn -quiet&lt;br /&gt;
c:\data_nic\bin\flac.exe -8 -f -b 512 &amp;quot;%~N1.lossy.wav&amp;quot; -o&amp;quot;%~N2.flac&amp;quot; &lt;br /&gt;
del &amp;quot;%~N1.lossy.wav&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Frequently asked questions==&lt;br /&gt;
*&#039;&#039;&#039;Question:&#039;&#039;&#039; Is it [[Variable Bitrate|VBR]]?&lt;br /&gt;
*&#039;&#039;&#039;Short answer:&#039;&#039;&#039; Yes.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Question:&#039;&#039;&#039; Is it [[transparency|transparent]]?&lt;br /&gt;
*&#039;&#039;&#039;Short answer:&#039;&#039;&#039; Almost certainly.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Question:&#039;&#039;&#039; Is it [[lossless]]?&lt;br /&gt;
*&#039;&#039;&#039;Short answer:&#039;&#039;&#039; No.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Question:&#039;&#039;&#039; Why should I use this?&lt;br /&gt;
*&#039;&#039;&#039;Answer:&#039;&#039;&#039;&lt;br /&gt;
:*high quality&lt;br /&gt;
:*extremely low chance of audible [[artifact|artefacts]]&lt;br /&gt;
:*reasonable [[bitrate]]s&lt;br /&gt;
:*usable with unmodified, established lossless formats.&lt;br /&gt;
&lt;br /&gt;
==Current Test Settings==&lt;br /&gt;
No current test settings&lt;br /&gt;
&lt;br /&gt;
==External links==&lt;br /&gt;
*[http://www.hydrogenaudio.org/forums/index.php?showtopic=56129 Current development thread] You will find the latest version and last stable version in post #1 of this thread.&lt;br /&gt;
*[http://www.hydrogenaudio.org/forums/index.php?showtopic=55522&amp;amp;st=0 Original lossyFLAC thread] Where David Robinson (Replaygain developer) introduces the method and a Matlab implementation.&lt;/div&gt;</summary>
		<author><name>Halb27</name></author>
	</entry>
	<entry>
		<id>https://wiki.hydrogenaudio.org/index.php?title=LossyWAV&amp;diff=18106</id>
		<title>LossyWAV</title>
		<link rel="alternate" type="text/html" href="https://wiki.hydrogenaudio.org/index.php?title=LossyWAV&amp;diff=18106"/>
		<updated>2008-01-03T20:55:22Z</updated>

		<summary type="html">&lt;p&gt;Halb27: /* Presets */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Software Infobox&lt;br /&gt;
| name = lossyWAV&lt;br /&gt;
| screenshot = &lt;br /&gt;
| caption = &lt;br /&gt;
| maintainer = [http://www.hydrogenaudio.org/forums/index.php?showuser=42400 Nick.C]&lt;br /&gt;
| stable_release = beta v0.6.1&lt;br /&gt;
| preview_release = &lt;br /&gt;
| operating_system = [[Wikipedia:MS-DOS|MS-DOS]]&lt;br /&gt;
| use = [[Wikipedia:Digital signal processing|Digital signal processing]]&lt;br /&gt;
| license = [[Wikipedia:LGPL|LGPL license]]&lt;br /&gt;
| website = [http://www.hydrogenaudio.org/forums/index.php?showtopic=56129 Hydrogenaudio]&lt;br /&gt;
}}&lt;br /&gt;
lossyWAV is a lossy pre-processor for [[PCM]] audio contained in the [[WAV]] file format. It reduces [[Wikipedia:Audio bit depth|bit depth]] of the input signal, which, when used in conjunction with certain lossless codecs, reduces the bitrate of the encoded file significantly compared to unpreprocessed compression. &lt;br /&gt;
lossyWAV&#039;s primary goal is to maintain [[transparency]] with a high degree of confidence when processing any audio data.&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
lossyFLAC is an idea started by [http://www.hydrogenaudio.org/forums/index.php?showuser=409 2Bdecided] at hydrogenaudio, utilising the wasted bits feature of the FLAC lossless codec with the aim of transparently reducing audio bit depth (making some lower significant bits (LSB&#039;s) zero), consequently taking advantage of FLAC&#039;s detection of consistently zeroed lower significant bits within each single frame and significantly increasing coding efficiency.[http://www.hydrogenaudio.org/forums/index.php?s=&amp;amp;showtopic=55522&amp;amp;view=findpost&amp;amp;p=498179] In this way the user can enjoy audio encoded using the same codec (which may be all important from a hardware compatibility perspective) at a reduced bitrate compared to the lossless version.&lt;br /&gt;
&lt;br /&gt;
[http://www.hydrogenaudio.org/forums/index.php?showuser=42400 Nick.C] ported the original [[Wikipedia:MATLAB|MATLAB]] implementation to [[Wikipedia:Borland Delphi|Delphi]] (Many thanks [[Wikipedia:CodeGear|CodeGear]] for Turbo Explorer!!) with a liberal sprinkling of [[Wikipedia:IA-32|IA-32]] and [[Wikipedia:x87|x87]] Assembly Language for speed.&lt;br /&gt;
&lt;br /&gt;
Subsequently, lossyFLAC proved itself to work with other lossless codecs, so the application name was changed to lossyWAV. &lt;br /&gt;
&lt;br /&gt;
Since then, Nick.C has heavily developed and built upon lossyWAV, with valuable tuning performed by [http://www.hydrogenaudio.org/forums/index.php?showuser=25015 halb27] at hydrogenaudio.&lt;br /&gt;
&lt;br /&gt;
==File Identification==&lt;br /&gt;
lossyWAV-processed WAV files are named with a double filename extension, .lossy.wav, to make them instantly identifiable. e.g. &amp;quot;.lossy.flac&amp;quot; would indicate an audio file which was processed using lossyWAV, and subsequently encoded using FLAC.[http://www.hydrogenaudio.org/forums/index.php?s=&amp;amp;showtopic=55522&amp;amp;view=findpost&amp;amp;p=498559]&lt;br /&gt;
&lt;br /&gt;
From beta v0.6.1, the -correction parameter is used when processing to create a correction file which is named with the .lwcdf.wav double filename extension. When &amp;quot;added&amp;quot; to the corresponding .lossy.wav, using a not yet implemented parameter of lossyWAV, the original file will be reconstituted.&lt;br /&gt;
&lt;br /&gt;
Combinations of lossyWAV with each specific encoder are referred to as lossy&#039;&#039;&#039;X&#039;&#039;&#039;, where &#039;&#039;&#039;X&#039;&#039;&#039; is an abbreviation of the lossless codec name. Combination names are listed in the &amp;quot;[[LossyWAV#Known supported codecs|known supported codecs]]&amp;quot; section below.&lt;br /&gt;
&lt;br /&gt;
From v0.5.9, lossyWAV inserts a variable length FACT chunk into the WAV file immediately after the FMT chunk. This takes the form:&amp;lt;pre&amp;gt;fact/&amp;lt;size&amp;gt;/lossyWAV beta vx.y.z : dd/mm/yyyy hh:mm:ss&lt;br /&gt;
-2 -cbs 512 -nts 0.00 -snr 21.00 -skew 36.00&lt;br /&gt;
-spf 22224-22235-22336-12347-12358 -fft 10101&amp;lt;/pre&amp;gt;Where the version, date &amp;amp; time and user settings are copied. Additionally, if a lossyWAV FACT chunk is found in a file, the processing will be halted (exit code = 16) to prevent re-processing of an already processed file.&lt;br /&gt;
&lt;br /&gt;
The -check parameter can be used to determine whether a file has previously been processed without trying to process it, exit code = 16 if already processed; exit code = 0 if not.&lt;br /&gt;
&lt;br /&gt;
==Presets==&lt;br /&gt;
*-1: Highest quality preset, disc space-saving alternative to lossless archiving for large audio collections.&lt;br /&gt;
*-2: Default preset; a compromise between -1 and -3.&lt;br /&gt;
*-3: High quality preset for usage on a compatible [[Wikipedia:Digital audio player|DAP]], approx. 370kbps for &amp;quot;normal&amp;quot; music. [http://www.hydrogenaudio.org/forums/index.php?s=&amp;amp;showtopic=56129&amp;amp;view=findpost&amp;amp;p=531316] &lt;br /&gt;
&lt;br /&gt;
All tuning has been performed on quality preset -3 with -2 and -1 being more conservative. Quality preset -3 is generally accepted to be (and from testing so far is) transparent. If you find a track which -3 fails to achieve transparency after processing, please post a sample (no more than 30 seconds) in the development thread.&lt;br /&gt;
&lt;br /&gt;
Apart from the quality presets the -nts (noise threshold shift) parameter is the most important parameter to control quality. Without noise threshold shifting (-nts 0) the number of bits to be removed is computed in a theoretically optimal way. -nts 0 is defaulted when using quality preset -2.&lt;br /&gt;
&lt;br /&gt;
In order to be more cautious a negative -nts value can be chosen up to -48. -nts -3 is defaulted when using quality preset -1. For archiving purposes and/or very cautious users even more conservative values may be of interest.&lt;br /&gt;
&lt;br /&gt;
Because of internal precautions in addition to 2Bdecided&#039;s principles experience so far tells us that a small positive -nts value doesn&#039;t keep the encodings from being transparent. That&#039;s why -nts 3 is defaulted when using quality preset -3. A more aggressive value may be welcome for a user who wants to keep average bitrate down a bit more. The higher the -nts value however the more probable is the arrival of a situation where lossyWAV isn&#039;t transparent any more. An -nts value of more than 10 is not recommended though even with such a value transparency is achieved most usually.&lt;br /&gt;
&lt;br /&gt;
==Supported input formats==&lt;br /&gt;
*[[WAV]]: 16-bit, 24-bit; sample rate &amp;amp;ge; 32kHz [[Pulse Code Modulation|PCM]]. Very high sample rates (&amp;amp;gt;48kHz) have not been extensively tested. Tunings have been focussed on 16-bit, 44.1kHz samples (i.e. [[Wikipedia:Red Book (audio CD standard)|CD]] PCM).&lt;br /&gt;
&lt;br /&gt;
==Codec Compatibility==&lt;br /&gt;
===Known supported codecs===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|+ &#039;&#039;&#039;Recommended settings&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
!Codec&lt;br /&gt;
!lossyWAV parameters&lt;br /&gt;
!Encoder parameters&lt;br /&gt;
!Combination name&lt;br /&gt;
|-&lt;br /&gt;
![[Free Lossless Audio Codec|FLAC]]&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| -&#039;&#039;&#039;3&#039;&#039;&#039; -&#039;&#039;&#039;m&#039;&#039;&#039; -&#039;&#039;&#039;e&#039;&#039;&#039; -&#039;&#039;&#039;r&#039;&#039;&#039; 2 -&#039;&#039;&#039;b&#039;&#039;&#039; 512 --&#039;&#039;&#039;keep-foreign-metadata&#039;&#039;&#039;[http://www.hydrogenaudio.org/forums/index.php?s=&amp;amp;showtopic=56129&amp;amp;view=findpost&amp;amp;p=533689]&lt;br /&gt;
|lossy&#039;&#039;&#039;FLAC&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
![[Wikipedia:Lossless Predictive Audio Compression|LPAC]]&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| -&#039;&#039;&#039;b&#039;&#039;&#039;512&lt;br /&gt;
|lossy&#039;&#039;&#039;LPAC&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
![[Wikipedia:Audio Lossless Coding|MPEG-4 ALS]]&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| -&#039;&#039;&#039;l&#039;&#039;&#039; -&#039;&#039;&#039;n&#039;&#039;&#039;512&lt;br /&gt;
|lossy&#039;&#039;&#039;ALS&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
![[TAK]]&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| -&#039;&#039;&#039;fsl&#039;&#039;&#039;512&lt;br /&gt;
|lossy&#039;&#039;&#039;TAK&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
![[WavPack]]&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| --&#039;&#039;&#039;blocksize&#039;&#039;&#039;=512&lt;br /&gt;
|lossy&#039;&#039;&#039;WV&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
![[Wikipedia:Windows Media Audio#Windows Media Audio Lossless|WMA Lossless]]&lt;br /&gt;
| -&#039;&#039;&#039;wmalsl&#039;&#039;&#039; (same as -&#039;&#039;&#039;cbs&#039;&#039;&#039; 2048)&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
|lossy&#039;&#039;&#039;WMALSL&#039;&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
There is also [http://www.hometheaterhifi.com/volume_8_4/dvd-benchmark-part-6-dvd-audio-11-2001.html#Meridian%20Lossless%20Packing%20(MLP)%20in%20a%20Nutshell evidence] &amp;amp;mdash; so-called &amp;quot;Bit Shifting&amp;quot; &amp;amp;mdash; to suggest that lossyWAV may work with [[Wikipedia:Meridian Lossless Packing|MLP]], but this remains untested due to prohibitive prices of encoders.&lt;br /&gt;
&lt;br /&gt;
A comparison of portable media players is [[Wikipedia:Comparison of portable media players#Audio Formats|here]], which shows FLAC and WMA Lossless compatibility among listed players.&lt;br /&gt;
Any player supported by [http://www.rockbox.org Rockbox] can use FLAC or wavPack files after installing Rockbox.&lt;br /&gt;
&lt;br /&gt;
===Known unsupported codecs===&lt;br /&gt;
*[[ALAC]]&lt;br /&gt;
*[[Lossless Audio|LA]]&lt;br /&gt;
*[[Monkey&#039;s Audio]]&lt;br /&gt;
*[[OptimFROG]]&lt;br /&gt;
*[[TTA]]&lt;br /&gt;
&lt;br /&gt;
==lossyWAV application settings==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
lossyWAV beta v0.6.0 : WAV file bit depth reduction method by 2Bdecided.&lt;br /&gt;
Delphi implementation by Nick.C from a Matlab script, www.hydrogenaudio.org&lt;br /&gt;
&lt;br /&gt;
Usage   : lossyWAV &amp;lt;input wav file&amp;gt; &amp;lt;options&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example : lossyWAV musicfile.wav&lt;br /&gt;
&lt;br /&gt;
Quality Options:&lt;br /&gt;
&lt;br /&gt;
-1            extreme settings [4xFFT] (-cbs 512 -nts -3.0 -skew 36 -snr 21&lt;br /&gt;
              -spf 22224-22225-11235-11246-12358 -fft 11011)&lt;br /&gt;
-2            default settings [3xFFT] (-cbs 512 -nts  0.0 -skew 36 -snr 21&lt;br /&gt;
              -spf 22224-22235-22346-12347-12358 -fft 10101)&lt;br /&gt;
-3            compact settings [2xFFT] (-cbs 512 -nts +3.0 -skew 36 -snr 21&lt;br /&gt;
              -spf 22224-22235-22347-22358-2246C -fft 10001)&lt;br /&gt;
&lt;br /&gt;
Standard Options:&lt;br /&gt;
&lt;br /&gt;
-o &amp;lt;folder&amp;gt;   destination folder for the output file&lt;br /&gt;
-nts &amp;lt;n&amp;gt;      set noise_threshold_shift to n dB (-48.0dB&amp;lt;=n&amp;lt;=+48.0dB)&lt;br /&gt;
              (-ve values reduce bits to remove, +ve values increase)&lt;br /&gt;
-force        forcibly over-write output file if it exists; default=off&lt;br /&gt;
-check        check if WAV file has already been processed. default=off;&lt;br /&gt;
              errorlevel=16 if already processed, 0 if not.&lt;br /&gt;
&lt;br /&gt;
Codec Specific Options:&lt;br /&gt;
&lt;br /&gt;
-wmalsl       optimise internal settings for WMA Lossless codec; default=off&lt;br /&gt;
&lt;br /&gt;
Advanced / System Options:&lt;br /&gt;
&lt;br /&gt;
-shaping      enable fixed shaping using bit_removal difference of previous&lt;br /&gt;
              samples [value = brd(-1)/4]; default=off&lt;br /&gt;
-snr &amp;lt;n&amp;gt;      set minimum average signal to added noise ratio to n dB;&lt;br /&gt;
              (-215.0dB&amp;lt;=n&amp;lt;=48.0dB) Increasing value reduces bits to remove.&lt;br /&gt;
-skew &amp;lt;n&amp;gt;     skew fft analysis results by n dB (0.0db&amp;lt;=n&amp;lt;=48.0db) in the&lt;br /&gt;
              frequency range 20Hz to 3.45kHz&lt;br /&gt;
-spf &amp;lt;5x5hex&amp;gt; manually input the 5 spreading functions as 5 x 5 characters;&lt;br /&gt;
              These correspond to FFTs of 64, 128, 256, 512 &amp;amp; 1024 samples;&lt;br /&gt;
              e.g. 22235-22236-22347-22358-2246C (Characters must be one of&lt;br /&gt;
              1 to 9 and A to F (zero excluded).&lt;br /&gt;
-fft &amp;lt;5xbin&amp;gt;  select fft lengths to use in analysis, using binary switching,&lt;br /&gt;
              from 64, 128, 256, 512 &amp;amp; 1024 samples, e.g. 01001 = 128,1024&lt;br /&gt;
-cbs &amp;lt;n&amp;gt;      set codec block size to n samples (512&amp;lt;=n&amp;lt;=4608, n mod 32=0)&lt;br /&gt;
&lt;br /&gt;
-quiet        significantly reduce screen output&lt;br /&gt;
-nowarn       suppress lossyWAV warnings&lt;br /&gt;
-detail       enable detailled output mode&lt;br /&gt;
&lt;br /&gt;
-below        set process priority to below normal.&lt;br /&gt;
-low          set process priority to low.&lt;br /&gt;
&lt;br /&gt;
Special thanks:&lt;br /&gt;
&lt;br /&gt;
David Robinson for the method itself and motivation to implement it in Delphi.&lt;br /&gt;
Dr. Jean Debord for the use of TPMAT036 uFFT &amp;amp; uTypes units for FFT analysis.&lt;br /&gt;
Halb27 @ www.hydrogenaudio.org for donation and maintenance of the wavIO unit.&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Indicative Bitrate Reduction==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|+ &#039;&#039;&#039;Conversion using lossyWAV beta v0.5.8, [[Wikipedia:FLAC|FLAC]] -8&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
!lossyWAV Test Set&lt;br /&gt;
!FLAC -8&lt;br /&gt;
!lossyWAV -1&lt;br /&gt;
!lossyWAV -2&lt;br /&gt;
!lossyWAV -3&lt;br /&gt;
|-&lt;br /&gt;
!10 Album Test Average                                &lt;br /&gt;
| 850kbps &lt;br /&gt;
| 480kbps &lt;br /&gt;
| 426kbps &lt;br /&gt;
| 376kbps&lt;br /&gt;
|-&lt;br /&gt;
!53 sample &amp;quot;problem&amp;quot; set                &lt;br /&gt;
| 784kbps &lt;br /&gt;
| 543kbps &lt;br /&gt;
| 491kbps &lt;br /&gt;
| 434kbps&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|+ &#039;&#039;&#039;Large Foobar2000 Conversion: (lossyWAV -3; [[Wikipedia:FLAC|FLAC]] -3 -m -e -r 2 -b 512)&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
!Album&lt;br /&gt;
!FLAC -8&lt;br /&gt;
!lossyWAV -1&lt;br /&gt;
!lossyWAV -2&lt;br /&gt;
!lossyWAV -3&lt;br /&gt;
|-&lt;br /&gt;
!3283 Tracks; 258 Discs; 87.2GB&amp;gt;36.8GB  &lt;br /&gt;
| 880kbps &lt;br /&gt;
| N/A &lt;br /&gt;
| N/A&lt;br /&gt;
| 371kbps &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Example Foobar2000 Converter Settings==&lt;br /&gt;
[[Image:Foobar2000_Converter_Settings.PNG]]&lt;br /&gt;
&lt;br /&gt;
Example flossy.bat file called from above converter settings.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@echo off&lt;br /&gt;
c:\data_nic\bin\lossyWAV %1 %3 %4 %5 %6 %7 %8 %9 -below -nowarn -quiet&lt;br /&gt;
c:\data_nic\bin\flac.exe -8 -f -b 512 &amp;quot;%~N1.lossy.wav&amp;quot; -o&amp;quot;%~N2.flac&amp;quot; &lt;br /&gt;
del &amp;quot;%~N1.lossy.wav&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Frequently asked questions==&lt;br /&gt;
*&#039;&#039;&#039;Question:&#039;&#039;&#039; Is it [[Variable Bitrate|VBR]]?&lt;br /&gt;
*&#039;&#039;&#039;Short answer:&#039;&#039;&#039; Yes.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Question:&#039;&#039;&#039; Is it [[transparency|transparent]]?&lt;br /&gt;
*&#039;&#039;&#039;Short answer:&#039;&#039;&#039; Almost certainly.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Question:&#039;&#039;&#039; Is it [[lossless]]?&lt;br /&gt;
*&#039;&#039;&#039;Short answer:&#039;&#039;&#039; No.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Question:&#039;&#039;&#039; Why should I use this?&lt;br /&gt;
*&#039;&#039;&#039;Answer:&#039;&#039;&#039;&lt;br /&gt;
:*high quality&lt;br /&gt;
:*extremely low chance of audible [[artifact|artefacts]]&lt;br /&gt;
:*reasonable [[bitrate]]s&lt;br /&gt;
:*usable with unmodified, established lossless formats.&lt;br /&gt;
&lt;br /&gt;
==Current Test Settings==&lt;br /&gt;
No current test settings&lt;br /&gt;
&lt;br /&gt;
==External links==&lt;br /&gt;
*[http://www.hydrogenaudio.org/forums/index.php?showtopic=56129 Current development thread] You will find the latest version and last stable version in post #1 of this thread.&lt;br /&gt;
*[http://www.hydrogenaudio.org/forums/index.php?showtopic=55522&amp;amp;st=0 Original lossyFLAC thread] Where David Robinson (Replaygain developer) introduces the method and a Matlab implementation.&lt;/div&gt;</summary>
		<author><name>Halb27</name></author>
	</entry>
	<entry>
		<id>https://wiki.hydrogenaudio.org/index.php?title=LossyWAV&amp;diff=18105</id>
		<title>LossyWAV</title>
		<link rel="alternate" type="text/html" href="https://wiki.hydrogenaudio.org/index.php?title=LossyWAV&amp;diff=18105"/>
		<updated>2008-01-03T20:54:55Z</updated>

		<summary type="html">&lt;p&gt;Halb27: /* Presets */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Software Infobox&lt;br /&gt;
| name = lossyWAV&lt;br /&gt;
| screenshot = &lt;br /&gt;
| caption = &lt;br /&gt;
| maintainer = [http://www.hydrogenaudio.org/forums/index.php?showuser=42400 Nick.C]&lt;br /&gt;
| stable_release = beta v0.6.1&lt;br /&gt;
| preview_release = &lt;br /&gt;
| operating_system = [[Wikipedia:MS-DOS|MS-DOS]]&lt;br /&gt;
| use = [[Wikipedia:Digital signal processing|Digital signal processing]]&lt;br /&gt;
| license = [[Wikipedia:LGPL|LGPL license]]&lt;br /&gt;
| website = [http://www.hydrogenaudio.org/forums/index.php?showtopic=56129 Hydrogenaudio]&lt;br /&gt;
}}&lt;br /&gt;
lossyWAV is a lossy pre-processor for [[PCM]] audio contained in the [[WAV]] file format. It reduces [[Wikipedia:Audio bit depth|bit depth]] of the input signal, which, when used in conjunction with certain lossless codecs, reduces the bitrate of the encoded file significantly compared to unpreprocessed compression. &lt;br /&gt;
lossyWAV&#039;s primary goal is to maintain [[transparency]] with a high degree of confidence when processing any audio data.&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
lossyFLAC is an idea started by [http://www.hydrogenaudio.org/forums/index.php?showuser=409 2Bdecided] at hydrogenaudio, utilising the wasted bits feature of the FLAC lossless codec with the aim of transparently reducing audio bit depth (making some lower significant bits (LSB&#039;s) zero), consequently taking advantage of FLAC&#039;s detection of consistently zeroed lower significant bits within each single frame and significantly increasing coding efficiency.[http://www.hydrogenaudio.org/forums/index.php?s=&amp;amp;showtopic=55522&amp;amp;view=findpost&amp;amp;p=498179] In this way the user can enjoy audio encoded using the same codec (which may be all important from a hardware compatibility perspective) at a reduced bitrate compared to the lossless version.&lt;br /&gt;
&lt;br /&gt;
[http://www.hydrogenaudio.org/forums/index.php?showuser=42400 Nick.C] ported the original [[Wikipedia:MATLAB|MATLAB]] implementation to [[Wikipedia:Borland Delphi|Delphi]] (Many thanks [[Wikipedia:CodeGear|CodeGear]] for Turbo Explorer!!) with a liberal sprinkling of [[Wikipedia:IA-32|IA-32]] and [[Wikipedia:x87|x87]] Assembly Language for speed.&lt;br /&gt;
&lt;br /&gt;
Subsequently, lossyFLAC proved itself to work with other lossless codecs, so the application name was changed to lossyWAV. &lt;br /&gt;
&lt;br /&gt;
Since then, Nick.C has heavily developed and built upon lossyWAV, with valuable tuning performed by [http://www.hydrogenaudio.org/forums/index.php?showuser=25015 halb27] at hydrogenaudio.&lt;br /&gt;
&lt;br /&gt;
==File Identification==&lt;br /&gt;
lossyWAV-processed WAV files are named with a double filename extension, .lossy.wav, to make them instantly identifiable. e.g. &amp;quot;.lossy.flac&amp;quot; would indicate an audio file which was processed using lossyWAV, and subsequently encoded using FLAC.[http://www.hydrogenaudio.org/forums/index.php?s=&amp;amp;showtopic=55522&amp;amp;view=findpost&amp;amp;p=498559]&lt;br /&gt;
&lt;br /&gt;
From beta v0.6.1, the -correction parameter is used when processing to create a correction file which is named with the .lwcdf.wav double filename extension. When &amp;quot;added&amp;quot; to the corresponding .lossy.wav, using a not yet implemented parameter of lossyWAV, the original file will be reconstituted.&lt;br /&gt;
&lt;br /&gt;
Combinations of lossyWAV with each specific encoder are referred to as lossy&#039;&#039;&#039;X&#039;&#039;&#039;, where &#039;&#039;&#039;X&#039;&#039;&#039; is an abbreviation of the lossless codec name. Combination names are listed in the &amp;quot;[[LossyWAV#Known supported codecs|known supported codecs]]&amp;quot; section below.&lt;br /&gt;
&lt;br /&gt;
From v0.5.9, lossyWAV inserts a variable length FACT chunk into the WAV file immediately after the FMT chunk. This takes the form:&amp;lt;pre&amp;gt;fact/&amp;lt;size&amp;gt;/lossyWAV beta vx.y.z : dd/mm/yyyy hh:mm:ss&lt;br /&gt;
-2 -cbs 512 -nts 0.00 -snr 21.00 -skew 36.00&lt;br /&gt;
-spf 22224-22235-22336-12347-12358 -fft 10101&amp;lt;/pre&amp;gt;Where the version, date &amp;amp; time and user settings are copied. Additionally, if a lossyWAV FACT chunk is found in a file, the processing will be halted (exit code = 16) to prevent re-processing of an already processed file.&lt;br /&gt;
&lt;br /&gt;
The -check parameter can be used to determine whether a file has previously been processed without trying to process it, exit code = 16 if already processed; exit code = 0 if not.&lt;br /&gt;
&lt;br /&gt;
==Presets==&lt;br /&gt;
*-1: Highest quality preset, disc space-saving alternative to lossless archiving for large audio collections.&lt;br /&gt;
*-2: Default preset; a compromise between -1 and -3.&lt;br /&gt;
*-3: High quality preset for usage on a compatible [[Wikipedia:Digital audio player|DAP]], approx. 370kbps for &amp;quot;normal&amp;quot; music. [http://www.hydrogenaudio.org/forums/index.php?s=&amp;amp;showtopic=56129&amp;amp;view=findpost&amp;amp;p=531316] &lt;br /&gt;
&lt;br /&gt;
All tuning has been performed on quality preset -3 with -2 and -1 being more conservative. Quality preset -3 is generally accepted to be (and from testing so far is) transparent. If you find a track which -3 fails to achieve transparency after processing, please post a sample (no more than 30 seconds) in the development thread.&lt;br /&gt;
&lt;br /&gt;
Apart from the quality presets the -nts (noise threshold shift) parameter is the most important parameter to control quality. Without noise threshold shifting (-nts 0) the number of bits to be removed is computed in a theoretically optimal way. -nts 0 is defaulted when using quality preset -2.&lt;br /&gt;
&lt;br /&gt;
In order to be more cautious a negative -nts value can be chosen up to -48. -nts -3 is defaulted when using quality preset -1. For archiving purposes and/or very cautious users even more conservative values may be of interest.&lt;br /&gt;
&lt;br /&gt;
Because of internal precautions in addition to 2Bdecided&#039;s principles experience so far tells us that a small positive -nts value doesn&#039;t keep the encodings from being transparent. That&#039;s why -nts 3 is defaulted when using quality preset -3. A more aggressive value may be welcome for a user who wants to keep average bitrate down a bit more. The higher the -nts value however the more probabable is the arrival of a situation where lossyWAV isn&#039;t transparent any more. An -nts value of more than 10 is not recommended though even with such a value transparency is achieved most usually.&lt;br /&gt;
&lt;br /&gt;
==Supported input formats==&lt;br /&gt;
*[[WAV]]: 16-bit, 24-bit; sample rate &amp;amp;ge; 32kHz [[Pulse Code Modulation|PCM]]. Very high sample rates (&amp;amp;gt;48kHz) have not been extensively tested. Tunings have been focussed on 16-bit, 44.1kHz samples (i.e. [[Wikipedia:Red Book (audio CD standard)|CD]] PCM).&lt;br /&gt;
&lt;br /&gt;
==Codec Compatibility==&lt;br /&gt;
===Known supported codecs===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|+ &#039;&#039;&#039;Recommended settings&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
!Codec&lt;br /&gt;
!lossyWAV parameters&lt;br /&gt;
!Encoder parameters&lt;br /&gt;
!Combination name&lt;br /&gt;
|-&lt;br /&gt;
![[Free Lossless Audio Codec|FLAC]]&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| -&#039;&#039;&#039;3&#039;&#039;&#039; -&#039;&#039;&#039;m&#039;&#039;&#039; -&#039;&#039;&#039;e&#039;&#039;&#039; -&#039;&#039;&#039;r&#039;&#039;&#039; 2 -&#039;&#039;&#039;b&#039;&#039;&#039; 512 --&#039;&#039;&#039;keep-foreign-metadata&#039;&#039;&#039;[http://www.hydrogenaudio.org/forums/index.php?s=&amp;amp;showtopic=56129&amp;amp;view=findpost&amp;amp;p=533689]&lt;br /&gt;
|lossy&#039;&#039;&#039;FLAC&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
![[Wikipedia:Lossless Predictive Audio Compression|LPAC]]&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| -&#039;&#039;&#039;b&#039;&#039;&#039;512&lt;br /&gt;
|lossy&#039;&#039;&#039;LPAC&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
![[Wikipedia:Audio Lossless Coding|MPEG-4 ALS]]&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| -&#039;&#039;&#039;l&#039;&#039;&#039; -&#039;&#039;&#039;n&#039;&#039;&#039;512&lt;br /&gt;
|lossy&#039;&#039;&#039;ALS&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
![[TAK]]&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| -&#039;&#039;&#039;fsl&#039;&#039;&#039;512&lt;br /&gt;
|lossy&#039;&#039;&#039;TAK&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
![[WavPack]]&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| --&#039;&#039;&#039;blocksize&#039;&#039;&#039;=512&lt;br /&gt;
|lossy&#039;&#039;&#039;WV&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
![[Wikipedia:Windows Media Audio#Windows Media Audio Lossless|WMA Lossless]]&lt;br /&gt;
| -&#039;&#039;&#039;wmalsl&#039;&#039;&#039; (same as -&#039;&#039;&#039;cbs&#039;&#039;&#039; 2048)&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
|lossy&#039;&#039;&#039;WMALSL&#039;&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
There is also [http://www.hometheaterhifi.com/volume_8_4/dvd-benchmark-part-6-dvd-audio-11-2001.html#Meridian%20Lossless%20Packing%20(MLP)%20in%20a%20Nutshell evidence] &amp;amp;mdash; so-called &amp;quot;Bit Shifting&amp;quot; &amp;amp;mdash; to suggest that lossyWAV may work with [[Wikipedia:Meridian Lossless Packing|MLP]], but this remains untested due to prohibitive prices of encoders.&lt;br /&gt;
&lt;br /&gt;
A comparison of portable media players is [[Wikipedia:Comparison of portable media players#Audio Formats|here]], which shows FLAC and WMA Lossless compatibility among listed players.&lt;br /&gt;
Any player supported by [http://www.rockbox.org Rockbox] can use FLAC or wavPack files after installing Rockbox.&lt;br /&gt;
&lt;br /&gt;
===Known unsupported codecs===&lt;br /&gt;
*[[ALAC]]&lt;br /&gt;
*[[Lossless Audio|LA]]&lt;br /&gt;
*[[Monkey&#039;s Audio]]&lt;br /&gt;
*[[OptimFROG]]&lt;br /&gt;
*[[TTA]]&lt;br /&gt;
&lt;br /&gt;
==lossyWAV application settings==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
lossyWAV beta v0.6.0 : WAV file bit depth reduction method by 2Bdecided.&lt;br /&gt;
Delphi implementation by Nick.C from a Matlab script, www.hydrogenaudio.org&lt;br /&gt;
&lt;br /&gt;
Usage   : lossyWAV &amp;lt;input wav file&amp;gt; &amp;lt;options&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example : lossyWAV musicfile.wav&lt;br /&gt;
&lt;br /&gt;
Quality Options:&lt;br /&gt;
&lt;br /&gt;
-1            extreme settings [4xFFT] (-cbs 512 -nts -3.0 -skew 36 -snr 21&lt;br /&gt;
              -spf 22224-22225-11235-11246-12358 -fft 11011)&lt;br /&gt;
-2            default settings [3xFFT] (-cbs 512 -nts  0.0 -skew 36 -snr 21&lt;br /&gt;
              -spf 22224-22235-22346-12347-12358 -fft 10101)&lt;br /&gt;
-3            compact settings [2xFFT] (-cbs 512 -nts +3.0 -skew 36 -snr 21&lt;br /&gt;
              -spf 22224-22235-22347-22358-2246C -fft 10001)&lt;br /&gt;
&lt;br /&gt;
Standard Options:&lt;br /&gt;
&lt;br /&gt;
-o &amp;lt;folder&amp;gt;   destination folder for the output file&lt;br /&gt;
-nts &amp;lt;n&amp;gt;      set noise_threshold_shift to n dB (-48.0dB&amp;lt;=n&amp;lt;=+48.0dB)&lt;br /&gt;
              (-ve values reduce bits to remove, +ve values increase)&lt;br /&gt;
-force        forcibly over-write output file if it exists; default=off&lt;br /&gt;
-check        check if WAV file has already been processed. default=off;&lt;br /&gt;
              errorlevel=16 if already processed, 0 if not.&lt;br /&gt;
&lt;br /&gt;
Codec Specific Options:&lt;br /&gt;
&lt;br /&gt;
-wmalsl       optimise internal settings for WMA Lossless codec; default=off&lt;br /&gt;
&lt;br /&gt;
Advanced / System Options:&lt;br /&gt;
&lt;br /&gt;
-shaping      enable fixed shaping using bit_removal difference of previous&lt;br /&gt;
              samples [value = brd(-1)/4]; default=off&lt;br /&gt;
-snr &amp;lt;n&amp;gt;      set minimum average signal to added noise ratio to n dB;&lt;br /&gt;
              (-215.0dB&amp;lt;=n&amp;lt;=48.0dB) Increasing value reduces bits to remove.&lt;br /&gt;
-skew &amp;lt;n&amp;gt;     skew fft analysis results by n dB (0.0db&amp;lt;=n&amp;lt;=48.0db) in the&lt;br /&gt;
              frequency range 20Hz to 3.45kHz&lt;br /&gt;
-spf &amp;lt;5x5hex&amp;gt; manually input the 5 spreading functions as 5 x 5 characters;&lt;br /&gt;
              These correspond to FFTs of 64, 128, 256, 512 &amp;amp; 1024 samples;&lt;br /&gt;
              e.g. 22235-22236-22347-22358-2246C (Characters must be one of&lt;br /&gt;
              1 to 9 and A to F (zero excluded).&lt;br /&gt;
-fft &amp;lt;5xbin&amp;gt;  select fft lengths to use in analysis, using binary switching,&lt;br /&gt;
              from 64, 128, 256, 512 &amp;amp; 1024 samples, e.g. 01001 = 128,1024&lt;br /&gt;
-cbs &amp;lt;n&amp;gt;      set codec block size to n samples (512&amp;lt;=n&amp;lt;=4608, n mod 32=0)&lt;br /&gt;
&lt;br /&gt;
-quiet        significantly reduce screen output&lt;br /&gt;
-nowarn       suppress lossyWAV warnings&lt;br /&gt;
-detail       enable detailled output mode&lt;br /&gt;
&lt;br /&gt;
-below        set process priority to below normal.&lt;br /&gt;
-low          set process priority to low.&lt;br /&gt;
&lt;br /&gt;
Special thanks:&lt;br /&gt;
&lt;br /&gt;
David Robinson for the method itself and motivation to implement it in Delphi.&lt;br /&gt;
Dr. Jean Debord for the use of TPMAT036 uFFT &amp;amp; uTypes units for FFT analysis.&lt;br /&gt;
Halb27 @ www.hydrogenaudio.org for donation and maintenance of the wavIO unit.&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Indicative Bitrate Reduction==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|+ &#039;&#039;&#039;Conversion using lossyWAV beta v0.5.8, [[Wikipedia:FLAC|FLAC]] -8&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
!lossyWAV Test Set&lt;br /&gt;
!FLAC -8&lt;br /&gt;
!lossyWAV -1&lt;br /&gt;
!lossyWAV -2&lt;br /&gt;
!lossyWAV -3&lt;br /&gt;
|-&lt;br /&gt;
!10 Album Test Average                                &lt;br /&gt;
| 850kbps &lt;br /&gt;
| 480kbps &lt;br /&gt;
| 426kbps &lt;br /&gt;
| 376kbps&lt;br /&gt;
|-&lt;br /&gt;
!53 sample &amp;quot;problem&amp;quot; set                &lt;br /&gt;
| 784kbps &lt;br /&gt;
| 543kbps &lt;br /&gt;
| 491kbps &lt;br /&gt;
| 434kbps&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|+ &#039;&#039;&#039;Large Foobar2000 Conversion: (lossyWAV -3; [[Wikipedia:FLAC|FLAC]] -3 -m -e -r 2 -b 512)&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
!Album&lt;br /&gt;
!FLAC -8&lt;br /&gt;
!lossyWAV -1&lt;br /&gt;
!lossyWAV -2&lt;br /&gt;
!lossyWAV -3&lt;br /&gt;
|-&lt;br /&gt;
!3283 Tracks; 258 Discs; 87.2GB&amp;gt;36.8GB  &lt;br /&gt;
| 880kbps &lt;br /&gt;
| N/A &lt;br /&gt;
| N/A&lt;br /&gt;
| 371kbps &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Example Foobar2000 Converter Settings==&lt;br /&gt;
[[Image:Foobar2000_Converter_Settings.PNG]]&lt;br /&gt;
&lt;br /&gt;
Example flossy.bat file called from above converter settings.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@echo off&lt;br /&gt;
c:\data_nic\bin\lossyWAV %1 %3 %4 %5 %6 %7 %8 %9 -below -nowarn -quiet&lt;br /&gt;
c:\data_nic\bin\flac.exe -8 -f -b 512 &amp;quot;%~N1.lossy.wav&amp;quot; -o&amp;quot;%~N2.flac&amp;quot; &lt;br /&gt;
del &amp;quot;%~N1.lossy.wav&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Frequently asked questions==&lt;br /&gt;
*&#039;&#039;&#039;Question:&#039;&#039;&#039; Is it [[Variable Bitrate|VBR]]?&lt;br /&gt;
*&#039;&#039;&#039;Short answer:&#039;&#039;&#039; Yes.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Question:&#039;&#039;&#039; Is it [[transparency|transparent]]?&lt;br /&gt;
*&#039;&#039;&#039;Short answer:&#039;&#039;&#039; Almost certainly.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Question:&#039;&#039;&#039; Is it [[lossless]]?&lt;br /&gt;
*&#039;&#039;&#039;Short answer:&#039;&#039;&#039; No.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Question:&#039;&#039;&#039; Why should I use this?&lt;br /&gt;
*&#039;&#039;&#039;Answer:&#039;&#039;&#039;&lt;br /&gt;
:*high quality&lt;br /&gt;
:*extremely low chance of audible [[artifact|artefacts]]&lt;br /&gt;
:*reasonable [[bitrate]]s&lt;br /&gt;
:*usable with unmodified, established lossless formats.&lt;br /&gt;
&lt;br /&gt;
==Current Test Settings==&lt;br /&gt;
No current test settings&lt;br /&gt;
&lt;br /&gt;
==External links==&lt;br /&gt;
*[http://www.hydrogenaudio.org/forums/index.php?showtopic=56129 Current development thread] You will find the latest version and last stable version in post #1 of this thread.&lt;br /&gt;
*[http://www.hydrogenaudio.org/forums/index.php?showtopic=55522&amp;amp;st=0 Original lossyFLAC thread] Where David Robinson (Replaygain developer) introduces the method and a Matlab implementation.&lt;/div&gt;</summary>
		<author><name>Halb27</name></author>
	</entry>
	<entry>
		<id>https://wiki.hydrogenaudio.org/index.php?title=LossyWAV&amp;diff=18104</id>
		<title>LossyWAV</title>
		<link rel="alternate" type="text/html" href="https://wiki.hydrogenaudio.org/index.php?title=LossyWAV&amp;diff=18104"/>
		<updated>2008-01-03T20:53:00Z</updated>

		<summary type="html">&lt;p&gt;Halb27: /* Presets */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Software Infobox&lt;br /&gt;
| name = lossyWAV&lt;br /&gt;
| screenshot = &lt;br /&gt;
| caption = &lt;br /&gt;
| maintainer = [http://www.hydrogenaudio.org/forums/index.php?showuser=42400 Nick.C]&lt;br /&gt;
| stable_release = beta v0.6.1&lt;br /&gt;
| preview_release = &lt;br /&gt;
| operating_system = [[Wikipedia:MS-DOS|MS-DOS]]&lt;br /&gt;
| use = [[Wikipedia:Digital signal processing|Digital signal processing]]&lt;br /&gt;
| license = [[Wikipedia:LGPL|LGPL license]]&lt;br /&gt;
| website = [http://www.hydrogenaudio.org/forums/index.php?showtopic=56129 Hydrogenaudio]&lt;br /&gt;
}}&lt;br /&gt;
lossyWAV is a lossy pre-processor for [[PCM]] audio contained in the [[WAV]] file format. It reduces [[Wikipedia:Audio bit depth|bit depth]] of the input signal, which, when used in conjunction with certain lossless codecs, reduces the bitrate of the encoded file significantly compared to unpreprocessed compression. &lt;br /&gt;
lossyWAV&#039;s primary goal is to maintain [[transparency]] with a high degree of confidence when processing any audio data.&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
lossyFLAC is an idea started by [http://www.hydrogenaudio.org/forums/index.php?showuser=409 2Bdecided] at hydrogenaudio, utilising the wasted bits feature of the FLAC lossless codec with the aim of transparently reducing audio bit depth (making some lower significant bits (LSB&#039;s) zero), consequently taking advantage of FLAC&#039;s detection of consistently zeroed lower significant bits within each single frame and significantly increasing coding efficiency.[http://www.hydrogenaudio.org/forums/index.php?s=&amp;amp;showtopic=55522&amp;amp;view=findpost&amp;amp;p=498179] In this way the user can enjoy audio encoded using the same codec (which may be all important from a hardware compatibility perspective) at a reduced bitrate compared to the lossless version.&lt;br /&gt;
&lt;br /&gt;
[http://www.hydrogenaudio.org/forums/index.php?showuser=42400 Nick.C] ported the original [[Wikipedia:MATLAB|MATLAB]] implementation to [[Wikipedia:Borland Delphi|Delphi]] (Many thanks [[Wikipedia:CodeGear|CodeGear]] for Turbo Explorer!!) with a liberal sprinkling of [[Wikipedia:IA-32|IA-32]] and [[Wikipedia:x87|x87]] Assembly Language for speed.&lt;br /&gt;
&lt;br /&gt;
Subsequently, lossyFLAC proved itself to work with other lossless codecs, so the application name was changed to lossyWAV. &lt;br /&gt;
&lt;br /&gt;
Since then, Nick.C has heavily developed and built upon lossyWAV, with valuable tuning performed by [http://www.hydrogenaudio.org/forums/index.php?showuser=25015 halb27] at hydrogenaudio.&lt;br /&gt;
&lt;br /&gt;
==File Identification==&lt;br /&gt;
lossyWAV-processed WAV files are named with a double filename extension, .lossy.wav, to make them instantly identifiable. e.g. &amp;quot;.lossy.flac&amp;quot; would indicate an audio file which was processed using lossyWAV, and subsequently encoded using FLAC.[http://www.hydrogenaudio.org/forums/index.php?s=&amp;amp;showtopic=55522&amp;amp;view=findpost&amp;amp;p=498559]&lt;br /&gt;
&lt;br /&gt;
From beta v0.6.1, the -correction parameter is used when processing to create a correction file which is named with the .lwcdf.wav double filename extension. When &amp;quot;added&amp;quot; to the corresponding .lossy.wav, using a not yet implemented parameter of lossyWAV, the original file will be reconstituted.&lt;br /&gt;
&lt;br /&gt;
Combinations of lossyWAV with each specific encoder are referred to as lossy&#039;&#039;&#039;X&#039;&#039;&#039;, where &#039;&#039;&#039;X&#039;&#039;&#039; is an abbreviation of the lossless codec name. Combination names are listed in the &amp;quot;[[LossyWAV#Known supported codecs|known supported codecs]]&amp;quot; section below.&lt;br /&gt;
&lt;br /&gt;
From v0.5.9, lossyWAV inserts a variable length FACT chunk into the WAV file immediately after the FMT chunk. This takes the form:&amp;lt;pre&amp;gt;fact/&amp;lt;size&amp;gt;/lossyWAV beta vx.y.z : dd/mm/yyyy hh:mm:ss&lt;br /&gt;
-2 -cbs 512 -nts 0.00 -snr 21.00 -skew 36.00&lt;br /&gt;
-spf 22224-22235-22336-12347-12358 -fft 10101&amp;lt;/pre&amp;gt;Where the version, date &amp;amp; time and user settings are copied. Additionally, if a lossyWAV FACT chunk is found in a file, the processing will be halted (exit code = 16) to prevent re-processing of an already processed file.&lt;br /&gt;
&lt;br /&gt;
The -check parameter can be used to determine whether a file has previously been processed without trying to process it, exit code = 16 if already processed; exit code = 0 if not.&lt;br /&gt;
&lt;br /&gt;
==Presets==&lt;br /&gt;
*-1: Highest quality preset, disc space-saving alternative to lossless archiving for large audio collections.&lt;br /&gt;
*-2: Default preset; a compromise between -1 and -3.&lt;br /&gt;
*-3: High quality preset for usage on a compatible [[Wikipedia:Digital audio player|DAP]], approx. 370kbps for &amp;quot;normal&amp;quot; music. [http://www.hydrogenaudio.org/forums/index.php?s=&amp;amp;showtopic=56129&amp;amp;view=findpost&amp;amp;p=531316] &lt;br /&gt;
&lt;br /&gt;
All tuning has been performed on quality preset -3 with -2 and -1 being more conservative. Quality preset -3 is generally accepted to be (and from testing so far is) transparent. If you find a track which -3 fails to achieve transparency after processing, please post a sample (no more than 30 seconds) in the development thread.&lt;br /&gt;
&lt;br /&gt;
Apart from the quality presets the -nts (noise threshold shift) parameter is the most important parameter to control quality. Without noise threshold shifting (-nts 0) the number of bits to be removed is computed in a theoretically optimal way. -nts 0 is defaulted when using quality preset -2.&lt;br /&gt;
&lt;br /&gt;
In order to be more cautious a negative -nts value can be chosen up to -48. -nts -3 is defaulted when using quality preset -1. For archiving purposes and/or very cautious users even more conservative values may be of interest.&lt;br /&gt;
&lt;br /&gt;
Because of internal precautions in addition to 2Bdecided&#039;s principles experience so far tells us that a small positive -nts value doesn&#039;t keep the encodings from being transparent. That&#039;s why -nts 3 is defaulted when using quality preset -3, but a more aggressive value may be welcome for a user who wants to keep average bitrate down a bit more. The higher the -nts value however the more probabable is the arrival of a situation where lossyWAV isn&#039;t transparent any more. An -nts value of more than 10 is not recommended though even with such a value transparency is achieved most usually.&lt;br /&gt;
&lt;br /&gt;
==Supported input formats==&lt;br /&gt;
*[[WAV]]: 16-bit, 24-bit; sample rate &amp;amp;ge; 32kHz [[Pulse Code Modulation|PCM]]. Very high sample rates (&amp;amp;gt;48kHz) have not been extensively tested. Tunings have been focussed on 16-bit, 44.1kHz samples (i.e. [[Wikipedia:Red Book (audio CD standard)|CD]] PCM).&lt;br /&gt;
&lt;br /&gt;
==Codec Compatibility==&lt;br /&gt;
===Known supported codecs===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|+ &#039;&#039;&#039;Recommended settings&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
!Codec&lt;br /&gt;
!lossyWAV parameters&lt;br /&gt;
!Encoder parameters&lt;br /&gt;
!Combination name&lt;br /&gt;
|-&lt;br /&gt;
![[Free Lossless Audio Codec|FLAC]]&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| -&#039;&#039;&#039;3&#039;&#039;&#039; -&#039;&#039;&#039;m&#039;&#039;&#039; -&#039;&#039;&#039;e&#039;&#039;&#039; -&#039;&#039;&#039;r&#039;&#039;&#039; 2 -&#039;&#039;&#039;b&#039;&#039;&#039; 512 --&#039;&#039;&#039;keep-foreign-metadata&#039;&#039;&#039;[http://www.hydrogenaudio.org/forums/index.php?s=&amp;amp;showtopic=56129&amp;amp;view=findpost&amp;amp;p=533689]&lt;br /&gt;
|lossy&#039;&#039;&#039;FLAC&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
![[Wikipedia:Lossless Predictive Audio Compression|LPAC]]&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| -&#039;&#039;&#039;b&#039;&#039;&#039;512&lt;br /&gt;
|lossy&#039;&#039;&#039;LPAC&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
![[Wikipedia:Audio Lossless Coding|MPEG-4 ALS]]&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| -&#039;&#039;&#039;l&#039;&#039;&#039; -&#039;&#039;&#039;n&#039;&#039;&#039;512&lt;br /&gt;
|lossy&#039;&#039;&#039;ALS&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
![[TAK]]&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| -&#039;&#039;&#039;fsl&#039;&#039;&#039;512&lt;br /&gt;
|lossy&#039;&#039;&#039;TAK&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
![[WavPack]]&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| --&#039;&#039;&#039;blocksize&#039;&#039;&#039;=512&lt;br /&gt;
|lossy&#039;&#039;&#039;WV&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
![[Wikipedia:Windows Media Audio#Windows Media Audio Lossless|WMA Lossless]]&lt;br /&gt;
| -&#039;&#039;&#039;wmalsl&#039;&#039;&#039; (same as -&#039;&#039;&#039;cbs&#039;&#039;&#039; 2048)&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
|lossy&#039;&#039;&#039;WMALSL&#039;&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
There is also [http://www.hometheaterhifi.com/volume_8_4/dvd-benchmark-part-6-dvd-audio-11-2001.html#Meridian%20Lossless%20Packing%20(MLP)%20in%20a%20Nutshell evidence] &amp;amp;mdash; so-called &amp;quot;Bit Shifting&amp;quot; &amp;amp;mdash; to suggest that lossyWAV may work with [[Wikipedia:Meridian Lossless Packing|MLP]], but this remains untested due to prohibitive prices of encoders.&lt;br /&gt;
&lt;br /&gt;
A comparison of portable media players is [[Wikipedia:Comparison of portable media players#Audio Formats|here]], which shows FLAC and WMA Lossless compatibility among listed players.&lt;br /&gt;
Any player supported by [http://www.rockbox.org Rockbox] can use FLAC or wavPack files after installing Rockbox.&lt;br /&gt;
&lt;br /&gt;
===Known unsupported codecs===&lt;br /&gt;
*[[ALAC]]&lt;br /&gt;
*[[Lossless Audio|LA]]&lt;br /&gt;
*[[Monkey&#039;s Audio]]&lt;br /&gt;
*[[OptimFROG]]&lt;br /&gt;
*[[TTA]]&lt;br /&gt;
&lt;br /&gt;
==lossyWAV application settings==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
lossyWAV beta v0.6.0 : WAV file bit depth reduction method by 2Bdecided.&lt;br /&gt;
Delphi implementation by Nick.C from a Matlab script, www.hydrogenaudio.org&lt;br /&gt;
&lt;br /&gt;
Usage   : lossyWAV &amp;lt;input wav file&amp;gt; &amp;lt;options&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example : lossyWAV musicfile.wav&lt;br /&gt;
&lt;br /&gt;
Quality Options:&lt;br /&gt;
&lt;br /&gt;
-1            extreme settings [4xFFT] (-cbs 512 -nts -3.0 -skew 36 -snr 21&lt;br /&gt;
              -spf 22224-22225-11235-11246-12358 -fft 11011)&lt;br /&gt;
-2            default settings [3xFFT] (-cbs 512 -nts  0.0 -skew 36 -snr 21&lt;br /&gt;
              -spf 22224-22235-22346-12347-12358 -fft 10101)&lt;br /&gt;
-3            compact settings [2xFFT] (-cbs 512 -nts +3.0 -skew 36 -snr 21&lt;br /&gt;
              -spf 22224-22235-22347-22358-2246C -fft 10001)&lt;br /&gt;
&lt;br /&gt;
Standard Options:&lt;br /&gt;
&lt;br /&gt;
-o &amp;lt;folder&amp;gt;   destination folder for the output file&lt;br /&gt;
-nts &amp;lt;n&amp;gt;      set noise_threshold_shift to n dB (-48.0dB&amp;lt;=n&amp;lt;=+48.0dB)&lt;br /&gt;
              (-ve values reduce bits to remove, +ve values increase)&lt;br /&gt;
-force        forcibly over-write output file if it exists; default=off&lt;br /&gt;
-check        check if WAV file has already been processed. default=off;&lt;br /&gt;
              errorlevel=16 if already processed, 0 if not.&lt;br /&gt;
&lt;br /&gt;
Codec Specific Options:&lt;br /&gt;
&lt;br /&gt;
-wmalsl       optimise internal settings for WMA Lossless codec; default=off&lt;br /&gt;
&lt;br /&gt;
Advanced / System Options:&lt;br /&gt;
&lt;br /&gt;
-shaping      enable fixed shaping using bit_removal difference of previous&lt;br /&gt;
              samples [value = brd(-1)/4]; default=off&lt;br /&gt;
-snr &amp;lt;n&amp;gt;      set minimum average signal to added noise ratio to n dB;&lt;br /&gt;
              (-215.0dB&amp;lt;=n&amp;lt;=48.0dB) Increasing value reduces bits to remove.&lt;br /&gt;
-skew &amp;lt;n&amp;gt;     skew fft analysis results by n dB (0.0db&amp;lt;=n&amp;lt;=48.0db) in the&lt;br /&gt;
              frequency range 20Hz to 3.45kHz&lt;br /&gt;
-spf &amp;lt;5x5hex&amp;gt; manually input the 5 spreading functions as 5 x 5 characters;&lt;br /&gt;
              These correspond to FFTs of 64, 128, 256, 512 &amp;amp; 1024 samples;&lt;br /&gt;
              e.g. 22235-22236-22347-22358-2246C (Characters must be one of&lt;br /&gt;
              1 to 9 and A to F (zero excluded).&lt;br /&gt;
-fft &amp;lt;5xbin&amp;gt;  select fft lengths to use in analysis, using binary switching,&lt;br /&gt;
              from 64, 128, 256, 512 &amp;amp; 1024 samples, e.g. 01001 = 128,1024&lt;br /&gt;
-cbs &amp;lt;n&amp;gt;      set codec block size to n samples (512&amp;lt;=n&amp;lt;=4608, n mod 32=0)&lt;br /&gt;
&lt;br /&gt;
-quiet        significantly reduce screen output&lt;br /&gt;
-nowarn       suppress lossyWAV warnings&lt;br /&gt;
-detail       enable detailled output mode&lt;br /&gt;
&lt;br /&gt;
-below        set process priority to below normal.&lt;br /&gt;
-low          set process priority to low.&lt;br /&gt;
&lt;br /&gt;
Special thanks:&lt;br /&gt;
&lt;br /&gt;
David Robinson for the method itself and motivation to implement it in Delphi.&lt;br /&gt;
Dr. Jean Debord for the use of TPMAT036 uFFT &amp;amp; uTypes units for FFT analysis.&lt;br /&gt;
Halb27 @ www.hydrogenaudio.org for donation and maintenance of the wavIO unit.&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Indicative Bitrate Reduction==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|+ &#039;&#039;&#039;Conversion using lossyWAV beta v0.5.8, [[Wikipedia:FLAC|FLAC]] -8&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
!lossyWAV Test Set&lt;br /&gt;
!FLAC -8&lt;br /&gt;
!lossyWAV -1&lt;br /&gt;
!lossyWAV -2&lt;br /&gt;
!lossyWAV -3&lt;br /&gt;
|-&lt;br /&gt;
!10 Album Test Average                                &lt;br /&gt;
| 850kbps &lt;br /&gt;
| 480kbps &lt;br /&gt;
| 426kbps &lt;br /&gt;
| 376kbps&lt;br /&gt;
|-&lt;br /&gt;
!53 sample &amp;quot;problem&amp;quot; set                &lt;br /&gt;
| 784kbps &lt;br /&gt;
| 543kbps &lt;br /&gt;
| 491kbps &lt;br /&gt;
| 434kbps&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|+ &#039;&#039;&#039;Large Foobar2000 Conversion: (lossyWAV -3; [[Wikipedia:FLAC|FLAC]] -3 -m -e -r 2 -b 512)&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
!Album&lt;br /&gt;
!FLAC -8&lt;br /&gt;
!lossyWAV -1&lt;br /&gt;
!lossyWAV -2&lt;br /&gt;
!lossyWAV -3&lt;br /&gt;
|-&lt;br /&gt;
!3283 Tracks; 258 Discs; 87.2GB&amp;gt;36.8GB  &lt;br /&gt;
| 880kbps &lt;br /&gt;
| N/A &lt;br /&gt;
| N/A&lt;br /&gt;
| 371kbps &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Example Foobar2000 Converter Settings==&lt;br /&gt;
[[Image:Foobar2000_Converter_Settings.PNG]]&lt;br /&gt;
&lt;br /&gt;
Example flossy.bat file called from above converter settings.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@echo off&lt;br /&gt;
c:\data_nic\bin\lossyWAV %1 %3 %4 %5 %6 %7 %8 %9 -below -nowarn -quiet&lt;br /&gt;
c:\data_nic\bin\flac.exe -8 -f -b 512 &amp;quot;%~N1.lossy.wav&amp;quot; -o&amp;quot;%~N2.flac&amp;quot; &lt;br /&gt;
del &amp;quot;%~N1.lossy.wav&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Frequently asked questions==&lt;br /&gt;
*&#039;&#039;&#039;Question:&#039;&#039;&#039; Is it [[Variable Bitrate|VBR]]?&lt;br /&gt;
*&#039;&#039;&#039;Short answer:&#039;&#039;&#039; Yes.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Question:&#039;&#039;&#039; Is it [[transparency|transparent]]?&lt;br /&gt;
*&#039;&#039;&#039;Short answer:&#039;&#039;&#039; Almost certainly.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Question:&#039;&#039;&#039; Is it [[lossless]]?&lt;br /&gt;
*&#039;&#039;&#039;Short answer:&#039;&#039;&#039; No.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Question:&#039;&#039;&#039; Why should I use this?&lt;br /&gt;
*&#039;&#039;&#039;Answer:&#039;&#039;&#039;&lt;br /&gt;
:*high quality&lt;br /&gt;
:*extremely low chance of audible [[artifact|artefacts]]&lt;br /&gt;
:*reasonable [[bitrate]]s&lt;br /&gt;
:*usable with unmodified, established lossless formats.&lt;br /&gt;
&lt;br /&gt;
==Current Test Settings==&lt;br /&gt;
No current test settings&lt;br /&gt;
&lt;br /&gt;
==External links==&lt;br /&gt;
*[http://www.hydrogenaudio.org/forums/index.php?showtopic=56129 Current development thread] You will find the latest version and last stable version in post #1 of this thread.&lt;br /&gt;
*[http://www.hydrogenaudio.org/forums/index.php?showtopic=55522&amp;amp;st=0 Original lossyFLAC thread] Where David Robinson (Replaygain developer) introduces the method and a Matlab implementation.&lt;/div&gt;</summary>
		<author><name>Halb27</name></author>
	</entry>
	<entry>
		<id>https://wiki.hydrogenaudio.org/index.php?title=LossyWAV&amp;diff=18103</id>
		<title>LossyWAV</title>
		<link rel="alternate" type="text/html" href="https://wiki.hydrogenaudio.org/index.php?title=LossyWAV&amp;diff=18103"/>
		<updated>2008-01-03T20:52:19Z</updated>

		<summary type="html">&lt;p&gt;Halb27: /* Presets */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Software Infobox&lt;br /&gt;
| name = lossyWAV&lt;br /&gt;
| screenshot = &lt;br /&gt;
| caption = &lt;br /&gt;
| maintainer = [http://www.hydrogenaudio.org/forums/index.php?showuser=42400 Nick.C]&lt;br /&gt;
| stable_release = beta v0.6.1&lt;br /&gt;
| preview_release = &lt;br /&gt;
| operating_system = [[Wikipedia:MS-DOS|MS-DOS]]&lt;br /&gt;
| use = [[Wikipedia:Digital signal processing|Digital signal processing]]&lt;br /&gt;
| license = [[Wikipedia:LGPL|LGPL license]]&lt;br /&gt;
| website = [http://www.hydrogenaudio.org/forums/index.php?showtopic=56129 Hydrogenaudio]&lt;br /&gt;
}}&lt;br /&gt;
lossyWAV is a lossy pre-processor for [[PCM]] audio contained in the [[WAV]] file format. It reduces [[Wikipedia:Audio bit depth|bit depth]] of the input signal, which, when used in conjunction with certain lossless codecs, reduces the bitrate of the encoded file significantly compared to unpreprocessed compression. &lt;br /&gt;
lossyWAV&#039;s primary goal is to maintain [[transparency]] with a high degree of confidence when processing any audio data.&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
lossyFLAC is an idea started by [http://www.hydrogenaudio.org/forums/index.php?showuser=409 2Bdecided] at hydrogenaudio, utilising the wasted bits feature of the FLAC lossless codec with the aim of transparently reducing audio bit depth (making some lower significant bits (LSB&#039;s) zero), consequently taking advantage of FLAC&#039;s detection of consistently zeroed lower significant bits within each single frame and significantly increasing coding efficiency.[http://www.hydrogenaudio.org/forums/index.php?s=&amp;amp;showtopic=55522&amp;amp;view=findpost&amp;amp;p=498179] In this way the user can enjoy audio encoded using the same codec (which may be all important from a hardware compatibility perspective) at a reduced bitrate compared to the lossless version.&lt;br /&gt;
&lt;br /&gt;
[http://www.hydrogenaudio.org/forums/index.php?showuser=42400 Nick.C] ported the original [[Wikipedia:MATLAB|MATLAB]] implementation to [[Wikipedia:Borland Delphi|Delphi]] (Many thanks [[Wikipedia:CodeGear|CodeGear]] for Turbo Explorer!!) with a liberal sprinkling of [[Wikipedia:IA-32|IA-32]] and [[Wikipedia:x87|x87]] Assembly Language for speed.&lt;br /&gt;
&lt;br /&gt;
Subsequently, lossyFLAC proved itself to work with other lossless codecs, so the application name was changed to lossyWAV. &lt;br /&gt;
&lt;br /&gt;
Since then, Nick.C has heavily developed and built upon lossyWAV, with valuable tuning performed by [http://www.hydrogenaudio.org/forums/index.php?showuser=25015 halb27] at hydrogenaudio.&lt;br /&gt;
&lt;br /&gt;
==File Identification==&lt;br /&gt;
lossyWAV-processed WAV files are named with a double filename extension, .lossy.wav, to make them instantly identifiable. e.g. &amp;quot;.lossy.flac&amp;quot; would indicate an audio file which was processed using lossyWAV, and subsequently encoded using FLAC.[http://www.hydrogenaudio.org/forums/index.php?s=&amp;amp;showtopic=55522&amp;amp;view=findpost&amp;amp;p=498559]&lt;br /&gt;
&lt;br /&gt;
From beta v0.6.1, the -correction parameter is used when processing to create a correction file which is named with the .lwcdf.wav double filename extension. When &amp;quot;added&amp;quot; to the corresponding .lossy.wav, using a not yet implemented parameter of lossyWAV, the original file will be reconstituted.&lt;br /&gt;
&lt;br /&gt;
Combinations of lossyWAV with each specific encoder are referred to as lossy&#039;&#039;&#039;X&#039;&#039;&#039;, where &#039;&#039;&#039;X&#039;&#039;&#039; is an abbreviation of the lossless codec name. Combination names are listed in the &amp;quot;[[LossyWAV#Known supported codecs|known supported codecs]]&amp;quot; section below.&lt;br /&gt;
&lt;br /&gt;
From v0.5.9, lossyWAV inserts a variable length FACT chunk into the WAV file immediately after the FMT chunk. This takes the form:&amp;lt;pre&amp;gt;fact/&amp;lt;size&amp;gt;/lossyWAV beta vx.y.z : dd/mm/yyyy hh:mm:ss&lt;br /&gt;
-2 -cbs 512 -nts 0.00 -snr 21.00 -skew 36.00&lt;br /&gt;
-spf 22224-22235-22336-12347-12358 -fft 10101&amp;lt;/pre&amp;gt;Where the version, date &amp;amp; time and user settings are copied. Additionally, if a lossyWAV FACT chunk is found in a file, the processing will be halted (exit code = 16) to prevent re-processing of an already processed file.&lt;br /&gt;
&lt;br /&gt;
The -check parameter can be used to determine whether a file has previously been processed without trying to process it, exit code = 16 if already processed; exit code = 0 if not.&lt;br /&gt;
&lt;br /&gt;
==Presets==&lt;br /&gt;
*-1: Highest quality preset, disc space-saving alternative to lossless archiving for large audio collections.&lt;br /&gt;
*-2: Default preset; a compromise between -1 and -3.&lt;br /&gt;
*-3: High quality preset for usage on a compatible [[Wikipedia:Digital audio player|DAP]], approx. 370kbps for &amp;quot;normal&amp;quot; music. [http://www.hydrogenaudio.org/forums/index.php?s=&amp;amp;showtopic=56129&amp;amp;view=findpost&amp;amp;p=531316] &lt;br /&gt;
&lt;br /&gt;
All tuning has been performed on quality preset -3 with -2 and -1 being more conservative. Quality preset -3 is generally accepted to be (and from testing so far is) transparent. If you find a track which -3 fails to achieve transparency after processing, please post a sample (no more than 30 seconds) in the development thread.&lt;br /&gt;
&lt;br /&gt;
Apart from the quality presets the -nts (noise threshold shift) parameter is the most important parameter to control quality. Without noise threshold shifting (-nts 0) the number of bits to be removed is computed in a theoretically optimal way. -nts 0 is defaulted when using quality preset -2.&lt;br /&gt;
&lt;br /&gt;
In order to be more cautious a negative -nts value can be chosen up to -48. -nts -3 is defaulted when using quality preset -1. For archiving purposes and/or very cautious users even more conservative values may be of interest.&lt;br /&gt;
&lt;br /&gt;
Because of internal precautions in addition to 2BDecided&#039;s principles experience so far tells us that a small positive -nts value doesn&#039;t keep the encodings from being transparent. That&#039;s why -nts 3 is defaulted when using quality preset -3, but a more aggressive value may be welcome for a user who wants to keep average bitrate down a bit more. The higher the -nts value however the more probabable is the arrival of a situation where lossyWAV isn&#039;t transparent any more. An -nts value of more than 10 is not recommended though even with such a value transparency is achieved most usually.&lt;br /&gt;
&lt;br /&gt;
==Supported input formats==&lt;br /&gt;
*[[WAV]]: 16-bit, 24-bit; sample rate &amp;amp;ge; 32kHz [[Pulse Code Modulation|PCM]]. Very high sample rates (&amp;amp;gt;48kHz) have not been extensively tested. Tunings have been focussed on 16-bit, 44.1kHz samples (i.e. [[Wikipedia:Red Book (audio CD standard)|CD]] PCM).&lt;br /&gt;
&lt;br /&gt;
==Codec Compatibility==&lt;br /&gt;
===Known supported codecs===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|+ &#039;&#039;&#039;Recommended settings&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
!Codec&lt;br /&gt;
!lossyWAV parameters&lt;br /&gt;
!Encoder parameters&lt;br /&gt;
!Combination name&lt;br /&gt;
|-&lt;br /&gt;
![[Free Lossless Audio Codec|FLAC]]&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| -&#039;&#039;&#039;3&#039;&#039;&#039; -&#039;&#039;&#039;m&#039;&#039;&#039; -&#039;&#039;&#039;e&#039;&#039;&#039; -&#039;&#039;&#039;r&#039;&#039;&#039; 2 -&#039;&#039;&#039;b&#039;&#039;&#039; 512 --&#039;&#039;&#039;keep-foreign-metadata&#039;&#039;&#039;[http://www.hydrogenaudio.org/forums/index.php?s=&amp;amp;showtopic=56129&amp;amp;view=findpost&amp;amp;p=533689]&lt;br /&gt;
|lossy&#039;&#039;&#039;FLAC&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
![[Wikipedia:Lossless Predictive Audio Compression|LPAC]]&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| -&#039;&#039;&#039;b&#039;&#039;&#039;512&lt;br /&gt;
|lossy&#039;&#039;&#039;LPAC&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
![[Wikipedia:Audio Lossless Coding|MPEG-4 ALS]]&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| -&#039;&#039;&#039;l&#039;&#039;&#039; -&#039;&#039;&#039;n&#039;&#039;&#039;512&lt;br /&gt;
|lossy&#039;&#039;&#039;ALS&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
![[TAK]]&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| -&#039;&#039;&#039;fsl&#039;&#039;&#039;512&lt;br /&gt;
|lossy&#039;&#039;&#039;TAK&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
![[WavPack]]&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| --&#039;&#039;&#039;blocksize&#039;&#039;&#039;=512&lt;br /&gt;
|lossy&#039;&#039;&#039;WV&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
![[Wikipedia:Windows Media Audio#Windows Media Audio Lossless|WMA Lossless]]&lt;br /&gt;
| -&#039;&#039;&#039;wmalsl&#039;&#039;&#039; (same as -&#039;&#039;&#039;cbs&#039;&#039;&#039; 2048)&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
|lossy&#039;&#039;&#039;WMALSL&#039;&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
There is also [http://www.hometheaterhifi.com/volume_8_4/dvd-benchmark-part-6-dvd-audio-11-2001.html#Meridian%20Lossless%20Packing%20(MLP)%20in%20a%20Nutshell evidence] &amp;amp;mdash; so-called &amp;quot;Bit Shifting&amp;quot; &amp;amp;mdash; to suggest that lossyWAV may work with [[Wikipedia:Meridian Lossless Packing|MLP]], but this remains untested due to prohibitive prices of encoders.&lt;br /&gt;
&lt;br /&gt;
A comparison of portable media players is [[Wikipedia:Comparison of portable media players#Audio Formats|here]], which shows FLAC and WMA Lossless compatibility among listed players.&lt;br /&gt;
Any player supported by [http://www.rockbox.org Rockbox] can use FLAC or wavPack files after installing Rockbox.&lt;br /&gt;
&lt;br /&gt;
===Known unsupported codecs===&lt;br /&gt;
*[[ALAC]]&lt;br /&gt;
*[[Lossless Audio|LA]]&lt;br /&gt;
*[[Monkey&#039;s Audio]]&lt;br /&gt;
*[[OptimFROG]]&lt;br /&gt;
*[[TTA]]&lt;br /&gt;
&lt;br /&gt;
==lossyWAV application settings==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
lossyWAV beta v0.6.0 : WAV file bit depth reduction method by 2Bdecided.&lt;br /&gt;
Delphi implementation by Nick.C from a Matlab script, www.hydrogenaudio.org&lt;br /&gt;
&lt;br /&gt;
Usage   : lossyWAV &amp;lt;input wav file&amp;gt; &amp;lt;options&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example : lossyWAV musicfile.wav&lt;br /&gt;
&lt;br /&gt;
Quality Options:&lt;br /&gt;
&lt;br /&gt;
-1            extreme settings [4xFFT] (-cbs 512 -nts -3.0 -skew 36 -snr 21&lt;br /&gt;
              -spf 22224-22225-11235-11246-12358 -fft 11011)&lt;br /&gt;
-2            default settings [3xFFT] (-cbs 512 -nts  0.0 -skew 36 -snr 21&lt;br /&gt;
              -spf 22224-22235-22346-12347-12358 -fft 10101)&lt;br /&gt;
-3            compact settings [2xFFT] (-cbs 512 -nts +3.0 -skew 36 -snr 21&lt;br /&gt;
              -spf 22224-22235-22347-22358-2246C -fft 10001)&lt;br /&gt;
&lt;br /&gt;
Standard Options:&lt;br /&gt;
&lt;br /&gt;
-o &amp;lt;folder&amp;gt;   destination folder for the output file&lt;br /&gt;
-nts &amp;lt;n&amp;gt;      set noise_threshold_shift to n dB (-48.0dB&amp;lt;=n&amp;lt;=+48.0dB)&lt;br /&gt;
              (-ve values reduce bits to remove, +ve values increase)&lt;br /&gt;
-force        forcibly over-write output file if it exists; default=off&lt;br /&gt;
-check        check if WAV file has already been processed. default=off;&lt;br /&gt;
              errorlevel=16 if already processed, 0 if not.&lt;br /&gt;
&lt;br /&gt;
Codec Specific Options:&lt;br /&gt;
&lt;br /&gt;
-wmalsl       optimise internal settings for WMA Lossless codec; default=off&lt;br /&gt;
&lt;br /&gt;
Advanced / System Options:&lt;br /&gt;
&lt;br /&gt;
-shaping      enable fixed shaping using bit_removal difference of previous&lt;br /&gt;
              samples [value = brd(-1)/4]; default=off&lt;br /&gt;
-snr &amp;lt;n&amp;gt;      set minimum average signal to added noise ratio to n dB;&lt;br /&gt;
              (-215.0dB&amp;lt;=n&amp;lt;=48.0dB) Increasing value reduces bits to remove.&lt;br /&gt;
-skew &amp;lt;n&amp;gt;     skew fft analysis results by n dB (0.0db&amp;lt;=n&amp;lt;=48.0db) in the&lt;br /&gt;
              frequency range 20Hz to 3.45kHz&lt;br /&gt;
-spf &amp;lt;5x5hex&amp;gt; manually input the 5 spreading functions as 5 x 5 characters;&lt;br /&gt;
              These correspond to FFTs of 64, 128, 256, 512 &amp;amp; 1024 samples;&lt;br /&gt;
              e.g. 22235-22236-22347-22358-2246C (Characters must be one of&lt;br /&gt;
              1 to 9 and A to F (zero excluded).&lt;br /&gt;
-fft &amp;lt;5xbin&amp;gt;  select fft lengths to use in analysis, using binary switching,&lt;br /&gt;
              from 64, 128, 256, 512 &amp;amp; 1024 samples, e.g. 01001 = 128,1024&lt;br /&gt;
-cbs &amp;lt;n&amp;gt;      set codec block size to n samples (512&amp;lt;=n&amp;lt;=4608, n mod 32=0)&lt;br /&gt;
&lt;br /&gt;
-quiet        significantly reduce screen output&lt;br /&gt;
-nowarn       suppress lossyWAV warnings&lt;br /&gt;
-detail       enable detailled output mode&lt;br /&gt;
&lt;br /&gt;
-below        set process priority to below normal.&lt;br /&gt;
-low          set process priority to low.&lt;br /&gt;
&lt;br /&gt;
Special thanks:&lt;br /&gt;
&lt;br /&gt;
David Robinson for the method itself and motivation to implement it in Delphi.&lt;br /&gt;
Dr. Jean Debord for the use of TPMAT036 uFFT &amp;amp; uTypes units for FFT analysis.&lt;br /&gt;
Halb27 @ www.hydrogenaudio.org for donation and maintenance of the wavIO unit.&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Indicative Bitrate Reduction==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|+ &#039;&#039;&#039;Conversion using lossyWAV beta v0.5.8, [[Wikipedia:FLAC|FLAC]] -8&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
!lossyWAV Test Set&lt;br /&gt;
!FLAC -8&lt;br /&gt;
!lossyWAV -1&lt;br /&gt;
!lossyWAV -2&lt;br /&gt;
!lossyWAV -3&lt;br /&gt;
|-&lt;br /&gt;
!10 Album Test Average                                &lt;br /&gt;
| 850kbps &lt;br /&gt;
| 480kbps &lt;br /&gt;
| 426kbps &lt;br /&gt;
| 376kbps&lt;br /&gt;
|-&lt;br /&gt;
!53 sample &amp;quot;problem&amp;quot; set                &lt;br /&gt;
| 784kbps &lt;br /&gt;
| 543kbps &lt;br /&gt;
| 491kbps &lt;br /&gt;
| 434kbps&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|+ &#039;&#039;&#039;Large Foobar2000 Conversion: (lossyWAV -3; [[Wikipedia:FLAC|FLAC]] -3 -m -e -r 2 -b 512)&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
!Album&lt;br /&gt;
!FLAC -8&lt;br /&gt;
!lossyWAV -1&lt;br /&gt;
!lossyWAV -2&lt;br /&gt;
!lossyWAV -3&lt;br /&gt;
|-&lt;br /&gt;
!3283 Tracks; 258 Discs; 87.2GB&amp;gt;36.8GB  &lt;br /&gt;
| 880kbps &lt;br /&gt;
| N/A &lt;br /&gt;
| N/A&lt;br /&gt;
| 371kbps &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Example Foobar2000 Converter Settings==&lt;br /&gt;
[[Image:Foobar2000_Converter_Settings.PNG]]&lt;br /&gt;
&lt;br /&gt;
Example flossy.bat file called from above converter settings.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@echo off&lt;br /&gt;
c:\data_nic\bin\lossyWAV %1 %3 %4 %5 %6 %7 %8 %9 -below -nowarn -quiet&lt;br /&gt;
c:\data_nic\bin\flac.exe -8 -f -b 512 &amp;quot;%~N1.lossy.wav&amp;quot; -o&amp;quot;%~N2.flac&amp;quot; &lt;br /&gt;
del &amp;quot;%~N1.lossy.wav&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Frequently asked questions==&lt;br /&gt;
*&#039;&#039;&#039;Question:&#039;&#039;&#039; Is it [[Variable Bitrate|VBR]]?&lt;br /&gt;
*&#039;&#039;&#039;Short answer:&#039;&#039;&#039; Yes.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Question:&#039;&#039;&#039; Is it [[transparency|transparent]]?&lt;br /&gt;
*&#039;&#039;&#039;Short answer:&#039;&#039;&#039; Almost certainly.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Question:&#039;&#039;&#039; Is it [[lossless]]?&lt;br /&gt;
*&#039;&#039;&#039;Short answer:&#039;&#039;&#039; No.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Question:&#039;&#039;&#039; Why should I use this?&lt;br /&gt;
*&#039;&#039;&#039;Answer:&#039;&#039;&#039;&lt;br /&gt;
:*high quality&lt;br /&gt;
:*extremely low chance of audible [[artifact|artefacts]]&lt;br /&gt;
:*reasonable [[bitrate]]s&lt;br /&gt;
:*usable with unmodified, established lossless formats.&lt;br /&gt;
&lt;br /&gt;
==Current Test Settings==&lt;br /&gt;
No current test settings&lt;br /&gt;
&lt;br /&gt;
==External links==&lt;br /&gt;
*[http://www.hydrogenaudio.org/forums/index.php?showtopic=56129 Current development thread] You will find the latest version and last stable version in post #1 of this thread.&lt;br /&gt;
*[http://www.hydrogenaudio.org/forums/index.php?showtopic=55522&amp;amp;st=0 Original lossyFLAC thread] Where David Robinson (Replaygain developer) introduces the method and a Matlab implementation.&lt;/div&gt;</summary>
		<author><name>Halb27</name></author>
	</entry>
	<entry>
		<id>https://wiki.hydrogenaudio.org/index.php?title=LossyWAV&amp;diff=18102</id>
		<title>LossyWAV</title>
		<link rel="alternate" type="text/html" href="https://wiki.hydrogenaudio.org/index.php?title=LossyWAV&amp;diff=18102"/>
		<updated>2008-01-03T20:51:39Z</updated>

		<summary type="html">&lt;p&gt;Halb27: /* Presets */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Software Infobox&lt;br /&gt;
| name = lossyWAV&lt;br /&gt;
| screenshot = &lt;br /&gt;
| caption = &lt;br /&gt;
| maintainer = [http://www.hydrogenaudio.org/forums/index.php?showuser=42400 Nick.C]&lt;br /&gt;
| stable_release = beta v0.6.1&lt;br /&gt;
| preview_release = &lt;br /&gt;
| operating_system = [[Wikipedia:MS-DOS|MS-DOS]]&lt;br /&gt;
| use = [[Wikipedia:Digital signal processing|Digital signal processing]]&lt;br /&gt;
| license = [[Wikipedia:LGPL|LGPL license]]&lt;br /&gt;
| website = [http://www.hydrogenaudio.org/forums/index.php?showtopic=56129 Hydrogenaudio]&lt;br /&gt;
}}&lt;br /&gt;
lossyWAV is a lossy pre-processor for [[PCM]] audio contained in the [[WAV]] file format. It reduces [[Wikipedia:Audio bit depth|bit depth]] of the input signal, which, when used in conjunction with certain lossless codecs, reduces the bitrate of the encoded file significantly compared to unpreprocessed compression. &lt;br /&gt;
lossyWAV&#039;s primary goal is to maintain [[transparency]] with a high degree of confidence when processing any audio data.&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
lossyFLAC is an idea started by [http://www.hydrogenaudio.org/forums/index.php?showuser=409 2Bdecided] at hydrogenaudio, utilising the wasted bits feature of the FLAC lossless codec with the aim of transparently reducing audio bit depth (making some lower significant bits (LSB&#039;s) zero), consequently taking advantage of FLAC&#039;s detection of consistently zeroed lower significant bits within each single frame and significantly increasing coding efficiency.[http://www.hydrogenaudio.org/forums/index.php?s=&amp;amp;showtopic=55522&amp;amp;view=findpost&amp;amp;p=498179] In this way the user can enjoy audio encoded using the same codec (which may be all important from a hardware compatibility perspective) at a reduced bitrate compared to the lossless version.&lt;br /&gt;
&lt;br /&gt;
[http://www.hydrogenaudio.org/forums/index.php?showuser=42400 Nick.C] ported the original [[Wikipedia:MATLAB|MATLAB]] implementation to [[Wikipedia:Borland Delphi|Delphi]] (Many thanks [[Wikipedia:CodeGear|CodeGear]] for Turbo Explorer!!) with a liberal sprinkling of [[Wikipedia:IA-32|IA-32]] and [[Wikipedia:x87|x87]] Assembly Language for speed.&lt;br /&gt;
&lt;br /&gt;
Subsequently, lossyFLAC proved itself to work with other lossless codecs, so the application name was changed to lossyWAV. &lt;br /&gt;
&lt;br /&gt;
Since then, Nick.C has heavily developed and built upon lossyWAV, with valuable tuning performed by [http://www.hydrogenaudio.org/forums/index.php?showuser=25015 halb27] at hydrogenaudio.&lt;br /&gt;
&lt;br /&gt;
==File Identification==&lt;br /&gt;
lossyWAV-processed WAV files are named with a double filename extension, .lossy.wav, to make them instantly identifiable. e.g. &amp;quot;.lossy.flac&amp;quot; would indicate an audio file which was processed using lossyWAV, and subsequently encoded using FLAC.[http://www.hydrogenaudio.org/forums/index.php?s=&amp;amp;showtopic=55522&amp;amp;view=findpost&amp;amp;p=498559]&lt;br /&gt;
&lt;br /&gt;
From beta v0.6.1, the -correction parameter is used when processing to create a correction file which is named with the .lwcdf.wav double filename extension. When &amp;quot;added&amp;quot; to the corresponding .lossy.wav, using a not yet implemented parameter of lossyWAV, the original file will be reconstituted.&lt;br /&gt;
&lt;br /&gt;
Combinations of lossyWAV with each specific encoder are referred to as lossy&#039;&#039;&#039;X&#039;&#039;&#039;, where &#039;&#039;&#039;X&#039;&#039;&#039; is an abbreviation of the lossless codec name. Combination names are listed in the &amp;quot;[[LossyWAV#Known supported codecs|known supported codecs]]&amp;quot; section below.&lt;br /&gt;
&lt;br /&gt;
From v0.5.9, lossyWAV inserts a variable length FACT chunk into the WAV file immediately after the FMT chunk. This takes the form:&amp;lt;pre&amp;gt;fact/&amp;lt;size&amp;gt;/lossyWAV beta vx.y.z : dd/mm/yyyy hh:mm:ss&lt;br /&gt;
-2 -cbs 512 -nts 0.00 -snr 21.00 -skew 36.00&lt;br /&gt;
-spf 22224-22235-22336-12347-12358 -fft 10101&amp;lt;/pre&amp;gt;Where the version, date &amp;amp; time and user settings are copied. Additionally, if a lossyWAV FACT chunk is found in a file, the processing will be halted (exit code = 16) to prevent re-processing of an already processed file.&lt;br /&gt;
&lt;br /&gt;
The -check parameter can be used to determine whether a file has previously been processed without trying to process it, exit code = 16 if already processed; exit code = 0 if not.&lt;br /&gt;
&lt;br /&gt;
==Presets==&lt;br /&gt;
*-1: Highest quality preset, disc space-saving alternative to lossless archiving for large audio collections.&lt;br /&gt;
*-2: Default preset; a compromise between -1 and -3.&lt;br /&gt;
*-3: High quality preset for usage on a compatible [[Wikipedia:Digital audio player|DAP]], approx. 370kbps for &amp;quot;normal&amp;quot; music. [http://www.hydrogenaudio.org/forums/index.php?s=&amp;amp;showtopic=56129&amp;amp;view=findpost&amp;amp;p=531316] &lt;br /&gt;
&lt;br /&gt;
All tuning has been performed on quality preset -3 with -2 and -1 being more conservative. Quality preset -3 is generally accepted to be (and from testing so far is) transparent. If you find a track which -3 fails to achieve transparency after processing, please post a sample (no more than 30 seconds) in the development thread.&lt;br /&gt;
&lt;br /&gt;
Apart from the quality presets the -nts (noise threshold shift) parameter is the most important parameter to control quality. Without noise threshold shifting (-nts 0) the number of bits to be removed is computed in a theoretically optimal way. -nts 0 is defaulted with quality preset -2.&lt;br /&gt;
&lt;br /&gt;
In order to be more cautious a negative -nts value can be chosen up to -48. -nts -3 is defaulted when using quality preset -1. For archiving purposes and/or very cautious users even more conservative values may be of interest.&lt;br /&gt;
&lt;br /&gt;
Because of internal precautions in addition to 2BDecided&#039;s principles experience so far tells us that a small positive -nts value doesn&#039;t keep the encodings from being transparent. That&#039;s why -nts 3 is defaulted when using quality preset -3, but a more aggressive value may be welcome for a user who wants to keep average bitrate down a bit more. The higher the -nts value however the more probabable is the arrival of a situation where lossyWAV isn&#039;t transparent any more. An -nts value of more than 10 is not recommended though even with such a value transparency is achieved most usually.&lt;br /&gt;
&lt;br /&gt;
==Supported input formats==&lt;br /&gt;
*[[WAV]]: 16-bit, 24-bit; sample rate &amp;amp;ge; 32kHz [[Pulse Code Modulation|PCM]]. Very high sample rates (&amp;amp;gt;48kHz) have not been extensively tested. Tunings have been focussed on 16-bit, 44.1kHz samples (i.e. [[Wikipedia:Red Book (audio CD standard)|CD]] PCM).&lt;br /&gt;
&lt;br /&gt;
==Codec Compatibility==&lt;br /&gt;
===Known supported codecs===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|+ &#039;&#039;&#039;Recommended settings&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
!Codec&lt;br /&gt;
!lossyWAV parameters&lt;br /&gt;
!Encoder parameters&lt;br /&gt;
!Combination name&lt;br /&gt;
|-&lt;br /&gt;
![[Free Lossless Audio Codec|FLAC]]&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| -&#039;&#039;&#039;3&#039;&#039;&#039; -&#039;&#039;&#039;m&#039;&#039;&#039; -&#039;&#039;&#039;e&#039;&#039;&#039; -&#039;&#039;&#039;r&#039;&#039;&#039; 2 -&#039;&#039;&#039;b&#039;&#039;&#039; 512 --&#039;&#039;&#039;keep-foreign-metadata&#039;&#039;&#039;[http://www.hydrogenaudio.org/forums/index.php?s=&amp;amp;showtopic=56129&amp;amp;view=findpost&amp;amp;p=533689]&lt;br /&gt;
|lossy&#039;&#039;&#039;FLAC&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
![[Wikipedia:Lossless Predictive Audio Compression|LPAC]]&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| -&#039;&#039;&#039;b&#039;&#039;&#039;512&lt;br /&gt;
|lossy&#039;&#039;&#039;LPAC&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
![[Wikipedia:Audio Lossless Coding|MPEG-4 ALS]]&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| -&#039;&#039;&#039;l&#039;&#039;&#039; -&#039;&#039;&#039;n&#039;&#039;&#039;512&lt;br /&gt;
|lossy&#039;&#039;&#039;ALS&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
![[TAK]]&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| -&#039;&#039;&#039;fsl&#039;&#039;&#039;512&lt;br /&gt;
|lossy&#039;&#039;&#039;TAK&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
![[WavPack]]&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| --&#039;&#039;&#039;blocksize&#039;&#039;&#039;=512&lt;br /&gt;
|lossy&#039;&#039;&#039;WV&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
![[Wikipedia:Windows Media Audio#Windows Media Audio Lossless|WMA Lossless]]&lt;br /&gt;
| -&#039;&#039;&#039;wmalsl&#039;&#039;&#039; (same as -&#039;&#039;&#039;cbs&#039;&#039;&#039; 2048)&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
|lossy&#039;&#039;&#039;WMALSL&#039;&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
There is also [http://www.hometheaterhifi.com/volume_8_4/dvd-benchmark-part-6-dvd-audio-11-2001.html#Meridian%20Lossless%20Packing%20(MLP)%20in%20a%20Nutshell evidence] &amp;amp;mdash; so-called &amp;quot;Bit Shifting&amp;quot; &amp;amp;mdash; to suggest that lossyWAV may work with [[Wikipedia:Meridian Lossless Packing|MLP]], but this remains untested due to prohibitive prices of encoders.&lt;br /&gt;
&lt;br /&gt;
A comparison of portable media players is [[Wikipedia:Comparison of portable media players#Audio Formats|here]], which shows FLAC and WMA Lossless compatibility among listed players.&lt;br /&gt;
Any player supported by [http://www.rockbox.org Rockbox] can use FLAC or wavPack files after installing Rockbox.&lt;br /&gt;
&lt;br /&gt;
===Known unsupported codecs===&lt;br /&gt;
*[[ALAC]]&lt;br /&gt;
*[[Lossless Audio|LA]]&lt;br /&gt;
*[[Monkey&#039;s Audio]]&lt;br /&gt;
*[[OptimFROG]]&lt;br /&gt;
*[[TTA]]&lt;br /&gt;
&lt;br /&gt;
==lossyWAV application settings==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
lossyWAV beta v0.6.0 : WAV file bit depth reduction method by 2Bdecided.&lt;br /&gt;
Delphi implementation by Nick.C from a Matlab script, www.hydrogenaudio.org&lt;br /&gt;
&lt;br /&gt;
Usage   : lossyWAV &amp;lt;input wav file&amp;gt; &amp;lt;options&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example : lossyWAV musicfile.wav&lt;br /&gt;
&lt;br /&gt;
Quality Options:&lt;br /&gt;
&lt;br /&gt;
-1            extreme settings [4xFFT] (-cbs 512 -nts -3.0 -skew 36 -snr 21&lt;br /&gt;
              -spf 22224-22225-11235-11246-12358 -fft 11011)&lt;br /&gt;
-2            default settings [3xFFT] (-cbs 512 -nts  0.0 -skew 36 -snr 21&lt;br /&gt;
              -spf 22224-22235-22346-12347-12358 -fft 10101)&lt;br /&gt;
-3            compact settings [2xFFT] (-cbs 512 -nts +3.0 -skew 36 -snr 21&lt;br /&gt;
              -spf 22224-22235-22347-22358-2246C -fft 10001)&lt;br /&gt;
&lt;br /&gt;
Standard Options:&lt;br /&gt;
&lt;br /&gt;
-o &amp;lt;folder&amp;gt;   destination folder for the output file&lt;br /&gt;
-nts &amp;lt;n&amp;gt;      set noise_threshold_shift to n dB (-48.0dB&amp;lt;=n&amp;lt;=+48.0dB)&lt;br /&gt;
              (-ve values reduce bits to remove, +ve values increase)&lt;br /&gt;
-force        forcibly over-write output file if it exists; default=off&lt;br /&gt;
-check        check if WAV file has already been processed. default=off;&lt;br /&gt;
              errorlevel=16 if already processed, 0 if not.&lt;br /&gt;
&lt;br /&gt;
Codec Specific Options:&lt;br /&gt;
&lt;br /&gt;
-wmalsl       optimise internal settings for WMA Lossless codec; default=off&lt;br /&gt;
&lt;br /&gt;
Advanced / System Options:&lt;br /&gt;
&lt;br /&gt;
-shaping      enable fixed shaping using bit_removal difference of previous&lt;br /&gt;
              samples [value = brd(-1)/4]; default=off&lt;br /&gt;
-snr &amp;lt;n&amp;gt;      set minimum average signal to added noise ratio to n dB;&lt;br /&gt;
              (-215.0dB&amp;lt;=n&amp;lt;=48.0dB) Increasing value reduces bits to remove.&lt;br /&gt;
-skew &amp;lt;n&amp;gt;     skew fft analysis results by n dB (0.0db&amp;lt;=n&amp;lt;=48.0db) in the&lt;br /&gt;
              frequency range 20Hz to 3.45kHz&lt;br /&gt;
-spf &amp;lt;5x5hex&amp;gt; manually input the 5 spreading functions as 5 x 5 characters;&lt;br /&gt;
              These correspond to FFTs of 64, 128, 256, 512 &amp;amp; 1024 samples;&lt;br /&gt;
              e.g. 22235-22236-22347-22358-2246C (Characters must be one of&lt;br /&gt;
              1 to 9 and A to F (zero excluded).&lt;br /&gt;
-fft &amp;lt;5xbin&amp;gt;  select fft lengths to use in analysis, using binary switching,&lt;br /&gt;
              from 64, 128, 256, 512 &amp;amp; 1024 samples, e.g. 01001 = 128,1024&lt;br /&gt;
-cbs &amp;lt;n&amp;gt;      set codec block size to n samples (512&amp;lt;=n&amp;lt;=4608, n mod 32=0)&lt;br /&gt;
&lt;br /&gt;
-quiet        significantly reduce screen output&lt;br /&gt;
-nowarn       suppress lossyWAV warnings&lt;br /&gt;
-detail       enable detailled output mode&lt;br /&gt;
&lt;br /&gt;
-below        set process priority to below normal.&lt;br /&gt;
-low          set process priority to low.&lt;br /&gt;
&lt;br /&gt;
Special thanks:&lt;br /&gt;
&lt;br /&gt;
David Robinson for the method itself and motivation to implement it in Delphi.&lt;br /&gt;
Dr. Jean Debord for the use of TPMAT036 uFFT &amp;amp; uTypes units for FFT analysis.&lt;br /&gt;
Halb27 @ www.hydrogenaudio.org for donation and maintenance of the wavIO unit.&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Indicative Bitrate Reduction==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|+ &#039;&#039;&#039;Conversion using lossyWAV beta v0.5.8, [[Wikipedia:FLAC|FLAC]] -8&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
!lossyWAV Test Set&lt;br /&gt;
!FLAC -8&lt;br /&gt;
!lossyWAV -1&lt;br /&gt;
!lossyWAV -2&lt;br /&gt;
!lossyWAV -3&lt;br /&gt;
|-&lt;br /&gt;
!10 Album Test Average                                &lt;br /&gt;
| 850kbps &lt;br /&gt;
| 480kbps &lt;br /&gt;
| 426kbps &lt;br /&gt;
| 376kbps&lt;br /&gt;
|-&lt;br /&gt;
!53 sample &amp;quot;problem&amp;quot; set                &lt;br /&gt;
| 784kbps &lt;br /&gt;
| 543kbps &lt;br /&gt;
| 491kbps &lt;br /&gt;
| 434kbps&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|+ &#039;&#039;&#039;Large Foobar2000 Conversion: (lossyWAV -3; [[Wikipedia:FLAC|FLAC]] -3 -m -e -r 2 -b 512)&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
!Album&lt;br /&gt;
!FLAC -8&lt;br /&gt;
!lossyWAV -1&lt;br /&gt;
!lossyWAV -2&lt;br /&gt;
!lossyWAV -3&lt;br /&gt;
|-&lt;br /&gt;
!3283 Tracks; 258 Discs; 87.2GB&amp;gt;36.8GB  &lt;br /&gt;
| 880kbps &lt;br /&gt;
| N/A &lt;br /&gt;
| N/A&lt;br /&gt;
| 371kbps &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Example Foobar2000 Converter Settings==&lt;br /&gt;
[[Image:Foobar2000_Converter_Settings.PNG]]&lt;br /&gt;
&lt;br /&gt;
Example flossy.bat file called from above converter settings.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@echo off&lt;br /&gt;
c:\data_nic\bin\lossyWAV %1 %3 %4 %5 %6 %7 %8 %9 -below -nowarn -quiet&lt;br /&gt;
c:\data_nic\bin\flac.exe -8 -f -b 512 &amp;quot;%~N1.lossy.wav&amp;quot; -o&amp;quot;%~N2.flac&amp;quot; &lt;br /&gt;
del &amp;quot;%~N1.lossy.wav&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Frequently asked questions==&lt;br /&gt;
*&#039;&#039;&#039;Question:&#039;&#039;&#039; Is it [[Variable Bitrate|VBR]]?&lt;br /&gt;
*&#039;&#039;&#039;Short answer:&#039;&#039;&#039; Yes.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Question:&#039;&#039;&#039; Is it [[transparency|transparent]]?&lt;br /&gt;
*&#039;&#039;&#039;Short answer:&#039;&#039;&#039; Almost certainly.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Question:&#039;&#039;&#039; Is it [[lossless]]?&lt;br /&gt;
*&#039;&#039;&#039;Short answer:&#039;&#039;&#039; No.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Question:&#039;&#039;&#039; Why should I use this?&lt;br /&gt;
*&#039;&#039;&#039;Answer:&#039;&#039;&#039;&lt;br /&gt;
:*high quality&lt;br /&gt;
:*extremely low chance of audible [[artifact|artefacts]]&lt;br /&gt;
:*reasonable [[bitrate]]s&lt;br /&gt;
:*usable with unmodified, established lossless formats.&lt;br /&gt;
&lt;br /&gt;
==Current Test Settings==&lt;br /&gt;
No current test settings&lt;br /&gt;
&lt;br /&gt;
==External links==&lt;br /&gt;
*[http://www.hydrogenaudio.org/forums/index.php?showtopic=56129 Current development thread] You will find the latest version and last stable version in post #1 of this thread.&lt;br /&gt;
*[http://www.hydrogenaudio.org/forums/index.php?showtopic=55522&amp;amp;st=0 Original lossyFLAC thread] Where David Robinson (Replaygain developer) introduces the method and a Matlab implementation.&lt;/div&gt;</summary>
		<author><name>Halb27</name></author>
	</entry>
	<entry>
		<id>https://wiki.hydrogenaudio.org/index.php?title=LossyWAV&amp;diff=18101</id>
		<title>LossyWAV</title>
		<link rel="alternate" type="text/html" href="https://wiki.hydrogenaudio.org/index.php?title=LossyWAV&amp;diff=18101"/>
		<updated>2008-01-03T20:50:47Z</updated>

		<summary type="html">&lt;p&gt;Halb27: /* Presets */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Software Infobox&lt;br /&gt;
| name = lossyWAV&lt;br /&gt;
| screenshot = &lt;br /&gt;
| caption = &lt;br /&gt;
| maintainer = [http://www.hydrogenaudio.org/forums/index.php?showuser=42400 Nick.C]&lt;br /&gt;
| stable_release = beta v0.6.1&lt;br /&gt;
| preview_release = &lt;br /&gt;
| operating_system = [[Wikipedia:MS-DOS|MS-DOS]]&lt;br /&gt;
| use = [[Wikipedia:Digital signal processing|Digital signal processing]]&lt;br /&gt;
| license = [[Wikipedia:LGPL|LGPL license]]&lt;br /&gt;
| website = [http://www.hydrogenaudio.org/forums/index.php?showtopic=56129 Hydrogenaudio]&lt;br /&gt;
}}&lt;br /&gt;
lossyWAV is a lossy pre-processor for [[PCM]] audio contained in the [[WAV]] file format. It reduces [[Wikipedia:Audio bit depth|bit depth]] of the input signal, which, when used in conjunction with certain lossless codecs, reduces the bitrate of the encoded file significantly compared to unpreprocessed compression. &lt;br /&gt;
lossyWAV&#039;s primary goal is to maintain [[transparency]] with a high degree of confidence when processing any audio data.&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
lossyFLAC is an idea started by [http://www.hydrogenaudio.org/forums/index.php?showuser=409 2Bdecided] at hydrogenaudio, utilising the wasted bits feature of the FLAC lossless codec with the aim of transparently reducing audio bit depth (making some lower significant bits (LSB&#039;s) zero), consequently taking advantage of FLAC&#039;s detection of consistently zeroed lower significant bits within each single frame and significantly increasing coding efficiency.[http://www.hydrogenaudio.org/forums/index.php?s=&amp;amp;showtopic=55522&amp;amp;view=findpost&amp;amp;p=498179] In this way the user can enjoy audio encoded using the same codec (which may be all important from a hardware compatibility perspective) at a reduced bitrate compared to the lossless version.&lt;br /&gt;
&lt;br /&gt;
[http://www.hydrogenaudio.org/forums/index.php?showuser=42400 Nick.C] ported the original [[Wikipedia:MATLAB|MATLAB]] implementation to [[Wikipedia:Borland Delphi|Delphi]] (Many thanks [[Wikipedia:CodeGear|CodeGear]] for Turbo Explorer!!) with a liberal sprinkling of [[Wikipedia:IA-32|IA-32]] and [[Wikipedia:x87|x87]] Assembly Language for speed.&lt;br /&gt;
&lt;br /&gt;
Subsequently, lossyFLAC proved itself to work with other lossless codecs, so the application name was changed to lossyWAV. &lt;br /&gt;
&lt;br /&gt;
Since then, Nick.C has heavily developed and built upon lossyWAV, with valuable tuning performed by [http://www.hydrogenaudio.org/forums/index.php?showuser=25015 halb27] at hydrogenaudio.&lt;br /&gt;
&lt;br /&gt;
==File Identification==&lt;br /&gt;
lossyWAV-processed WAV files are named with a double filename extension, .lossy.wav, to make them instantly identifiable. e.g. &amp;quot;.lossy.flac&amp;quot; would indicate an audio file which was processed using lossyWAV, and subsequently encoded using FLAC.[http://www.hydrogenaudio.org/forums/index.php?s=&amp;amp;showtopic=55522&amp;amp;view=findpost&amp;amp;p=498559]&lt;br /&gt;
&lt;br /&gt;
From beta v0.6.1, the -correction parameter is used when processing to create a correction file which is named with the .lwcdf.wav double filename extension. When &amp;quot;added&amp;quot; to the corresponding .lossy.wav, using a not yet implemented parameter of lossyWAV, the original file will be reconstituted.&lt;br /&gt;
&lt;br /&gt;
Combinations of lossyWAV with each specific encoder are referred to as lossy&#039;&#039;&#039;X&#039;&#039;&#039;, where &#039;&#039;&#039;X&#039;&#039;&#039; is an abbreviation of the lossless codec name. Combination names are listed in the &amp;quot;[[LossyWAV#Known supported codecs|known supported codecs]]&amp;quot; section below.&lt;br /&gt;
&lt;br /&gt;
From v0.5.9, lossyWAV inserts a variable length FACT chunk into the WAV file immediately after the FMT chunk. This takes the form:&amp;lt;pre&amp;gt;fact/&amp;lt;size&amp;gt;/lossyWAV beta vx.y.z : dd/mm/yyyy hh:mm:ss&lt;br /&gt;
-2 -cbs 512 -nts 0.00 -snr 21.00 -skew 36.00&lt;br /&gt;
-spf 22224-22235-22336-12347-12358 -fft 10101&amp;lt;/pre&amp;gt;Where the version, date &amp;amp; time and user settings are copied. Additionally, if a lossyWAV FACT chunk is found in a file, the processing will be halted (exit code = 16) to prevent re-processing of an already processed file.&lt;br /&gt;
&lt;br /&gt;
The -check parameter can be used to determine whether a file has previously been processed without trying to process it, exit code = 16 if already processed; exit code = 0 if not.&lt;br /&gt;
&lt;br /&gt;
==Presets==&lt;br /&gt;
*-1: Highest quality preset, disc space-saving alternative to lossless archiving for large audio collections.&lt;br /&gt;
*-2: Default preset; a compromise between -1 and -3.&lt;br /&gt;
*-3: High quality preset for usage on a compatible [[Wikipedia:Digital audio player|DAP]], approx. 370kbps for &amp;quot;normal&amp;quot; music. [http://www.hydrogenaudio.org/forums/index.php?s=&amp;amp;showtopic=56129&amp;amp;view=findpost&amp;amp;p=531316] &lt;br /&gt;
&lt;br /&gt;
All tuning has been performed on quality preset -3 with -2 and -1 being more conservative. Quality preset -3 is generally accepted to be (and from testing so far is) transparent. If you find a track which -3 fails to achieve transparency after processing, please post a sample (no more than 30 seconds) in the development thread.&lt;br /&gt;
&lt;br /&gt;
Apart from the quality presets the -nts (noise threshold shift) parameter is the most important parameter to control quality. Without noise threshold shifting (-nts 0) the number of bits to be removed is computed in a theoretically optimal way. -nts 0 is defaulted with quality preset -2.&lt;br /&gt;
&lt;br /&gt;
In order to be more cautious a negative -nts value can be chosen up to -48. -nts -3 is defaulted when using quality preset -1. For archiving purposes and/or very cautious users even more conservative values may be welcome.&lt;br /&gt;
&lt;br /&gt;
Because of internal precautions in addition to 2BDecided&#039;s principles experience so far tells us that a small positive -nts value doesn&#039;t keep the encodings from being transparent. That&#039;s why -nts 3 is defaulted when using quality preset -3, but a more aggressive value may be welcome for a user who wants to keep average bitrate down a bit more. The higher the -nts value however the more probabable is the arrival of a situation where lossyWAV isn&#039;t transparent any more. An -nts value of more than 10 is not recommended though even with such a value transparency is achieved most usually.&lt;br /&gt;
&lt;br /&gt;
==Supported input formats==&lt;br /&gt;
*[[WAV]]: 16-bit, 24-bit; sample rate &amp;amp;ge; 32kHz [[Pulse Code Modulation|PCM]]. Very high sample rates (&amp;amp;gt;48kHz) have not been extensively tested. Tunings have been focussed on 16-bit, 44.1kHz samples (i.e. [[Wikipedia:Red Book (audio CD standard)|CD]] PCM).&lt;br /&gt;
&lt;br /&gt;
==Codec Compatibility==&lt;br /&gt;
===Known supported codecs===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|+ &#039;&#039;&#039;Recommended settings&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
!Codec&lt;br /&gt;
!lossyWAV parameters&lt;br /&gt;
!Encoder parameters&lt;br /&gt;
!Combination name&lt;br /&gt;
|-&lt;br /&gt;
![[Free Lossless Audio Codec|FLAC]]&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| -&#039;&#039;&#039;3&#039;&#039;&#039; -&#039;&#039;&#039;m&#039;&#039;&#039; -&#039;&#039;&#039;e&#039;&#039;&#039; -&#039;&#039;&#039;r&#039;&#039;&#039; 2 -&#039;&#039;&#039;b&#039;&#039;&#039; 512 --&#039;&#039;&#039;keep-foreign-metadata&#039;&#039;&#039;[http://www.hydrogenaudio.org/forums/index.php?s=&amp;amp;showtopic=56129&amp;amp;view=findpost&amp;amp;p=533689]&lt;br /&gt;
|lossy&#039;&#039;&#039;FLAC&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
![[Wikipedia:Lossless Predictive Audio Compression|LPAC]]&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| -&#039;&#039;&#039;b&#039;&#039;&#039;512&lt;br /&gt;
|lossy&#039;&#039;&#039;LPAC&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
![[Wikipedia:Audio Lossless Coding|MPEG-4 ALS]]&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| -&#039;&#039;&#039;l&#039;&#039;&#039; -&#039;&#039;&#039;n&#039;&#039;&#039;512&lt;br /&gt;
|lossy&#039;&#039;&#039;ALS&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
![[TAK]]&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| -&#039;&#039;&#039;fsl&#039;&#039;&#039;512&lt;br /&gt;
|lossy&#039;&#039;&#039;TAK&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
![[WavPack]]&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| --&#039;&#039;&#039;blocksize&#039;&#039;&#039;=512&lt;br /&gt;
|lossy&#039;&#039;&#039;WV&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
![[Wikipedia:Windows Media Audio#Windows Media Audio Lossless|WMA Lossless]]&lt;br /&gt;
| -&#039;&#039;&#039;wmalsl&#039;&#039;&#039; (same as -&#039;&#039;&#039;cbs&#039;&#039;&#039; 2048)&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
|lossy&#039;&#039;&#039;WMALSL&#039;&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
There is also [http://www.hometheaterhifi.com/volume_8_4/dvd-benchmark-part-6-dvd-audio-11-2001.html#Meridian%20Lossless%20Packing%20(MLP)%20in%20a%20Nutshell evidence] &amp;amp;mdash; so-called &amp;quot;Bit Shifting&amp;quot; &amp;amp;mdash; to suggest that lossyWAV may work with [[Wikipedia:Meridian Lossless Packing|MLP]], but this remains untested due to prohibitive prices of encoders.&lt;br /&gt;
&lt;br /&gt;
A comparison of portable media players is [[Wikipedia:Comparison of portable media players#Audio Formats|here]], which shows FLAC and WMA Lossless compatibility among listed players.&lt;br /&gt;
Any player supported by [http://www.rockbox.org Rockbox] can use FLAC or wavPack files after installing Rockbox.&lt;br /&gt;
&lt;br /&gt;
===Known unsupported codecs===&lt;br /&gt;
*[[ALAC]]&lt;br /&gt;
*[[Lossless Audio|LA]]&lt;br /&gt;
*[[Monkey&#039;s Audio]]&lt;br /&gt;
*[[OptimFROG]]&lt;br /&gt;
*[[TTA]]&lt;br /&gt;
&lt;br /&gt;
==lossyWAV application settings==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
lossyWAV beta v0.6.0 : WAV file bit depth reduction method by 2Bdecided.&lt;br /&gt;
Delphi implementation by Nick.C from a Matlab script, www.hydrogenaudio.org&lt;br /&gt;
&lt;br /&gt;
Usage   : lossyWAV &amp;lt;input wav file&amp;gt; &amp;lt;options&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example : lossyWAV musicfile.wav&lt;br /&gt;
&lt;br /&gt;
Quality Options:&lt;br /&gt;
&lt;br /&gt;
-1            extreme settings [4xFFT] (-cbs 512 -nts -3.0 -skew 36 -snr 21&lt;br /&gt;
              -spf 22224-22225-11235-11246-12358 -fft 11011)&lt;br /&gt;
-2            default settings [3xFFT] (-cbs 512 -nts  0.0 -skew 36 -snr 21&lt;br /&gt;
              -spf 22224-22235-22346-12347-12358 -fft 10101)&lt;br /&gt;
-3            compact settings [2xFFT] (-cbs 512 -nts +3.0 -skew 36 -snr 21&lt;br /&gt;
              -spf 22224-22235-22347-22358-2246C -fft 10001)&lt;br /&gt;
&lt;br /&gt;
Standard Options:&lt;br /&gt;
&lt;br /&gt;
-o &amp;lt;folder&amp;gt;   destination folder for the output file&lt;br /&gt;
-nts &amp;lt;n&amp;gt;      set noise_threshold_shift to n dB (-48.0dB&amp;lt;=n&amp;lt;=+48.0dB)&lt;br /&gt;
              (-ve values reduce bits to remove, +ve values increase)&lt;br /&gt;
-force        forcibly over-write output file if it exists; default=off&lt;br /&gt;
-check        check if WAV file has already been processed. default=off;&lt;br /&gt;
              errorlevel=16 if already processed, 0 if not.&lt;br /&gt;
&lt;br /&gt;
Codec Specific Options:&lt;br /&gt;
&lt;br /&gt;
-wmalsl       optimise internal settings for WMA Lossless codec; default=off&lt;br /&gt;
&lt;br /&gt;
Advanced / System Options:&lt;br /&gt;
&lt;br /&gt;
-shaping      enable fixed shaping using bit_removal difference of previous&lt;br /&gt;
              samples [value = brd(-1)/4]; default=off&lt;br /&gt;
-snr &amp;lt;n&amp;gt;      set minimum average signal to added noise ratio to n dB;&lt;br /&gt;
              (-215.0dB&amp;lt;=n&amp;lt;=48.0dB) Increasing value reduces bits to remove.&lt;br /&gt;
-skew &amp;lt;n&amp;gt;     skew fft analysis results by n dB (0.0db&amp;lt;=n&amp;lt;=48.0db) in the&lt;br /&gt;
              frequency range 20Hz to 3.45kHz&lt;br /&gt;
-spf &amp;lt;5x5hex&amp;gt; manually input the 5 spreading functions as 5 x 5 characters;&lt;br /&gt;
              These correspond to FFTs of 64, 128, 256, 512 &amp;amp; 1024 samples;&lt;br /&gt;
              e.g. 22235-22236-22347-22358-2246C (Characters must be one of&lt;br /&gt;
              1 to 9 and A to F (zero excluded).&lt;br /&gt;
-fft &amp;lt;5xbin&amp;gt;  select fft lengths to use in analysis, using binary switching,&lt;br /&gt;
              from 64, 128, 256, 512 &amp;amp; 1024 samples, e.g. 01001 = 128,1024&lt;br /&gt;
-cbs &amp;lt;n&amp;gt;      set codec block size to n samples (512&amp;lt;=n&amp;lt;=4608, n mod 32=0)&lt;br /&gt;
&lt;br /&gt;
-quiet        significantly reduce screen output&lt;br /&gt;
-nowarn       suppress lossyWAV warnings&lt;br /&gt;
-detail       enable detailled output mode&lt;br /&gt;
&lt;br /&gt;
-below        set process priority to below normal.&lt;br /&gt;
-low          set process priority to low.&lt;br /&gt;
&lt;br /&gt;
Special thanks:&lt;br /&gt;
&lt;br /&gt;
David Robinson for the method itself and motivation to implement it in Delphi.&lt;br /&gt;
Dr. Jean Debord for the use of TPMAT036 uFFT &amp;amp; uTypes units for FFT analysis.&lt;br /&gt;
Halb27 @ www.hydrogenaudio.org for donation and maintenance of the wavIO unit.&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Indicative Bitrate Reduction==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|+ &#039;&#039;&#039;Conversion using lossyWAV beta v0.5.8, [[Wikipedia:FLAC|FLAC]] -8&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
!lossyWAV Test Set&lt;br /&gt;
!FLAC -8&lt;br /&gt;
!lossyWAV -1&lt;br /&gt;
!lossyWAV -2&lt;br /&gt;
!lossyWAV -3&lt;br /&gt;
|-&lt;br /&gt;
!10 Album Test Average                                &lt;br /&gt;
| 850kbps &lt;br /&gt;
| 480kbps &lt;br /&gt;
| 426kbps &lt;br /&gt;
| 376kbps&lt;br /&gt;
|-&lt;br /&gt;
!53 sample &amp;quot;problem&amp;quot; set                &lt;br /&gt;
| 784kbps &lt;br /&gt;
| 543kbps &lt;br /&gt;
| 491kbps &lt;br /&gt;
| 434kbps&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|+ &#039;&#039;&#039;Large Foobar2000 Conversion: (lossyWAV -3; [[Wikipedia:FLAC|FLAC]] -3 -m -e -r 2 -b 512)&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
!Album&lt;br /&gt;
!FLAC -8&lt;br /&gt;
!lossyWAV -1&lt;br /&gt;
!lossyWAV -2&lt;br /&gt;
!lossyWAV -3&lt;br /&gt;
|-&lt;br /&gt;
!3283 Tracks; 258 Discs; 87.2GB&amp;gt;36.8GB  &lt;br /&gt;
| 880kbps &lt;br /&gt;
| N/A &lt;br /&gt;
| N/A&lt;br /&gt;
| 371kbps &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Example Foobar2000 Converter Settings==&lt;br /&gt;
[[Image:Foobar2000_Converter_Settings.PNG]]&lt;br /&gt;
&lt;br /&gt;
Example flossy.bat file called from above converter settings.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@echo off&lt;br /&gt;
c:\data_nic\bin\lossyWAV %1 %3 %4 %5 %6 %7 %8 %9 -below -nowarn -quiet&lt;br /&gt;
c:\data_nic\bin\flac.exe -8 -f -b 512 &amp;quot;%~N1.lossy.wav&amp;quot; -o&amp;quot;%~N2.flac&amp;quot; &lt;br /&gt;
del &amp;quot;%~N1.lossy.wav&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Frequently asked questions==&lt;br /&gt;
*&#039;&#039;&#039;Question:&#039;&#039;&#039; Is it [[Variable Bitrate|VBR]]?&lt;br /&gt;
*&#039;&#039;&#039;Short answer:&#039;&#039;&#039; Yes.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Question:&#039;&#039;&#039; Is it [[transparency|transparent]]?&lt;br /&gt;
*&#039;&#039;&#039;Short answer:&#039;&#039;&#039; Almost certainly.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Question:&#039;&#039;&#039; Is it [[lossless]]?&lt;br /&gt;
*&#039;&#039;&#039;Short answer:&#039;&#039;&#039; No.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Question:&#039;&#039;&#039; Why should I use this?&lt;br /&gt;
*&#039;&#039;&#039;Answer:&#039;&#039;&#039;&lt;br /&gt;
:*high quality&lt;br /&gt;
:*extremely low chance of audible [[artifact|artefacts]]&lt;br /&gt;
:*reasonable [[bitrate]]s&lt;br /&gt;
:*usable with unmodified, established lossless formats.&lt;br /&gt;
&lt;br /&gt;
==Current Test Settings==&lt;br /&gt;
No current test settings&lt;br /&gt;
&lt;br /&gt;
==External links==&lt;br /&gt;
*[http://www.hydrogenaudio.org/forums/index.php?showtopic=56129 Current development thread] You will find the latest version and last stable version in post #1 of this thread.&lt;br /&gt;
*[http://www.hydrogenaudio.org/forums/index.php?showtopic=55522&amp;amp;st=0 Original lossyFLAC thread] Where David Robinson (Replaygain developer) introduces the method and a Matlab implementation.&lt;/div&gt;</summary>
		<author><name>Halb27</name></author>
	</entry>
	<entry>
		<id>https://wiki.hydrogenaudio.org/index.php?title=LossyWAV&amp;diff=18100</id>
		<title>LossyWAV</title>
		<link rel="alternate" type="text/html" href="https://wiki.hydrogenaudio.org/index.php?title=LossyWAV&amp;diff=18100"/>
		<updated>2008-01-03T20:49:16Z</updated>

		<summary type="html">&lt;p&gt;Halb27: /* Presets */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Software Infobox&lt;br /&gt;
| name = lossyWAV&lt;br /&gt;
| screenshot = &lt;br /&gt;
| caption = &lt;br /&gt;
| maintainer = [http://www.hydrogenaudio.org/forums/index.php?showuser=42400 Nick.C]&lt;br /&gt;
| stable_release = beta v0.6.1&lt;br /&gt;
| preview_release = &lt;br /&gt;
| operating_system = [[Wikipedia:MS-DOS|MS-DOS]]&lt;br /&gt;
| use = [[Wikipedia:Digital signal processing|Digital signal processing]]&lt;br /&gt;
| license = [[Wikipedia:LGPL|LGPL license]]&lt;br /&gt;
| website = [http://www.hydrogenaudio.org/forums/index.php?showtopic=56129 Hydrogenaudio]&lt;br /&gt;
}}&lt;br /&gt;
lossyWAV is a lossy pre-processor for [[PCM]] audio contained in the [[WAV]] file format. It reduces [[Wikipedia:Audio bit depth|bit depth]] of the input signal, which, when used in conjunction with certain lossless codecs, reduces the bitrate of the encoded file significantly compared to unpreprocessed compression. &lt;br /&gt;
lossyWAV&#039;s primary goal is to maintain [[transparency]] with a high degree of confidence when processing any audio data.&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
lossyFLAC is an idea started by [http://www.hydrogenaudio.org/forums/index.php?showuser=409 2Bdecided] at hydrogenaudio, utilising the wasted bits feature of the FLAC lossless codec with the aim of transparently reducing audio bit depth (making some lower significant bits (LSB&#039;s) zero), consequently taking advantage of FLAC&#039;s detection of consistently zeroed lower significant bits within each single frame and significantly increasing coding efficiency.[http://www.hydrogenaudio.org/forums/index.php?s=&amp;amp;showtopic=55522&amp;amp;view=findpost&amp;amp;p=498179] In this way the user can enjoy audio encoded using the same codec (which may be all important from a hardware compatibility perspective) at a reduced bitrate compared to the lossless version.&lt;br /&gt;
&lt;br /&gt;
[http://www.hydrogenaudio.org/forums/index.php?showuser=42400 Nick.C] ported the original [[Wikipedia:MATLAB|MATLAB]] implementation to [[Wikipedia:Borland Delphi|Delphi]] (Many thanks [[Wikipedia:CodeGear|CodeGear]] for Turbo Explorer!!) with a liberal sprinkling of [[Wikipedia:IA-32|IA-32]] and [[Wikipedia:x87|x87]] Assembly Language for speed.&lt;br /&gt;
&lt;br /&gt;
Subsequently, lossyFLAC proved itself to work with other lossless codecs, so the application name was changed to lossyWAV. &lt;br /&gt;
&lt;br /&gt;
Since then, Nick.C has heavily developed and built upon lossyWAV, with valuable tuning performed by [http://www.hydrogenaudio.org/forums/index.php?showuser=25015 halb27] at hydrogenaudio.&lt;br /&gt;
&lt;br /&gt;
==File Identification==&lt;br /&gt;
lossyWAV-processed WAV files are named with a double filename extension, .lossy.wav, to make them instantly identifiable. e.g. &amp;quot;.lossy.flac&amp;quot; would indicate an audio file which was processed using lossyWAV, and subsequently encoded using FLAC.[http://www.hydrogenaudio.org/forums/index.php?s=&amp;amp;showtopic=55522&amp;amp;view=findpost&amp;amp;p=498559]&lt;br /&gt;
&lt;br /&gt;
From beta v0.6.1, the -correction parameter is used when processing to create a correction file which is named with the .lwcdf.wav double filename extension. When &amp;quot;added&amp;quot; to the corresponding .lossy.wav, using a not yet implemented parameter of lossyWAV, the original file will be reconstituted.&lt;br /&gt;
&lt;br /&gt;
Combinations of lossyWAV with each specific encoder are referred to as lossy&#039;&#039;&#039;X&#039;&#039;&#039;, where &#039;&#039;&#039;X&#039;&#039;&#039; is an abbreviation of the lossless codec name. Combination names are listed in the &amp;quot;[[LossyWAV#Known supported codecs|known supported codecs]]&amp;quot; section below.&lt;br /&gt;
&lt;br /&gt;
From v0.5.9, lossyWAV inserts a variable length FACT chunk into the WAV file immediately after the FMT chunk. This takes the form:&amp;lt;pre&amp;gt;fact/&amp;lt;size&amp;gt;/lossyWAV beta vx.y.z : dd/mm/yyyy hh:mm:ss&lt;br /&gt;
-2 -cbs 512 -nts 0.00 -snr 21.00 -skew 36.00&lt;br /&gt;
-spf 22224-22235-22336-12347-12358 -fft 10101&amp;lt;/pre&amp;gt;Where the version, date &amp;amp; time and user settings are copied. Additionally, if a lossyWAV FACT chunk is found in a file, the processing will be halted (exit code = 16) to prevent re-processing of an already processed file.&lt;br /&gt;
&lt;br /&gt;
The -check parameter can be used to determine whether a file has previously been processed without trying to process it, exit code = 16 if already processed; exit code = 0 if not.&lt;br /&gt;
&lt;br /&gt;
==Presets==&lt;br /&gt;
*-1: Highest quality preset, disc space-saving alternative to lossless archiving for large audio collections.&lt;br /&gt;
*-2: Default preset; a compromise between -1 and -3.&lt;br /&gt;
*-3: High quality preset for usage on a compatible [[Wikipedia:Digital audio player|DAP]], approx. 370kbps for &amp;quot;normal&amp;quot; music. [http://www.hydrogenaudio.org/forums/index.php?s=&amp;amp;showtopic=56129&amp;amp;view=findpost&amp;amp;p=531316] &lt;br /&gt;
&lt;br /&gt;
All tuning has been performed on quality preset -3 with -2 and -1 being more conservative. Quality preset -3 is generally accepted to be (and from testing so far is) transparent. If you find a track which -3 fails to achieve transparency after processing, please post a sample (no more than 30 seconds) in the development thread.&lt;br /&gt;
&lt;br /&gt;
Apart from the quality presets the -nts (noise threshold shift) parameter is the most important parameter to control quality. Without noise threshold shifting (-nts 0) the number of bits to be removed is computed in a theoretically optimal way. -nts 0 is defaulted with quality preset -2.&lt;br /&gt;
&lt;br /&gt;
In order to be more cautious a negative -nts value can be chosen up to -48. -nts -3 is defaulted when using quality preset -1, but especially for archiving purposes even more conservative values maybe welcome for the very cautious user.&lt;br /&gt;
&lt;br /&gt;
Because of internal precautions in addition to 2BDecided&#039;s principles experience so far tells us that a small positive -nts value doesn&#039;t keep the encodings from being transparent. That&#039;s why -nts 3 is defaulted when using quality preset -3, but a more aggressive value may be welcome for a user who wants to keep average bitrate down a bit more. The higher the -nts value however the more probabable is the arrival of a situation where lossyWAV isn&#039;t transparent any more. An -nts value of more than 10 is not recommended though even with such a value transparency is achieved most usually.&lt;br /&gt;
&lt;br /&gt;
==Supported input formats==&lt;br /&gt;
*[[WAV]]: 16-bit, 24-bit; sample rate &amp;amp;ge; 32kHz [[Pulse Code Modulation|PCM]]. Very high sample rates (&amp;amp;gt;48kHz) have not been extensively tested. Tunings have been focussed on 16-bit, 44.1kHz samples (i.e. [[Wikipedia:Red Book (audio CD standard)|CD]] PCM).&lt;br /&gt;
&lt;br /&gt;
==Codec Compatibility==&lt;br /&gt;
===Known supported codecs===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|+ &#039;&#039;&#039;Recommended settings&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
!Codec&lt;br /&gt;
!lossyWAV parameters&lt;br /&gt;
!Encoder parameters&lt;br /&gt;
!Combination name&lt;br /&gt;
|-&lt;br /&gt;
![[Free Lossless Audio Codec|FLAC]]&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| -&#039;&#039;&#039;3&#039;&#039;&#039; -&#039;&#039;&#039;m&#039;&#039;&#039; -&#039;&#039;&#039;e&#039;&#039;&#039; -&#039;&#039;&#039;r&#039;&#039;&#039; 2 -&#039;&#039;&#039;b&#039;&#039;&#039; 512 --&#039;&#039;&#039;keep-foreign-metadata&#039;&#039;&#039;[http://www.hydrogenaudio.org/forums/index.php?s=&amp;amp;showtopic=56129&amp;amp;view=findpost&amp;amp;p=533689]&lt;br /&gt;
|lossy&#039;&#039;&#039;FLAC&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
![[Wikipedia:Lossless Predictive Audio Compression|LPAC]]&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| -&#039;&#039;&#039;b&#039;&#039;&#039;512&lt;br /&gt;
|lossy&#039;&#039;&#039;LPAC&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
![[Wikipedia:Audio Lossless Coding|MPEG-4 ALS]]&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| -&#039;&#039;&#039;l&#039;&#039;&#039; -&#039;&#039;&#039;n&#039;&#039;&#039;512&lt;br /&gt;
|lossy&#039;&#039;&#039;ALS&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
![[TAK]]&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| -&#039;&#039;&#039;fsl&#039;&#039;&#039;512&lt;br /&gt;
|lossy&#039;&#039;&#039;TAK&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
![[WavPack]]&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| --&#039;&#039;&#039;blocksize&#039;&#039;&#039;=512&lt;br /&gt;
|lossy&#039;&#039;&#039;WV&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
![[Wikipedia:Windows Media Audio#Windows Media Audio Lossless|WMA Lossless]]&lt;br /&gt;
| -&#039;&#039;&#039;wmalsl&#039;&#039;&#039; (same as -&#039;&#039;&#039;cbs&#039;&#039;&#039; 2048)&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
|lossy&#039;&#039;&#039;WMALSL&#039;&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
There is also [http://www.hometheaterhifi.com/volume_8_4/dvd-benchmark-part-6-dvd-audio-11-2001.html#Meridian%20Lossless%20Packing%20(MLP)%20in%20a%20Nutshell evidence] &amp;amp;mdash; so-called &amp;quot;Bit Shifting&amp;quot; &amp;amp;mdash; to suggest that lossyWAV may work with [[Wikipedia:Meridian Lossless Packing|MLP]], but this remains untested due to prohibitive prices of encoders.&lt;br /&gt;
&lt;br /&gt;
A comparison of portable media players is [[Wikipedia:Comparison of portable media players#Audio Formats|here]], which shows FLAC and WMA Lossless compatibility among listed players.&lt;br /&gt;
Any player supported by [http://www.rockbox.org Rockbox] can use FLAC or wavPack files after installing Rockbox.&lt;br /&gt;
&lt;br /&gt;
===Known unsupported codecs===&lt;br /&gt;
*[[ALAC]]&lt;br /&gt;
*[[Lossless Audio|LA]]&lt;br /&gt;
*[[Monkey&#039;s Audio]]&lt;br /&gt;
*[[OptimFROG]]&lt;br /&gt;
*[[TTA]]&lt;br /&gt;
&lt;br /&gt;
==lossyWAV application settings==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
lossyWAV beta v0.6.0 : WAV file bit depth reduction method by 2Bdecided.&lt;br /&gt;
Delphi implementation by Nick.C from a Matlab script, www.hydrogenaudio.org&lt;br /&gt;
&lt;br /&gt;
Usage   : lossyWAV &amp;lt;input wav file&amp;gt; &amp;lt;options&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example : lossyWAV musicfile.wav&lt;br /&gt;
&lt;br /&gt;
Quality Options:&lt;br /&gt;
&lt;br /&gt;
-1            extreme settings [4xFFT] (-cbs 512 -nts -3.0 -skew 36 -snr 21&lt;br /&gt;
              -spf 22224-22225-11235-11246-12358 -fft 11011)&lt;br /&gt;
-2            default settings [3xFFT] (-cbs 512 -nts  0.0 -skew 36 -snr 21&lt;br /&gt;
              -spf 22224-22235-22346-12347-12358 -fft 10101)&lt;br /&gt;
-3            compact settings [2xFFT] (-cbs 512 -nts +3.0 -skew 36 -snr 21&lt;br /&gt;
              -spf 22224-22235-22347-22358-2246C -fft 10001)&lt;br /&gt;
&lt;br /&gt;
Standard Options:&lt;br /&gt;
&lt;br /&gt;
-o &amp;lt;folder&amp;gt;   destination folder for the output file&lt;br /&gt;
-nts &amp;lt;n&amp;gt;      set noise_threshold_shift to n dB (-48.0dB&amp;lt;=n&amp;lt;=+48.0dB)&lt;br /&gt;
              (-ve values reduce bits to remove, +ve values increase)&lt;br /&gt;
-force        forcibly over-write output file if it exists; default=off&lt;br /&gt;
-check        check if WAV file has already been processed. default=off;&lt;br /&gt;
              errorlevel=16 if already processed, 0 if not.&lt;br /&gt;
&lt;br /&gt;
Codec Specific Options:&lt;br /&gt;
&lt;br /&gt;
-wmalsl       optimise internal settings for WMA Lossless codec; default=off&lt;br /&gt;
&lt;br /&gt;
Advanced / System Options:&lt;br /&gt;
&lt;br /&gt;
-shaping      enable fixed shaping using bit_removal difference of previous&lt;br /&gt;
              samples [value = brd(-1)/4]; default=off&lt;br /&gt;
-snr &amp;lt;n&amp;gt;      set minimum average signal to added noise ratio to n dB;&lt;br /&gt;
              (-215.0dB&amp;lt;=n&amp;lt;=48.0dB) Increasing value reduces bits to remove.&lt;br /&gt;
-skew &amp;lt;n&amp;gt;     skew fft analysis results by n dB (0.0db&amp;lt;=n&amp;lt;=48.0db) in the&lt;br /&gt;
              frequency range 20Hz to 3.45kHz&lt;br /&gt;
-spf &amp;lt;5x5hex&amp;gt; manually input the 5 spreading functions as 5 x 5 characters;&lt;br /&gt;
              These correspond to FFTs of 64, 128, 256, 512 &amp;amp; 1024 samples;&lt;br /&gt;
              e.g. 22235-22236-22347-22358-2246C (Characters must be one of&lt;br /&gt;
              1 to 9 and A to F (zero excluded).&lt;br /&gt;
-fft &amp;lt;5xbin&amp;gt;  select fft lengths to use in analysis, using binary switching,&lt;br /&gt;
              from 64, 128, 256, 512 &amp;amp; 1024 samples, e.g. 01001 = 128,1024&lt;br /&gt;
-cbs &amp;lt;n&amp;gt;      set codec block size to n samples (512&amp;lt;=n&amp;lt;=4608, n mod 32=0)&lt;br /&gt;
&lt;br /&gt;
-quiet        significantly reduce screen output&lt;br /&gt;
-nowarn       suppress lossyWAV warnings&lt;br /&gt;
-detail       enable detailled output mode&lt;br /&gt;
&lt;br /&gt;
-below        set process priority to below normal.&lt;br /&gt;
-low          set process priority to low.&lt;br /&gt;
&lt;br /&gt;
Special thanks:&lt;br /&gt;
&lt;br /&gt;
David Robinson for the method itself and motivation to implement it in Delphi.&lt;br /&gt;
Dr. Jean Debord for the use of TPMAT036 uFFT &amp;amp; uTypes units for FFT analysis.&lt;br /&gt;
Halb27 @ www.hydrogenaudio.org for donation and maintenance of the wavIO unit.&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Indicative Bitrate Reduction==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|+ &#039;&#039;&#039;Conversion using lossyWAV beta v0.5.8, [[Wikipedia:FLAC|FLAC]] -8&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
!lossyWAV Test Set&lt;br /&gt;
!FLAC -8&lt;br /&gt;
!lossyWAV -1&lt;br /&gt;
!lossyWAV -2&lt;br /&gt;
!lossyWAV -3&lt;br /&gt;
|-&lt;br /&gt;
!10 Album Test Average                                &lt;br /&gt;
| 850kbps &lt;br /&gt;
| 480kbps &lt;br /&gt;
| 426kbps &lt;br /&gt;
| 376kbps&lt;br /&gt;
|-&lt;br /&gt;
!53 sample &amp;quot;problem&amp;quot; set                &lt;br /&gt;
| 784kbps &lt;br /&gt;
| 543kbps &lt;br /&gt;
| 491kbps &lt;br /&gt;
| 434kbps&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|+ &#039;&#039;&#039;Large Foobar2000 Conversion: (lossyWAV -3; [[Wikipedia:FLAC|FLAC]] -3 -m -e -r 2 -b 512)&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
!Album&lt;br /&gt;
!FLAC -8&lt;br /&gt;
!lossyWAV -1&lt;br /&gt;
!lossyWAV -2&lt;br /&gt;
!lossyWAV -3&lt;br /&gt;
|-&lt;br /&gt;
!3283 Tracks; 258 Discs; 87.2GB&amp;gt;36.8GB  &lt;br /&gt;
| 880kbps &lt;br /&gt;
| N/A &lt;br /&gt;
| N/A&lt;br /&gt;
| 371kbps &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Example Foobar2000 Converter Settings==&lt;br /&gt;
[[Image:Foobar2000_Converter_Settings.PNG]]&lt;br /&gt;
&lt;br /&gt;
Example flossy.bat file called from above converter settings.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@echo off&lt;br /&gt;
c:\data_nic\bin\lossyWAV %1 %3 %4 %5 %6 %7 %8 %9 -below -nowarn -quiet&lt;br /&gt;
c:\data_nic\bin\flac.exe -8 -f -b 512 &amp;quot;%~N1.lossy.wav&amp;quot; -o&amp;quot;%~N2.flac&amp;quot; &lt;br /&gt;
del &amp;quot;%~N1.lossy.wav&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Frequently asked questions==&lt;br /&gt;
*&#039;&#039;&#039;Question:&#039;&#039;&#039; Is it [[Variable Bitrate|VBR]]?&lt;br /&gt;
*&#039;&#039;&#039;Short answer:&#039;&#039;&#039; Yes.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Question:&#039;&#039;&#039; Is it [[transparency|transparent]]?&lt;br /&gt;
*&#039;&#039;&#039;Short answer:&#039;&#039;&#039; Almost certainly.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Question:&#039;&#039;&#039; Is it [[lossless]]?&lt;br /&gt;
*&#039;&#039;&#039;Short answer:&#039;&#039;&#039; No.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Question:&#039;&#039;&#039; Why should I use this?&lt;br /&gt;
*&#039;&#039;&#039;Answer:&#039;&#039;&#039;&lt;br /&gt;
:*high quality&lt;br /&gt;
:*extremely low chance of audible [[artifact|artefacts]]&lt;br /&gt;
:*reasonable [[bitrate]]s&lt;br /&gt;
:*usable with unmodified, established lossless formats.&lt;br /&gt;
&lt;br /&gt;
==Current Test Settings==&lt;br /&gt;
No current test settings&lt;br /&gt;
&lt;br /&gt;
==External links==&lt;br /&gt;
*[http://www.hydrogenaudio.org/forums/index.php?showtopic=56129 Current development thread] You will find the latest version and last stable version in post #1 of this thread.&lt;br /&gt;
*[http://www.hydrogenaudio.org/forums/index.php?showtopic=55522&amp;amp;st=0 Original lossyFLAC thread] Where David Robinson (Replaygain developer) introduces the method and a Matlab implementation.&lt;/div&gt;</summary>
		<author><name>Halb27</name></author>
	</entry>
	<entry>
		<id>https://wiki.hydrogenaudio.org/index.php?title=LossyWAV&amp;diff=18099</id>
		<title>LossyWAV</title>
		<link rel="alternate" type="text/html" href="https://wiki.hydrogenaudio.org/index.php?title=LossyWAV&amp;diff=18099"/>
		<updated>2008-01-03T20:48:14Z</updated>

		<summary type="html">&lt;p&gt;Halb27: /* Presets */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Software Infobox&lt;br /&gt;
| name = lossyWAV&lt;br /&gt;
| screenshot = &lt;br /&gt;
| caption = &lt;br /&gt;
| maintainer = [http://www.hydrogenaudio.org/forums/index.php?showuser=42400 Nick.C]&lt;br /&gt;
| stable_release = beta v0.6.1&lt;br /&gt;
| preview_release = &lt;br /&gt;
| operating_system = [[Wikipedia:MS-DOS|MS-DOS]]&lt;br /&gt;
| use = [[Wikipedia:Digital signal processing|Digital signal processing]]&lt;br /&gt;
| license = [[Wikipedia:LGPL|LGPL license]]&lt;br /&gt;
| website = [http://www.hydrogenaudio.org/forums/index.php?showtopic=56129 Hydrogenaudio]&lt;br /&gt;
}}&lt;br /&gt;
lossyWAV is a lossy pre-processor for [[PCM]] audio contained in the [[WAV]] file format. It reduces [[Wikipedia:Audio bit depth|bit depth]] of the input signal, which, when used in conjunction with certain lossless codecs, reduces the bitrate of the encoded file significantly compared to unpreprocessed compression. &lt;br /&gt;
lossyWAV&#039;s primary goal is to maintain [[transparency]] with a high degree of confidence when processing any audio data.&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
lossyFLAC is an idea started by [http://www.hydrogenaudio.org/forums/index.php?showuser=409 2Bdecided] at hydrogenaudio, utilising the wasted bits feature of the FLAC lossless codec with the aim of transparently reducing audio bit depth (making some lower significant bits (LSB&#039;s) zero), consequently taking advantage of FLAC&#039;s detection of consistently zeroed lower significant bits within each single frame and significantly increasing coding efficiency.[http://www.hydrogenaudio.org/forums/index.php?s=&amp;amp;showtopic=55522&amp;amp;view=findpost&amp;amp;p=498179] In this way the user can enjoy audio encoded using the same codec (which may be all important from a hardware compatibility perspective) at a reduced bitrate compared to the lossless version.&lt;br /&gt;
&lt;br /&gt;
[http://www.hydrogenaudio.org/forums/index.php?showuser=42400 Nick.C] ported the original [[Wikipedia:MATLAB|MATLAB]] implementation to [[Wikipedia:Borland Delphi|Delphi]] (Many thanks [[Wikipedia:CodeGear|CodeGear]] for Turbo Explorer!!) with a liberal sprinkling of [[Wikipedia:IA-32|IA-32]] and [[Wikipedia:x87|x87]] Assembly Language for speed.&lt;br /&gt;
&lt;br /&gt;
Subsequently, lossyFLAC proved itself to work with other lossless codecs, so the application name was changed to lossyWAV. &lt;br /&gt;
&lt;br /&gt;
Since then, Nick.C has heavily developed and built upon lossyWAV, with valuable tuning performed by [http://www.hydrogenaudio.org/forums/index.php?showuser=25015 halb27] at hydrogenaudio.&lt;br /&gt;
&lt;br /&gt;
==File Identification==&lt;br /&gt;
lossyWAV-processed WAV files are named with a double filename extension, .lossy.wav, to make them instantly identifiable. e.g. &amp;quot;.lossy.flac&amp;quot; would indicate an audio file which was processed using lossyWAV, and subsequently encoded using FLAC.[http://www.hydrogenaudio.org/forums/index.php?s=&amp;amp;showtopic=55522&amp;amp;view=findpost&amp;amp;p=498559]&lt;br /&gt;
&lt;br /&gt;
From beta v0.6.1, the -correction parameter is used when processing to create a correction file which is named with the .lwcdf.wav double filename extension. When &amp;quot;added&amp;quot; to the corresponding .lossy.wav, using a not yet implemented parameter of lossyWAV, the original file will be reconstituted.&lt;br /&gt;
&lt;br /&gt;
Combinations of lossyWAV with each specific encoder are referred to as lossy&#039;&#039;&#039;X&#039;&#039;&#039;, where &#039;&#039;&#039;X&#039;&#039;&#039; is an abbreviation of the lossless codec name. Combination names are listed in the &amp;quot;[[LossyWAV#Known supported codecs|known supported codecs]]&amp;quot; section below.&lt;br /&gt;
&lt;br /&gt;
From v0.5.9, lossyWAV inserts a variable length FACT chunk into the WAV file immediately after the FMT chunk. This takes the form:&amp;lt;pre&amp;gt;fact/&amp;lt;size&amp;gt;/lossyWAV beta vx.y.z : dd/mm/yyyy hh:mm:ss&lt;br /&gt;
-2 -cbs 512 -nts 0.00 -snr 21.00 -skew 36.00&lt;br /&gt;
-spf 22224-22235-22336-12347-12358 -fft 10101&amp;lt;/pre&amp;gt;Where the version, date &amp;amp; time and user settings are copied. Additionally, if a lossyWAV FACT chunk is found in a file, the processing will be halted (exit code = 16) to prevent re-processing of an already processed file.&lt;br /&gt;
&lt;br /&gt;
The -check parameter can be used to determine whether a file has previously been processed without trying to process it, exit code = 16 if already processed; exit code = 0 if not.&lt;br /&gt;
&lt;br /&gt;
==Presets==&lt;br /&gt;
*-1: Highest quality preset, disc space-saving alternative to lossless archiving for large audio collections.&lt;br /&gt;
*-2: Default preset; a compromise between -1 and -3.&lt;br /&gt;
*-3: High quality preset for usage on a compatible [[Wikipedia:Digital audio player|DAP]], approx. 370kbps for &amp;quot;normal&amp;quot; music. [http://www.hydrogenaudio.org/forums/index.php?s=&amp;amp;showtopic=56129&amp;amp;view=findpost&amp;amp;p=531316] &lt;br /&gt;
&lt;br /&gt;
All tuning has been performed on quality preset -3 with -2 and -1 being more conservative. Quality preset -3 is generally accepted to be (and from testing so far is) transparent. If you find a track which -3 fails to achieve transparency after processing, please post a sample (no more than 30 seconds) in the development thread.&lt;br /&gt;
&lt;br /&gt;
Apart from the quality presets the -nts (noise threshold shift) parameter is the most important parameter to control quality. Without threshold shifting (-nts 0) the number of bits to be removed is computed in a theoretically optimal way. -nts 0 is defaulted with quality preset -2.&lt;br /&gt;
&lt;br /&gt;
In order to be more cautious a negative -nts value can be chosen up to -48. -nts -3 is defaulted when using quality preset -1, but especially for archiving purposes even more conservative values maybe welcome for the very cautious user.&lt;br /&gt;
&lt;br /&gt;
Because of internal precautions in addition to 2BDecided&#039;s principles experience so far tells us that a small positive -nts value doesn&#039;t keep the encodings from being transparent. That&#039;s why -nts 3 is defaulted when using quality preset -3, but a more aggressive value may be welcome for a user who wants to keep average bitrate down a bit more. The higher the -nts value however the more probabable is the arrival of a situation where lossyWAV isn&#039;t transparent any more. An -nts value of more than 10 is not recommended though even with such a value transparency is achieved most usually.&lt;br /&gt;
&lt;br /&gt;
==Supported input formats==&lt;br /&gt;
*[[WAV]]: 16-bit, 24-bit; sample rate &amp;amp;ge; 32kHz [[Pulse Code Modulation|PCM]]. Very high sample rates (&amp;amp;gt;48kHz) have not been extensively tested. Tunings have been focussed on 16-bit, 44.1kHz samples (i.e. [[Wikipedia:Red Book (audio CD standard)|CD]] PCM).&lt;br /&gt;
&lt;br /&gt;
==Codec Compatibility==&lt;br /&gt;
===Known supported codecs===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|+ &#039;&#039;&#039;Recommended settings&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
!Codec&lt;br /&gt;
!lossyWAV parameters&lt;br /&gt;
!Encoder parameters&lt;br /&gt;
!Combination name&lt;br /&gt;
|-&lt;br /&gt;
![[Free Lossless Audio Codec|FLAC]]&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| -&#039;&#039;&#039;3&#039;&#039;&#039; -&#039;&#039;&#039;m&#039;&#039;&#039; -&#039;&#039;&#039;e&#039;&#039;&#039; -&#039;&#039;&#039;r&#039;&#039;&#039; 2 -&#039;&#039;&#039;b&#039;&#039;&#039; 512 --&#039;&#039;&#039;keep-foreign-metadata&#039;&#039;&#039;[http://www.hydrogenaudio.org/forums/index.php?s=&amp;amp;showtopic=56129&amp;amp;view=findpost&amp;amp;p=533689]&lt;br /&gt;
|lossy&#039;&#039;&#039;FLAC&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
![[Wikipedia:Lossless Predictive Audio Compression|LPAC]]&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| -&#039;&#039;&#039;b&#039;&#039;&#039;512&lt;br /&gt;
|lossy&#039;&#039;&#039;LPAC&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
![[Wikipedia:Audio Lossless Coding|MPEG-4 ALS]]&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| -&#039;&#039;&#039;l&#039;&#039;&#039; -&#039;&#039;&#039;n&#039;&#039;&#039;512&lt;br /&gt;
|lossy&#039;&#039;&#039;ALS&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
![[TAK]]&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| -&#039;&#039;&#039;fsl&#039;&#039;&#039;512&lt;br /&gt;
|lossy&#039;&#039;&#039;TAK&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
![[WavPack]]&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| --&#039;&#039;&#039;blocksize&#039;&#039;&#039;=512&lt;br /&gt;
|lossy&#039;&#039;&#039;WV&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
![[Wikipedia:Windows Media Audio#Windows Media Audio Lossless|WMA Lossless]]&lt;br /&gt;
| -&#039;&#039;&#039;wmalsl&#039;&#039;&#039; (same as -&#039;&#039;&#039;cbs&#039;&#039;&#039; 2048)&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
|lossy&#039;&#039;&#039;WMALSL&#039;&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
There is also [http://www.hometheaterhifi.com/volume_8_4/dvd-benchmark-part-6-dvd-audio-11-2001.html#Meridian%20Lossless%20Packing%20(MLP)%20in%20a%20Nutshell evidence] &amp;amp;mdash; so-called &amp;quot;Bit Shifting&amp;quot; &amp;amp;mdash; to suggest that lossyWAV may work with [[Wikipedia:Meridian Lossless Packing|MLP]], but this remains untested due to prohibitive prices of encoders.&lt;br /&gt;
&lt;br /&gt;
A comparison of portable media players is [[Wikipedia:Comparison of portable media players#Audio Formats|here]], which shows FLAC and WMA Lossless compatibility among listed players.&lt;br /&gt;
Any player supported by [http://www.rockbox.org Rockbox] can use FLAC or wavPack files after installing Rockbox.&lt;br /&gt;
&lt;br /&gt;
===Known unsupported codecs===&lt;br /&gt;
*[[ALAC]]&lt;br /&gt;
*[[Lossless Audio|LA]]&lt;br /&gt;
*[[Monkey&#039;s Audio]]&lt;br /&gt;
*[[OptimFROG]]&lt;br /&gt;
*[[TTA]]&lt;br /&gt;
&lt;br /&gt;
==lossyWAV application settings==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
lossyWAV beta v0.6.0 : WAV file bit depth reduction method by 2Bdecided.&lt;br /&gt;
Delphi implementation by Nick.C from a Matlab script, www.hydrogenaudio.org&lt;br /&gt;
&lt;br /&gt;
Usage   : lossyWAV &amp;lt;input wav file&amp;gt; &amp;lt;options&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example : lossyWAV musicfile.wav&lt;br /&gt;
&lt;br /&gt;
Quality Options:&lt;br /&gt;
&lt;br /&gt;
-1            extreme settings [4xFFT] (-cbs 512 -nts -3.0 -skew 36 -snr 21&lt;br /&gt;
              -spf 22224-22225-11235-11246-12358 -fft 11011)&lt;br /&gt;
-2            default settings [3xFFT] (-cbs 512 -nts  0.0 -skew 36 -snr 21&lt;br /&gt;
              -spf 22224-22235-22346-12347-12358 -fft 10101)&lt;br /&gt;
-3            compact settings [2xFFT] (-cbs 512 -nts +3.0 -skew 36 -snr 21&lt;br /&gt;
              -spf 22224-22235-22347-22358-2246C -fft 10001)&lt;br /&gt;
&lt;br /&gt;
Standard Options:&lt;br /&gt;
&lt;br /&gt;
-o &amp;lt;folder&amp;gt;   destination folder for the output file&lt;br /&gt;
-nts &amp;lt;n&amp;gt;      set noise_threshold_shift to n dB (-48.0dB&amp;lt;=n&amp;lt;=+48.0dB)&lt;br /&gt;
              (-ve values reduce bits to remove, +ve values increase)&lt;br /&gt;
-force        forcibly over-write output file if it exists; default=off&lt;br /&gt;
-check        check if WAV file has already been processed. default=off;&lt;br /&gt;
              errorlevel=16 if already processed, 0 if not.&lt;br /&gt;
&lt;br /&gt;
Codec Specific Options:&lt;br /&gt;
&lt;br /&gt;
-wmalsl       optimise internal settings for WMA Lossless codec; default=off&lt;br /&gt;
&lt;br /&gt;
Advanced / System Options:&lt;br /&gt;
&lt;br /&gt;
-shaping      enable fixed shaping using bit_removal difference of previous&lt;br /&gt;
              samples [value = brd(-1)/4]; default=off&lt;br /&gt;
-snr &amp;lt;n&amp;gt;      set minimum average signal to added noise ratio to n dB;&lt;br /&gt;
              (-215.0dB&amp;lt;=n&amp;lt;=48.0dB) Increasing value reduces bits to remove.&lt;br /&gt;
-skew &amp;lt;n&amp;gt;     skew fft analysis results by n dB (0.0db&amp;lt;=n&amp;lt;=48.0db) in the&lt;br /&gt;
              frequency range 20Hz to 3.45kHz&lt;br /&gt;
-spf &amp;lt;5x5hex&amp;gt; manually input the 5 spreading functions as 5 x 5 characters;&lt;br /&gt;
              These correspond to FFTs of 64, 128, 256, 512 &amp;amp; 1024 samples;&lt;br /&gt;
              e.g. 22235-22236-22347-22358-2246C (Characters must be one of&lt;br /&gt;
              1 to 9 and A to F (zero excluded).&lt;br /&gt;
-fft &amp;lt;5xbin&amp;gt;  select fft lengths to use in analysis, using binary switching,&lt;br /&gt;
              from 64, 128, 256, 512 &amp;amp; 1024 samples, e.g. 01001 = 128,1024&lt;br /&gt;
-cbs &amp;lt;n&amp;gt;      set codec block size to n samples (512&amp;lt;=n&amp;lt;=4608, n mod 32=0)&lt;br /&gt;
&lt;br /&gt;
-quiet        significantly reduce screen output&lt;br /&gt;
-nowarn       suppress lossyWAV warnings&lt;br /&gt;
-detail       enable detailled output mode&lt;br /&gt;
&lt;br /&gt;
-below        set process priority to below normal.&lt;br /&gt;
-low          set process priority to low.&lt;br /&gt;
&lt;br /&gt;
Special thanks:&lt;br /&gt;
&lt;br /&gt;
David Robinson for the method itself and motivation to implement it in Delphi.&lt;br /&gt;
Dr. Jean Debord for the use of TPMAT036 uFFT &amp;amp; uTypes units for FFT analysis.&lt;br /&gt;
Halb27 @ www.hydrogenaudio.org for donation and maintenance of the wavIO unit.&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Indicative Bitrate Reduction==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|+ &#039;&#039;&#039;Conversion using lossyWAV beta v0.5.8, [[Wikipedia:FLAC|FLAC]] -8&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
!lossyWAV Test Set&lt;br /&gt;
!FLAC -8&lt;br /&gt;
!lossyWAV -1&lt;br /&gt;
!lossyWAV -2&lt;br /&gt;
!lossyWAV -3&lt;br /&gt;
|-&lt;br /&gt;
!10 Album Test Average                                &lt;br /&gt;
| 850kbps &lt;br /&gt;
| 480kbps &lt;br /&gt;
| 426kbps &lt;br /&gt;
| 376kbps&lt;br /&gt;
|-&lt;br /&gt;
!53 sample &amp;quot;problem&amp;quot; set                &lt;br /&gt;
| 784kbps &lt;br /&gt;
| 543kbps &lt;br /&gt;
| 491kbps &lt;br /&gt;
| 434kbps&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|+ &#039;&#039;&#039;Large Foobar2000 Conversion: (lossyWAV -3; [[Wikipedia:FLAC|FLAC]] -3 -m -e -r 2 -b 512)&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
!Album&lt;br /&gt;
!FLAC -8&lt;br /&gt;
!lossyWAV -1&lt;br /&gt;
!lossyWAV -2&lt;br /&gt;
!lossyWAV -3&lt;br /&gt;
|-&lt;br /&gt;
!3283 Tracks; 258 Discs; 87.2GB&amp;gt;36.8GB  &lt;br /&gt;
| 880kbps &lt;br /&gt;
| N/A &lt;br /&gt;
| N/A&lt;br /&gt;
| 371kbps &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Example Foobar2000 Converter Settings==&lt;br /&gt;
[[Image:Foobar2000_Converter_Settings.PNG]]&lt;br /&gt;
&lt;br /&gt;
Example flossy.bat file called from above converter settings.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@echo off&lt;br /&gt;
c:\data_nic\bin\lossyWAV %1 %3 %4 %5 %6 %7 %8 %9 -below -nowarn -quiet&lt;br /&gt;
c:\data_nic\bin\flac.exe -8 -f -b 512 &amp;quot;%~N1.lossy.wav&amp;quot; -o&amp;quot;%~N2.flac&amp;quot; &lt;br /&gt;
del &amp;quot;%~N1.lossy.wav&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Frequently asked questions==&lt;br /&gt;
*&#039;&#039;&#039;Question:&#039;&#039;&#039; Is it [[Variable Bitrate|VBR]]?&lt;br /&gt;
*&#039;&#039;&#039;Short answer:&#039;&#039;&#039; Yes.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Question:&#039;&#039;&#039; Is it [[transparency|transparent]]?&lt;br /&gt;
*&#039;&#039;&#039;Short answer:&#039;&#039;&#039; Almost certainly.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Question:&#039;&#039;&#039; Is it [[lossless]]?&lt;br /&gt;
*&#039;&#039;&#039;Short answer:&#039;&#039;&#039; No.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Question:&#039;&#039;&#039; Why should I use this?&lt;br /&gt;
*&#039;&#039;&#039;Answer:&#039;&#039;&#039;&lt;br /&gt;
:*high quality&lt;br /&gt;
:*extremely low chance of audible [[artifact|artefacts]]&lt;br /&gt;
:*reasonable [[bitrate]]s&lt;br /&gt;
:*usable with unmodified, established lossless formats.&lt;br /&gt;
&lt;br /&gt;
==Current Test Settings==&lt;br /&gt;
No current test settings&lt;br /&gt;
&lt;br /&gt;
==External links==&lt;br /&gt;
*[http://www.hydrogenaudio.org/forums/index.php?showtopic=56129 Current development thread] You will find the latest version and last stable version in post #1 of this thread.&lt;br /&gt;
*[http://www.hydrogenaudio.org/forums/index.php?showtopic=55522&amp;amp;st=0 Original lossyFLAC thread] Where David Robinson (Replaygain developer) introduces the method and a Matlab implementation.&lt;/div&gt;</summary>
		<author><name>Halb27</name></author>
	</entry>
	<entry>
		<id>https://wiki.hydrogenaudio.org/index.php?title=LossyWAV&amp;diff=18084</id>
		<title>LossyWAV</title>
		<link rel="alternate" type="text/html" href="https://wiki.hydrogenaudio.org/index.php?title=LossyWAV&amp;diff=18084"/>
		<updated>2008-01-03T20:18:40Z</updated>

		<summary type="html">&lt;p&gt;Halb27: /* Known supported codecs */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{title|lossyWAV}}&lt;br /&gt;
{{Codec Infobox&lt;br /&gt;
| name = lossyWAV&lt;br /&gt;
| logo = &lt;br /&gt;
| type = lossy&lt;br /&gt;
| purpose = lossy pre-processor&lt;br /&gt;
| maintainer = [http://www.hydrogenaudio.org/forums/index.php?showuser=42400 Nick.C]&lt;br /&gt;
| recommended_encoder = lossyWAV&lt;br /&gt;
| recommended_text = latest&lt;br /&gt;
| website = [http://www.hydrogenaudio.org/forums/index.php?showtopic=56129 Hydrogenaudio]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
lossyWAV is a lossy pre-processor for audio. It reduces bit depth of the input signal, which, when used in conjunction with certain lossless codecs, reduces the bitrate significantly compared to unpreprocessed compression. lossyWAV&#039;s primary goal is to maintain [[transparency]] with a high degree of confidence when processing any audio data.&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
lossyFLAC is an idea started by [http://www.hydrogenaudio.org/forums/index.php?showuser=409 2Bdecided], utilising the wasted bits feature of the FLAC lossless codec with the aim of transparently reducing audio bit depth (making some lower significant bits (LSB&#039;s) zero), consequently taking advantage of FLAC&#039;s detection of consistently zeroed lower significant bits within each single frame and significantly increasing coding efficiency.[http://www.hydrogenaudio.org/forums/index.php?s=&amp;amp;showtopic=55522&amp;amp;view=findpost&amp;amp;p=498179]&lt;br /&gt;
&lt;br /&gt;
Nick.C ported the original [[Wikipedia:MATLAB|MATLAB]] implementation to [[Wikipedia:Borland Delphi|Delphi]] (Many thanks [[Wikipedia:CodeGear|CodeGear]] for your free Turbo Explorer!!), and lossyFLAC proved itself to work with other lossless codecs, so the application name was changed to lossyWAV. &lt;br /&gt;
&lt;br /&gt;
Since then, Nick.C has heavily developed and built upon lossyWAV, with valuable tuning performed by [http://www.hydrogenaudio.org/forums/index.php?showuser=25015 halb27].&lt;br /&gt;
&lt;br /&gt;
==Naming==&lt;br /&gt;
lossyWAV-processed WAV files are named with a double filename extension, .lossy.wav, to make them instantly identifiable. e.g. &amp;quot;.lossy.flac&amp;quot; would indicate an audio file which was processed using lossyWAV, and subsequently encoded using FLAC.[http://www.hydrogenaudio.org/forums/index.php?s=&amp;amp;showtopic=55522&amp;amp;view=findpost&amp;amp;p=498559]&lt;br /&gt;
&lt;br /&gt;
Combinations of lossyWAV with each specific encoder are referred to as lossy&#039;&#039;&#039;X&#039;&#039;&#039;, where &#039;&#039;&#039;X&#039;&#039;&#039; is an abbreviation of the lossless codec name. Combination names are listed in the &amp;quot;[[LossyWAV#Known supported codecs|known supported codecs]]&amp;quot; section below.&lt;br /&gt;
&lt;br /&gt;
==File Identification==&lt;br /&gt;
From v0.5.9, lossyWAV inserts a variable length FACT chunk immediately after the FMT chunk. This takes the form:&amp;lt;pre&amp;gt;fact/&amp;lt;size&amp;gt;/lossyWAV beta vx.y.z : dd/mm/yyyy hh:mm:ss&lt;br /&gt;
-2 -cbs 512 -nts 0.00 -snr 21.00 -skew 36.00&lt;br /&gt;
-spf 22224-22235-22336-12347-12358 -fft 10101&amp;lt;/pre&amp;gt;Where the version, date &amp;amp; time and user settings are copied. Additionally, if a lossyWAV FACT chunk is found in a file, the processing will be halted (exit code = 16) to prevent re-processing of an already processed file.&lt;br /&gt;
&lt;br /&gt;
The -check parameter can be used to determine whether a file has previously been processed without trying to process it, exit code = 16 if already processed; exit code = 0 if not.&lt;br /&gt;
&lt;br /&gt;
==Presets==&lt;br /&gt;
*-1: Highest quality preset, disc space-saving alternative to lossless archiving for large audio collections.&lt;br /&gt;
*-2: Default preset; a compromise between -1 and -3.&lt;br /&gt;
*-3: High quality preset for usage on a compatible [[Wikipedia:Digital audio player|DAP]], approx. 370kbps for &amp;quot;normal&amp;quot; music. [http://www.hydrogenaudio.org/forums/index.php?s=&amp;amp;showtopic=56129&amp;amp;view=findpost&amp;amp;p=531316] &lt;br /&gt;
&lt;br /&gt;
All tuning has been performed on quality preset -3 with -2 and -1 being more conservative. Quality preset -3 is generally accepted to be (and from testing so far is) transparent. If you find a track which -3 fails to achieve transparency after processing, please post a sample (no more than 30 seconds) in the development thread.&lt;br /&gt;
&lt;br /&gt;
Presets are, of course, not limited to these example uses. Currently, command line parameters exist to allow the user to tune the processing to personal requirements. This may not always be the case.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;It is up to the user to decide which preset to use for their own purposes.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Supported input formats==&lt;br /&gt;
*[[WAV]]: 16-bit, 24-bit; sample rate &amp;amp;ge; 32kHz [[Pulse Code Modulation|PCM]]. Very high sample rates (&amp;amp;gt;48kHz) have not been extensively tested. Tunings have been focussed on 16-bit, 44.1kHz samples (i.e. [[Wikipedia:Red Book (audio CD standard)|CD]] PCM).&lt;br /&gt;
&lt;br /&gt;
==Known supported codecs==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|+ &#039;&#039;&#039;Recommended settings&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
!Codec&lt;br /&gt;
!lossyWAV parameters&lt;br /&gt;
!Encoder parameters&lt;br /&gt;
!Combination name&lt;br /&gt;
|-&lt;br /&gt;
![[Free Lossless Audio Codec|FLAC]]&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| -&#039;&#039;&#039;3&#039;&#039;&#039; -&#039;&#039;&#039;m&#039;&#039;&#039; -&#039;&#039;&#039;e&#039;&#039;&#039; -&#039;&#039;&#039;r&#039;&#039;&#039; 2 -&#039;&#039;&#039;b&#039;&#039;&#039; 512 --&#039;&#039;&#039;keep-foreign-metadata&#039;&#039;&#039;[http://www.hydrogenaudio.org/forums/index.php?s=&amp;amp;showtopic=56129&amp;amp;view=findpost&amp;amp;p=533689]&lt;br /&gt;
|lossy&#039;&#039;&#039;FLAC&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
![[Wikipedia:Lossless Predictive Audio Compression|LPAC]]&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| -&#039;&#039;&#039;b&#039;&#039;&#039;512&lt;br /&gt;
|lossy&#039;&#039;&#039;LPAC&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
![[Wikipedia:Audio Lossless Coding|MPEG-4 ALS]]&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| -&#039;&#039;&#039;l&#039;&#039;&#039; -&#039;&#039;&#039;n&#039;&#039;&#039;512&lt;br /&gt;
|lossy&#039;&#039;&#039;ALS&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
![[TAK]]&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| -&#039;&#039;&#039;fsl&#039;&#039;&#039;512&lt;br /&gt;
|lossy&#039;&#039;&#039;TAK&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
![[WavPack]]&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| --&#039;&#039;&#039;blocksize&#039;&#039;&#039;=512&lt;br /&gt;
|lossy&#039;&#039;&#039;WV&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
![[Wikipedia:Windows Media Audio#Windows Media Audio Lossless|WMA Lossless]]&lt;br /&gt;
| -&#039;&#039;&#039;wmalsl&#039;&#039;&#039; (same as -&#039;&#039;&#039;cbs&#039;&#039;&#039; 2048)&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
|lossy&#039;&#039;&#039;WMALSL&#039;&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
There is also [http://www.hometheaterhifi.com/volume_8_4/dvd-benchmark-part-6-dvd-audio-11-2001.html#Meridian%20Lossless%20Packing%20(MLP)%20in%20a%20Nutshell evidence] &amp;amp;mdash; so-called &amp;quot;Bit Shifting&amp;quot; &amp;amp;mdash; to suggest that lossyWAV may work with [[Wikipedia:Meridian Lossless Packing|MLP]], but this remains untested due to prohibitive prices of encoders.&lt;br /&gt;
&lt;br /&gt;
A comparison of portable media players is [[Wikipedia:Comparison of portable media players#Audio Formats|here]], which shows FLAC and WMA Lossless compatibility among listed players.&lt;br /&gt;
Any player supported by [http://www.rockbox.org Rockbox] can use FLAC or wavPack files after installing Rockbox.&lt;br /&gt;
&lt;br /&gt;
==Known unsupported codecs==&lt;br /&gt;
*[[ALAC]]&lt;br /&gt;
*[[Lossless Audio|LA]]&lt;br /&gt;
*[[Monkey&#039;s Audio]]&lt;br /&gt;
*[[OptimFROG]]&lt;br /&gt;
*[[TTA]]&lt;br /&gt;
&lt;br /&gt;
==lossyWAV application settings==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
lossyWAV beta v0.6.0 : WAV file bit depth reduction method by 2Bdecided.&lt;br /&gt;
Delphi implementation by Nick.C from a Matlab script, www.hydrogenaudio.org&lt;br /&gt;
&lt;br /&gt;
Usage   : lossyWAV &amp;lt;input wav file&amp;gt; &amp;lt;options&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example : lossyWAV musicfile.wav&lt;br /&gt;
&lt;br /&gt;
Quality Options:&lt;br /&gt;
&lt;br /&gt;
-1            extreme settings [4xFFT] (-cbs 512 -nts -3.0 -skew 36 -snr 21&lt;br /&gt;
              -spf 22224-22225-11235-11246-12358 -fft 11011)&lt;br /&gt;
-2            default settings [3xFFT] (-cbs 512 -nts  0.0 -skew 36 -snr 21&lt;br /&gt;
              -spf 22224-22235-22346-12347-12358 -fft 10101)&lt;br /&gt;
-3            compact settings [2xFFT] (-cbs 512 -nts +3.0 -skew 36 -snr 21&lt;br /&gt;
              -spf 22224-22235-22347-22358-2246C -fft 10001)&lt;br /&gt;
&lt;br /&gt;
Standard Options:&lt;br /&gt;
&lt;br /&gt;
-o &amp;lt;folder&amp;gt;   destination folder for the output file&lt;br /&gt;
-nts &amp;lt;n&amp;gt;      set noise_threshold_shift to n dB (-48.0dB&amp;lt;=n&amp;lt;=+48.0dB)&lt;br /&gt;
              (-ve values reduce bits to remove, +ve values increase)&lt;br /&gt;
-force        forcibly over-write output file if it exists; default=off&lt;br /&gt;
-check        check if WAV file has already been processed. default=off;&lt;br /&gt;
              errorlevel=16 if already processed, 0 if not.&lt;br /&gt;
&lt;br /&gt;
Codec Specific Options:&lt;br /&gt;
&lt;br /&gt;
-wmalsl       optimise internal settings for WMA Lossless codec; default=off&lt;br /&gt;
&lt;br /&gt;
Advanced / System Options:&lt;br /&gt;
&lt;br /&gt;
-shaping      enable fixed shaping using bit_removal difference of previous&lt;br /&gt;
              samples [value = brd(-1)/4]; default=off&lt;br /&gt;
-snr &amp;lt;n&amp;gt;      set minimum average signal to added noise ratio to n dB;&lt;br /&gt;
              (-215.0dB&amp;lt;=n&amp;lt;=48.0dB) Increasing value reduces bits to remove.&lt;br /&gt;
-skew &amp;lt;n&amp;gt;     skew fft analysis results by n dB (0.0db&amp;lt;=n&amp;lt;=48.0db) in the&lt;br /&gt;
              frequency range 20Hz to 3.45kHz&lt;br /&gt;
-spf &amp;lt;5x5hex&amp;gt; manually input the 5 spreading functions as 5 x 5 characters;&lt;br /&gt;
              These correspond to FFTs of 64, 128, 256, 512 &amp;amp; 1024 samples;&lt;br /&gt;
              e.g. 22235-22236-22347-22358-2246C (Characters must be one of&lt;br /&gt;
              1 to 9 and A to F (zero excluded).&lt;br /&gt;
-fft &amp;lt;5xbin&amp;gt;  select fft lengths to use in analysis, using binary switching,&lt;br /&gt;
              from 64, 128, 256, 512 &amp;amp; 1024 samples, e.g. 01001 = 128,1024&lt;br /&gt;
-cbs &amp;lt;n&amp;gt;      set codec block size to n samples (512&amp;lt;=n&amp;lt;=4608, n mod 32=0)&lt;br /&gt;
&lt;br /&gt;
-quiet        significantly reduce screen output&lt;br /&gt;
-nowarn       suppress lossyWAV warnings&lt;br /&gt;
-detail       enable detailled output mode&lt;br /&gt;
&lt;br /&gt;
-below        set process priority to below normal.&lt;br /&gt;
-low          set process priority to low.&lt;br /&gt;
&lt;br /&gt;
Special thanks:&lt;br /&gt;
&lt;br /&gt;
David Robinson for the method itself and motivation to implement it in Delphi.&lt;br /&gt;
Dr. Jean Debord for the use of TPMAT036 uFFT &amp;amp; uTypes units for FFT analysis.&lt;br /&gt;
Halb27 @ www.hydrogenaudio.org for donation and maintenance of the wavIO unit.&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Indicative Bitrate Reduction==&lt;br /&gt;
&lt;br /&gt;
Conversion using lossyWAV beta v0.5.8, FLAC -8&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
|=======================================|=========|=========|=========|=========|&lt;br /&gt;
|Album                                  | FLAC -8 |  lW -1  |  lW -2  |  lW -3  |&lt;br /&gt;
|=======================================|=========|=========|=========|=========|&lt;br /&gt;
|AC/DC - Dirty Deeds Done Dirt Cheap    | 781kbps | 468kbps | 417kbps | 366kbps |&lt;br /&gt;
|B52&#039;s - Good Stuff                     | 993kbps | 476kbps | 421kbps | 376kbps |&lt;br /&gt;
|David Byrne - Uh-Oh                    | 937kbps | 464kbps | 413kbps | 363kbps |&lt;br /&gt;
|Fish - Songs From The Mirror           | 854kbps | 451kbps | 399kbps | 357kbps |&lt;br /&gt;
|Gerry Rafferty - City To City          | 802kbps | 468kbps | 416kbps | 366kbps |&lt;br /&gt;
|Iron Maiden - Can I Play With Madness  | 784kbps | 486kbps | 437kbps | 387kbps |&lt;br /&gt;
|Jean Michel Jarre - Oxygene            | 773kbps | 538kbps | 475kbps | 422kbps |&lt;br /&gt;
|Marillion - The Thieving Magpie        | 790kbps | 473kbps | 421kbps | 373kbps |&lt;br /&gt;
|Mike Oldfield - Tr3s Lunas             | 848kbps | 491kbps | 436kbps | 389kbps |&lt;br /&gt;
|Scorpions - Best Of Rockers N&#039; Ballads | 922kbps | 492kbps | 437kbps | 378kbps |&lt;br /&gt;
|=======================================|=========|=========|=========|=========|&lt;br /&gt;
|Average                                | 850kbps | 480kbps | 426kbps | 376kbps |&lt;br /&gt;
|=======================================|=========|=========|=========|=========|&lt;br /&gt;
|53 sample &amp;quot;problem&amp;quot; set                | 784kbps | 543kbps | 491kbps | 434kbps |&lt;br /&gt;
|=======================================|=========|=========|=========|=========|&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Large Batch Conversion: (lossyWAV -3; FLAC -3 -m -e -r 2 -b 512)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
|=======================================|=========|=========|=========|=========|&lt;br /&gt;
|3283 Tracks; 258 Discs; 87.2GB&amp;gt;36.8GB  | 880kbps | ###kbps | ###kbps | 371kbps |&lt;br /&gt;
|=======================================|=========|=========|=========|=========|&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Example Foobar2000 Converter Settings==&lt;br /&gt;
[[Image:Foobar2000_Converter_Settings.PNG]]&lt;br /&gt;
&lt;br /&gt;
Example flossy.bat file called from above converter settings.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@echo off&lt;br /&gt;
c:\data_nic\bin\lossyWAV %1 %3 %4 %5 %6 %7 %8 %9 -below -nowarn -quiet&lt;br /&gt;
c:\data_nic\bin\flac.exe -8 -f -b 512 &amp;quot;%~N1.lossy.wav&amp;quot; -o&amp;quot;%~N2.flac&amp;quot; &lt;br /&gt;
del &amp;quot;%~N1.lossy.wav&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Frequently asked questions==&lt;br /&gt;
*&#039;&#039;&#039;Question:&#039;&#039;&#039; Is it [[Variable Bitrate|VBR]]?&lt;br /&gt;
*&#039;&#039;&#039;Short answer:&#039;&#039;&#039; Yes.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Question:&#039;&#039;&#039; Is it [[transparency|transparent]]?&lt;br /&gt;
*&#039;&#039;&#039;Short answer:&#039;&#039;&#039; Almost certainly.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Question:&#039;&#039;&#039; Is it [[lossless]]?&lt;br /&gt;
*&#039;&#039;&#039;Short answer:&#039;&#039;&#039; No.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Question:&#039;&#039;&#039; Why should I use this?&lt;br /&gt;
*&#039;&#039;&#039;Answer:&#039;&#039;&#039;&lt;br /&gt;
:*high quality&lt;br /&gt;
:*extremely low chance of audible [[artifact|artefacts]]&lt;br /&gt;
:*reasonable [[bitrate]]s&lt;br /&gt;
:*usable with unmodified, established lossless formats.&lt;br /&gt;
&lt;br /&gt;
==Current Test Settings==&lt;br /&gt;
No current test settings&lt;br /&gt;
&lt;br /&gt;
==External links==&lt;br /&gt;
*[http://www.hydrogenaudio.org/forums/index.php?showtopic=56129 Current development thread] You will find the latest version and last stable version in post #1 of this thread.&lt;br /&gt;
*[http://www.hydrogenaudio.org/forums/index.php?showtopic=55522&amp;amp;st=0 Original lossyFLAC thread] Where David Robinson (Replaygain developer) introduces the method and a Matlab implementation.&lt;/div&gt;</summary>
		<author><name>Halb27</name></author>
	</entry>
	<entry>
		<id>https://wiki.hydrogenaudio.org/index.php?title=LossyWAV&amp;diff=18083</id>
		<title>LossyWAV</title>
		<link rel="alternate" type="text/html" href="https://wiki.hydrogenaudio.org/index.php?title=LossyWAV&amp;diff=18083"/>
		<updated>2008-01-03T20:17:49Z</updated>

		<summary type="html">&lt;p&gt;Halb27: /* Known supported codecs */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{title|lossyWAV}}&lt;br /&gt;
{{Codec Infobox&lt;br /&gt;
| name = lossyWAV&lt;br /&gt;
| logo = &lt;br /&gt;
| type = lossy&lt;br /&gt;
| purpose = lossy pre-processor&lt;br /&gt;
| maintainer = [http://www.hydrogenaudio.org/forums/index.php?showuser=42400 Nick.C]&lt;br /&gt;
| recommended_encoder = lossyWAV&lt;br /&gt;
| recommended_text = latest&lt;br /&gt;
| website = [http://www.hydrogenaudio.org/forums/index.php?showtopic=56129 Hydrogenaudio]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
lossyWAV is a lossy pre-processor for audio. It reduces bit depth of the input signal, which, when used in conjunction with certain lossless codecs, reduces the bitrate significantly compared to unpreprocessed compression. lossyWAV&#039;s primary goal is to maintain [[transparency]] with a high degree of confidence when processing any audio data.&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
lossyFLAC is an idea started by [http://www.hydrogenaudio.org/forums/index.php?showuser=409 2Bdecided], utilising the wasted bits feature of the FLAC lossless codec with the aim of transparently reducing audio bit depth (making some lower significant bits (LSB&#039;s) zero), consequently taking advantage of FLAC&#039;s detection of consistently zeroed lower significant bits within each single frame and significantly increasing coding efficiency.[http://www.hydrogenaudio.org/forums/index.php?s=&amp;amp;showtopic=55522&amp;amp;view=findpost&amp;amp;p=498179]&lt;br /&gt;
&lt;br /&gt;
Nick.C ported the original [[Wikipedia:MATLAB|MATLAB]] implementation to [[Wikipedia:Borland Delphi|Delphi]] (Many thanks [[Wikipedia:CodeGear|CodeGear]] for your free Turbo Explorer!!), and lossyFLAC proved itself to work with other lossless codecs, so the application name was changed to lossyWAV. &lt;br /&gt;
&lt;br /&gt;
Since then, Nick.C has heavily developed and built upon lossyWAV, with valuable tuning performed by [http://www.hydrogenaudio.org/forums/index.php?showuser=25015 halb27].&lt;br /&gt;
&lt;br /&gt;
==Naming==&lt;br /&gt;
lossyWAV-processed WAV files are named with a double filename extension, .lossy.wav, to make them instantly identifiable. e.g. &amp;quot;.lossy.flac&amp;quot; would indicate an audio file which was processed using lossyWAV, and subsequently encoded using FLAC.[http://www.hydrogenaudio.org/forums/index.php?s=&amp;amp;showtopic=55522&amp;amp;view=findpost&amp;amp;p=498559]&lt;br /&gt;
&lt;br /&gt;
Combinations of lossyWAV with each specific encoder are referred to as lossy&#039;&#039;&#039;X&#039;&#039;&#039;, where &#039;&#039;&#039;X&#039;&#039;&#039; is an abbreviation of the lossless codec name. Combination names are listed in the &amp;quot;[[LossyWAV#Known supported codecs|known supported codecs]]&amp;quot; section below.&lt;br /&gt;
&lt;br /&gt;
==File Identification==&lt;br /&gt;
From v0.5.9, lossyWAV inserts a variable length FACT chunk immediately after the FMT chunk. This takes the form:&amp;lt;pre&amp;gt;fact/&amp;lt;size&amp;gt;/lossyWAV beta vx.y.z : dd/mm/yyyy hh:mm:ss&lt;br /&gt;
-2 -cbs 512 -nts 0.00 -snr 21.00 -skew 36.00&lt;br /&gt;
-spf 22224-22235-22336-12347-12358 -fft 10101&amp;lt;/pre&amp;gt;Where the version, date &amp;amp; time and user settings are copied. Additionally, if a lossyWAV FACT chunk is found in a file, the processing will be halted (exit code = 16) to prevent re-processing of an already processed file.&lt;br /&gt;
&lt;br /&gt;
The -check parameter can be used to determine whether a file has previously been processed without trying to process it, exit code = 16 if already processed; exit code = 0 if not.&lt;br /&gt;
&lt;br /&gt;
==Presets==&lt;br /&gt;
*-1: Highest quality preset, disc space-saving alternative to lossless archiving for large audio collections.&lt;br /&gt;
*-2: Default preset; a compromise between -1 and -3.&lt;br /&gt;
*-3: High quality preset for usage on a compatible [[Wikipedia:Digital audio player|DAP]], approx. 370kbps for &amp;quot;normal&amp;quot; music. [http://www.hydrogenaudio.org/forums/index.php?s=&amp;amp;showtopic=56129&amp;amp;view=findpost&amp;amp;p=531316] &lt;br /&gt;
&lt;br /&gt;
All tuning has been performed on quality preset -3 with -2 and -1 being more conservative. Quality preset -3 is generally accepted to be (and from testing so far is) transparent. If you find a track which -3 fails to achieve transparency after processing, please post a sample (no more than 30 seconds) in the development thread.&lt;br /&gt;
&lt;br /&gt;
Presets are, of course, not limited to these example uses. Currently, command line parameters exist to allow the user to tune the processing to personal requirements. This may not always be the case.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;It is up to the user to decide which preset to use for their own purposes.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Supported input formats==&lt;br /&gt;
*[[WAV]]: 16-bit, 24-bit; sample rate &amp;amp;ge; 32kHz [[Pulse Code Modulation|PCM]]. Very high sample rates (&amp;amp;gt;48kHz) have not been extensively tested. Tunings have been focussed on 16-bit, 44.1kHz samples (i.e. [[Wikipedia:Red Book (audio CD standard)|CD]] PCM).&lt;br /&gt;
&lt;br /&gt;
==Known supported codecs==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|+ &#039;&#039;&#039;Recommended settings&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
!Codec&lt;br /&gt;
!lossyWAV parameters&lt;br /&gt;
!Encoder parameters&lt;br /&gt;
!Combination name&lt;br /&gt;
|-&lt;br /&gt;
![[Free Lossless Audio Codec|FLAC]]&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| -&#039;&#039;&#039;3&#039;&#039;&#039; -&#039;&#039;&#039;m&#039;&#039;&#039; -&#039;&#039;&#039;e&#039;&#039;&#039; -&#039;&#039;&#039;r&#039;&#039;&#039; 2 -&#039;&#039;&#039;b&#039;&#039;&#039; 512 --&#039;&#039;&#039;keep-foreign-metadata&#039;&#039;&#039;[http://www.hydrogenaudio.org/forums/index.php?s=&amp;amp;showtopic=56129&amp;amp;view=findpost&amp;amp;p=533689]&lt;br /&gt;
|lossy&#039;&#039;&#039;FLAC&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
![[Wikipedia:Lossless Predictive Audio Compression|LPAC]]&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| -&#039;&#039;&#039;b&#039;&#039;&#039;512&lt;br /&gt;
|lossy&#039;&#039;&#039;LPAC&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
![[Wikipedia:Audio Lossless Coding|MPEG-4 ALS]]&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| -&#039;&#039;&#039;l&#039;&#039;&#039; -&#039;&#039;&#039;n&#039;&#039;&#039;512&lt;br /&gt;
|lossy&#039;&#039;&#039;ALS&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
![[TAK]]&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| -&#039;&#039;&#039;fsl&#039;&#039;&#039;512&lt;br /&gt;
|lossy&#039;&#039;&#039;TAK&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
![[WavPack]]&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| --&#039;&#039;&#039;blocksize&#039;&#039;&#039;=512&lt;br /&gt;
|lossy&#039;&#039;&#039;WV&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
![[Wikipedia:Windows Media Audio#Windows Media Audio Lossless|WMA Lossless]]&lt;br /&gt;
| -&#039;&#039;&#039;wmalsl&#039;&#039;&#039; (same as -&#039;&#039;&#039;cbs&#039;&#039;&#039; 2048)&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
|lossy&#039;&#039;&#039;WMALSL&#039;&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
There is also [http://www.hometheaterhifi.com/volume_8_4/dvd-benchmark-part-6-dvd-audio-11-2001.html#Meridian%20Lossless%20Packing%20(MLP)%20in%20a%20Nutshell evidence] &amp;amp;mdash; so-called &amp;quot;Bit Shifting&amp;quot; &amp;amp;mdash; to suggest that lossyWAV may work with [[Wikipedia:Meridian Lossless Packing|MLP]], but this remains untested due to prohibitive prices of encoders.&lt;br /&gt;
&lt;br /&gt;
A comparison of portable media players is [[Wikipedia:Comparison of portable media players#Audio Formats|here]], which shows FLAC and WMA Lossless compatibility among listed players.&lt;br /&gt;
Any player sopported by [http://www.rockbox.org Rockbox] can use FLAC or wavPack files after installing Rockbox.&lt;br /&gt;
&lt;br /&gt;
==Known unsupported codecs==&lt;br /&gt;
*[[ALAC]]&lt;br /&gt;
*[[Lossless Audio|LA]]&lt;br /&gt;
*[[Monkey&#039;s Audio]]&lt;br /&gt;
*[[OptimFROG]]&lt;br /&gt;
*[[TTA]]&lt;br /&gt;
&lt;br /&gt;
==lossyWAV application settings==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
lossyWAV beta v0.6.0 : WAV file bit depth reduction method by 2Bdecided.&lt;br /&gt;
Delphi implementation by Nick.C from a Matlab script, www.hydrogenaudio.org&lt;br /&gt;
&lt;br /&gt;
Usage   : lossyWAV &amp;lt;input wav file&amp;gt; &amp;lt;options&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example : lossyWAV musicfile.wav&lt;br /&gt;
&lt;br /&gt;
Quality Options:&lt;br /&gt;
&lt;br /&gt;
-1            extreme settings [4xFFT] (-cbs 512 -nts -3.0 -skew 36 -snr 21&lt;br /&gt;
              -spf 22224-22225-11235-11246-12358 -fft 11011)&lt;br /&gt;
-2            default settings [3xFFT] (-cbs 512 -nts  0.0 -skew 36 -snr 21&lt;br /&gt;
              -spf 22224-22235-22346-12347-12358 -fft 10101)&lt;br /&gt;
-3            compact settings [2xFFT] (-cbs 512 -nts +3.0 -skew 36 -snr 21&lt;br /&gt;
              -spf 22224-22235-22347-22358-2246C -fft 10001)&lt;br /&gt;
&lt;br /&gt;
Standard Options:&lt;br /&gt;
&lt;br /&gt;
-o &amp;lt;folder&amp;gt;   destination folder for the output file&lt;br /&gt;
-nts &amp;lt;n&amp;gt;      set noise_threshold_shift to n dB (-48.0dB&amp;lt;=n&amp;lt;=+48.0dB)&lt;br /&gt;
              (-ve values reduce bits to remove, +ve values increase)&lt;br /&gt;
-force        forcibly over-write output file if it exists; default=off&lt;br /&gt;
-check        check if WAV file has already been processed. default=off;&lt;br /&gt;
              errorlevel=16 if already processed, 0 if not.&lt;br /&gt;
&lt;br /&gt;
Codec Specific Options:&lt;br /&gt;
&lt;br /&gt;
-wmalsl       optimise internal settings for WMA Lossless codec; default=off&lt;br /&gt;
&lt;br /&gt;
Advanced / System Options:&lt;br /&gt;
&lt;br /&gt;
-shaping      enable fixed shaping using bit_removal difference of previous&lt;br /&gt;
              samples [value = brd(-1)/4]; default=off&lt;br /&gt;
-snr &amp;lt;n&amp;gt;      set minimum average signal to added noise ratio to n dB;&lt;br /&gt;
              (-215.0dB&amp;lt;=n&amp;lt;=48.0dB) Increasing value reduces bits to remove.&lt;br /&gt;
-skew &amp;lt;n&amp;gt;     skew fft analysis results by n dB (0.0db&amp;lt;=n&amp;lt;=48.0db) in the&lt;br /&gt;
              frequency range 20Hz to 3.45kHz&lt;br /&gt;
-spf &amp;lt;5x5hex&amp;gt; manually input the 5 spreading functions as 5 x 5 characters;&lt;br /&gt;
              These correspond to FFTs of 64, 128, 256, 512 &amp;amp; 1024 samples;&lt;br /&gt;
              e.g. 22235-22236-22347-22358-2246C (Characters must be one of&lt;br /&gt;
              1 to 9 and A to F (zero excluded).&lt;br /&gt;
-fft &amp;lt;5xbin&amp;gt;  select fft lengths to use in analysis, using binary switching,&lt;br /&gt;
              from 64, 128, 256, 512 &amp;amp; 1024 samples, e.g. 01001 = 128,1024&lt;br /&gt;
-cbs &amp;lt;n&amp;gt;      set codec block size to n samples (512&amp;lt;=n&amp;lt;=4608, n mod 32=0)&lt;br /&gt;
&lt;br /&gt;
-quiet        significantly reduce screen output&lt;br /&gt;
-nowarn       suppress lossyWAV warnings&lt;br /&gt;
-detail       enable detailled output mode&lt;br /&gt;
&lt;br /&gt;
-below        set process priority to below normal.&lt;br /&gt;
-low          set process priority to low.&lt;br /&gt;
&lt;br /&gt;
Special thanks:&lt;br /&gt;
&lt;br /&gt;
David Robinson for the method itself and motivation to implement it in Delphi.&lt;br /&gt;
Dr. Jean Debord for the use of TPMAT036 uFFT &amp;amp; uTypes units for FFT analysis.&lt;br /&gt;
Halb27 @ www.hydrogenaudio.org for donation and maintenance of the wavIO unit.&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Indicative Bitrate Reduction==&lt;br /&gt;
&lt;br /&gt;
Conversion using lossyWAV beta v0.5.8, FLAC -8&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
|=======================================|=========|=========|=========|=========|&lt;br /&gt;
|Album                                  | FLAC -8 |  lW -1  |  lW -2  |  lW -3  |&lt;br /&gt;
|=======================================|=========|=========|=========|=========|&lt;br /&gt;
|AC/DC - Dirty Deeds Done Dirt Cheap    | 781kbps | 468kbps | 417kbps | 366kbps |&lt;br /&gt;
|B52&#039;s - Good Stuff                     | 993kbps | 476kbps | 421kbps | 376kbps |&lt;br /&gt;
|David Byrne - Uh-Oh                    | 937kbps | 464kbps | 413kbps | 363kbps |&lt;br /&gt;
|Fish - Songs From The Mirror           | 854kbps | 451kbps | 399kbps | 357kbps |&lt;br /&gt;
|Gerry Rafferty - City To City          | 802kbps | 468kbps | 416kbps | 366kbps |&lt;br /&gt;
|Iron Maiden - Can I Play With Madness  | 784kbps | 486kbps | 437kbps | 387kbps |&lt;br /&gt;
|Jean Michel Jarre - Oxygene            | 773kbps | 538kbps | 475kbps | 422kbps |&lt;br /&gt;
|Marillion - The Thieving Magpie        | 790kbps | 473kbps | 421kbps | 373kbps |&lt;br /&gt;
|Mike Oldfield - Tr3s Lunas             | 848kbps | 491kbps | 436kbps | 389kbps |&lt;br /&gt;
|Scorpions - Best Of Rockers N&#039; Ballads | 922kbps | 492kbps | 437kbps | 378kbps |&lt;br /&gt;
|=======================================|=========|=========|=========|=========|&lt;br /&gt;
|Average                                | 850kbps | 480kbps | 426kbps | 376kbps |&lt;br /&gt;
|=======================================|=========|=========|=========|=========|&lt;br /&gt;
|53 sample &amp;quot;problem&amp;quot; set                | 784kbps | 543kbps | 491kbps | 434kbps |&lt;br /&gt;
|=======================================|=========|=========|=========|=========|&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Large Batch Conversion: (lossyWAV -3; FLAC -3 -m -e -r 2 -b 512)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
|=======================================|=========|=========|=========|=========|&lt;br /&gt;
|3283 Tracks; 258 Discs; 87.2GB&amp;gt;36.8GB  | 880kbps | ###kbps | ###kbps | 371kbps |&lt;br /&gt;
|=======================================|=========|=========|=========|=========|&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Example Foobar2000 Converter Settings==&lt;br /&gt;
[[Image:Foobar2000_Converter_Settings.PNG]]&lt;br /&gt;
&lt;br /&gt;
Example flossy.bat file called from above converter settings.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@echo off&lt;br /&gt;
c:\data_nic\bin\lossyWAV %1 %3 %4 %5 %6 %7 %8 %9 -below -nowarn -quiet&lt;br /&gt;
c:\data_nic\bin\flac.exe -8 -f -b 512 &amp;quot;%~N1.lossy.wav&amp;quot; -o&amp;quot;%~N2.flac&amp;quot; &lt;br /&gt;
del &amp;quot;%~N1.lossy.wav&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Frequently asked questions==&lt;br /&gt;
*&#039;&#039;&#039;Question:&#039;&#039;&#039; Is it [[Variable Bitrate|VBR]]?&lt;br /&gt;
*&#039;&#039;&#039;Short answer:&#039;&#039;&#039; Yes.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Question:&#039;&#039;&#039; Is it [[transparency|transparent]]?&lt;br /&gt;
*&#039;&#039;&#039;Short answer:&#039;&#039;&#039; Almost certainly.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Question:&#039;&#039;&#039; Is it [[lossless]]?&lt;br /&gt;
*&#039;&#039;&#039;Short answer:&#039;&#039;&#039; No.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Question:&#039;&#039;&#039; Why should I use this?&lt;br /&gt;
*&#039;&#039;&#039;Answer:&#039;&#039;&#039;&lt;br /&gt;
:*high quality&lt;br /&gt;
:*extremely low chance of audible [[artifact|artefacts]]&lt;br /&gt;
:*reasonable [[bitrate]]s&lt;br /&gt;
:*usable with unmodified, established lossless formats.&lt;br /&gt;
&lt;br /&gt;
==Current Test Settings==&lt;br /&gt;
No current test settings&lt;br /&gt;
&lt;br /&gt;
==External links==&lt;br /&gt;
*[http://www.hydrogenaudio.org/forums/index.php?showtopic=56129 Current development thread] You will find the latest version and last stable version in post #1 of this thread.&lt;br /&gt;
*[http://www.hydrogenaudio.org/forums/index.php?showtopic=55522&amp;amp;st=0 Original lossyFLAC thread] Where David Robinson (Replaygain developer) introduces the method and a Matlab implementation.&lt;/div&gt;</summary>
		<author><name>Halb27</name></author>
	</entry>
	<entry>
		<id>https://wiki.hydrogenaudio.org/index.php?title=LossyWAV&amp;diff=18082</id>
		<title>LossyWAV</title>
		<link rel="alternate" type="text/html" href="https://wiki.hydrogenaudio.org/index.php?title=LossyWAV&amp;diff=18082"/>
		<updated>2008-01-03T20:14:47Z</updated>

		<summary type="html">&lt;p&gt;Halb27: /* Presets */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{title|lossyWAV}}&lt;br /&gt;
{{Codec Infobox&lt;br /&gt;
| name = lossyWAV&lt;br /&gt;
| logo = &lt;br /&gt;
| type = lossy&lt;br /&gt;
| purpose = lossy pre-processor&lt;br /&gt;
| maintainer = [http://www.hydrogenaudio.org/forums/index.php?showuser=42400 Nick.C]&lt;br /&gt;
| recommended_encoder = lossyWAV&lt;br /&gt;
| recommended_text = latest&lt;br /&gt;
| website = [http://www.hydrogenaudio.org/forums/index.php?showtopic=56129 Hydrogenaudio]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
lossyWAV is a lossy pre-processor for audio. It reduces bit depth of the input signal, which, when used in conjunction with certain lossless codecs, reduces the bitrate significantly compared to unpreprocessed compression. lossyWAV&#039;s primary goal is to maintain [[transparency]] with a high degree of confidence when processing any audio data.&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
lossyFLAC is an idea started by [http://www.hydrogenaudio.org/forums/index.php?showuser=409 2Bdecided], utilising the wasted bits feature of the FLAC lossless codec with the aim of transparently reducing audio bit depth (making some lower significant bits (LSB&#039;s) zero), consequently taking advantage of FLAC&#039;s detection of consistently zeroed lower significant bits within each single frame and significantly increasing coding efficiency.[http://www.hydrogenaudio.org/forums/index.php?s=&amp;amp;showtopic=55522&amp;amp;view=findpost&amp;amp;p=498179]&lt;br /&gt;
&lt;br /&gt;
Nick.C ported the original [[Wikipedia:MATLAB|MATLAB]] implementation to [[Wikipedia:Borland Delphi|Delphi]] (Many thanks [[Wikipedia:CodeGear|CodeGear]] for your free Turbo Explorer!!), and lossyFLAC proved itself to work with other lossless codecs, so the application name was changed to lossyWAV. &lt;br /&gt;
&lt;br /&gt;
Since then, Nick.C has heavily developed and built upon lossyWAV, with valuable tuning performed by [http://www.hydrogenaudio.org/forums/index.php?showuser=25015 halb27].&lt;br /&gt;
&lt;br /&gt;
==Naming==&lt;br /&gt;
lossyWAV-processed WAV files are named with a double filename extension, .lossy.wav, to make them instantly identifiable. e.g. &amp;quot;.lossy.flac&amp;quot; would indicate an audio file which was processed using lossyWAV, and subsequently encoded using FLAC.[http://www.hydrogenaudio.org/forums/index.php?s=&amp;amp;showtopic=55522&amp;amp;view=findpost&amp;amp;p=498559]&lt;br /&gt;
&lt;br /&gt;
Combinations of lossyWAV with each specific encoder are referred to as lossy&#039;&#039;&#039;X&#039;&#039;&#039;, where &#039;&#039;&#039;X&#039;&#039;&#039; is an abbreviation of the lossless codec name. Combination names are listed in the &amp;quot;[[LossyWAV#Known supported codecs|known supported codecs]]&amp;quot; section below.&lt;br /&gt;
&lt;br /&gt;
==File Identification==&lt;br /&gt;
From v0.5.9, lossyWAV inserts a variable length FACT chunk immediately after the FMT chunk. This takes the form:&amp;lt;pre&amp;gt;fact/&amp;lt;size&amp;gt;/lossyWAV beta vx.y.z : dd/mm/yyyy hh:mm:ss&lt;br /&gt;
-2 -cbs 512 -nts 0.00 -snr 21.00 -skew 36.00&lt;br /&gt;
-spf 22224-22235-22336-12347-12358 -fft 10101&amp;lt;/pre&amp;gt;Where the version, date &amp;amp; time and user settings are copied. Additionally, if a lossyWAV FACT chunk is found in a file, the processing will be halted (exit code = 16) to prevent re-processing of an already processed file.&lt;br /&gt;
&lt;br /&gt;
The -check parameter can be used to determine whether a file has previously been processed without trying to process it, exit code = 16 if already processed; exit code = 0 if not.&lt;br /&gt;
&lt;br /&gt;
==Presets==&lt;br /&gt;
*-1: Highest quality preset, disc space-saving alternative to lossless archiving for large audio collections.&lt;br /&gt;
*-2: Default preset; a compromise between -1 and -3.&lt;br /&gt;
*-3: High quality preset for usage on a compatible [[Wikipedia:Digital audio player|DAP]], approx. 370kbps for &amp;quot;normal&amp;quot; music. [http://www.hydrogenaudio.org/forums/index.php?s=&amp;amp;showtopic=56129&amp;amp;view=findpost&amp;amp;p=531316] &lt;br /&gt;
&lt;br /&gt;
All tuning has been performed on quality preset -3 with -2 and -1 being more conservative. Quality preset -3 is generally accepted to be (and from testing so far is) transparent. If you find a track which -3 fails to achieve transparency after processing, please post a sample (no more than 30 seconds) in the development thread.&lt;br /&gt;
&lt;br /&gt;
Presets are, of course, not limited to these example uses. Currently, command line parameters exist to allow the user to tune the processing to personal requirements. This may not always be the case.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;It is up to the user to decide which preset to use for their own purposes.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Supported input formats==&lt;br /&gt;
*[[WAV]]: 16-bit, 24-bit; sample rate &amp;amp;ge; 32kHz [[Pulse Code Modulation|PCM]]. Very high sample rates (&amp;amp;gt;48kHz) have not been extensively tested. Tunings have been focussed on 16-bit, 44.1kHz samples (i.e. [[Wikipedia:Red Book (audio CD standard)|CD]] PCM).&lt;br /&gt;
&lt;br /&gt;
==Known supported codecs==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|+ &#039;&#039;&#039;Recommended settings&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
!Codec&lt;br /&gt;
!lossyWAV parameters&lt;br /&gt;
!Encoder parameters&lt;br /&gt;
!Combination name&lt;br /&gt;
|-&lt;br /&gt;
![[Free Lossless Audio Codec|FLAC]]&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| -&#039;&#039;&#039;3&#039;&#039;&#039; -&#039;&#039;&#039;m&#039;&#039;&#039; -&#039;&#039;&#039;e&#039;&#039;&#039; -&#039;&#039;&#039;r&#039;&#039;&#039; 2 -&#039;&#039;&#039;b&#039;&#039;&#039; 512 --&#039;&#039;&#039;keep-foreign-metadata&#039;&#039;&#039;[http://www.hydrogenaudio.org/forums/index.php?s=&amp;amp;showtopic=56129&amp;amp;view=findpost&amp;amp;p=533689]&lt;br /&gt;
|lossy&#039;&#039;&#039;FLAC&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
![[Wikipedia:Lossless Predictive Audio Compression|LPAC]]&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| -&#039;&#039;&#039;b&#039;&#039;&#039;512&lt;br /&gt;
|lossy&#039;&#039;&#039;LPAC&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
![[Wikipedia:Audio Lossless Coding|MPEG-4 ALS]]&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| -&#039;&#039;&#039;l&#039;&#039;&#039; -&#039;&#039;&#039;n&#039;&#039;&#039;512&lt;br /&gt;
|lossy&#039;&#039;&#039;ALS&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
![[TAK]]&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| -&#039;&#039;&#039;fsl&#039;&#039;&#039;512&lt;br /&gt;
|lossy&#039;&#039;&#039;TAK&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
![[WavPack]]&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
| --&#039;&#039;&#039;blocksize&#039;&#039;&#039;=512&lt;br /&gt;
|lossy&#039;&#039;&#039;WV&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
![[Wikipedia:Windows Media Audio#Windows Media Audio Lossless|WMA Lossless]]&lt;br /&gt;
| -&#039;&#039;&#039;wmalsl&#039;&#039;&#039; (same as -&#039;&#039;&#039;cbs&#039;&#039;&#039; 2048)&lt;br /&gt;
| &amp;amp;mdash;&lt;br /&gt;
|lossy&#039;&#039;&#039;WMALSL&#039;&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
There is also [http://www.hometheaterhifi.com/volume_8_4/dvd-benchmark-part-6-dvd-audio-11-2001.html#Meridian%20Lossless%20Packing%20(MLP)%20in%20a%20Nutshell evidence] &amp;amp;mdash; so-called &amp;quot;Bit Shifting&amp;quot; &amp;amp;mdash; to suggest that lossyWAV may work with [[Wikipedia:Meridian Lossless Packing|MLP]], but this remains untested due to prohibitive prices of encoders.&lt;br /&gt;
&lt;br /&gt;
==Known unsupported codecs==&lt;br /&gt;
*[[ALAC]]&lt;br /&gt;
*[[Lossless Audio|LA]]&lt;br /&gt;
*[[Monkey&#039;s Audio]]&lt;br /&gt;
*[[OptimFROG]]&lt;br /&gt;
*[[TTA]]&lt;br /&gt;
&lt;br /&gt;
==lossyWAV application settings==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
lossyWAV beta v0.6.0 : WAV file bit depth reduction method by 2Bdecided.&lt;br /&gt;
Delphi implementation by Nick.C from a Matlab script, www.hydrogenaudio.org&lt;br /&gt;
&lt;br /&gt;
Usage   : lossyWAV &amp;lt;input wav file&amp;gt; &amp;lt;options&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example : lossyWAV musicfile.wav&lt;br /&gt;
&lt;br /&gt;
Quality Options:&lt;br /&gt;
&lt;br /&gt;
-1            extreme settings [4xFFT] (-cbs 512 -nts -3.0 -skew 36 -snr 21&lt;br /&gt;
              -spf 22224-22225-11235-11246-12358 -fft 11011)&lt;br /&gt;
-2            default settings [3xFFT] (-cbs 512 -nts  0.0 -skew 36 -snr 21&lt;br /&gt;
              -spf 22224-22235-22346-12347-12358 -fft 10101)&lt;br /&gt;
-3            compact settings [2xFFT] (-cbs 512 -nts +3.0 -skew 36 -snr 21&lt;br /&gt;
              -spf 22224-22235-22347-22358-2246C -fft 10001)&lt;br /&gt;
&lt;br /&gt;
Standard Options:&lt;br /&gt;
&lt;br /&gt;
-o &amp;lt;folder&amp;gt;   destination folder for the output file&lt;br /&gt;
-nts &amp;lt;n&amp;gt;      set noise_threshold_shift to n dB (-48.0dB&amp;lt;=n&amp;lt;=+48.0dB)&lt;br /&gt;
              (-ve values reduce bits to remove, +ve values increase)&lt;br /&gt;
-force        forcibly over-write output file if it exists; default=off&lt;br /&gt;
-check        check if WAV file has already been processed. default=off;&lt;br /&gt;
              errorlevel=16 if already processed, 0 if not.&lt;br /&gt;
&lt;br /&gt;
Codec Specific Options:&lt;br /&gt;
&lt;br /&gt;
-wmalsl       optimise internal settings for WMA Lossless codec; default=off&lt;br /&gt;
&lt;br /&gt;
Advanced / System Options:&lt;br /&gt;
&lt;br /&gt;
-shaping      enable fixed shaping using bit_removal difference of previous&lt;br /&gt;
              samples [value = brd(-1)/4]; default=off&lt;br /&gt;
-snr &amp;lt;n&amp;gt;      set minimum average signal to added noise ratio to n dB;&lt;br /&gt;
              (-215.0dB&amp;lt;=n&amp;lt;=48.0dB) Increasing value reduces bits to remove.&lt;br /&gt;
-skew &amp;lt;n&amp;gt;     skew fft analysis results by n dB (0.0db&amp;lt;=n&amp;lt;=48.0db) in the&lt;br /&gt;
              frequency range 20Hz to 3.45kHz&lt;br /&gt;
-spf &amp;lt;5x5hex&amp;gt; manually input the 5 spreading functions as 5 x 5 characters;&lt;br /&gt;
              These correspond to FFTs of 64, 128, 256, 512 &amp;amp; 1024 samples;&lt;br /&gt;
              e.g. 22235-22236-22347-22358-2246C (Characters must be one of&lt;br /&gt;
              1 to 9 and A to F (zero excluded).&lt;br /&gt;
-fft &amp;lt;5xbin&amp;gt;  select fft lengths to use in analysis, using binary switching,&lt;br /&gt;
              from 64, 128, 256, 512 &amp;amp; 1024 samples, e.g. 01001 = 128,1024&lt;br /&gt;
-cbs &amp;lt;n&amp;gt;      set codec block size to n samples (512&amp;lt;=n&amp;lt;=4608, n mod 32=0)&lt;br /&gt;
&lt;br /&gt;
-quiet        significantly reduce screen output&lt;br /&gt;
-nowarn       suppress lossyWAV warnings&lt;br /&gt;
-detail       enable detailled output mode&lt;br /&gt;
&lt;br /&gt;
-below        set process priority to below normal.&lt;br /&gt;
-low          set process priority to low.&lt;br /&gt;
&lt;br /&gt;
Special thanks:&lt;br /&gt;
&lt;br /&gt;
David Robinson for the method itself and motivation to implement it in Delphi.&lt;br /&gt;
Dr. Jean Debord for the use of TPMAT036 uFFT &amp;amp; uTypes units for FFT analysis.&lt;br /&gt;
Halb27 @ www.hydrogenaudio.org for donation and maintenance of the wavIO unit.&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Indicative Bitrate Reduction==&lt;br /&gt;
&lt;br /&gt;
Conversion using lossyWAV beta v0.5.8, FLAC -8&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
|=======================================|=========|=========|=========|=========|&lt;br /&gt;
|Album                                  | FLAC -8 |  lW -1  |  lW -2  |  lW -3  |&lt;br /&gt;
|=======================================|=========|=========|=========|=========|&lt;br /&gt;
|AC/DC - Dirty Deeds Done Dirt Cheap    | 781kbps | 468kbps | 417kbps | 366kbps |&lt;br /&gt;
|B52&#039;s - Good Stuff                     | 993kbps | 476kbps | 421kbps | 376kbps |&lt;br /&gt;
|David Byrne - Uh-Oh                    | 937kbps | 464kbps | 413kbps | 363kbps |&lt;br /&gt;
|Fish - Songs From The Mirror           | 854kbps | 451kbps | 399kbps | 357kbps |&lt;br /&gt;
|Gerry Rafferty - City To City          | 802kbps | 468kbps | 416kbps | 366kbps |&lt;br /&gt;
|Iron Maiden - Can I Play With Madness  | 784kbps | 486kbps | 437kbps | 387kbps |&lt;br /&gt;
|Jean Michel Jarre - Oxygene            | 773kbps | 538kbps | 475kbps | 422kbps |&lt;br /&gt;
|Marillion - The Thieving Magpie        | 790kbps | 473kbps | 421kbps | 373kbps |&lt;br /&gt;
|Mike Oldfield - Tr3s Lunas             | 848kbps | 491kbps | 436kbps | 389kbps |&lt;br /&gt;
|Scorpions - Best Of Rockers N&#039; Ballads | 922kbps | 492kbps | 437kbps | 378kbps |&lt;br /&gt;
|=======================================|=========|=========|=========|=========|&lt;br /&gt;
|Average                                | 850kbps | 480kbps | 426kbps | 376kbps |&lt;br /&gt;
|=======================================|=========|=========|=========|=========|&lt;br /&gt;
|53 sample &amp;quot;problem&amp;quot; set                | 784kbps | 543kbps | 491kbps | 434kbps |&lt;br /&gt;
|=======================================|=========|=========|=========|=========|&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Large Batch Conversion: (lossyWAV -3; FLAC -3 -m -e -r 2 -b 512)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
|=======================================|=========|=========|=========|=========|&lt;br /&gt;
|3283 Tracks; 258 Discs; 87.2GB&amp;gt;36.8GB  | 880kbps | ###kbps | ###kbps | 371kbps |&lt;br /&gt;
|=======================================|=========|=========|=========|=========|&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Example Foobar2000 Converter Settings==&lt;br /&gt;
[[Image:Foobar2000_Converter_Settings.PNG]]&lt;br /&gt;
&lt;br /&gt;
Example flossy.bat file called from above converter settings.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@echo off&lt;br /&gt;
c:\data_nic\bin\lossyWAV %1 %3 %4 %5 %6 %7 %8 %9 -below -nowarn -quiet&lt;br /&gt;
c:\data_nic\bin\flac.exe -8 -f -b 512 &amp;quot;%~N1.lossy.wav&amp;quot; -o&amp;quot;%~N2.flac&amp;quot; &lt;br /&gt;
del &amp;quot;%~N1.lossy.wav&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Frequently asked questions==&lt;br /&gt;
*&#039;&#039;&#039;Question:&#039;&#039;&#039; Is it [[Variable Bitrate|VBR]]?&lt;br /&gt;
*&#039;&#039;&#039;Short answer:&#039;&#039;&#039; Yes.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Question:&#039;&#039;&#039; Is it [[transparency|transparent]]?&lt;br /&gt;
*&#039;&#039;&#039;Short answer:&#039;&#039;&#039; Almost certainly.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Question:&#039;&#039;&#039; Is it [[lossless]]?&lt;br /&gt;
*&#039;&#039;&#039;Short answer:&#039;&#039;&#039; No.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Question:&#039;&#039;&#039; Why should I use this?&lt;br /&gt;
*&#039;&#039;&#039;Answer:&#039;&#039;&#039;&lt;br /&gt;
:*high quality&lt;br /&gt;
:*extremely low chance of audible [[artifact|artefacts]]&lt;br /&gt;
:*reasonable [[bitrate]]s&lt;br /&gt;
:*usable with unmodified, established lossless formats.&lt;br /&gt;
&lt;br /&gt;
==Current Test Settings==&lt;br /&gt;
No current test settings&lt;br /&gt;
&lt;br /&gt;
==External links==&lt;br /&gt;
*[http://www.hydrogenaudio.org/forums/index.php?showtopic=56129 Current development thread] You will find the latest version and last stable version in post #1 of this thread.&lt;br /&gt;
*[http://www.hydrogenaudio.org/forums/index.php?showtopic=55522&amp;amp;st=0 Original lossyFLAC thread] Where David Robinson (Replaygain developer) introduces the method and a Matlab implementation.&lt;/div&gt;</summary>
		<author><name>Halb27</name></author>
	</entry>
</feed>