ARTA analysis SW and LTspice under OSX on a hackintosh - diyAudio
Go Back   Home > Forums > Design & Build > Software Tools

Software Tools SPICE, PCB CAD, speaker design and measurement software, calculators

Please consider donating to help us continue to serve you.

Ads on/off / Custom Title / More PMs / More album space / Advanced printing & mass image saving
Reply
 
Thread Tools Search this Thread
Old 6th May 2011, 09:50 PM   #1
richiem is offline richiem  United States
diyAudio Member
 
richiem's Avatar
 
Join Date: Sep 2010
Location: Grapeview, WA
Default ARTA analysis SW and LTspice under OSX on a hackintosh

As a hackintosh user, I wanted to be able to run the two programs I most use on the PC side of my machine without rebooting out of OSX and into Windows. Those two programs are ARTA audio analysis software, and LTspiceIV for circuit simulation.

I downloaded Crossover Mac, a Wine variant that lets you boot Windows programs under OSX (Intel only) without needing Windows.

LTspice is fully functional.

ARTA will run if you set its resolution to 16-bits and sample rate to 44100Hz -- it will not run at other settings, because it has no WDM access to the sound chip. But it runs well at those OSX audio system defaults.

I hope there is some way to get OSX to run the host PC's audio chipset at its full capabilities of 24-bits and 96kHz. If you know how to do that, post here, please!
  Reply With Quote
Old 6th May 2011, 10:41 PM   #2
richiem is offline richiem  United States
diyAudio Member
 
richiem's Avatar
 
Join Date: Sep 2010
Location: Grapeview, WA
Update -- there's a utility in OSX (I run 10.6.7) called Audio MIDI Setup that lets you change the sample rate and resolution. ARTA can be set to the sample rate you select in Audio MIDI Setup, up to 96kHz. But ARTA will only run if it is set to 16-bit resolution, regardless of the resolution you choose in Audio MIDI Setup.

But I can assure you that despite the 16-bit setting in ARTA, the resolution is very good in the ARTA spectrum analyzer, with a noise floor of -120dBV or lower, depending on number of samples set, re a 1VRMS, 1kHz input to the line-in jack.
  Reply With Quote
Old 6th May 2011, 11:16 PM   #3
diyAudio Member
 
DBMandrake's Avatar
 
Join Date: Nov 2010
Location: Glasgow, UK
I'm actually impressed that you got ARTA to work at all under OS X using Wine. Good to know that it's possible.

I don't know the specific answers to your questions, however when running ARTA on a non-Windows platform through an emulation layer like wine I suggest you carefully check the calibration and accuracy of the sound inputs and outputs, as it's anybodies guess how well a windows sound device is emulated in Wine. (If my experience of using Wine years ago is anything to go by, sound emulation can be flaky)

At the bare minimum do an analogue loop-back test by connecting line output to line input to check for non flat frequency response such as ringing/ripples in the treble or early roll-off at low and high frequency extremes, testing it at each of the potential sample rates and bits that you might use.

Even on Windows with a good sound card results can vary dramatically with different sample rates, especially if you are not using the native sample rate of the card, which often causes Windows to step in and do (poor quality) sample rate conversion on the fly. Mac OS X also supports on the fly sample rate conversion if the application is set to a different sample rate than the Audio MIDI Setup - so make sure they're both the same.

Check for clipping of 0dB FS - depending on sound card drivers you may have to set the line input level lower than maximum to avoid clipping - you'll find out soon enough in a loop-back test.

Finally do a full calibration under Setup->Calibrate devices, and make a note of any sound card mixer settings/volumes at the time the calibration was done. Once calibrated and checked, the accuracy of calibration should be considered suspect if you change sample rate, bit depth, or any volume settings of the sound device.

As for the noise floor being -120dBV in 16 bit mode - that's somewhat arbitrary depending on what the calibration settings are set to in Setup->Calibrate, or whether a calibration has been done.

There's no way that you'll get an actual 120dB Full Scale SNR in 16 bit mode, the most you can hope to get is around 96dB, and that's if the analogue stages in the sound card are very high quality. (EG a lot better than onboard or most consumer level sound cards)

Even in 24 bit mode a high quality sound card will not achieve 120dB as there are no ADC's available that can achieve an analogue 120dB SNR performance, let alone when placed inside a PC case. A mid to high end prosumer level 24 bit sound card can achieve about 108dB Full Scale SNR maximum, certainly not 120dB.

In any case, for the vast majority of measurements 16 bit / 96dB SNR is more than enough, provided that the actual analogue performance of the card is equal to the number of bits
__________________
- Simon
  Reply With Quote
Old 7th May 2011, 12:11 AM   #4
richiem is offline richiem  United States
diyAudio Member
 
richiem's Avatar
 
Join Date: Sep 2010
Location: Grapeview, WA
Thanks for the comments -- have long since done a calibration. My input source at the moment is the oscillator in an HP 339A, which has harmonic components of a few parts per million. I've done a linearity check with a precision 40dB attenuator (<1ppm error) and the very good attenuator in an HP 652A, giving a total attenuation range of 110dB with less than 1dB total error at 1kHz, RE 3.16VRMS.

The screen shot of the ARTA spectrum was done quickly to show results -- the output from the 40dB attenuator was -37.7dBV with the 339 set to the 3V range and the variable knob at minimum, giving another 60dB attenuation available from the 339 which I used. If everything is perfect, the 1kHz peak should be -97.7dBV. It's just a bit less. Compression does start to occur below -100dB but doesn't get serious until below -110dB, so with reasonable accuracy, ARTA will work well to -110dBV RE 1VRMS input -- no overload of the PC's input.
Attached Images
File Type: jpg ARTA.jpg (46.9 KB, 168 views)
  Reply With Quote
Old 7th May 2011, 06:09 AM   #5
ChrisA is offline ChrisA  United States
diyAudio Member
 
Join Date: Jan 2008
Quote:
Originally Posted by richiem View Post
As a hackintosh user, I wanted to be able to run the two programs I most use on the PC side of my machine without rebooting out of OSX and into Windows. Those two programs are ARTA audio analysis software, and LTspiceIV for circuit simulation.
There are audio analysis programs and a good version of Spice for Mac OS X. No need for emulation
  Reply With Quote
Old 7th May 2011, 10:06 AM   #6
diyAudio Member
 
DBMandrake's Avatar
 
Join Date: Nov 2010
Location: Glasgow, UK
Quote:
Originally Posted by richiem View Post
Thanks for the comments -- have long since done a calibration. My input source at the moment is the oscillator in an HP 339A, which has harmonic components of a few parts per million. I've done a linearity check with a precision 40dB attenuator (<1ppm error) and the very good attenuator in an HP 652A, giving a total attenuation range of 110dB with less than 1dB total error at 1kHz, RE 3.16VRMS.

The screen shot of the ARTA spectrum was done quickly to show results -- the output from the 40dB attenuator was -37.7dBV with the 339 set to the 3V range and the variable knob at minimum, giving another 60dB attenuation available from the 339 which I used. If everything is perfect, the 1kHz peak should be -97.7dBV. It's just a bit less. Compression does start to occur below -100dB but doesn't get serious until below -110dB, so with reasonable accuracy, ARTA will work well to -110dBV RE 1VRMS input -- no overload of the PC's input.
I really don't understand what it is you're trying to demonstrate here - checking amplitude accuracy/tracking between large and small signals is not the same thing as as measuring the dynamic range and full scale SNR.

The screen shot you show indicates there is little or no "compression" of a signal as it is reduced from FS down towards a 1 bit signal (-96dB) but that is to be expected with a linear PCM sample encoding, and I would be very surprised to see otherwise.

However you'll also note that your -97.7dB signal (which is a very pure sine wave from a high quality generator) is showing several aliasing components between 1Khz - 2Khz alone whose amplitude is nearly equal to the actual signal at 1Khz.

This is indicative of a 24 bit sound card which in 16 bit mode is simply truncating the 24 bit samples to 16 bits without applying any 16 bit dither. This causes severe aliasing and distortion of low level signals unless there is at least -96dB or so of random noise present in the measurement signal itself.

So from that it's not reasonable to conclude that it's usable down to -110dB (or even -96dB for that matter) unless you can find a way to enable dither or switch it to true 24 bit mode. (In 24 bit mode the natural analogue noise in even the best ADC is far greater than 1 bit so 24 bit mode is inherently dithered)

It's hard to say whether lack of dither in 16 bit mode is a fault of the design of the sound card hardware, (what sound card is it ?) the Mac OS sound drivers, or the Wine emulation layer. (probably the latter) If the machine can dual boot to windows you could try running the same test in windows on the same sound card and see if there is a difference.

If you want to explore this further you could try using the built in signal generator in ARTA which has the option of No, 16 bit, 18bit or 20bit dither. Make a direct loop-back connection between line out and line in in Spectrum Analyzer mode, and set the Generator to sine, in Generator->Configure you can select the dither level.

With no dither you should see much the same result as with your external generator, however when you enable 16 bit dither the noise floor should rise slightly but the aliasing artefacts will almost entirely disappear. (This will only work if there is no attenuation between line out and line in otherwise the 16bit dither will be reduced below the LSB)

As for what this means for real measurements - any acoustic measurement with a microphone is going to be fine as there will always be more than 1bit worth of noise in the input signal, however it would cause you errors in making small signal measurements on low noise electrical circuits...

One other thing I would comment on is that you have only measured the line input performance of the sound card, (by using an external generator) which is valid if you are using modes such as Spectrum Analyser or SPL meter with an external signal source.

However the majority of the measurement modes in ARTA such as impulse response generate their own measurement signal - thus the line output performance (SNR, THD etc) is just as important for final measurement accuracy as the line in performance, and is likely to be much worse. (particularly digital hash from the motherboard if it's an internal sound card)

That's why the loop-back tests are important - they show you what SNR you will actually get when the sound card is both signal source and input device - which will inevitably be worse than just being an input device alone. In that sense it doesn't really matter what the isolated input performance is, the total loop from output to input is what matters.
__________________
- Simon
  Reply With Quote
Old 7th May 2011, 10:07 AM   #7
diyAudio Member
 
DBMandrake's Avatar
 
Join Date: Nov 2010
Location: Glasgow, UK
Quote:
Originally Posted by ChrisA View Post
There are audio analysis programs and a good version of Spice for Mac OS X. No need for emulation
Is it nearly as good as ARTA though ?

Do you have a link ? (All my searches for Spice come up with Spice circuit simulators...)
__________________
- Simon

Last edited by DBMandrake; 7th May 2011 at 10:13 AM.
  Reply With Quote
Old 7th May 2011, 11:03 AM   #8
diyAudio Member
 
DBMandrake's Avatar
 
Join Date: Nov 2010
Location: Glasgow, UK
Quote:
Originally Posted by DBMandrake View Post
However you'll also note that your -97.7dB signal (which is a very pure sine wave from a high quality generator) is showing several aliasing components between 1Khz - 2Khz alone whose amplitude is nearly equal to the actual signal at 1Khz.

This is indicative of a 24 bit sound card which in 16 bit mode is simply truncating the 24 bit samples to 16 bits without applying any 16 bit dither. This causes severe aliasing and distortion of low level signals unless there is at least -96dB or so of random noise present in the measurement signal itself.
I've attached a screen shot from a quick test I did for comparison to yours. This is spectrum analyser mode, but using the built in sine wave generator with analogue loop-back. Although I normally use 96Khz 24bit mode for all measurements, I did this test in 48Khz 16bit mode to be consistent with yours. (Both are native sample rates for my sound card)

The sine wave generator was set to -95dB, and due to my sound card line input settings being set a few dB below 100% (to give some headroom against clipping) the measured input is -100dB.

My graph is in dBFS (dB relative to full scale) which avoids confusing the issue when using dBV without knowing the calibration settings - dBFS shows the signal precisely in relation to digital full scale regardless of the calibration settings. (You might want to redo your test in dBFS mode to compare the results directly to mine without ambiguity)

Note that at -100dB the test signal is actually below the line inputs LSB in amplitude (which would be -96dB) however because the sound card does proper dithering it's possible to resolve a narrow band signal well below the average noise floor.

The RMS level of the sine wave + dither noise is -91.3dB which is approximately a 1.5 bit signal. Also note the complete absence of aliasing artefacts - there is approximately 24dB of SNR between the sine wave at -100dB and the narrow band noise floor of -124dB. (The broadband noise floor is still exactly -96dB - as measured with the sine wave turned off)

The noise floor is completely random and constantly changing (although it's hard to show that with a stationary screen shot) with no artefacts that relate to the input sine wave regardless of how low in level it is. This is what you should be seeing if dither was working on your sound card. If dither is not working, the signal will also disappear completely as soon as it goes below -96dBFS...
Attached Images
File Type: png 48Khz-16bit.PNG (32.8 KB, 147 views)
__________________
- Simon

Last edited by DBMandrake; 7th May 2011 at 11:14 AM.
  Reply With Quote
Old 7th May 2011, 11:36 AM   #9
diyAudio Member
 
DBMandrake's Avatar
 
Join Date: Nov 2010
Location: Glasgow, UK
I just noticed you had linear averaging enabled in your test, while I didn't. I've attached another screen shot of the same test with linear averaging turned on. The absence of aliasing artefacts is even more stark.

There's definitely something wrong with your sound card / driver setup (possibly Wine) that is preventing dithering from working for you.
Attached Images
File Type: png 48Khz-16bit-linear-averaging.PNG (24.4 KB, 143 views)
__________________
- Simon
  Reply With Quote
Old 7th May 2011, 06:41 PM   #10
richiem is offline richiem  United States
diyAudio Member
 
richiem's Avatar
 
Join Date: Sep 2010
Location: Grapeview, WA
@ Simon -- great shots. The "aliasing artifacts" in my pix are, I believe, actually IM and residual products from line-frequency related signals -- killing such products is notoriously difficult when using a bunch of bench-top line-operated gear. Your loop-back connection nicely avoids most of that problem. I've chosen to use an external analog signal source precisely to avoid issues about the integrity of the source signal and any questions about the accuracy of the input level.

My hackintosh's "sound card" is the on-board Intel High Definition Audio chipset, which has 24-bit, 96kHz max resolution and sample rate. As you note, averaging and dithering are the keys to stable measurements in the presence of a lot of noise. I re-ran my test with an input signal of -120dBV, with the reference of 0dBV set to be safely just below clipping of the PC's input and ADC, thus optimizing dynamic range. ARTA and the stuff in the PC resolved the 1kHz sine-wave from the HP 339 as having a level of -118.7dB. It appears that noise-shaping or dithering or some other process is actually working, or I wouldn't be able to see signals with reasonable accuracy at this very low level, and adjust the level slightly and see the change.

BTW, I got the same results running ARTA under Windows where I had full control over the sound card's params via ARTA and the WDM drivers. Please note that under Mac OSX's Audio MIDI Setup utility, I had the resolution set to 24-bit, and the sample rate set to 48kHz. ARTA was fine with the difference between it's 16-bit setting (it *only* runs with the 16-bit setting under CrossOver Mac) and the system's 24-bit setting, but was completely intolerant of any difference in sample rate setting, so those had to match.

You are quite right about the kinds of applications ARTA is mostly used for and is so good at -- but I don't do those anymore -- I'm interested in analyzers and signal sources. My days in electro-acoustics are pretty much over. But when I want to know the level of the 3rd H. in an oscillator and, with some relatively simple gear, I'm able to see products in the 1ppm area, then that's carrying my load pretty well.

Dick Moore
  Reply With Quote

Reply


Hide this!Advertise here!
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
A note about ARTA audio analysis software richiem Software Tools 44 27th April 2011 04:58 PM
ARTA - using ARTA to measure room acoustics! OMF Software Tools 0 25th November 2009 01:55 PM
How to make sense of LTSpice FFT analysis? ray_moth Tubes / Valves 11 12th August 2008 07:43 PM
Gerber help on Mac OSX pinkmouse Everything Else 4 3rd May 2005 02:38 PM
OSX Server HELP!! jleaman Everything Else 9 10th September 2003 08:30 AM


New To Site? Need Help?

All times are GMT. The time now is 09:59 PM.


vBulletin Optimisation provided by vB Optimise (Pro) - vBulletin Mods & Addons Copyright © 2014 DragonByte Technologies Ltd.
Copyright 1999-2014 diyAudio

Content Relevant URLs by vBSEO 3.3.2