Low-distortion Audio-range Oscillator

What I would do is figure out exactly where things are going wrong. Can you write a square wave file at 48kHz 24bit raw PCM and load this into Octave?

Yes of course all the programs work fine with 24bit waves from a DAW, etc. and process them and save them at full resolution. What is going on is Windows audio well documented in 100's of blogs, threads, etc. The saddest thing is that, as Demian said, several things worked out of the box under XP more than 10 years ago. I had a brief try with Visual C++ and the plugin API for CoolEdit. I got a couple of simple plugins to work functionally (worked on Audition too) but I never could figure out their interface to dialog boxes. At the time CoolEdit worked fine full duplex 48K/24 Bit with a USB sound card (XP). Angelo Farina has a very nice set of plugins he still sells.
 
Last edited:
I'm aware of two trick for handling discontinuity in timing in a USB stream.
The most popular one is bit depth dropping. This is the reason the data is sent msb first.
It allow sat a 24bit word to be reduced to 20bit or 16 bit. However the missing bits need to be padded at the receiving end. DAC hardware can handle this perfectly. But I not so sure out software can unless it has knowledge of the number of bits dropped.

I can sample rate conversion taking place because of intense processing time. it would fix the problem.

The other trick is more at the USB interface end of things. This involved small changes in sample rate by changing the clock rate. It leads to FM effects thought to be undetectable. We are not talking about huge changes here just enough to prevent buffer overflow.
 
Member
Joined 2004
Paid Member
Are you talking about adaptive USB audio? USB is a reliable link that doesn't just drop data but it can get delayed. Audio will be passed at the highest priority (unless its using a not recommended bulk transfer protocol) as isochronous or time sensitive and everything else, like mouse clicks will get delayed. USB 1 at 12 Mbps may have problems but if the device supports high speed (480 Mbps) there should be no issues. Adaptive doesn't modulate the audio data rapidly but it does lock it to the PC side which is non-optimal. Async locks it to a clock on the device so jitter and frequency modulation are all local issues independent of the host.

USB data is moved in packets at 1KHz in USB 1 and 2.5 KHz in USB 2. Its not a continuous stream and you have buffering at both ends to make it work. It also makes for a minimum latency in an full duplex audio using USB.

I have not seen a situation where data gets truncated over USB. Drivers and software may do it but not because of USB issues. Don't share a USB drive with a USB audio device, that can get you into some issues of bus contention, depending.

I believe the EMU USB stuff implements a full Async protocol. Its not UAC 2 compliant (I think it predates UAC 2) but it is isochronous. I tend to prefer PCI audio devices. PCIE has more overhead (and will be newer and more costly). I have one PC with an EMU 1212M or 1616M and an RME 9632 and a Lynx L22. Its overkill but they all work together on both Win 10 and XP. I have also not seen issues with Xmos based USB audio and the Thesycon drivers in the same system. They have all shown better than 16 bit audio in Arta (noise floor drops and harmonics show up going from 16 bits to 24 bits).
 
They have all shown better than 16 bit audio in Arta (noise floor drops and harmonics show up going from 16 bits to 24 bits).

Do you know if PCI cards are better? Right now ARTA is the only thing working over USB and it works with the cheapest sound devices from ASUS and Creative Labs too. I got into this this week because Jan sent me a preview of the Linear Audio article on a computer based measurement system, on the PC examples only work 44.1(48?)/16. I have not nailed down whether the resampling is to 48k or 44.1k in their software of choice, GNU Octave. I don't think it's the software that decides in any case.

I jumped the gun on ocenaudio, it now appears that some 24bit dither (or something) is added to 16bit data and I was faked out.

BTW the MAudio USB Duo worked 48/24 full duplex on USB 1.0 and I never saw any dropouts or glitches or anything suspicious. All data and graphs in my microphone articles were made this way. That desktop died a horrible death, the replacement with a couple of service patches and things no longer worked. I always wondered if the USB chipset in the PC could also contribute to problems.
 
Last edited:
I'm not referring to the USB standards themselves. The tricks are done at the firmware level in micro controllers or on the win side of things. They are cheap alternatives to doing it the right way.

I think this stuff goes on more than we like to think. USB sends out packets. In itself it is perfect.

Check this app note from Microchip on clocking for USB audio. This is what I'm referring too.

https://www.google.ca/url?sa=t&rct=..._ESXftLfw&sig2=bV5ue9_vGfuqg2M7oz8BgA&cad=rja
 
Last edited:
I don't know how you guys get those outlandish performances out of sound cards, I may do something very wrong? I had the opportunity to check 3 models:

- Asus Xonar Essence STX (PCIe)
- M-Audio 192 (PCI)
- Asus Xonar U7 MKII (USB)

They all use top of the line A/D and D/A from Cirrus (Xonar U7) TI/BB (Xonar Essence) and AKM (M-audio) and also the best you can get in op amps.

None of these cards can reach at 1KHz better than 0.0015% THD and 0.01% THD+N in loop back, by far the best being the M-Audio 192 (I suspect because it's the only one having balanced inputs and outputs). The Xonar Essence has about 0.002% THD (after replacing the NJM5532 op amps with LME49710) and the Xonar U7 MKII has about 0.004% THD. In all cases, the limitation appears to be the A/D converter, since the distortions appear at the same levels, by feeding from a SG505 low distortion generator, at optimum level.

I am in particular surprised by the Asus Xonar U7 MKII USB performance (or lack thereof), since it uses the flagship A/D and D/A from Cirrus (the owner replaced the original CS5361 A/D with the better, pin to pin compatible, CS5381, the D/A is CS4398). Op amps are rail-to-rail LME49726 with 0.00002% distortions. Both 2nd and 3rd harmonics are at -102dB, best case.

Using ARTA with ASIO for measurements.
 

Attachments

  • Asus Xonar Essence.jpg
    Asus Xonar Essence.jpg
    163.8 KB · Views: 263
  • M-Audio 192.jpg
    M-Audio 192.jpg
    157.9 KB · Views: 267
  • Asus Xonar U7.jpg
    Asus Xonar U7.jpg
    164 KB · Views: 262
Scott, it's not clear if you are trying to get something in particular to work, or if you are trying to make a list of all the applications that don't properly support exclusive mode, and those that do?

I'm not sure it has anything to do with exclusive mode per se otherwise it would be simple. Please find an application that works by simply using exclusive mode and does not support ASIO. GNU Octave is a huge project with dozens of capable developers, it does not work.

Yes, I would be happy to get one USB device to work with Octave to help out the cause.
 
Last edited:
I don't know how you guys get those outlandish performances out of sound cards, I may do something very wrong? I had the opportunity to check 3 models:

Waly I think you missed something, these are all what I find too. With respect to THD I presume we are talking about what we see after a notch filter.
None of these cards are useful at full scale in to better than 100dB or so.
 
I'm aware of two trick for handling discontinuity in timing in a USB stream.
The most popular one is bit depth dropping. This is the reason the data is sent msb first.
It allow sat a 24bit word to be reduced to 20bit or 16 bit. However the missing bits need to be padded at the receiving end. DAC hardware can handle this perfectly. But I not so sure out software can unless it has knowledge of the number of bits dropped.

I can sample rate conversion taking place because of intense processing time. it would fix the problem.

The other trick is more at the USB interface end of things. This involved small changes in sample rate by changing the clock rate. It leads to FM effects thought to be undetectable. We are not talking about huge changes here just enough to prevent buffer overflow.

I have to stop posting first thing in the morning.

Second paragraph should read,

I can't see sample rate conversion taking place because of the intense processing. It wouldn't fix a timing problem.
 
Last edited:
Member
Joined 2004
Paid Member
I don't know how you guys get those outlandish performances out of sound cards, I may do something very wrong? I had the opportunity to check 3 models:

- Asus Xonar Essence STX (PCIe)
- M-Audio 192 (PCI)
- Asus Xonar U7 MKII (USB)

They all use top of the line A/D and D/A from Cirrus (Xonar U7) TI/BB (Xonar Essence) and AKM (M-audio) and also the best you can get in op amps.

None of these cards can reach at 1KHz better than 0.0015% THD and 0.01% THD+N in loop back, by far the best being the M-Audio 192 (I suspect because it's the only one having balanced inputs and outputs). The Xonar Essence has about 0.002% THD (after replacing the NJM5532 op amps with LME49710) and the Xonar U7 MKII has about 0.004% THD. In all cases, the limitation appears to be the A/D converter, since the distortions appear at the same levels, by feeding from a SG505 low distortion generator, at optimum level.

I am in particular surprised by the Asus Xonar U7 MKII USB performance (or lack thereof), since it uses the flagship A/D and D/A from Cirrus (the owner replaced the original CS5361 A/D with the better, pin to pin compatible, CS5381, the D/A is CS4398). Op amps are rail-to-rail LME49726 with 0.00002% distortions. Both 2nd and 3rd harmonics are at -102dB, best case.

Using ARTA with ASIO for measurements.

Trick #1 lower the level. I find -15 dBFS to -20 dBFS gets the best results.
Trick #2 get as much hum out of the card as you can. The balanced to differential helps a lot. The hum and noises dominate the distortion readings
Trick #3 waste a lot of time f'ing around with it. Even the host PC makes a difference if the supplies are poor or the noise level is really high. The three cards you tried I have not. The Asus Xonar DX is the first Asus and that only because of the low profile.

The pro cards tend to be better executed for whatever reason. Probably because they will get flack from users faster.
 
Scott, it's not clear if you are trying to get something in particular to work, or if you are trying to make a list of all the applications that don't properly support exclusive mode, and those that do?

The plot thickens a little, got 96k but not 24 bits to work on Octave. I suspect that when you go to yourdevice -> Settings -> Advanced the pull down list under what to use in shared mode are all the possibilities that are reported for the non-ASIO driver.

FWIW

In theory, Windows Audio (Exclusive Mode) provides the best stability because it blocks Windows system sounds and sound from other programs to get mixed in. It's usually the best choice when using built-in sound for computers running Vista/7/8/10.

I think it's usually better to use ASIO if you are using an external audio interface on Windows.
 
I got a couple of simple plugins to work functionally (worked on Audition too) but I never could figure out their interface to dialog boxes.

Scott, you know this but I'll say it any way. When you reach these points,
you've got to find a kid to young adult to lead the way. They can figure it out
out pretty quickly compared to "mature" folks.

That is not to say that we cannot give time and desire. But, it gets to the
point that for me personally I don't want to be stuck in a room behind a computer.

Yes, I know with the laptops we can carry them with us...until one
walks off....

Cheers,
 
Trick #1 lower the level. I find -15 dBFS to -20 dBFS gets the best results.
Trick #2 get as much hum out of the card as you can. The balanced to differential helps a lot. The hum and noises dominate the distortion readings
Trick #3 waste a lot of time f'ing around with it. Even the host PC makes a difference if the supplies are poor or the noise level is really high. The three cards you tried I have not. The Asus Xonar DX is the first Asus and that only because of the low profile.

The pro cards tend to be better executed for whatever reason. Probably because they will get flack from users faster.

Ok, so I've put quickly together a twin T, with what was around; unfortunately at 5KHz, since the only decent caps (dielectric, 5% precision and enough to sort 3 pcs.) I found were 3nF polystirene. Got some metal film 0.5% and the result were pretty good: -58.3dB attenuation @5.0475KHz (measured independently with a SA).

Redid the Asus Xonar U7 MKII USB, see the attached results; 5.0475KHz notched is -69dB, it adds up with the notch attenuation and the low output (had to keep it low, the whole thing is powered from the 5V USB, max output signal is -3dB, used -9dB (-3dB max from calibration, -6dB from generator setting) in this experiment). H2 is at -128.8dB + 9.6dB = -119.2dB and H3 is at -106dB + 5.8dB = -100.2dB so the total is pretty much H3 0.001%. Not too bad, but still worse than what I would expect from top notch A/D and D/A in loop.

I'll redo the Asus Xonar Essence STX when I have the chance (needs f'king with the PC internals, something I deeply hate to do).
 

Attachments

  • Asus Xonar U7 notched.jpg
    Asus Xonar U7 notched.jpg
    162.9 KB · Views: 249
Scott, you know this but I'll say it any way. When you reach these points,
you've got to find a kid to young adult to lead the way.

I agree, but it just keeps getting worse. I was convinced I had it. I switched to my ASUS and 24/96 showed up and YES CoolEdit recorded a few second of noise and it worked. I switched to Audacity just out of curiosity and the ASUS bricked and stayed bricked now it simply froze every app including CoolEdit. Numerous reboots, etc. and now I have no recourse but try reinstalling all the drivers.

EDIT - Went back to my Win 7 laptop and yes it does appear that for each device (and each input) you have to have what you want show up in the settings -> advanced menu and you have to select it. Apparently the software can not request this to be changed. To my surprise the Scarlett 2i2 does not have a 24 bit mode at any sampling rate for the regular Win drivers, while the very cheap ASUS and Sound Blaster do. Apparently my older ASUS is not totally Win 10 friendly and I should look for updated drivers anyway. Sorry for all the BW on this simple stuff.
 
Last edited: