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: Development of ABC/HR for Java (Read 36407 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Development of ABC/HR for Java

Reply #25
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>


Development of ABC/HR for Java

Reply #26
I can have a look at it tomorrow night. If anyone else can fix it before that feel free to preempt.

Development of ABC/HR for Java

Reply #27
Version 0.53a

  • Made the source changes for SwingWorker Java 1.5 compatible again by just fixing import directives and leaving the legacy code alone.
  • Included clicodecs.cfg in binary package.

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.

Development of ABC/HR for Java

Reply #28
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.

Development of ABC/HR for Java

Reply #29
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.





-- Windows 7 32-bit (this is a test rig and currently my only PC that happens to have the old Java version installed.)

Development of ABC/HR for Java

Reply #30
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.


Development of ABC/HR for Java

Reply #32
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.

Development of ABC/HR for Java

Reply #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.

Development of ABC/HR for Java

Reply #34
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/

Development of ABC/HR for Java

Reply #35
<obsolete>

Development of ABC/HR for Java

Reply #36
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.)

Development of ABC/HR for Java

Reply #37
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.

Development of ABC/HR for Java

Reply #38
That's my opinion too. My legacy tests are over. I just upgraded.

And thanks for trying, anyway.

Development of ABC/HR for Java

Reply #39
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

Development of ABC/HR for Java

Reply #40
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"

Development of ABC/HR for Java

Reply #41
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.




Development of ABC/HR for Java

Reply #42
@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.

Development of ABC/HR for Java

Reply #43
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.


Development of ABC/HR for Java

Reply #45
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)

Development of ABC/HR for Java

Reply #46
Apparently schnofler's files are not anymore served at 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 and 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.

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


Edit: fixed a broken link.

Development of ABC/HR for Java

Reply #47
Apparently schnofler's files are not anymore served at 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 and 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.


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?

Development of ABC/HR for Java

Reply #48
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.

Development of ABC/HR for Java

Reply #49
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.