Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: lossyWAV 1.0.0 released. (Read 70538 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

lossyWAV 1.0.0 released.

lossyWAV 1.0.0b released:
Code: [Select]
lossyWAV 1.0.0b, Copyright © 2007,2008 Nick Currie. Copyleft.

This program is free software: you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation, either version 3 of the License, or (at your option) any later
version.

This program is distributed in the hope that it will be useful,but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.  See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with
this program.  If not, see <http://www.gnu.org/licenses/>.

Usage   : lossyWAV <input wav file> <options>

Example : lossyWAV musicfile.wav

Quality Options:

-q, --quality <n>   quality preset (10=highest quality, 0=lowest bitrate;
                    -q 5 is generally accepted to be transparent)
                    default=-q 5.

Standard Options:

-c, --check         check if WAV file has already been processed; default=off.
                    errorlevel=16 if already processed, 0 if not.
-C, --correction    write correction file for processed WAV file; default=off.
-f, --force         forcibly over-write output file if it exists; default=off.
-h, --help          display help.
-L, --longhelp      display extended help.
-M, --merge         merge existing lossy.wav and lwcdf.wav files.
-N, --noclips       set allowable number of clips / channel / codec block to 0;
                    default=3,3,3,3,2,1,0,0,0,0,0 (-q 0 to -q 10)
-o, --outdir <dir>  destination directory for the output file(s).
-v, --version       display the lossyWAV version number.

Special thanks:

David Robinson for the method itself and motivation to implement it.
Don Cross for the Complex-FFT algorithm used.
Horst Albrecht for valuable tuning input and feedback.
[/size]

Explanation, history and lossless codec settings in the wiki article

[edit] 1.0.0b necessitated by unknown WAV chunk handling error and 24-bit --correction / --merge parameter error.

Link to GNU GPLv3+ source code for lossyWAV 1.0.0b [/edit]

N.B.: lossyWAV 1.1.0b released here.
lossyWAV -q X -a 4 -s h -A --feedback 2 --limit 15848 --scale 0.5 | FLAC -5 -e -p -b 512 -P=4096 -S- (having set foobar to output 24-bit PCM; scaling by 0.5 gives the ANS headroom to work)


lossyWAV 1.0.0 released.

Reply #2
22 minutes late. Bitterly disappointed.

Kidding of course. Congrats on the big 1.0(.0). Have been watching the development of this with interest, even if I didn't understand any of the technical discussion.

lossyWAV 1.0.0 released.

Reply #3
lossyWAV 1.0.0 released:
Congratulations !
Many thanks!

22 minutes late. Bitterly disappointed.

Kidding of course. Congrats on the big 1.0(.0). Have been watching the development of this with interest, even if I didn't understand any of the technical discussion.
  I got hung up with the GNU GPL text....
lossyWAV -q X -a 4 -s h -A --feedback 2 --limit 15848 --scale 0.5 | FLAC -5 -e -p -b 512 -P=4096 -S- (having set foobar to output 24-bit PCM; scaling by 0.5 gives the ANS headroom to work)

lossyWAV 1.0.0 released.

Reply #4

lossyWAV 1.0.0 released.

Reply #5
Just Thanks 

Edit: plz validated news & frontpage mods

lossyWAV 1.0.0 released.

Reply #6
Just Thanks 

Edit: plz validated news & frontpage mods
I'm glad it got this far too. Unfortunately, I cannot add a topic to the Validated News forum - it returns a lack of privilege error.
lossyWAV -q X -a 4 -s h -A --feedback 2 --limit 15848 --scale 0.5 | FLAC -5 -e -p -b 512 -P=4096 -S- (having set foobar to output 24-bit PCM; scaling by 0.5 gives the ANS headroom to work)

lossyWAV 1.0.0 released.

Reply #7
Unfortunately, I cannot add a topic to the Validated News forum - it returns a lack of privilege error.

What about "News Submissions"?

Great work! 

  Thomas

lossyWAV 1.0.0 released.

Reply #8
Nice work. Taking this experimental concept and following through with a usable, high-quality implementation is amazing.
lossyFLAC (lossyWAV -q 0; FLAC -b 512 -e)

lossyWAV 1.0.0 released.

Reply #9
Unfortunately, I cannot add a topic to the Validated News forum - it returns a lack of privilege error.
What about "News Submissions"?

Great work! 

  Thomas
    Ah.... That would explain a lot....  .... and thanks!
lossyWAV -q X -a 4 -s h -A --feedback 2 --limit 15848 --scale 0.5 | FLAC -5 -e -p -b 512 -P=4096 -S- (having set foobar to output 24-bit PCM; scaling by 0.5 gives the ANS headroom to work)

lossyWAV 1.0.0 released.

Reply #10
All in all, this release came pretty fast, and it's Free Software. Great! Now I just hope someone will port it to unix
Aside from that, does lossyWAV compile as a 64-bit program out of the box, or would that need some adaptations too? Also, would a 64-bit build benefit from your ASM optimisations as well? Would upgrading from x87 to SSE improve performance?

lossyWAV 1.0.0 released.

Reply #11
All in all, this release came pretty fast, and it's Free Software. Great! Now I just hope someone will port it to unix
Aside from that, does lossyWAV compile as a 64-bit program out of the box, or would that need some adaptations too? Also, would a 64-bit build benefit from your ASM optimisations as well? Would upgrading from x87 to SSE improve performance?
lossyWAV is vanilla Delphi with 32-bit x86 and x87. No SSE instructions have (intentionally) been used - there was a problematic bug in an early build where I inadvertently used an SSE3 instruction (FISTTP) to truncate and store the result of the spreading function which caused compatibility problems for some users. I will be releasing the code shortly (certainly within a few days) and after I have a go at re-writing the chunk-mapping element of the wavIO unit to properly handle un-recognised chunks in the WAV file before the 'data' chunk. (the latest NIN album has a 'PAD ' chunk before the 'data' chunk in the FLAC and 24bit/96kHz versions, so lossyWAV exits with an error code....).
[edit] Using SSE may improve performance, using FISTTP almost certainly would shave a few cycles per codec_block. [/edit]
lossyWAV -q X -a 4 -s h -A --feedback 2 --limit 15848 --scale 0.5 | FLAC -5 -e -p -b 512 -P=4096 -S- (having set foobar to output 24-bit PCM; scaling by 0.5 gives the ANS headroom to work)

lossyWAV 1.0.0 released.

Reply #12
Well done Nick, and thank you.

Thank you too to all the people who helped with testing.

Where's the launch party?

Cheers,
David.

lossyWAV 1.0.0 released.

Reply #13
Well done Nick, and thank you.

Thank you too to all the people who helped with testing.

Where's the launch party?

Cheers,
David.
Thanks David, that means a lot. It has been a really enjoyable (in the sense that bashing one's head off a wall occasionally is "enjoyable" ) project to be involved in. Without the help of all the contributors / commenters / constructive critics it would not have been possible.

Thanks again,

Nick.
lossyWAV -q X -a 4 -s h -A --feedback 2 --limit 15848 --scale 0.5 | FLAC -5 -e -p -b 512 -P=4096 -S- (having set foobar to output 24-bit PCM; scaling by 0.5 gives the ANS headroom to work)

lossyWAV 1.0.0 released.

Reply #14
lossyWAV 1.0.0 released:

Usage  : lossyWAV <input wav file> <options>

Example : lossyWAV musicfile.wav

Quality Options:

-q, --quality <n>  quality preset (10=highest quality, 0=lowest bitrate;
               -q 5 is generally accepted to be transparent)
               default=-q 5.


Hello,
I guess this is a beginners question  , but when I have a wave-file and use lossyWav.exe, I get an exact copy of the original Wave file. Is this correct?
I get no difference if I try "lossyWAV <input wav file> -q 0" or "lossyWAV <input wav file> -q 10" or just "lossyWAV <input wav file>". I always ends up with a new file with lossy.wav filetype, but the exact same file-size as the original.

Balnes

lossyWAV 1.0.0 released.

Reply #15
Very good work. Much appreciated.

lossyWAV 1.0.0 released.

Reply #16
Hello,
I guess this is a beginners question  , but when I have a wave-file and use lossyWav.exe, I get an exact copy of the original Wave file. Is this correct?
I get no difference if I try "lossyWAV <input wav file> -q 0" or "lossyWAV <input wav file> -q 10" or just "lossyWAV <input wav file>". I always ends up with a new file with lossy.wav filetype, but the exact same file-size as the original.

Balnes
It should not be exactly the same size, there is a 'fact' chunk inserted immediately after the 'fmt ' chunk, probably about 50 to 100 bytes long. The WAV file then requires to be encoded with a compatible lossless codec, e.g. FLAC, TAK, WavPack, taking care to set the block size to 512 samples (-b 512 in FLAC) and also to preserve WAV chunks (--keep-foreign-metadata in FLAC). When you compare the filesizes of the FLAC and the lossy.FLAC you should notice a difference.
lossyWAV -q X -a 4 -s h -A --feedback 2 --limit 15848 --scale 0.5 | FLAC -5 -e -p -b 512 -P=4096 -S- (having set foobar to output 24-bit PCM; scaling by 0.5 gives the ANS headroom to work)

lossyWAV 1.0.0 released.

Reply #17
Hallo Nick,

I've just come home from the extended weekend and seen the good news.

Congratulations, and thank you very much!
lame3995o -Q1.7 --lowpass 17

lossyWAV 1.0.0 released.

Reply #18
Hallo Nick,

I've just come home from the extended weekend and seen the good news.

Congratulations, and thank you very much!
Glad to be of service!

[edit] lossyWAV 1.0.0b released, fixes unknown WAV chunk problem and 24-bit correction file / merge problem. [/edit]
lossyWAV -q X -a 4 -s h -A --feedback 2 --limit 15848 --scale 0.5 | FLAC -5 -e -p -b 512 -P=4096 -S- (having set foobar to output 24-bit PCM; scaling by 0.5 gives the ANS headroom to work)

lossyWAV 1.0.0 released.

Reply #19
The WAV file then requires to be encoded with a compatible lossless codec, e.g. FLAC, TAK, WavPack, taking care to set the block size to 512 samples (-b 512 in FLAC) and also to preserve WAV chunks (--keep-foreign-metadata in FLAC).

Please explain why. A flac will be generated anyway. What are the risks when I don't keep that metadata ?

lossyWAV 1.0.0 released.

Reply #20
Please explain why. A flac will be generated anyway. What are the risks when I don't keep that metadata ?
If you don't keep the metadata, you lose the 'fact' chunk, which in turn will not prevent lossyWAV processing the file again.
lossyWAV -q X -a 4 -s h -A --feedback 2 --limit 15848 --scale 0.5 | FLAC -5 -e -p -b 512 -P=4096 -S- (having set foobar to output 24-bit PCM; scaling by 0.5 gives the ANS headroom to work)


lossyWAV 1.0.0 released.

Reply #22
What are the risks when I don't keep that metadata ?
If you don't keep the metadata, you lose the 'fact' chunk, which in turn will not prevent lossyWAV processing the file again.
Thanks. So, sadly, that's another way to mislead people. Well, it's not your fault.
However, it would not be that difficult to check for the lowest set bit per codec-block and "estimate" whether the file had been previously processed. Unfortunately, if someone were to dither the lossyWAV processed file you would lose even that possibility.
lossyWAV -q X -a 4 -s h -A --feedback 2 --limit 15848 --scale 0.5 | FLAC -5 -e -p -b 512 -P=4096 -S- (having set foobar to output 24-bit PCM; scaling by 0.5 gives the ANS headroom to work)

lossyWAV 1.0.0 released.

Reply #23
Or if someone dithered to 16bit and saved as 24bit anyways (i've seen it a few times from my mastering clients) it would trigger a false positive.  But that's splitting hairs.  Hopefully FLAC (and others) will just default to including that information.  I already was using it before lossyWAV anyways, because I include lots of meta-data in (some of) my WAV files since i've stopped using DDP.

lossyWAV 1.0.0 released.

Reply #24
Most importantly, I add my congrats.   
The technical discussion was way over my comprehension abilities  , but I did pick up that very clever tricks are used.
I'm hoping that there will be A-B testing by the silver-eared and  examination of what happens after *.lossy.flac is turned into *,lossy.mp3, *ogg, *m4a or whatever. 
Not only do I mull replacing a portion of my full-size 14,000 FLAC files, I'm thinking about a DJ I know who has scruples about using lossy files, but still wants to carry his dance itinerary on a laptop. I.e., can we assure him that a Q 5 *.lossy.flac is as good as "the real thing"?