HydrogenAudio

Hydrogenaudio Forum => Listening Tests => Topic started by: stigc on 2010-01-04 21:57:48

Title: Development of ABC/HR for Java
Post by: stigc on 2010-01-04 21:57:48
BTW, another problem is that schnofler apparently stopped development of ABC/HR for Java, coding something in Silverlight would require an expensive IIS server, and I don't know how to program in Air or Flash or even if those would be suitable for a testing application. ABC/HR has certain limitations and bugs that I don't know how to fix. Last time it didn't work correctly with JRE 1.6 and even with JRE 1.5 it had the problem that on some machines, a click was hearable when playing certain files (it always happened for the same files).


If you have the source, i could try fix the errors and missing features.

Title: Development of ABC/HR for Java
Post by: Sebastian Mares on 2010-01-04 22:34:46
BTW, another problem is that schnofler apparently stopped development of ABC/HR for Java, coding something in Silverlight would require an expensive IIS server, and I don't know how to program in Air or Flash or even if those would be suitable for a testing application. ABC/HR has certain limitations and bugs that I don't know how to fix. Last time it didn't work correctly with JRE 1.6 and even with JRE 1.5 it had the problem that on some machines, a click was hearable when playing certain files (it always happened for the same files).


If you have the source, i could try fix the errors and missing features.


Latest sources I have are from http://www.rz.uni-frankfurt.de/~bkuckuck/a...a-0.5a5-src.zip (http://www.rz.uni-frankfurt.de/~bkuckuck/abchr-java-0.5a5-src.zip). Like I said, one problem was that ABC/HR didn't run well on JRE 1.6. I don't know exactly when the problem occurred, though - I'd have to dig it out from last listening test discussions.
Title: Development of ABC/HR for Java
Post by: lvqcl on 2010-01-04 22:48:02
There's also http://www.rarewares.org/files/others/abch...va-0.5b-src.zip (http://www.rarewares.org/files/others/abchr-java-0.5b-src.zip)
Title: Development of ABC/HR for Java
Post by: Alex B on 2010-01-04 23:05:01
Hi Seb,

I think the latest/best version is actually 052b, here's the source:

http://www.rz.uni-frankfurt.de/~bkuckuck/a...a-0.52b-src.zip (http://www.rz.uni-frankfurt.de/~bkuckuck/abchr-java-0.52b-src.zip)

I'll search for the jar application and post a link or upload it.

If I recall correctly it is possible to use the program, but not save the results on JRE 1.6.0.x. It works correctly on JRE 1.5.0.x (I have currently the last 1.5 release, 1.5.0_22 installed, but SUN has recently stopped 1.5 support.)



stigc,

After seeing your new release post I actually thought about asking if you could do something about this matter. I'd really appreciate your help. ABC/HR Java is the best comparator and probably the only one that would work in a public listening test.

(BTW, thanks for the new JavaTunes version. I'll post my comments after I have tried it. It looks promising.)
Title: Development of ABC/HR for Java
Post by: Alex B on 2010-01-04 23:12:19
I guessed the link:

http://www.rz.uni-frankfurt.de/~bkuckuck/a...-java-0.52b.zip (http://www.rz.uni-frankfurt.de/~bkuckuck/abchr-java-0.52b.zip)

(wasn't difficult, just removed -src)
Title: Development of ABC/HR for Java
Post by: Alex B on 2010-01-04 23:36:34
I searched HA.

The last new features schnofler added were explained here:
http://www.hydrogenaudio.org/forums/index....st&p=382311 (http://www.hydrogenaudio.org/forums/index.php?s=&showtopic=42696&view=findpost&p=382311)
... and in some earlier replies in the same thread.

I also found this post, but he didn't actually post a link:
http://www.hydrogenaudio.org/forums/index....st&p=451721 (http://www.hydrogenaudio.org/forums/index.php?s=&showtopic=50408&view=findpost&p=451721)

I tried 0.53b: "http://user.uni-frankfurt.de/~bkuckuck/abchr-java-0.53b.zip", but it wasn't available. The web server generated this text:

Quote
Multiple Choices
The document name you requested (/~bkuckuck/abchr-java-0.53b.zip) could not be found on this server. However, we found documents with names similar to the one you requested.

Available documents:
/~bkuckuck/abchr-java-0.51b.zip (mistyped character)
/~bkuckuck/abchr-java-0.52b.zip (mistyped character)
Furthermore, the following related documents were found:
/~bkuckuck/abchr-java-0.4b3SE-fast.zip (common basename)
/~bkuckuck/abchr-java-0.4b4-debug.zip (common basename)
/~bkuckuck/abchr-java-0.4b4-src.zip (common basename)
/~bkuckuck/abchr-java-0.4b4.zip (common basename)
/~bkuckuck/abchr-java-0.4b4SE.zip (common basename)
/~bkuckuck/abchr-java-0.5a4.zip (common basename)
/~bkuckuck/abchr-java-0.5a4-src.zip (common basename)
/~bkuckuck/abchr-java-0.5a_retro5.zip (common basename)
/~bkuckuck/abchr-java-0.5a_retro4.zip (common basename)
/~bkuckuck/abchr-java-0.4b2-debug.zip (common basename)
/~bkuckuck/abchr-java-0.5a5-src.zip (common basename)
/~bkuckuck/abchr-java-0.52b-retro.zip (common basename)
/~bkuckuck/abchr-java-0.5a5.zip (common basename)
/~bkuckuck/abchr-java-0.5a_retro3.zip (common basename)
/~bkuckuck/abchr-java-0.5a_retro2.zip (common basename)
/~bkuckuck/abchr-java-0.5a_retro7.zip (common basename)
/~bkuckuck/abchr-java-0.5a_retro8.zip (common basename)
/~bkuckuck/abchr-java-0.5b-retro.zip (common basename)
/~bkuckuck/abchr-java-0.51b-src.zip (common basename)
/~bkuckuck/abchr-java-0.4b3-test.zip (common basename)
/~bkuckuck/abchr-java-0.51b-retro.zip (common basename)
/~bkuckuck/abchr-java-0.52b-src.zip (common basename)
/~bkuckuck/abchr-java-0.4b3.zip (common basename)
Apache Server at user.uni-frankfurt.de Port 80
Title: Development of ABC/HR for Java
Post by: stigc on 2010-01-05 19:49:27
I got the code up and running. Now i need some configuration files to actual test and debug the code. Do we have the configuration from last test? http://www.listening-tests.info/mp3-128-1/ (http://www.listening-tests.info/mp3-128-1/)

I'm not sure why this abc/hr application seems so complicated. What about adding jFLAC and encode all the samples in FLAC? To make it more user-friendly it should only contain the one screen used for comparison -> http://ff123.net/abchr/scrshot7.gif (http://ff123.net/abchr/scrshot7.gif). Do we need the other screens?

Title: Development of ABC/HR for Java
Post by: lvqcl on 2010-01-05 20:12:10
At least we need also ABX dialog box: http://ff123.net/abchr/abx2.gif (http://ff123.net/abchr/abx2.gif)
Title: Development of ABC/HR for Java
Post by: Alex B on 2010-01-06 10:29:51
I got the code up and running. Now i need some configuration files to actual test and debug the code. Do we have the configuration from last test? http://www.listening-tests.info/mp3-128-1/ (http://www.listening-tests.info/mp3-128-1/)

I think I have archived most if not all previous test materials, but I must go through some backup drives before I can say for sure.

For starters you could try Gabriel's "48kbps AAC public test". All files are still available at:
http://www.mp3-tech.org/content/?48kbps%20...20public%20test (http://www.mp3-tech.org/content/?48kbps%20AAC%20public%20test)

Quote
I'm not sure why this abc/hr application seems so complicated. What about adding jFLAC and encode all the samples in FLAC? To make it more user-friendly it should only contain the one screen used for comparison -> http://ff123.net/abchr/scrshot7.gif (http://ff123.net/abchr/scrshot7.gif). Do we need the other screens?

In the past public tests the users didn't need to configure the individual tests. The test configurations and batch files for decoding the encoded samples were prepared beforehand. Normally the samples were delivered in the original encoded format because of bandwidth limitations. In some tests certain samples were converted to a lossless format if it wasn't possible to correctly decode the files without additional proprietary software, which couldn't be included in the test package.

Regarding to the actual user interface that shows up after a test configuration is loaded, everything that is currently included is necessary, but possibly it could be improved by making changes to the layout , textual info, etc.

As lvqcl said, the ABX window is essential and I don't recall any other additional windows, except the window for saving the results. (I must check this, I have not used the program for some time.)
Title: Development of ABC/HR for Java
Post by: Sebastian Mares on 2010-01-06 12:23:13
The other windows are useful for the person organzing the test (creating the configs, decrypting and renaming the results, etc.).
Title: Development of ABC/HR for Java
Post by: stigc on 2010-01-06 20:23:33
Hmmm... I took the first sample from Gabriel's "48kbps AAC public test" and everything was fine. I even installed the old jre1.6.0_07 but could not get the application to freeze. Both Win 7 and Xp.

Maybe Sebastian Mares still have the original program, sample and settings files from the listing test where the problem was discovered?
http://www.hydrogenaudio.org/forums/index....showtopic=66564 (http://www.hydrogenaudio.org/forums/index.php?showtopic=66564)
Title: Development of ABC/HR for Java
Post by: Sebastian Mares on 2010-01-06 20:31:59
Nope, nothing left.
Title: Development of ABC/HR for Java
Post by: Alex B on 2010-01-07 01:18:59
I found the test stuff.

I created a zip file of the original test package from the 128 kbps MP3 test including the two first sample packages. I also included my encrypted result files of the same two samples and the key file so that you try them (the key was released after the test was finished).

I also have the rest of the sample packages, but I don't think the audio content can have anything to do with the problems. Two sets should be fine for testing the functions.

http://cid-138ca589c542aeee.skydrive.live..../128MP3test.zip (http://cid-138ca589c542aeee.skydrive.live.com/self.aspx/HA%20stuff/128MP3test.zip)  (8.6 MB)
Title: Development of ABC/HR for Java
Post by: stigc on 2010-01-12 22:11:54
With Java 6 update 15 on Windows XP i could reproduce the error.

For some reason the JRE hang when a static instance of type JFileChooser (the Java Open File Dialog) was used. I changed the code to always create a new instance and the problem was gone. I have uploaded a new build of abchr.jar and the changed java files. I have also changed the version number to 0.53.

http://stigc.dk/abchr.0.53.zip (http://stigc.dk/abchr.0.53.zip)


Title: Development of ABC/HR for Java
Post by: C.R.Helmrich on 2010-01-12 23:14:09
Sorry if this will clearly show that I know nothing about Java, but...

I only get this:

Code: [Select]
C:\Users\Christian\Desktop>java -jar abchr.jar
Exception in thread "main" java.lang.NoClassDefFoundError: com/jgoodies/looks/pl
astic/PlasticLookAndFeel
Caused by: java.lang.ClassNotFoundException: com.jgoodies.looks.plastic.PlasticL
ookAndFeel
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClassInternal(Unknown Source)
Could not find the main class: abchr.gui.Main. Program will exit.


The same happens when I double-click on the jar file. Windows 7, Java 6.0 Update 17.

Chris
Title: Development of ABC/HR for Java
Post by: rpp3po on 2010-01-12 23:34:57
@C.R.Helmrich: Stigc's upload is incomplete, that might be the cause. It does not contain the needed libs. Specifically you are missing looks-1.3.1.jar. Do you get the same error for the 0.52b release? It is included there in the correct path.

Edit: Some Java 6 problems in the code seem to relate to the use of the legacy SwingWorker class. It has become core functionality of Java 6 and there were a couple of namespace issues. I'm just rewriting some parts, that are using the old code. Should be fixed soon.
Title: Development of ABC/HR for Java
Post by: rpp3po on 2010-01-13 00:48:32
Here you go. Attached you will find a patch against 0.52b, that fixes Java 6 issues in 4 more files. It can be compiled without Java 5 legacy workarounds now. Someone else needs to get the build system up (Ant) and produce a fresh binary package. The original author used Windows based absolute directories and I'm not willing to fiddle with that on Linux or OS X. Someone on Windows could get this running with less work.

[Edit: Please use version 0.53a below.]

Update: Integrated stigc's changes to Main and SimpleFileChooser into patch.
Title: Development of ABC/HR for Java
Post by: rpp3po on 2010-01-13 13:32:53
Here is a working binary! Just unzip and double-click on all platforms.

[Edit: Please use version 0.53a below.]

The issues with the build script were not due to absolute Windows paths, which are only referenced from a legacy build target, but the external libraries weren't included automatically in the target jar. I modified build.xml and manifest.txt to do that. The result is the above self-contained jar, that can be launched with a single click.

This patch consolidates all changes (stigc's, SwingWorker, build system) since 0.52b:

[Edit: Please use version 0.53a below.]
Title: Development of ABC/HR for Java
Post by: Alex B on 2010-01-25 06:24:34
Thanks.

I didn't have time to try it earlier.

Saving seems to work fine, but it seems to always hang when a saved config or session is opened.

It hangs on "Loading Samples". The Please Wait message window can't be closed.

(http://i224.photobucket.com/albums/dd212/AB2K/ha/loadingsamples.png)

XP SP3, JRE 6u17 (6u18 has been released, but I have not installed it yet.)


EDIT

The program doesn't work on Java 5 anymore, but probably that is intentional.

During my tests I also noticed that for some reason the older version, 0.52b, started to work correctly on Java 6 after I completely uninstalled Java 5 and Java 6 and reinstalled 6u17. This was on another PC that has had the automatic Java updates enabled for years. The installed Java 5 build was not the latest because at some stage the updater started to maintain the version 6. Apparently the automatic Java updater doesn't remove the previous version when it installs a newer version and apparently that can affect the newer version's functionality.
Title: Development of ABC/HR for Java
Post by: stigc on 2010-01-25 22:02:37
It first occurred to me now that rpp3po clean up restricted the version to JRE 1.6+. I think it should at least be 1.5 compatible which my build was. OS X 10.4 does not support JRE 1.6 code.

Title: Development of ABC/HR for Java
Post by: Sebastian Mares on 2010-01-25 22:24:57
Out of interest, is 10.4 still supported by Apple? Is it wide spread? Isn't it like forcing support for Windows 98 or something?
Title: Development of ABC/HR for Java
Post by: stigc on 2010-01-26 00:23:59
Latest 10.4.11 is 2 years old.
Title: Development of ABC/HR for Java
Post by: KFal on 2010-01-26 07:24:21
Saving seems to work fine, but it seems to always hang when a saved config or session is opened.

It hangs on "Loading Samples". The Please Wait message window can't be closed.


I can confirm that it hangs at this place on Java 6 update 18 on Windows 7.

Version 0.52b that Alex has posted together with two samples does not exhibit this problem. Playing the sounds work, so far I could not hear any clicks. Saving the results is also possible and the program exits cleanly after saving the session.


Title: Development of ABC/HR for Java
Post by: rpp3po on 2010-01-26 13:40:43
Could someone upload a session, that fails? A test session with two wav files works fine here. Additionally the program's output on the command line could help, after you have started it with "java -jar abchr.jar".
Title: Development of ABC/HR for Java
Post by: KFal on 2010-01-26 14:55:48
I have used the test samples and configuration from this post by Alex B. That zip file does not contain a session file, if you need this I could upload.

I created a zip file of the original test package from the 128 kbps MP3 test including the two first sample packages. I also included my encrypted result files of the same two samples and the key file so that you try them (the key was released after the test was finished).

http://cid-138ca589c542aeee.skydrive.live..../128MP3test.zip (http://cid-138ca589c542aeee.skydrive.live.com/self.aspx/HA%20stuff/128MP3test.zip)  (8.6 MB)


I have unpacked the zip files contained in 128MP3test.zip in order to create the required directory structure. From there I have selected sample01.ecf which I can load and use fine in 0.52b, as stated above.

Starting up your abchr.jar gives the following error message. Nothing is added when a config is loaded and the application freezes.

Does this help?

Code: [Select]
java.io.FileNotFoundException: clicodecs.cfg (The system cannot find the file sp
ecified)
        at java.io.FileInputStream.open(Native Method)
        at java.io.FileInputStream.<init>(Unknown Source)
        at abchr.settings.DecoderSettings.<init>(Unknown Source)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

        at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)

        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Sou
rce)
        at java.lang.reflect.Constructor.newInstance(Unknown Source)
        at java.lang.Class.newInstance0(Unknown Source)
        at java.lang.Class.newInstance(Unknown Source)
        at abchr.gui.ProjectFrame.<clinit>(Unknown Source)
        at abchr.gui.Main.main(Unknown Source)
Title: Development of ABC/HR for Java
Post by: Alex B on 2010-01-26 15:15:54
I can confirm KFal's report.

Actually, now the saved session files seem to open normally. I am pretty sure that the .ses file that I tried before posting did not work, but now I can't reproduce that. However, saved config files do not work (xml & ecf).

The clicodecs.cfg file is for defining the decoding settings when external decoders are used. The error message in the cmd window is probably unrelated to  this problem. It doesn't appear if an empty clicodecs.cfg file is available and that doesn't fix the problem.

Here's an unencrypted config file:

Code: [Select]
<?xml version="1.0" encoding="UTF-8"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="config.xsd">
  <testname>demo</testname>
  <testconfig>
    <original>
      <location>Sample01\Sample01.wav</location>
      <offset>0</offset>
      <gain>-0.11691735</gain>
    </original>
    <testsample>
      <location>Sample01\Sample01_1.wav</location>
      <offset>12</offset>
      <gain>-0.016409306</gain>
    </testsample>
    <testsample>
      <location>Sample01\Sample01_2.wav</location>
      <offset>0</offset>
      <gain>-0.10708105</gain>
    </testsample>
    <testsample>
      <location>Sample01\Sample01_3.wav</location>
      <offset>7</offset>
      <gain>0.0</gain>
    </testsample>
    <testsample>
      <location>Sample01\Sample01_4.wav</location>
      <offset>29</offset>
      <gain>-0.007981508</gain>
    </testsample>
    <testsample>
      <location>Sample01\Sample01_5.wav</location>
      <offset>0</offset>
      <gain>-0.08176097</gain>
    </testsample>
    <testsample>
      <location>Sample01\Sample01_6.wav</location>
      <offset>38</offset>
      <gain>-0.11264228</gain>
    </testsample>
  </testconfig>
  <ratingscale>
    <min>1.0</min>
    <max>5.0</max>
    <increment>0.1</increment>
    <description>Ratings:


5.0 = Impercebtible

4.0 = Perceptible but not annoying

3.0 = Slightly annoying

2.0 = Annoying

1.0 = Very annoying</description>
  </ratingscale>
  <abx>
    <revealrefpval>0.05</revealrefpval>
  </abx>
</config>

Title: Development of ABC/HR for Java
Post by: rpp3po on 2010-01-26 18:26:37
I can have a look at it tomorrow night. If anyone else can fix it before that feel free to preempt.
Title: Development of ABC/HR for Java
Post by: rpp3po on 2010-01-27 22:58:42
Version 0.53a


This is only a very minor update. The "Loading Samples" dialog doesn't hang with this build on my machine. Verified with Java 1.6.0_17 on Mac OS X 10.6.2 and Java 1.6.0_18 on Windows XP and Alex B's config. Stigc's fix is also included.

Application binary (Java 6 compiled):
[attachment=5692:abchr_ja....53a_bin.zip]
Application binary (Java 5 compiled):
[attachment=5697:abchr_ja...in_java5.zip]
Full source package:
[attachment=5693:abchr_ja....53a_src.zip]
Diff against 0.52b:
[attachment=5691:abchr_ja...53a.diff.zip]

The Java 5 build should also run fine on Java 6 machines. In both cases just double-click the jar to start.
Title: Development of ABC/HR for Java
Post by: KFal on 2010-01-28 09:56:59
This works fine on my machine with Windows 7 and Java 6 update 18. I have loaded a configuration from Alex' sample set, played a few tunes, saved results, saved the session, quit and restart and loaded the session and all appears to work correctly.
Title: Development of ABC/HR for Java
Post by: Alex B on 2010-01-28 11:02:30
Thanks. It seems to work fine  on java 6u18. I did some quick testing and didn't see any problems. I'm going to try a full-blown codec test later.

Apparently the older java version is still not working. When the jar file is double-clicked in Explorer it shows "could not find the main class" and won't start.

(http://i238.photobucket.com/albums/ff132/alexb2k/HA/mainclassismissing.png)

(http://i238.photobucket.com/albums/ff132/alexb2k/HA/javaversion150_22.png)

-- Windows 7 32-bit (this is a test rig and currently my only PC that happens to have the old Java version installed.)
Title: Development of ABC/HR for Java
Post by: rpp3po on 2010-01-28 13:13:23
I doubt that Java 5 is even supported for Windows 7. I guess Java 5 might have a problem with the new single-jar format and have added a legacy binary package, that should run fine on old installations.
Title: Development of ABC/HR for Java
Post by: Sebastian Mares on 2010-01-28 16:53:11
In fact, only the latest update (18) is officially supported under Windows 7.
Title: Development of ABC/HR for Java
Post by: rpp3po on 2010-01-28 17:10:42
Since minor updates usually don't break any compatibilities, I don't see any problem with that. In fact, I don't know any company so dedicated to backwards compatibility as Sun. Almost all Java 1.2 (and lower) apps still run just fine on a Java 6 RE. The only issue here was that the programmer used the same class name for a class, that was later (in Java 6) implemented by Sun under the same name. Since he used *- instead of explicit import statements things like this cannot be avoided.

But that just on a side note. I guess you just wanted to point out that the set of "officially supported" installations is quite small.
Title: Development of ABC/HR for Java
Post by: Alex B on 2010-01-28 17:39:33
I noticed that my old laptop has Java 5u16 on XP Pro SP2. I tried 053a and 0.53a legacy. They report the same "could not find main class" problem. The "legacy" version on Windows 7 & Java 5u22 is not any different. It does not work.

I installed the last build of the "5" series on Windows 7 in last November because I wanted to be able to use ABC/HR JAVA. I remembered the problems with "6" and didn't even try it. The old ABC/HR Java v. 0.52b works fine on 32-bit Windows 7 & Java 5u22.

However, I don't think this is an issue for Windows users anymore. I wonder if it is an issue for anyone who is using some other OS.
Title: Development of ABC/HR for Java
Post by: Alex B on 2010-01-28 17:59:18
As a related issue, I noticed that phong released a minor update to his Chunky results parser over a year ago, but he didn't put a Windows binary online. Only the source is available.

I wonder if he is still active at HA, or maybe someone else is familiar with Python and could help.

http://www.phong.org/chunky/ (http://www.phong.org/chunky/)
Title: Development of ABC/HR for Java
Post by: rpp3po on 2010-01-28 18:12:27
<obsolete>
Title: Development of ABC/HR for Java
Post by: Alex B on 2010-01-28 18:42:07
Probably we are close, but no cigar yet. "main class" is still missing. How the .bat file is intended to work?

Code: [Select]
java -cp bin;lib\plastic-1.1.2.jar;lib\jdom.jar;src\config;src\resources -Xmx32m abchr.gui.Main

I can't see "abchr.jar" in it or does the abchr.jar file run the batch file?

(I tried it on Win 7, the laptop is off at the moment.)
Title: Development of ABC/HR for Java
Post by: rpp3po on 2010-01-28 19:08:33
My bad, I thought that javac 1.6 could output 1.5 compatible code, if no specific 1.6 features were used - it doesn't. If anybody needs 1.5 compatibility, just run 0.53a-src through a Java 1.5 compiler and it should work. I won't do it as I don't see the sense of spending more of my time on this. Java 6 is available for Windows XP, 2000, Vista, 7, almost any Linux, Solaris, and the current & former Mac OS X.

Else just use 0.52 for old machines.
Title: Development of ABC/HR for Java
Post by: Alex B on 2010-01-28 20:25:27
That's my opinion too. My legacy tests are over. I just upgraded.

And thanks for trying, anyway.
Title: Development of ABC/HR for Java
Post by: [JAZ] on 2010-01-28 20:55:15
I can build it in java 1.5 if needed. (I know that finding jdk5 is quite difficult nowadays).

Btw, just tried to build it and found a problem with the BASE64 class.

I suggest to change those two calls and use the class in here instead:
http://www.source-code.biz/snippets/java/2.htm (http://www.source-code.biz/snippets/java/2.htm)
Title: Development of ABC/HR for Java
Post by: stigc on 2010-01-28 21:19:28
My bad, I thought that javac 1.6 could output 1.5 compatible code, if no specific 1.6 features were used - it doesn't. If anybody needs 1.5 compatibility, just run 0.53a-src through a Java 1.5 compiler and it should work. I won't do it as I don't see the sense of spending more of my time on this. Java 6 is available for Windows XP, 2000, Vista, 7, almost any Linux, Solaris, and the current & former Mac OS X.

Else just use 0.52 for old machines.


You can compile Java 1.5 compatible code with JDK 1.6 with the target flag. Just add "-target 1.5"
Title: Development of ABC/HR for Java
Post by: rpp3po on 2010-01-28 21:19:54
Nothing BASE64 related has been changed by stigc and me since 0.52a. So if that produced a working Java 5 binary once, you should double check wether BASE64 is really the issue here.

Changing working code always has the potential to cause other issues, that we might only detect at a later time. The code runs fine now on Java 6, completely click free on my machine. Personally I wouldn't change it again just to make it compatible with Windows 98 and the penultimate Mac OS. For Java 5 the existing 0.52a binary works perfectly.

But maybe you get it running without causing additional issues. Feel free to give it a try and upload a Java 5 binary.



Title: Development of ABC/HR for Java
Post by: [JAZ] on 2010-01-28 21:26:02
@rpp3po: It was eclipse the one that was showing a problem with that class, not the compiler itself.

Also, it is not about compatibility with older versions, but compatibility in general. Please, read the link that i've pointed to.
Title: Development of ABC/HR for Java
Post by: rpp3po on 2010-01-28 21:28:01
You can compile Java 1.5 compatible code with JDK 1.6 with the target flag. Just add "-target 1.5"


Thank you, stigc! I totally forgot about that option. I could build a working Java 5 binary now without further modifications.

Edit: Just uploaded!


@rpp3po: It was eclipse the one that was showing a problem with that class, not the compiler itself.
Also, it is not about compatibility with older versions, but compatibility in general. Please, read the link that i've pointed to.


Sorry, I thought that you were talking about a compiler problem.

Yes, it seems reasonable practice to not reference Sun's private code. BASE64 is pretty basic functionality, though. Countless classes of their own code likely depend on it and it may even be platform accelerated beyond pure Java. I would be a lot of work for them to ever refactor this again. But from a best practice point of view, you are totally right. Feel free to fix it.
Title: Development of ABC/HR for Java
Post by: david@sicnarf.com on 2010-04-07 15:56:19
found the sources and binaries for version 0.5b:

"Java ABC/HR
2005-09-07

Java version of ABC/HR comparator v0.5. by schnofler. Runs on Sun JRE 1.5 or later."

rarewares + archive to the rescue?
http://web.archive.org/web/20071011051533r....org/others.php (http://web.archive.org/web/20071011051533rn_1/www.rarewares.org/others.php)
the link came from: http://web.archive.org/web/20070817111509/...bchr/abchr.html (http://web.archive.org/web/20070817111509/ff123.net/abchr/abchr.html)
Title: Development of ABC/HR for Java
Post by: david@sicnarf.com on 2010-04-07 16:04:42
missed the first page, those have already been posted.
(i'm having issues with the forum, only the first post shows up in this topic, weird)
Title: Development of ABC/HR for Java
Post by: Alex B on 2010-04-07 16:34:10
Apparently schnofler's files are not anymore served at http://user.uni-frankfurt.de/~bkuckuck/ (http://user.uni-frankfurt.de/~bkuckuck/) . All links show now a 404 error message.
I have the v.0.52b files archived in case anyone would like to have them. It was the last version from schnofler.

The version 0.50b was the latest that was available on rarewares (the download links seem to still work, even though they are not anymore on a web page: http://www.rarewares.org/files/others/abch...va-0.5b-src.zip (http://www.rarewares.org/files/others/abchr-java-0.5b-src.zip) and http://www.rarewares.org/files/others/abchr-java-0.5b.zip) (http://www.rarewares.org/files/others/abchr-java-0.5b.zip).

rpp3po did nice job in fixing some issues. Why would you like to have an old version? rpp3po's fixed versions are in this post: http://www.hydrogenaudio.org/forums/index....st&p=683924 (http://www.hydrogenaudio.org/forums/index.php?s=&showtopic=77573&view=findpost&p=683924).

The very sad news is that he is not with us anymore -- please read this thread: http://www.hydrogenaudio.org/forums/index....showtopic=79075 (http://www.hydrogenaudio.org/forums/index.php?showtopic=79075).


Edit: fixed a broken link.
Title: Development of ABC/HR for Java
Post by: Arnold B. Krueger on 2010-04-07 18:25:18
Apparently schnofler's files are not anymore served at http://user.uni-frankfurt.de/~bkuckuck/ (http://user.uni-frankfurt.de/~bkuckuck/) . All links show now a 404 error message.
I have the v.0.52b files archived in case anyone would like to have them. It was the last version from schnofler.

The version 0.50b was the latest that was available on rarewares (the download links seem to still work, even though they are not anymore on a web page: http://www.rarewares.org/files/others/abch...va-0.5b-src.zip (http://www.rarewares.org/files/others/abchr-java-0.5b-src.zip) and http://www.rarewares.org/files/others/abchr-java-0.5b.zip) (http://www.rarewares.org/files/others/abchr-java-0.5b.zip).

rpp3po did nice job in fixing some issues. Why would you like to have an old version? rpp3po's fixed versions are in this post: http://www.hydrogenaudio.org/forums/index....st&p=683924 (http://www.hydrogenaudio.org/forums/index.php?s=&showtopic=77573&view=findpost&p=683924).


Just for grins I downloaded the latest JRE package from the Sun site, which made rpp3po's r6 code appear to be running quite sweetly.

Might this be a problem solver for users of Mac and other non-windows platforms?
Title: Development of ABC/HR for Java
Post by: david@sicnarf.com on 2010-04-07 19:14:32
on linux there are some startup woes with Sun's JRE:
Code: [Select]
$ java -jar abchr.jar 
Exception in thread "main" java.lang.ExceptionInInitializerError
        at abchr.settings.PlaybackSettings.<init>(Unknown Source)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
        at java.lang.Class.newInstance0(Class.java:355)
        at java.lang.Class.newInstance(Class.java:308)
        at abchr.gui.ProjectFrame.<clinit>(Unknown Source)
        at abchr.gui.Main.main(Unknown Source)
Caused by: java.lang.NullPointerException
        at abchr.audio.PlaybackThread.<init>(Unknown Source)
        at abchr.audio.PlaybackThread.<clinit>(Unknown Source)
        ... 9 more

$ java -version
java version "1.6.0_17"
Java(TM) SE Runtime Environment (build 1.6.0_17-b04)
Java HotSpot(TM) 64-Bit Server VM (build 14.3-b01, mixed mode)
[/size]

OpenJDK starts up fine however
Code: [Select]
java version "1.6.0_18"
OpenJDK Runtime Environment (IcedTea6 1.8pre) (6b18~pre3-1)
OpenJDK 64-Bit Server VM (build 16.0-b13, mixed mode)
[/size]

next issue is when you hit the play button:
Code: [Select]
Exception in thread "AWT-EventQueue-0" java.lang.IllegalArgumentException: Line unsupported: interface SourceDataLine supporting format PCM_SIGNED 44100.0 Hz, 16 bit, stereo, 4 bytes/frame, little-endian, and buffers of 88200 to 88200 bytes
        at com.sun.media.sound.DirectAudioDevice.getLine(DirectAudioDevice.java:174)
        at abchr.audio.PlaybackThread.play(Unknown Source)
        at abchr.gui.PlayAction.actionPerformed(Unknown Source)
        at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2012)
        at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2335)
        at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:404)
        at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
        at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:253)
        at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:289)
        at java.awt.Component.processMouseEvent(Component.java:6108)
        at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
        at java.awt.Component.processEvent(Component.java:5873)
        at java.awt.Container.processEvent(Container.java:2105)
        at java.awt.Component.dispatchEventImpl(Component.java:4469)
        at java.awt.Container.dispatchEventImpl(Container.java:2163)
        at java.awt.Component.dispatchEvent(Component.java:4295)
        at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4461)
        at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4125)
        at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4055)
        at java.awt.Container.dispatchEventImpl(Container.java:2149)
        at java.awt.Window.dispatchEventImpl(Window.java:2478)
        at java.awt.Component.dispatchEvent(Component.java:4295)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:604)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:275)
        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:200)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:185)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:177)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:138)
[/size]

oh the joys...
that's the only exception that gets thrown everytime you hit play.
in the options it's correctly set to playback to the jack audio server.
Title: Development of ABC/HR for Java
Post by: david@sicnarf.com on 2010-04-07 19:19:38
forgot to mention: i'm using Version 0.53a from rpp3po's link.
i'm eager to get this running and do some abx tests. this program seems promising. maybe i can debug the playback issue.. although i don't have much java audio coding experience.
Title: Development of ABC/HR for Java
Post by: Arnold B. Krueger on 2010-04-08 04:23:42
forgot to mention: i'm using Version 0.53a from rpp3po's link.
i'm eager to get this running and do some abx tests. this program seems promising. maybe i can debug the playback issue.. although i don't have much java audio coding experience.


I'm no Java guru, but the dump/traceback looks to me like some problem connecting up with the audio card.
Title: Development of ABC/HR for Java
Post by: Arnold B. Krueger on 2010-04-10 18:28:57
forgot to mention: i'm using Version 0.53a from rpp3po's link.
i'm eager to get this running and do some abx tests. this program seems promising. maybe i can debug the playback issue.. although i don't have much java audio coding experience.


Doesn't seem to work with 24 bit .wav files.
Title: Development of ABC/HR for Java
Post by: googlebot on 2010-04-10 18:43:18
I guess the code is build around Java's old sound system: the Java Sound Audio Engine, which doesn't support anything higher than 16 bit. If someone would rewrite the output code to employ the newer (since JDK 1.5) Direct Audio Device mixer with SourceDataLines, the only limits are those of the output device. I could have a look at it, but in my spare free time I'm working on a high quality, multi-platform stream switching library, right now. Improving old legacy code might even deserve higher respect, but writing your own stuff from scratch is certainly more fun...
Title: Development of ABC/HR for Java
Post by: Arnold B. Krueger on 2010-04-10 21:09:15
I guess the code is build around Java's old sound system: the Java Sound Audio Engine, which doesn't support anything higher than 16 bit. If someone would rewrite the output code to employ the newer (since JDK 1.5) Direct Audio Device mixer with SourceDataLines, the only limits are those of the output device. I could have a look at it, but in my spare free time I'm working on a high quality, multi-platform stream switching library, right now. Improving old legacy code might even deserve higher respect, but writing your own stuff from scratch is certainly more fun...


On the plus side,  the rpp3po Java ABC/hr-ABX  1.6 code generates far fewer transisents while switching than what we've seen here lately.
Title: Development of ABC/HR for Java
Post by: ernstblaauw on 2010-08-07 23:43:43
What's the status of ABC/HR? If nobody is currently working on it, I can maybe give it a try. I did learn Java on my university, but I do not have any experiences with audio. So, I would be happy if someone can assist me:
- where can I find a proper explanation of the depreciated and current audio API from Java?
- which files should be altered? Only PlaybackThread.java?

I won't promise anything, but maybe I can give it a shot this week (I guess I can spend some hours).
Title: Development of ABC/HR for Java
Post by: Kamedo2 on 2014-07-10 19:16:23
abchr_java_0.53a_src.zip ABXResultsPanel.java line 89
Code: [Select]
            guessingField.setText(p<0.001?"<0.001":Float.toString(((int)(p*1000))/1000.0f));
            guessingField.setBackground(p<=0.01?Color.GREEN:(p<=0.05?Color.YELLOW:Color.RED));

This yields a p-value with additional zero. For example, when the accurate p-value is 0.0078125, the text will say "0.0070".

Also, Color.RED is hard for protanopia to read the black text.
Code: [Select]
            guessingField.setBackground(p<=0.01?new Color(0,255,144):(p<=0.05?new Color(255,255,80):new Color(255,88,64)));

(http://i61.tinypic.com/2afxym0.png)
The improved color version is the bottom. This is easier to read, although the change is minimal.

And the explanation "Prob. you were guessing" is misleading. I'd say: "Prob. you were just lucky" or simply "p-value".
Title: Development of ABC/HR for Java
Post by: Kamedo2 on 2014-07-12 21:40:58
abchr_java_0.53a_src.zip ABXResultsPanel.java line 90
I improved the color to be readable for all.
Code: [Select]
            guessingField.setBackground(p<=0.01?(new Color(0,232,192)):(p<=0.05?(new Color(255,248,0)):(new Color(255,80,32))));

(http://i59.tinypic.com/1219zt0.png)