Getting a bit-perfect recording - Page 2 - Gearslutz Pro Audio Community
Getting a bit-perfect recording
Old 19th April 2010
  #31
Lives for gear
 
nucelar's Avatar
 

Quote:
Originally Posted by HLStudios View Post
You seem to have very little experience and your equipment is lower than entry level from what I have read.

I dont know why you are trying so hard to be an expert when you are clearly not.

Take the time to do a little bit of reading. When you understand what should happen and under what circumstances you will be able to make it happen with out all the try anything and see what happens routine.

In what way are you trying to create music?
Why are you questioning this? IMO it is perfectly legitimate to try to understand things by experimenting with whatever you have at hand. In fact I believe it's the only way to understand things. It is clear that Muriel has done his homework and has had enough theoretical background to start learning by doing. I don't think Muriel is trying to show off as an expert, he's just asking perfectly valid and reasonable questions...Maybe tell us how to BECOME an expert if it's not by trying hardly...
You also should have noticed that we are dealing with deterministic test signals here, not music.
Old 19th April 2010
  #32
Lives for gear
 
monomer's Avatar
 

Quote:
Originally Posted by Muriel Esteban View Post
This is true, but I will still miss 16711680 different values, not just 254.

I exactly played values [ 0, 1, 2, 3, ..., 99, 100, 101, 102, ..., 16777215 ] (I write them here unsigned, but in fact they are encoded in signed 24 bits integers).
The recorded data shows [ 127, 128, 129, 130, ..., 226, 227, 227, 228, ..., 16777087 ]: 254 values (0-126 and 16777088-16777215) are missing, and 254 values are doubled (as in my example: 100 and 101 were recorded at 227).

If somewhere in the path (between the played file and the recorded file) there was a 16 bits truncation (even with bits repadded afterwards), it would have been impossible to get such consecutive numbers precisely. A 16 bits truncation means that anyway I will loose at least 16711680 values.
Well, this is very unusual.
What might have happened is that the 8 LSB were truncated, and then the signal was, maybe partially, shifted in the range.
In any case there is some dubious bit manipulation going on.


Quote:
I just looked a bit around this pre-emphasis option. I don't understand yet how it can alter the signal.

Do you know a bit more about it ?
I think it's a way to encode the higher frequencies with more bits.
There is a precisely specified high frequency boost before sending the data over SPDIF. The stream includes a bit that will inform the other side that emphasis is enabled. The receiver applies a corresponding high frequency cut to compensate.

But that's what i can remember.

Quote:
I would have thought the same, but when I see how such a recording is not obvious, I fear the worse heh I really hope that you are right.

Your EMU testing makes me think that I just jumped on the cheapest audio interface for AES recording, and it should be an exception.

Thanks for your replies
Yeah, you should never have trusted the ASUS.
It is a game/toy card not designed for pro audio use.

I'm pretty sure the Emu 1212 will do just as well as the 1616m and it only costs around $150.
Not sure what cheaper alternatives there are.
Old 19th April 2010
  #33
Quote:
Originally Posted by monomer View Post
That's realy strange as there definitely SHOULD be padding if you record a 16 or 20 bit stream at 24 bits.
Altho almost any gain change at the recording side would overwrite the padded bits.



Yes, it is mostly a driver issue.
But there are other issues as well.
I read somewhere that if the windows mixer is used somehow, it will automaticly truncate everything to 16 bits if there is a 16 bit stream comming in.
So even if the soundcard drivers would provide for 24 bits, windows will fall back to 16 bits if there is a 16 bit source present anywhere in the chain.
So there are more issues to consider when using WDM drivers.


That SHOULD have yielded 24 bit transfer.


Yes, i understand your problem now. heh
This is definitely a gain change.
And it will mask any padded bits because a gain change will redistribute the non-padded bits across all the available bits if the gain change is not a power of 2.

So it is still uclear if it's only a gain change or if there is more involved.
I think your info on WDM is not complete or up to date. And it apparently wasn't when this 2003 explainer was written: http://www.digitalaudio.com/fileadmi.../WDM_Audio.pdf

There was a bug in the K-mixer (aka, KMixer; apparently affecting those with Win ME and Win 2000) that did truncate to 16 bits. But that was a decade ago and patches have been around since not long after.

Additionally, kernel-streaming mode WDM drivers, which bypassed the KMixer, were considerably more capable and better performing. The KMixer ended with XP.
Old 19th April 2010
  #34
Lives for gear
 
James Lehmann's Avatar
 

Quote:
Originally Posted by Muriel Esteban View Post
If it appears my problems with recording might come to clock issues or jitter...
It's nearly always that!
Old 19th April 2010
  #35
Lives for gear
 
monomer's Avatar
 

Quote:
Originally Posted by theblue1 View Post
I think your info on WDM is not complete or up to date. And it apparently wasn't when this 2003 explainer was written: http://www.digitalaudio.com/fileadmi.../WDM_Audio.pdf

There was a bug in the K-mixer (aka, KMixer; apparently affecting those with Win ME and Win 2000) that did truncate to 16 bits. But that was a decade ago and patches have been around since not long after.

Additionally, kernel-streaming mode WDM drivers, which bypassed the KMixer, were considerably more capable and better performing. The KMixer ended with XP.
But the paragraph about the Kmixer bit depth conversion mentions 2 separate problems. The path fixes only the second of these.
Old 27th April 2010
  #36
Gear interested
 
Muriel Esteban's Avatar
 

Thread Starter
I have just tested the M-Audio Audiophile 192 sound card.
It is also a PCI sound card with S/PDIF input/output, support for Asio and WDM drivers. I got it around 119 €. It can record 24 bits PCM data at 8, 9.6, 11, 12, 16, 22, 24, 32, 44.1, 48, 88.2, 96, 176.4 and 192 kHz. It is possible to select the clock synchro method, either internal or S/PDIF input signal.
I will just relate the PCM recording through its S/PDIF input.

I used several 192kHz 24bits files to be recorded (I also used the same files when previously testing ASUS Xonar D2/PM):
  • 1 file containing all possible values taken on 24 bits samples. File content: [ 0 0 1 1 2 2 ... 16777214 16777214 16777215 16777215 ].
  • 1 file containing a non-null constant value during 30 minutes. File content: [ 16777215 16777215 16777215 16777215 ... 16777215 16777215 ].
  • 1 file containing silence during 30 minutes. File content: [ 0 0 0 0 ... 0 0 ].
  • 1 file containing real music.
Before entering test details, I found a limitation in the M-Audio drivers concerning clock synchro. WDM drivers can't be used to record while synchronizing on the S/PDIF clock, and on the opposite, ASIO drivers can't record while synchronizing on the internal clock. This limitation was hit using several recording software (Sonar, GoldWave, Audacity).

Here are the tests I conducted:

1- Recording a consumer S/PDIF PCM signal

The PCM signal was played from another computer using foobar with kernel streaming plugin.

a- Using WDM driver and internal synchro: Failure

  • The problem encountered here seems to be jitter. 2 samples were sometimes added to the signal, and samples around were kind of stretched.
Here is a concrete example: playing the sequence
[ 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 ],
recording was
[ 1 1 2 1 3 3 4 3 5 4 6 5 7 6 8 7 8 8 9 9 ].

b- Using ASIO driver and S/PDIF synchro: Success

2- Recording a professional S/PDIF (aka AES/EBU) PCM signal played from the Audiophile 192 itself

The S/PDIF output has the possibility to send AES/EBU data (switch on the driver side). I directly connected its S/PDIF output to its S/PDIF input, and played using foobar and ASIO playback driver. Unfortunately ASIO driver can't be used for both playback and recording, so I could not test ASIO recording with this configuration.

a- Using WDM driver and internal synchro: Success

  • No problem. Jitter can't happen as the same clock is used for both playback and recording. This test validates that the Audiophile 192's S/PDIF input accepts AES/EBU data correctly.

3- Recording a professional S/PDIF (aka AES/EBU) PCM signal played from Forssell MADC-2 output

For this test, I can't check for sure if the recording is bit-perfect as my source is analog when going into MADC-2.
However, I did not hear/see any drop-out or distortion when recording silence, sine waves or music, both with WDM driver (Internal clock) and ASIO driver (S/PDIF clock).
I suspect that WDM driver recording using internal clock synchro has induced jitter, but it was impossible to hear it.


Conclusion:

M-Audio Audiophile 192 can clearly record bit-perfectly both S/PDIF and AES/EBU signals (when synchronized on the S/PDIF signal).
Jitter was measured where it was supposed to occur (only when the source was an external device and the clock synchro was internal), nothing abnormal.


Other notes I have taken:
  • Concerning the previously tested ASUS Xonar D2/PM (for consumer S/PDIF recording only), its clock synchro was certainly S/PDIF also, as I got the exact same number of recorded samples. Just the values were modified. With Audiophile 192, jitter resulted in the addition of new samples that were kind of interpolating the source signal.
  • The only 2 causes of distortion I have seen along my tests were bad software drivers and jitter.
  • I did neither test sample rates <192khz nor 16bits recording. I assume that if 192kHz/24bits records bit-perfectly, other formats should be ok.

If I happen to test another gear, I will continue posting my results here.

I hope those results will be helpful for others. If you want me testing specific features or configs that I may have missed, feel free to ask, I will try my best.
Old 4th July 2010
  #37
Lives for gear
 
Muser's Avatar
I thought that AES had to use an smux scheme. for higher sample rates at least.

http://www.sonorus.com/audio/smux.pdf

I find it totally unsurprising that these digital connections operate so badly via computer drivers.

interesting thread.. highlights it nicely.
Old 4th July 2010
  #38
Lives for gear
 
Teddy Ray's Avatar
 

Old 7th July 2010
  #39
Lives for gear
 
Muser's Avatar
Quote:
Originally Posted by Teddy Ray View Post
there is an easy way to see if something is "bit perfect" or not.


use a .md5 checksum

hkSFV Overview/Features
I bet chomsky manufactured your consent to say that.
Old 7th July 2010
  #40
Lives for gear
 
Teddy Ray's Avatar
 

Quote:
Originally Posted by Muser View Post
I bet chomsky manufactured your consent to say that.
Old 4th November 2011
  #41
Gear interested
 

hi,

Sorry for bring up a old thread. I'm trying to do bit perfect SPDIF recording, and come by this thread. Then bought a M-Audio Audiophile 192. But so far still don't know how to do this...

My setup:
PC A as spdif source, onboard spdif coaxial output, Win7 64bit, foobar2000 with wasapi plugin, 44.1khz 16bit wav dts file downloaded from Free DTS and AC-3 (Dolby Digital) Downloads - Kelly Industries output to a Pioneer receiver, receiver correctly see the spdif as DTS

PC B as spdif recorder, sound card is M-Audio Audiophile 192, Win7 32bit, sound card driver downloaded from m-audio website, in the driver panel, it sees the external spdif source correctly in 44.1khz, external spdif clock is selected and locked

I tried a few audio recording software, such as REAPER, wavosaur, Cool Edit pro etc, the resulting recorded wav file when playback on the PC A, the Pioneer receiver does NOT go to DTS and only output white noise.

Please give me some hint! Is there some specific software and/or options/settings must first configure for this to work? Thanks in advance.
Old 7th November 2011
  #42
Gear interested
 
Muriel Esteban's Avatar
 

Thread Starter
Hi

Here is my setup to get bit-perfect recording so far:
  • PC: Intel Core2 Duo E8400 @ 3Ghz with 3,25 Gb RAM
  • Sound card: M-Audio Audiophile 192
  • OS: WinXP SP3 Professional 32 bits
  • Sound card driver: M-Audio Delta 5.10.0.5074
  • Recording software and drivers: Ableton Live Lite M-Audio Edition 8.1.3 (given with the M-Audio AP192) configured to record using ASIO driver named "M-Audio Delta ASIO" (buffer of 4096 samples).
  • Recording setup (from the M-Audio Delta driver): 192kHz, 24bits, locked on external source, professional mode (AES)
With all the testing I conducted, I can say that unfortunately the bit-perfect recording depends on the hardware, drivers and recording software.

My advice to test your gear would be to use PCM files that you forge with all the values you want to record, then compare the recorded file with the source with basic hexadecimal editors.
This way you might understand the distortions applied in your recording chain. During my various hardware/software testing, I found gain distortion, jitter and even dithering! Knowing the kind of distortion you suffer from will help you point out which part of your recording chain might be the problem.

Hope this helps.
Old 11th July 2016
  #43
Here for the gear
 

Sorry for waking up an old thread.

I would just like to say, if any of you reading this is able to make a bit-perfect digital line loopback recording right now, would you be so kind as to post a screenshot of your process and results at
Measuring digital audio qualities of bit-perfect playback with Diffmaker’s correlation depth

?

One persistent issue in particular is stumping us, and that's the fact that all the loops we tried would introduce a 0.1dB cut to a full scale signal. I could even consistently get bit perfect recordings IF I limit the source material to - 6dB or thereabouts in max amplitude.
Old 12th July 2016
  #44
Lives for gear
 

Isn't .1 db the actual, hard limit, above which you would only hear digital static/distortions? Apologies if that's incorrect, but it was always my understanding.
Old 12th July 2016
  #45
Lives for gear
I would go with RME. They have some of the best drivers.

I use SSL ASIO drivers that I have had good luck with.
Old 12th July 2016
  #46
Lives for gear
 
monomer's Avatar
 

Quote:
Originally Posted by Joe Bloggs View Post
One persistent issue in particular is stumping us, and that's the fact that all the loops we tried would introduce a 0.1dB cut to a full scale signal. I could even consistently get bit perfect recordings IF I limit the source material to - 6dB or thereabouts in max amplitude.
Speculation:
Maybe the actual transfer you do is 16 bit only.
But you start with a 24 bit file.

So let's assume you want to sent the maximum value with 24 bits.
The maximum value would be 24 1's in a row.
But then you do the transfer and it's forced to 16 bits. So the lowest 8 bits get dropped. (still speculation)

These lower 8 bits would represent a pretty small value and so your sample would be reduced by some small ammount of db. Seems that's what's happening to you?

Try transfering a 16 bit file and see if that works better.
Old 12th July 2016
  #47
I don't think the volume would be reduced.. just the noise floor increased.
Old 12th July 2016
  #48
Lives for gear
 
monomer's Avatar
 

Quote:
Originally Posted by Chris Perra View Post
I don't think the volume would be reduced.. just the noise floor increased.
It would be both.

The highest possible level has all bits filled out as ones.
Without those lowest bits being filled, how would you ever hope to reach maximum level?

So the question is, do these lowest bits represent a level of about 0.1db?
Old 12th July 2016
  #49
I'm not an expert but I think the potential dynamic range would be reduced by the noise floor increasing but the max volume would remain the same.. 0 DB is 0 Db at any bit rate which is the max for both.

If you played and or measured a song mastered with a peak volume of 0.1 db at 24 bits then dithered it to 16 bit and made no other changes.. I believe the 16 bit version would also have a peak volume of 0.1 db.

I could be wrong as I've never done the test myself but I'm pretty sure that bit rate only increases noise floor and doesn't effect decreases max level.

It turns the dynamic range down from the bottom up so to speak.
Old 12th July 2016
  #50
Cool section on dithering here.. I'm basing my assumptions on his demos. When applying the dither I don't see the amplitude change just the noise floor.

Old 12th July 2016
  #51
Lives for gear
 
monomer's Avatar
 

Quote:
Originally Posted by Chris Perra View Post
I'm not an expert but I think the potential dynamic range would be reduced by the noise floor increasing but the max volume would remain the same.. 0 DB is 0 Db at any bit rate which is the max for both.
0dBfs only occurs at one value! (ok, there is a negative side so there are actually two such values. But let's consider the positive side only for now)
That value has all its bits filled with ones.

If you zero out some bits in that value then it is per definition not 0db anymore. Some bits that should contribute to the signal reaching 0db are simply missing. It's that simple.

Noise doesn't even come into play since we are talking about the level of single samples. We are not talking about signals here, we are talking about the transfer of individual samples and how they can be affected by the transfer.

For completeness, there can also be other problems that do not relate to individual samples but to the encoded signal over time. But we haven't touched that beast yet And most of the time if there is no sneaky samplerate conversion going on you don't see these type of problems. Most spdif problems are related to clocking or to mangling of individual samples.

Quote:
If you played and or measured a song mastered with a peak volume of 0.1 db at 24 bits then dithered it to 16 bit and made no other changes.. I believe the 16 bit version would also have a peak volume of 0.1 db.
What kind of dB's are you talking about? There is no such thing as 0.1db in digital. We consider only 0db and below. Actually, we should all speak about dBfs in this discussion.

Anyway, if you represent that 16 bit signal in a 24 bit datapath (like the one going to your interface) then it is impossible that the upscaled 16 bit will peak at exactly the same level (as explained above) because there are bits missing that are needed to reach that level. It will be close (because the lower bits contribute less) but it must be lower.
Old 12th July 2016
  #52
Sorry I meant -0.1 db.

If we compare bits to a ruler.. and we have a ruler that is 1 foot long or 30 cm, or 300 mm.

If we looked at the measurement from left to right as volume from - infinity db to 0 db


You describe that based on 24 bits,..8 bits is worth say a length of 10 cm or 4 inches.. (I'm just making that up as a value). If going by your description the potential output or length of the 16 bit when compared to a 24 bit or a full 1 foot ruler would be only 20 cm or 8 inches.. So automatically you would loose a third of your volume by dithering or rerecording to 16 bit.

To me what happens is the ruler stays the same length regardless of bit rate. The only thing that happens is the left side of the ruler gets blanked out or blacked out so you can't see the measurement on the left. So anything between 0 and 10 cm or 0 and 4 inches can't be measured or in comparison can't be heard because of noise floor...

At higher bit rates those measurements or ticks on a ruler reappear.. But the length of the ruler is always the same regardless of the bit rate.

If you can only measure from 10 to 30 cm instead of 0 to 30 cm,.. You have less markers.. In audio that would be dynamic range you would technically only have 20 cm of dynamic range vs 30 in 24 bit... But the right side of the ruler is always the same.. As long as you are doing things that make it past 10 cm on the left side of the ruler you are fine..

That to me is how you can have less dynamic range and still have the same volume regardless of bit rate.
Old 13th July 2016
  #53
Lives for gear
 
monomer's Avatar
 

Quote:
Originally Posted by Chris Perra View Post
Sorry I meant -0.1 db.

If we compare bits to a ruler.. and we have a ruler that is 1 foot long or 30 cm, or 300 mm.
I understand the ruler analogy but it simply can't be true!
Those bits you blank out have a level. If they are set to zero the do not contribute this level. So you can't reach the same value as you could with the bits in use. If you could then those bits would be useless.

But to be honest, i started calculating this level difference and it is actually pretty small. The levels get tiniy at the lowest 8 bits of a 24 bit system. I don't think it can be the level difference we talked about earlier...
Old 13th July 2016
  #54
Lives for gear
 
monomer's Avatar
 

Quote:
Originally Posted by Chris Perra View Post
So automatically you would loose a third of your volume by dithering or rerecording to 16 bit.
Aah! If you dither then you are adding back some (random) level. Over time this kindof compensates for the bits (and their levels) you truncated.

But this is not what i was talking about. For bit-perfect transfers dithering is out of the question, allways. So i would not expect a 24 bit stream to become dithered before being sent out over spdif. It would most likely just truncate because there could be a 16 bit data stream coded in the top 16 bits of the 24 bit stream. But as i said, that would not explain the level loss mentined earlier...
Old 13th July 2016
  #55
I don't think things are added or cut from the top. I think that's a term or concept created by looking at bit meters ad seeing things missing.

In the analog world as in hearing the material played back, or metering the material.... bit rate relates to hiss or noise floor.

So I believe the max level can and will be the same for both. The minimum level is different though because you have more hiss or noise floor. Anything below it is inaudible.
Old 13th July 2016
  #56
Here for the gear
 

In any case both my source audio file and recording device are 24 bits.
Old 13th July 2016
  #57
Lives for gear
 
monomer's Avatar
 

Quote:
Originally Posted by Chris Perra View Post
I don't think things are added or cut from the top. I think that's a term or concept created by looking at bit meters ad seeing things missing.
No, it's how sampling works. Really.
If i have some time i'll try to generate a file that will demonstrate this.

Quote:
In the analog world as in hearing the material played back, or metering the material.... bit rate relates to hiss or noise floor.
You have to remember that this is not the analog world we are talking about. It's not even the digital world in all is glory. It's about considering single sampels. There is no notion of noise because for noise you have to consider a series of samples.

Quote:
So I believe the max level can and will be the same for both. The minimum level is different though because you have more hiss or noise floor. Anything below it is inaudible.
That's only true if you do things according to sampling theory, which means dithering before truncation.
The case is that if you choose an arbitrary bit in a sample, let's say the 8th bit, then all the bits that come after it will add up to half the level (or was it the same level?) of that 8th bit. With dithering you actually add, on average, half a bit worth of level that kindof compensates for the level lost by truncating the bits that follow.
So if everything is done according to the rules then you are right.
If you do pure truncation then not.

And my point is that if something goes wrong with these type of spdif transfers then it's usually due to truncation and there is no actual correct dithering going on. You just get missing bits without the level compensation of the added dither.
Old 13th July 2016
  #58
Lives for gear
 
monomer's Avatar
 

Quote:
Originally Posted by Joe Bloggs View Post
In any case both my source audio file and recording device are 24 bits.
Just speculating: Did you use real recordings or did you generate the data for the test?
The thing is, if you generate the data then you need to take into account the sign bit. The sign bit is actually the highest bits an then you are left with 23 bits to describe the level. That may (or may not) be that -6 limit you encountered.

Maybe you can tell us more about your test setup.
Old 13th July 2016
  #59
Lives for gear
 
monomer's Avatar
 

Quote:
Originally Posted by Chris Perra View Post
The minimum level is different though because you have more hiss or noise floor. Anything below it is inaudible.
[off topic]
Well, no..

I made a test file to demonstrate (if all went well).
The sine tones are 14dB lower than the 1-bit noise.
If you can hear them in the noise then things below the noise floor are definitely audible.

Even better, if this noise was actual dither of those tones and you would then erase the low bits that encode the tones you would still be able to hear those tones since they get encoded statistically in the dither.

So through dither you can actually preserve some of the information from the bits that you are about to throw away. Which is kindof magic if you ask me
[/off topic]
Attached Files

Test noise sine 14dB difference.wav (4.04 MB, 59 views)

Old 13th July 2016
  #60
Tui
Lives for gear
Cool. I have no idea what you're talking about.

Actually, I do, but I would concur with elegentdrum. Get yourself proper gear - not consumer-grade - and it will take care of all potential issues.

Years and years ago, I nulled all formats down to complete digital black. If it doesn't null, something is broken.
Loading mentioned products ...
New Reply Submit Thread to Facebook Facebook  Submit Thread to Twitter Twitter  Submit Thread to LinkedIn LinkedIn  Submit Thread to Google+ Google+  Submit Thread to Reddit Reddit 
 
Post Reply

Welcome to Gearslutz Pro Audio Forum!

Registration benefits include:
  • Ability to make and reply to posts
  • Access to members-only giveaways & competitions
  • Interact with VIP industry experts in our guest Q&As
  • Access to members-only sub forum discussions
  • Access to members-only Chat Room
  • Get instant lifetime access to the world's best private pro audio Classifieds for only USD $20
  • List your eBay auctions for free
  • Remove this message!
You need an account to post a reply. Create a username and password below and an account will be created and your post entered.


 
 
Slide to join now Processing…
Thread Tools
Search this Thread
Search this Thread:

Advanced Search

Forum Jump
 
Join FAQ Search Today's Posts Mark Forums Read Search