jLossyWav, implementation of lossyWav in Java |
- No over 30 sec clips of copyrighted music. Cite properly and never more than necessary for the discussion.
- No copyrighted software without permission.
- Click here for complete Hydrogenaudio Terms of Service
![]() ![]() |
jLossyWav, implementation of lossyWav in Java |
Dec 1 2008, 23:44
Post
#1
|
|
|
Group: Members Posts: 1559 Joined: 24-June 02 From: Catalunya(Spain) Member No.: 2383 |
This is the initial implementation of the lossyWav algorithm in Java.
It is based on the C# port, and doesn't provide yet most of the parameters ( it only accepts the -q parameter). To execute it: java -jar jLossyWav.jar -q 5.0 inputFile.wav. The sources are included inside the .jar file. They can be seen with 7-Zip or be imported directly into Eclipse IDE. [Current posted version: 0.5.1] This post has been edited by greynol: Jul 6 2009, 20:54
Reason for edit: Updated current version number
Attached File(s)
|
|
|
|
Jan 24 2009, 01:32
Post
#2
|
|
|
Group: Members Posts: 245 Joined: 10-February 04 From: London Member No.: 11923 |
I had to recompile because of this error:
CODE Exception in thread "main" java.lang.UnsupportedClassVersionError: Bad version number in .class file at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:675) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124) at java.net.URLClassLoader.defineClass(URLClassLoader.java:260) at java.net.URLClassLoader.access$100(URLClassLoader.java:56) at java.net.URLClassLoader$1.run(URLClassLoader.java:195) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:316) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:280) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:374) at org.lossywav.dsp.InplaceFFT.<clinit>(InplaceFFT.java:48) at org.lossywav.algorithm.Analyzer.<init>(Analyzer.java:103) at org.lossywav.algorithm.LossyWav.<init>(LossyWav.java:53) at org.lossywav.frontend.jLossyWavConsole.main(jLossyWavConsole.java:60) I had to remove the invalid @Override in ComplexArrayBuffer.java and DoubleArrayBuffer.java for compiling too. After that it seems to work Bugs found: does not accept mono files. Does not work properly with the following file (sample rate 22kHz)-
spr_ouch.wav ( 30.6K )
Number of downloads: 163 |
|
|
|
Jan 24 2009, 17:31
Post
#3
|
|
|
Group: Members Posts: 1559 Joined: 24-June 02 From: Catalunya(Spain) Member No.: 2383 |
I had to remove the invalid @Override in ComplexArrayBuffer.java and DoubleArrayBuffer.java for compiling too. Which java version are you using? This has been compiled with java 1.6.0r10 @Override is a valid annotation. Requires java 5. Bugs found: does not accept mono files. Does not work properly with the following file (sample rate 22kHz)- I'll check why mono doesn't work. there shouldn't be a problem. about samplerate of 22Khz, the ported code may not cope with it, but i'll take a look too. Edit:it The problems with mono and other sampling rates were pretty trivial. It was all due to fixed values when creating the writer. I've replaced those to use the values from the .wav file. Uploaded a version with those changed. This post has been edited by [JAZ]: Jan 24 2009, 18:39 |
|
|
|
Jan 24 2009, 21:26
Post
#4
|
|
|
Group: Members Posts: 245 Joined: 10-February 04 From: London Member No.: 11923 |
QUOTE ' date='Jan 24 2009, 08:31' post='611054'] I had to remove the invalid @Override in ComplexArrayBuffer.java and DoubleArrayBuffer.java for compiling too. Which java version are you using? This has been compiled with java 1.6.0r10 @Override is a valid annotation. Requires java 5. Yeah that is the problem, I still have Java 5 (1.5.0_16). You should not use @Override when the method does not exist in the superclass (here the superclass is Object), should you? QUOTE Bugs found: does not accept mono files. Does not work properly with the following file (sample rate 22kHz)- I'll check why mono doesn't work. there shouldn't be a problem. about samplerate of 22Khz, the ported code may not cope with it, but i'll take a look too. Edit:it The problems with mono and other sampling rates were pretty trivial. It was all due to fixed values when creating the writer. I've replaced those to use the values from the .wav file. Uploaded a version with those changed. Great, thanks! |
|
|
|
Feb 7 2009, 19:59
Post
#5
|
|
|
Group: Members Posts: 1559 Joined: 24-June 02 From: Catalunya(Spain) Member No.: 2383 |
Uploaded a new version which now trully works (when testing another file, i realized that the FFT analisys was using one bit too much, which implied that it was using erroneous information).
It still doesn't produce the same output than lossywav 1.1.1 but it is pretty close now. |
|
|
|
Mar 18 2009, 23:56
Post
#6
|
|
![]() Group: Members Posts: 19 Joined: 29-December 08 From: Germany Member No.: 64965 |
Hey there...
I tried to convert a track with "-q -4" as quality settings as could be done with the original lossyWav 1.1.0e, but it didn't accept the settings. Thanks tho very much for your effort and hard work to port it to Java! When I get the chance, I'll have a look or two over the source code All the best, monoton This post has been edited by monoton: Mar 18 2009, 23:56 |
|
|
|
Mar 19 2009, 20:08
Post
#7
|
|
|
Group: Members Posts: 1559 Joined: 24-June 02 From: Catalunya(Spain) Member No.: 2383 |
Yes, I know.
My initial implementation just provides a conversion of the algorithm in an informative way, and i left the options a bit on the side. I plan to upgrade it for 1.2.0, although i don't have a timeline for that set up yet. The source code is separated in classes and methods that should represent the process itself, and have some javadoc in them trying to describe what everything does. I hope to improve those comments and source separation further with the new release too, but sure a look from other people could help to find out if i'm on the good path |
|
|
|
Jul 5 2009, 21:59
Post
#8
|
|
|
Group: Members Posts: 1559 Joined: 24-June 02 From: Catalunya(Spain) Member No.: 2383 |
I've got a freshly new version of jLossyWav ready. I've labeled it 0.5.0 .
This one is a big improvement over the older. - Uses an intermediate buffer for file IO. This has increased the speed considerably (obviously, slower than LossyWav, but not by a mile now) - It implements most of the console switches that LossyWav supports (important ones still missing are stdin/out and --merge ) - The algorithm is updated to LossyWav 1.1.4c - Several things have been changed to conform better with the official one. This release is bit-perfect with the default settings (and the single file I've tried) compared to the official. As always, the .jar contains the sources so anyone can look and either help or learn. Also, you would like to know that Nick and I are in contact about the sources and we will attempt to make both easier to understand and manage (Comparing the Delphi to the Java implementation is not an easy task right now Expect more versions to follow due to these changes.
Attached File(s)
|
|
|
|
Jul 5 2009, 22:05
Post
#9
|
|
![]() lossyWAV Developer Group: Developer Posts: 1721 Joined: 11-April 07 From: Wherever here is Member No.: 42400 |
Great work [JAZ] - my Delphi's not **that** illegible, is it?
As discussed, I'm working on making my Delphi easier to read and am currently creating more units to split the code up into functional chunks. Nick. -------------------- lossyWAV -q X -i | FLAC -8 ~= 295kbps
SGS III (Rooted) + 64GB |
|
|
|
Jul 6 2009, 12:45
Post
#10
|
|
|
Group: Members Posts: 245 Joined: 10-February 04 From: London Member No.: 11923 |
Error with this version...
CODE Exception in thread "main" java.lang.NoClassDefFoundError: org/lossywav/frontend/jLossyWavConsole This command works: CODE java -cp jLossyWav.jar org.lossywav.frontend.JLossyWavConsole (note that it is a capital J. The normal command may work on Windows though) After that jLossyWav seems to work fine. |
|
|
|
Jul 6 2009, 18:41
Post
#11
|
|
|
Group: Members Posts: 1559 Joined: 24-June 02 From: Catalunya(Spain) Member No.: 2383 |
Ops!
I decided to change the class name, since usually in Java every class starts with a capital letter I've also took the opportunity to fix the -o option. It was failing if the input file already contained a path. This post has been edited by [JAZ]: Jul 6 2009, 18:59
Attached File(s)
|
|
|
|
![]() ![]() |
|
Lo-Fi Version | Time is now: 19th May 2013 - 00:41 |