Help - Search - Members - Calendar
Full Version: ABC/HR for Java 0.4b
Hydrogenaudio Forums > Hydrogenaudio Forum > Validated News
schnofler
Here's my christmas present to the HA community!

You can get it here:
Binary
Source

Major Changes:
- Architectural overhaul (the first few versions were a bit quick and dirty)
- Reads compressed files directly by using CLI decoders
- Improved gain correction, now also available in ABC/HR mode
- New L&F
- Uses Mersenne Twister RNG (for all the skeptics wink.gif )
- XML support! (not that this is of much use, but it sure sounds good biggrin.gif )

...and lots of minor changes

Edit: uploaded fixed version, which should resolve the issue with clicodecs.cfg on *nix OSs (see below)
schnofler
A few more words:

There are no decoders included in the download, so for decoding to work you either have to put the CLI decoders in the abchr-java directory or have them in your path. ABC/HR is preconfigured to decode the following formats:
- mp3 using lame
- aac using faad
- ogg using oggdec
- flac using ... flac
- monkey's audio using mac
- mpc using mppdec
So you can just put those tools into the abchr dir or your path and decoding should work. You can also set up new CLI decoders in the Settings dialog (which you can find in the Options menu).

Btw, you can also set the buffer size used for playback in the Settings dialog. Increasing the buffer size should help if you experience clicks and skips during playback (but it will increase latency, too).
dev0
That's the kind of christmas present I like. Thanks for your great work.

dev0
guruboolez
Nice present (w00t)
Your software has very impressive features. It's close to be a real audio player wink.gif
rjamorim
Amazing!

Where is ff123? He must now bring his Win32 ABC/HR comparator to the Java version's level biggrin.gif
ff123
QUOTE(rjamorim @ Dec 26 2003, 08:05 AM)
Amazing!

Where is ff123? He must now bring his Win32 ABC/HR comparator to the Java version's level biggrin.gif

Au contraire!

I can sit back and watch the features in its successor grow! The Win32 version was coded because I got tired of waiting for somebody else to implement something I wanted to use right away. Great job, schofler!

ff123
schnofler
Thanks everyone for your very nice words. smile.gif

There is another feature some of you might want to try, which is quite useful but still very experimental (i.e. it's only a hack right now). In the Quick ABX dialog you can put something like
CODE
$encode:lame --alt-preset standard %i %o;c:\music\foo.flac;mp3
into the file textfield. When you start the test the file foo.flac will be transcoded to aps then decoded for the test. Generally the syntax looks something like
CODE
$encode:[command line];[file];[extension]
where [command line] must contain the placeholders %i and %o instead of an input and output file, [file] might contain spaces (don't use quotes), and [extension] is the file extension of the encoded file. So, as another example, if you want to test vorbis at q4 you'd use
CODE
$encode:oggenc -q4 -o %o %i;c:\music\some file.flac;ogg


But as I told you, this feature is experimental and not really supported yet, meaning you won't get any feedback on encoding progress (the program will just halt for a minute after pressing the "Start Test" button), you will likely get strange error messages if encoding fails for some reason or it might just not work at all.
rjamorim
WITH SCHNOFLER'S ABC/HR I HEAR WAHT I DON'T HEAR WITH OTHER TOOLZ!

I KNOW TEH QUALITY!

I ABXd Schnofler's ABC/HR vs. ff123's ABC/HR, and Schnofler's was bettar, 16/16!



Now, seriously: Thanks a lot to Schnofler for his ABC/HR and related tools. They are a wonderful help in setting up a listening test. No more eyeballing on CoolEdit to find offsets smile.gif


Also thanks to Atlantis for the joke idea. happy.gif
danchr
*cough*QuickTime for Java*cough* wink.gif
xmixahlx
loading of clicodecs.cfg is hardcoded as .\clicodecs.cfg

on a *nix OS this will be ./clicodecs.cfg (or just "clicodecs.cfg" ? no? )

...i can't build to test, because i don't have the jdom.jar java sources (says the j2sdk 1.4.2_03 compiler smile.gif )

DecoderSettings.java:

54c54
< File f=new File(".\\clicodecs.cfg");
---
> File f=new File("clicodecs.cfg");


i'll upload the debian package anyways, but the user will have to add their decoder settings by hand (and really, for debian, i'd like to see clicodecs.cfg loaded into the user's directory and then this config edited when changing settings versus the main file)


later
schnofler
xmixahlx:

You're right, thanks. I really wish I had a Linux installed somewhere, so this kind of bug could not slip by unnoticed. I'll probably upload a fixed version later today.

Anyway, you don't need the jdom sources to compile. Adding "jdom.jar" to the compile-classpath should suffice.

QUOTE
and really, for debian, i'd like to see clicodecs.cfg loaded into the user's directory and then this config edited when changing settings versus the main file

Well, I don't really know whether it's possible to do this in a nice way in Java. The way you are *supposed* to save user-specific settings (or any settings at all) is by using Java's Preferences facility. This is a platform-independent way of storing settings for Java programs (in some mysterious location which is completely transparent for the application). Problem is, you probably won't be able to edit the settings in a text editor then, which I thought was a nice thing to have.
schnofler
OK, I changed the ".\clicodecs.cfg" to "clicodecs.cfg" and uploaded fixed sources and binaries. Thanks again for your efforts, xmixahlx.
negritot
Is anyone able to get the ABX testing working under OS X? I am unable to drag the slider to select the portion of the samples to listen to. So start is 0.00 and end is 0.00 (the defaults), and of course nothing plays.
schnofler
QUOTE
Is anyone able to get the ABX testing working under OS X? I am unable to drag the slider to select the portion of the samples to listen to. So start is 0.00 and end is 0.00 (the defaults), and of course nothing plays.


That's strange. The default is that the whole sample is selected. Could you tell me when exactly this happens? Did you use the "Quick ABX Test" or the ABX dialog during an ABC/HR test? If the problem occurs in an ABC/HR test, does it only occur in ABX or also in ABC/HR mode? Is there something special about the samples you used (like they're an hour long or use some strange wave format)? The last question is probably the most important (it seems like the program couldn't find out the length of the sample correctly). Maybe you can try with some other samples, and see if it works to find the cause of the problem?

Thanks in advance. I'll be away now for a few hours, but I'll look into it tomorrow.
negritot
[quote=schnofler,Jan 19 2004, 03:06 PM] [QUOTE]That's strange. The default is that the whole sample is selected. Could you tell me when exactly this happens? Did you use the "Quick ABX Test" or the ABX dialog during an ABC/HR test? If the problem occurs in an ABC/HR test, does it only occur in ABX or also in ABC/HR mode? Is there something special about the samples you used (like they're an hour long or use some strange wave format)? The last question is probably the most important (it seems like the program couldn't find out the length of the sample correctly). Maybe you can try with some other samples, and see if it works to find the cause of the problem?

Thanks in advance. I'll be away now for a few hours, but I'll look into it tomorrow. [/quote]
I used the "Quick ABX Test." The samples I tested are 2-4 minutes long. I created them by importing in iTunes, then using Quicktime to export to wav. Here's a screenshot of the ABX window after I hit the "Start Test" button:
user posted image
Pushing the play buttons does nothing, and none of the sample is selected, as you can see at the bottom.

This is running 10.3.2, which includes Java 1.4.1, IIRC. I can host one of the wav files if you want to check it out. I'll look for an alternate way to decode the files to wav.

Thanks for the reply. smile.gif
ff123
Is it possible that you created 24-bit WAV files? I think that previously caused the symptoms seen here.

ff123

Edit: ABC/HR (native windows version) and WinABX also have a problem with 24-bit files when using Windows 2000 / XP.

Last I remember, KikeG was working on fixing this for WinABX.
negritot
No, the files are all reported as 44.1kHz, 16-bit audio by Quicktime. It also says they're little endian, if that matters. Even if that was an issue, I'd think it would still be able to load the file, though it would sound like white noise.
schnofler
QUOTE
I can host one of the wav files if you want to check it out.


That would probably help me finding the problem. But be sure not to link to copyrighted samples longer than 30 seconds. Thanks.
negritot
Ok, I'll get one hosted tonight when I'm back home. Thanks for looking into it. smile.gif
negritot
Ok, I put up a 20 second sample here: http://students.washington.edu/bmedina/sample2.wav
ff123
QUOTE(negritot @ Jan 20 2004, 11:26 PM)
Ok, I put up a 20 second sample here: http://students.washington.edu/bmedina/sample2.wav

Did you verify that this 20 second sample has the same problem as the full-length version?

I have no problems comparing the sample against itself using either abchr-java 0.4b2 or abchr 0.9b

My OS is win2k

ff123

Edit: Looks like the problem is probably OSX related
schnofler
QUOTE(ff123)
I have no problems comparing the sample against itself using either abchr-java 0.4b2 or abchr 0.9b

Same here.

Negritot, if you're still interested in some more testing, I've uploaded a version which outputs some debug messages here. You have to run it from a console (with "java -jar abchr.jar") to see the debug information. If you post it here, maybe I can figure out what goes wrong.
negritot
Ok, here's the relevant debug output:
CODE
QuickABXAction.startTest(): Loading files
QuickABXAction.startTest(): File A: /Volumes/Users/bmedina/Desktop/Audio Test/sample2.wav
QuickABXAction.startTest(): File B: /Volumes/Users/bmedina/Desktop/Audio Test/sample2.wav
QuickABXAction.startTest(): Decoding A
FileSample.initialize(): Decoding wave
FileSample.initialize(): fileFormat=WAVE (.wav) file, byte length: 3640648, data format: PCM_SIGNED, 44100.0 Hz, 16 bit, stereo, little-endian, audio data
FileSample.initialize(): format=PCM_SIGNED, 44100.0 Hz, 16 bit, stereo, little-endian, audio data
FileSample.initialize(): frameRate=44100.0
FileSample.initialize(): length=-2.2675737E-5
QuickABXAction.startTest(): Decoding B
FileSample.initialize(): Decoding wave
FileSample.initialize(): fileFormat=WAVE (.wav) file, byte length: 3640648, data format: PCM_SIGNED, 44100.0 Hz, 16 bit, stereo, little-endian, audio data
FileSample.initialize(): format=PCM_SIGNED, 44100.0 Hz, 16 bit, stereo, little-endian, audio data
FileSample.initialize(): frameRate=44100.0
FileSample.initialize(): length=-2.2675737E-5
QuickABXAction.startTest(): Files loaded
QuickABXAction.startTest(): Calculating offset
OffsetCalculator.configureOffset(): Sample A: sample2.wav
OffsetCalculator.getSamples(): done
OffsetCalculator.configureOffset(): Sample B: sample2.wav
OffsetCalculator.getSamples(): done
OffsetCalculator.configureOffset(): minLength=62181
OffsetCalculator.resample(): resample to 62181
OffsetCalculator.resample(): resample to 62181
OffsetCalculator.configureOffset(): done
QuickABXAction.startTest(): Offset calculated
QuickABXAction.startTest(): Offset A=0
QuickABXAction.startTest(): Offset B=0
QuickABXAction.startTest(): Calculating gain
OffsetCalculator.calcVolumeDifference(): aRMS=34794.91507390124
OffsetCalculator.calcVolumeDifference(): bRMS=34794.91507390124
OffsetCalculator.calcVolumeDifference(): gain=0.0
OffsetCalculator.configureGain(): done
QuickABXAction.startTest(): Gain calculated
QuickABXAction.startTest(): Gain A=0.0
QuickABXAction.startTest(): Gain B=0.0
QuickABXAction.startTest(): Making ABX test
QuickABXAction.startTest(): length=0
apple.awt.EventQueueExceptionHandler Caught Throwable :
java.lang.ArithmeticException: / by zero
       at guiutils.RangeSelectBar.rangeToDisplay(RangeSelectBar.java:85)
       at guiutils.RangeSelectBar.paintComponent(RangeSelectBar.java:68)
       at guiutils.PlaybackRangeSelectBar.paintComponent(PlaybackRangeSelectBar.java:34)
       at javax.swing.JComponent.paint(JComponent.java:808)
       at javax.swing.JComponent.paintChildren(JComponent.java:647)
       at javax.swing.JComponent.paint(JComponent.java:817)
       at javax.swing.JComponent._paintImmediately(JComponent.java:4678)
       at javax.swing.JComponent.paintImmediately(JComponent.java:4477)
       at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:410)
       at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:117)
       at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:178)
       at java.awt.EventQueue.dispatchEvent(EventQueue.java:448)
       at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:230)
       at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:183)
       at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
       at java.awt.Dialog.show(Dialog.java:538)
       at abchr.gui.QuickABXAction$QuickABXDialog.show(QuickABXAction.java:276)
       at abchr.gui.QuickABXAction.actionPerformed(QuickABXAction.java:295)
       at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1797)
       at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1850)
       at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:419)
       at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:257)
       at javax.swing.AbstractButton.doClick(AbstractButton.java:321)
       at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1109)
       at javax.swing.plaf.basic.BasicMenuItemUI$MenuDragMouseHandler.menuDragMouseReleased(BasicMenuItemUI.java:1002)
       at javax.swing.JMenuItem.fireMenuDragMouseReleased(JMenuItem.java:582)
       at javax.swing.JMenuItem.processMenuDragMouseEvent(JMenuItem.java:479)
       at javax.swing.JMenuItem.processMouseEvent(JMenuItem.java:426)
       at javax.swing.MenuSelectionManager.processMouseEvent(MenuSelectionManager.java:274)
       at javax.swing.plaf.basic.BasicMenuUI$MouseInputHandler.mouseReleased(BasicMenuUI.java:344)
       at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:227)
       at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:227)
       at java.awt.Component.processMouseEvent(Component.java:5093)
       at java.awt.Component.processEvent(Component.java:4890)
       at java.awt.Container.processEvent(Container.java:1566)
       at java.awt.Component.dispatchEventImpl(Component.java:3598)
       at java.awt.Container.dispatchEventImpl(Container.java:1623)
       at java.awt.Component.dispatchEvent(Component.java:3439)
       at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3450)
       at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3165)
       at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3095)
       at java.awt.Container.dispatchEventImpl(Container.java:1609)
       at java.awt.Window.dispatchEventImpl(Window.java:1585)
       at java.awt.Component.dispatchEvent(Component.java:3439)
       at java.awt.EventQueue.dispatchEvent(EventQueue.java:450)
       at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:230)
       at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:183)
       at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:177)
       at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
       at java.awt.EventDispatchThread.run(EventDispatchThread.java:99)

And yes, I did test the sample and got the same results.
schnofler
Ok, looks like Apple's implementation of Java Sound reports an incorrect frame length.

I made a version which reverts to an alternate method of determining the length of the sample, if the usual method doesn't work. You can download it here.

Thanks a lot for your help so far, negritot.
negritot
Yay! The new version works perfectly. Thanks for fixing the issue, schnofler! smile.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.