Home Theater Forum and Systems banner

Getting around the limitations of JavaSound on OS X

86K views 170 replies 41 participants last post by  mikaelb 
#1 · (Edited)
John Reekie has produced a great blog post about how to work around the problems Java has on OS X with audio input from Firewire cards, multi-input USB cards and 48kHz sources. You can find the cure for these JavaSound ills at Room EQ Wizard on the Mac - An Input Workaround. Great work John, and thank you!

Edit 12th September: Here is a related post on using HDMI output with REW on OS X, thanks to EmagSamurai: 8 channel HDMI output from REW on the Mac.

Edit 29th June 2014: Use V5.01 beta 21 or later (available here) for OS X 10.7.3 onwards, removes the need for workarounds.
 
#70 · (Edited)
The quoted text, read as statements ( since they lack the required "?" after the text ) so I'll treat them as such .

i) Your Line 1 is true .

ii) I would debate line 2 ( since you didn't use the word "new" before the word Mac . REW has been used successfully with earlier versions of the Mac OS .

iii) Line 3 ( looks to be ) true, if one is insistent on using a Mac that is running Mavericks .

:sn:
 
#71 · (Edited)
Can I use an UMIK-1?
Easily? No, there are problems...

Can I use a FW interface?
Easily? No, there are problems...

Can I use Mavericks? Easily?
No, there are problems... (Apple doesn't sell previous versions of Mac OSX nor allows you to install it...)

In order to use REW with my Mac, I've bought so many useless things (UMIK the latest) that now I can say: "REW isn't for Mac users"

I think it is the sw which must be written according to the OS.
Not the other way...

P.S. I'd pay for a working version with Mac OSX.
 
#72 ·
I spoke to a world-class expert (Jim Johnston) about the garbage in front of the impulse and he said basically, no ifs, ands or buts, they have to fix it (they being FuzzMeasure). Since this garbage does not appear in FuzzMeasure's own display, it's probably not a problem for them, but then again, I don't think FuzzMeasure's display goes far enough back in negative time to be sure. JJ told me that the garbage is probably wraparound from the sweep and can cause all kinds of anomalies. And you can't get around it by windowing closet to the 0 as you don't know what other kinds of anomalies are occurring.

My solution: Sample in Acourate and export to REW. This works already, very well, I already tried it. Or, get another interface for my portable work :-(. Or, wait till John fixes the ASIO issue on the PC side. The Mac side will take a lot longer, if ever, for him to fix, sadly.
 
#73 · (Edited)
Expert

Hi Bob, I am communicating with JohnPM and the head guy at MiniDSP, regarding the problems between Apple and Java and REW and MiniDSP.
There is a compounded impossible situation here. Apple are not doing Java, MiniDSP products are 48K natural, or only 48K in the case of the UMIK-1. There appears to be a reasonable chance of REW working with the UMIK-1 if it were changed to 44.1K. JohnPM is very helpful regarding REW, which is why I know about the association between the pre-image and distortion. There is only one real expert IMO. Perhaps if one considers the concept of pre-ringing in filters, it may become palatable to see action before zero? This is a normal REW graph of a measurement done in REW, not an import. Green Line Plot Grass family Grass


DD
 
#74 · (Edited)
Re: Expert

Dear DanDan:

While you're waiting for the developers of the MiniDSP to try to solve the Mac problems, why not install Bootcamp on your Mac and work in Windows? It takes me 1 minute total to switch operating systems on my SSD-equipped MacBook pro.

Now to go off-topic. Your image in dBFS shows something happening in front of the impulse but it is not the same phenomenon that I saw with the import from REW. That was NOT preringing or pre-echo of any form, and according to Jim Johnston, a respected world's expert on this topic, that was some form of wraparound distortion that should nullify the use of an import from REW.

Now in terms of interpreting your log scale impulse, those look to me like anomalies in the noise floor of your room contaminating the measurement in some way. It is not distortion caused by the sampling. I believe these echos are too far away from the impulse to be caused by pre-ringing in a filter. Attached are three pictures from my measurements in Studio A, which has a noise floor below 30 dBC. The linear is an extreme zoom to exagerrate any ringing or pre-impulse, and as you can see it still looks very well behaved. Those pre-rings are within 1 ms. of the start of the impulse while yours go back in the hundreds of milliseconds, which looks like an acoustical noise-related contamination issue to me. These are not imports either as I take measurements with REW directly using a Lynx Soundcard. I suggest you try averaging your impulses to reduce noise influence and see if that three-peak anomaly goes away. Or, if you are not taking the measurement at sufficient SPL, try taking it at a higher SPL to see what you get in front of your speaker impulse.

I also added a second log picture of the same impulse with as close to the identical zoom as in your image. The impulse starts at 908 actual milliseconds as due to the use of Acourate Convolver with FIR filters with a 65k long impulse there is nearly 1 second latency in my system!

If you disagree with my interpretations, we could both defer to our respective experts and agree to meet in a duel at high noon ;-).
 

Attachments

#75 ·
I'm a bit confused about the turn taken by the discussion as the REW docs state quite clearly that the images of the impulse before zero are distortion images.



(http://www.roomeqwizard.com/wizardhelpv5/help_en-GB/html/impulseresponse.html)

Returning somewhat to the topic of this thread, I run REW (and UMIK-1) regularly in Windows (7) under VMWare Fusion. I suppose that could be considered another approach to the OSX workaround, if you have a Windows license. I read there are various issues with Mavericks but have not explored them (and probably won't...!)
 
#76 · (Edited)
In that case, HiFiZine, then I am mistaken about the anomalies which DanDan measured. I've learned something today! It also looks like the amplitude of the 2nd and additional harmonics is VERY LOW in my Studio A system! I've not seen anomalies like those ever in my Studio A pictures. I'll have to zoom in and look for them.

Regardless, I've decided not to trust the REW import that I got under expert advice. (see my previous post the other day).
 
#77 ·
Now we're getting down to something (still off topic). Approximately a year ago I switched from an analog-based subwoofer eq to a full DRC and digital crossover using Acourate convolver. In the previous measurement taken January 2013, I can see some small spikes in the negative time before the impulse (much less than in either DanDan's or PM's example picture). But since then I am using Acourate Convolver. The harmonic distortion measurements (using REW) have lowered by 15 dB between 20 and 200 Hz! Due to the use of a steep linear phase crossover keeping the woofer better within its operating range than any standard crossover. Probably that's why I have not seen any spikes in the impulse in negative time since that point.

If you would like to see some of my before-after Acourate Convolver measurements of the front speakers I can start another thread if you would like.
 
#78 · (Edited)
Experts

Bob, I have bounced measurements back and forth between FM and REW extensively and for a long time.
The default behaviour of FM, not normalising and choosing 16Bit when exporting did show truncation in the resulting REW imports. That was about the extent of the problems I and many others looking carefully encountered.
This computer, my office iMac is on Mavericks and most of my online viewing and analysis are done here.
Due to your unease about the FM import I decided to test today. The expert to end all experts perhaps, the test....
I am using the onboard mic and speakers, which both REW and FM have always been happy with. I tried sweeps in both FM and REW and exported at 32 Bit, Normalised in FM and Not.
Without extensive and careful testing of each element there is no point in going in to any detail.
But from the immediate results I would not trust the Export and Import process at all right now. Certainly from FM to REW. Normalising seems to cause problems and the IR window seems to get included in the Export.

I don't think we will see a solution to the Apple Java issues any time soon, probably never, so the interface problems will remain. Seems like nothing other than a stereo USB will work for REW on a Mac.
I do believe that if the UMIK clock were changed to 44.! the Mac problems would go. I, and Apple it seems, do not regard 48K as a go to or norm for music.


DD
 
#80 ·
Re: Experts

Guys, I have had complete success interchanging impulse responses between Acourate and REW and I do feel confident in that. The two programs go hand in hand. Acourate for the nitty gritty stuff and REW for the pretty stuff :).
 
#82 ·
Howdy folks,

I've been summoned by a few users, and would like to wrap my head around what's going on here. :)

It sounds like people are having trouble exporting FuzzMeasure impulses into REW? What is the specific issue that is causing problems?

I'm looking at graphs that appear to include the distortion components (i.e. the "mini impulses" that appear to the left of the initial impulse response, decreasing in amplitude as you move further to the "left" of the initial impulse.) Those are totally normal in the context of swept sine measurements (and part of their power!)

Thanks!

Chris
 
#84 · (Edited)
Hi Chris, welcome! I sent you an email which is probably pertinent to this, although it may not be that apparent. The following will explain what I mean and the summary may be helpful to all readers. Do note the earlier post by Esprit though, saying exactly the same thing

For some time people have been successfully Exporting and Importing IR's between REW and FM.
For some time we have been able to use LineIn and SoundFlower to allow REW to function on the Mac's crippled version of Java.
A very similar workaround enabled the UMIK-1 to work with REW on Macs. Much thanks to the OP John Reekie here.

All of this has changed with the introduction of Mavericks.
I have never seen such a disastrous OS update before, in fact I have never seen an update which was negative in any way. Plse note that ProTools 11 users and probably others are having nightmares with Mavericks also.

Now on my iMac with Mavericks 10.9.2 installed:-
I cannot get the UMIK to function. MiniDSP are being very helpful, but ultimately I believe it will take a hardware change to 44.1K to make this device Java/Mac friendly.
On brief tests exporting from FM to REW the graphs are significantly different.

EDIT, Chris and I SimulTyping..... Is there an app for that?
Just to be fully clear. FuzzMeasure is a fully capable acoustic tool and works perfectly on Macs, including ALL interface types, and the onboard 1/O.
The UMIK-1 works perfectly with all normal Mac apps.
REW works perfectly using the Mac onboard I/O. This is of a perfectly acceptable quality for Acoustic Measurement. I have measured 20-20K on this iMac, with less than 0.1dB variation, and negligible distortion.


DD
 
#85 ·
Now on my iMac with Mavericks 10.9.2 installed:-
I cannot get the UMIK to function. MiniDSP are being very helpful, but ultimately I believe it will take a hardware change to 44.1K to make this device Java/Mac friendly.
That seems rather drastic. If the device wants to operate at a better sample rate, it should! As long as it's a class-compliant USB hardware device, we should be OK. I'll be communicating with the miniDSP folks as well to ensure everything's behaving itself with FM as well.

On brief tests exporting from FM to REW the graphs are significantly different.
Could you elaborate on this? You have to understand that a normalized impulse response will peak at 1.0 at the peak of the impulse itself. That won't necessarily normalize the ETC graphs or frequency response graphs.

That is, a peak of 1.0 (or 0 dBFS) in the time domain doesn't guarantee the same peak in the frequency domain. That's just not how the math works.

Anyway, examples of how exported impulses aren't coming across in REW would be helpful for me to explain this better here.

Chris
 
#86 · (Edited)
We should get a room Chris! I haven't had time to repeat the quick Export/Import tests I did but I will.
I am not sure it is fully On Topic in this thread though. Perhaps another thread on the havoc which is being wreaked throughout the audio community by Mavericks?
Or a focus on the Java(sound)/Mac issue here, which I am convinced by the warning messages in REW, is a 44.1K thing.
IMO, 44.1K is the common FS for music and should be the primarily default in all software and hardware. As it stands 48K reigns.

I am 100% certain that the UMIK-1 and FuzzMeasure are working perfectly on Macs.

The UMIK-1 is a regular USB device, but this does not guarantee function with REW on Macs. REW also fails to function at anything other than 48K, although not always. REW also doesn't work even with class compliant interfaces which are more than 2 Channel USB, or Firewire of any size.
Text Font Line Screenshot Technology

DD
 
#87 ·
I haven't had time to repeat the quick Export/Import tests I did but I will.
I'll stay tuned.

I am not sure it is fully On Topic in this thread though. Perhaps another thread on the havoc which is being wreaked throughout the audio community by Mavericks?
I'm not familiar with much havoc from my end. CoreAudio is a fairly stable system that hasn't changed very much if at all over the past few years.

I am 100% certain that the UMIK-1 and FuzzMeasure are working perfectly on Macs.
Glad to hear it. Honestly, as long as hardware works with CoreAudio it should work with FuzzMeasure trouble-free.

The UMIK-1 is a regular USB device, but this does not guarantee function with REW on Macs. REW also fails to function at anything other than 48K, although not always. REW also doesn't work even with class compliant interfaces which are more than 2 Channel USB, or Firewire of any size.
DD
That's a real bummer, and I'm not sure who is at fault, as I'm not familiar with the matter.
 
#89 ·
Re: Rotten Apple

Chris, REW is a Java app. It works fine on PC's and I presume Linux machines etc. all of which implement Java as it's designers specify. Apple have not complied for a long time, thus the problems and the workaround of this thread.

DD
For what it's worth, Java's runtime should be maintained by Oracle, and I believe they're the ones doing the work to make sure it runs well on PCs. I don't believe they put the same level of effort into maintaining it on OS X.

If I were to venture a guess, I'd say that whatever team is tasked with maintaining the OS X java runtime simply doesn't have the expertise or motivation to make the audio side work perfectly. I also use MATLAB which is java-based, and they have more than their fair share of issues with the runtime as well.

I think that, once upon a time, Apple used to have a hand in keeping the runtime up to date, but whether Apple simply doesn't care or Oracle isn't allowing them to maintain the runtime themselves is another story. To be honest, I don't think it's necessarily fair for Apple to be required to do this work. Ultimately Java is a technology product that promises cross-platform functionality, and hence the onus is on the Java folks to do whatever it takes to live up to their claims.

But that's just my own $0.02.
 
#90 ·
Compatible

That's interesting Chris. However, to my knowledge, there are things in OSX treatment of Java which are not compatible with the Java specs. As the purpose of Java is to be a mulitplatform, ahem platform, surely it behoves all of OS's to comply with one central set of specs. I mean, it makes little sense to include Java compatibility in an OS, but leave out or disobey certain aspects. Windows and afaik Linux treat it with re (spec)t and REW works perfectly.

BTW, Chris and Bob, I have been trying some Export/Import tests. When I force both apps to run at the same Sample Rate, despite REW's protests, i.e. 48Khz the 32 Bit WAV Ex/Im seems to mostly work fine for most graphs. The only flaw I see is that the distortion pre-images are missing in REW. I am fairly sure these used to transfer across before Mavericks.
I will test further but will PM both of you with anything interesting as I believe this is a tad Off Topic.
I just wanted to reinstate the probability that capturing on FM and viewing in REW, on Macs seems still viable.
I expect the Distortion thing to be a small fix or perhaps some parameter I have overlooked.
DD
 
#91 ·
Re: Compatible

That's interesting Chris. However, to my knowledge, there are things in OSX treatment of Java which are not compatible with the Java specs. As the purpose of Java is to be a mulitplatform, ahem platform, surely it behoves all of OS's to comply with one central set of specs. I mean, it makes little sense to include Java compatibility in an OS, but leave out or disobey certain aspects. Windows and afaik Linux treat it with re (spec)t and REW works perfectly.
That's not how it works in practice. OS X moves to the beat of its own drum, and Java needs to keep up. I'm sure there's a two-sided arrangement in place, and for some reason it's not functioning as we'd like.

There is undoubtedly some animosity towards Java due to recent security vulnerabilities introduced by the Java runtime. Similar stuff has happened with Adobe's Flash as well. Apple doesn't own either technology, yet failings on the part of Adobe and Oracle ultimately lead to a stain on Apple's reputation with their customers. Apple doesn't really need to take this anymore, and I can understand why they continue to treat third-party cross-platform frameworks and applications as third-class citizens.

Is it ideal for consumers? That's arguable, and not worth exploring here as you pointed out. Way off topic.

BTW, Chris and Bob, I have been trying some Export/Import tests. When I force both apps to run at the same Sample Rate, despite REW's protests, i.e. 48Khz the 32 Bit WAV Ex/Im seems to mostly work fine for most graphs. The only flaw I see is that the distortion pre-images are missing in REW. I am fairly sure these used to transfer across before Mavericks.
I will test further but will PM both of you with anything interesting as I believe this is a tad Off Topic.
I just wanted to reinstate the probability that capturing on FM and viewing in REW, on Macs seems still viable.
I expect the Distortion thing to be a small fix or perhaps some parameter I have overlooked.
DD
Distortion is an environmental thing. You're either seeing distortion in your measurements, or you're not—this isn't "configurable." I'd say that if you're seeing those distortion peaks, then you might want to look at your signal chain to see why it's distorting to begin with, and measure until it mostly disappears.
 
#92 ·
Working Together

Interesting points well stated Chris. Also firmly On Topic I reckon.

The Ex/Im thing is not so on topic. I am not sure what you are saying re distortion. I can see the harmonic distortion traces in FM, but when the same sweep is Ex/Im to REW, the Distortion graph has nothing but the fundamental trace. And, the usual pre-0 distortion image is entirely missing. Note this seems similar to BoB Katz earlier posts. Let's continue this in email.
DD
 
#94 · (Edited)
Exporting Import

I have done a little testing. Exporting from FM and importing to REW seems to be working perfectly.
No need to Normalise and I am choosing 32Bit Export. The Distortion components do not make it across, it seems they cannot be, or are not included, within an Exported WAV. This is hardly a drawback as Distortion can be viewed in FM in any case.

DD
 
#95 · (Edited)
44.1

Regarding the other issue, I have been informed that
Apple's Javasound implementation only appears to work for devices that operate at 44.1k.
We do find examples of REW working at 48K, e.g. after an Import. But it won't communicate with properly with an interface running at 48K, with or without the workaround. I am guessing that this new 'broken' behaviour could well be due to changes caused by Mavericks.
DD
 
#97 ·
My rig: MacBook 2.13 GHz Intel Duo, 2 GB RAM, OS 10.6.8, PreSouns Firebox (2-channel)

I did all the recommended steps for this workaround, and was not successful. I configured Step 3 as suggested, but when I got to Step 5 and clicked "Pass Thru" I never got any meter bounce in the LineIn app window. I've attached grabs of REW5 preference (screen1), LineIn (screen2) and Audio MIDI Set-Up (screen3) windows. The REW5 Prefs gives me default, SoundFlower 2ch, built-in mic, built-in input:line in, PreSouns Firebox and SoundFlower 64 ch for input. The REW5 output choices are default and Java Sound Engine. With LIneIn the input choices are the same plus "silence". I included the Audio MIDI window just in case.

Any other suggestions? Or is this "operator error"? Do I need a Ph.D. ("push here dummy")? Thanks for helping.

Cheers!
AP
 

Attachments

#99 ·
Hi everyone - first time posting here :) Hopefully I have the right thread...

I'm new to REW. I was hoping to use REW with a Mac (running Mavericks), a UMIK-1 mic, and a HDMI connection. I understand that this is currently not possible - is this correct? (I would be using these in combination with SoundFlower and LineIn).

Thanks
 
#107 ·
I am referring to any of the Mac I/O ports or devices. I often take sweeps on my iMac using the onboard Mic and Speakers, when checking the software or to generate examples of measurement behaviour.
The iMac probably has a Line In, some include a Digital Optical option.
I haven't tried the HDMI workaround but I cannot see how it would work. The issue here is that the Mac Javasound will not work at 48Khz. The workarounds may well have worked on previous OSX but Mavericks has put a stop to all of that. I have tried Java 7, no improvement.

DD
 
#110 ·
DanDan,

Thanks. It looks like I would require a USB audio interface as my late 2013 iMac doesn't have a Line In or a Digital Optical connection.
The headphone jack also has a digital optical line-out in it, or at least that is how almost every Apple computer thats been made for a number of years has worked (including Airport Express audio out). Line in is missing though.
 
This is an older thread, you may not receive a response, and could be reviving an old thread. Please consider creating a new thread.
Top