• WANTED: Happy members who like to discuss audio and other topics related to our interest. Desire to learn and share knowledge of science required. There are many reviews of audio hardware and expert members to help answer your questions. Click here to have your audio equipment measured for free!

SINAD Measurements

DonH56

Master Contributor
Technical Expert
Forum Donor
Joined
Mar 15, 2016
Messages
7,835
Likes
16,497
Location
Monument, CO
Thanks for all the code!

I had everything in Matlab years ago, then switched to Mathcad for some corporate programs. I have my own copy of both but have not updated the Mathcad program in years, and just found my old Matlab files appear to be gone (I had back-to-back hard drive crashes several years ago and lost a lot). My PDF of the IEEE Standard is also missing, argh... If I can find them I'll post my code (or pseudo-code). The advantage of the IEEE method, and similar used by most data converter companies, is that it generate relatively prime frequencies so harmonics do not bin and the signal(s) are aligned to the sample rate and record length so windowing is not required.
 
Last edited:

scott wurcer

Major Contributor
Audio Luminary
Technical Expert
Joined
Apr 24, 2019
Messages
1,501
Likes
2,821
The advantage of the IEEE method, and similar used by most data converter companies, is that it generate relatively prime frequencies so harmonics do not bin and the signal(s) are aligned to the sample rate and record length so windowing is not required.

The frequencies posted all are integer multiples of the record length and do not require windowing. If F is an integer multiple 2F and 3F are too so I am missing something here.
 
Last edited:

Rja4000

Major Contributor
Forum Donor
Joined
May 31, 2019
Messages
2,682
Likes
4,220
Location
Liège, Belgium
If you simply want 30 tones spaced at 1/3 octaves (with 1000Hz included as closely as possible) this works.

sample_rate = 192000.
fft_len = 65536.

base = sample_rate/fft_len

for n in range(-16,14):
freq = round((1000*pow(2.0,n/3.0)/base))*base

Which gives...

23.4375
32.2265625
38.0859375
49.8046875
61.5234375
79.1015625
99.609375
125.9765625
158.203125
199.21875
249.0234375
316.40625
395.5078125
500.9765625
629.8828125
793.9453125
999.0234375
1259.765625
1587.890625
2000.9765625
2519.53125
3175.78125
3999.0234375
5039.0625
6348.6328125
8000.9765625
10078.125
12700.1953125
15999.0234375
20159.1796875
Hi
I was doing something similar, although I was not focusing on the "1kHz as closely as possible".
But I like the idea: that is a way to standardise this one step further.
 

Rja4000

Major Contributor
Forum Donor
Joined
May 31, 2019
Messages
2,682
Likes
4,220
Location
Liège, Belgium
The frequencies posted all are integer multiples of the record length and do not require windowing.
...Which is the goal of the "round()" in the function.
F is an integer multiple 2F and 3F are too so I am missing something here.
I also thing they are not real prime but (very close to) multiples.
 
Last edited:

solderdude

Grand Contributor
Joined
Jul 21, 2018
Messages
15,891
Likes
35,912
Location
The Neitherlands

RayDunzl

Grand Contributor
Central Scrutinizer
Joined
Mar 9, 2016
Messages
13,201
Likes
16,983
Location
Riverview FL
This is a problem. As of late I have started to think that in the Dashboard view I should show the best case scenario even if it means lowering the volume to get around extreme clipping and such. Open to feedback on this.

I think, if playing full scale is a problem, to show both 0dB and whatever level is "best".

You got folks that are worried about digital attenuation, and attenuate after the DAC.

Then you have the digitally attenuating folks.

You can cater to both. Seems like good information to me.

If a DAC can't play nice at 0dB it's broke, isn't it?
 

RayDunzl

Grand Contributor
Central Scrutinizer
Joined
Mar 9, 2016
Messages
13,201
Likes
16,983
Location
Riverview FL
Get it while it is hot: https://www.dropbox.com/s/j0b8twx8pu7ga1o/APx555 Multitone 32 192 khz 24 bit.wav?dl=0

It may not be there forever if someone is reading this months from now. :)

Above is at 192 kHz sampling by the way.


Out of idle curiosity, I imported that (or at least the first 5.5 seconds that the software would take) into REW:

1570952469566.png


I don't know why it would register at 157dB SPL.

Nor why it would show so much "bad stuff" underneath.

---

Maybe some Cockpit Error. The above says "impulse Response Imported". I meant to import Audio Data.

Here's 87.4 seconds imported:

1570953738684.png


More reasonable, anyway.

---

And, in-room (at the moment):

1570954039915.png
 
Last edited:

KSTR

Major Contributor
Joined
Sep 6, 2018
Messages
2,690
Likes
6,013
Location
Berlin, Germany
And the silence bins (-240dB, where REW stops display) are an indicator that the FFT size is larger than the sequency length, and in fact it is only a 64k sequence. Using that we now get the bin population that is listed in Amir's post of the table data for that signal:
APx555 Multitone 32 192 khz 24 bit-Spectrum(64kFFT vs 256k).png


The reason why a 256k FFT shall be used is to leave some space between the bins so that the IMD components are actually visible and not lost in things like phase noise (which widens the bins at the bottom). Nevertheless, the IMD spectrum is so dense that one cannot distinguish actual components from simple random noise when only the multitone plot is given. That's why I prefer a less dense pattern, the mentioned sequence with at least a 7 bin distance between components.
 

RayDunzl

Grand Contributor
Central Scrutinizer
Joined
Mar 9, 2016
Messages
13,201
Likes
16,983
Location
Riverview FL
Oh, that's tricky...
 

scott wurcer

Major Contributor
Audio Luminary
Technical Expert
Joined
Apr 24, 2019
Messages
1,501
Likes
2,821
...Which is the goal of the "round()" in the function.
I also thing they are not real prime but (very close to) multiples.

To pick exact bins i.e. make it an integer as close as possible to the center of the NAB standard 1/3 octave bands where bin 19 is 1kHz. I skipped the first two low frequency bins but one could add them for 32 bins as the standard lists. I never saw the point of primes because if there is enough harmonic energy falling in a stimulus bin to add even a few 1/10ths a dB error the distortion has to be very bad. Just a way to do it.
 

scott wurcer

Major Contributor
Audio Luminary
Technical Expert
Joined
Apr 24, 2019
Messages
1,501
Likes
2,821
Yep, in this case 64k or larger.

Multiples of 64k? I'm used to using the arbitrary n FFT to keep the bins in exact Hz, I make to many stupid mistakes figuring out the equivalent noise BW. :)
 

DonH56

Master Contributor
Technical Expert
Forum Donor
Joined
Mar 15, 2016
Messages
7,835
Likes
16,497
Location
Monument, CO
The frequencies posted all are integer multiples of the record length and do not require windowing. If F is an integer multiple 2F and 3F are too so I am missing something here.

You are not missing anything; I was commenting in general and have not had time to look at any of the methods in detail. I was actually planning to run yours first as it looks similar to what I remember and incorporates rate and record length parameters so you can use arbitrary('ish) FFT length. I designed data converters and related circuits for many years, but that has not been my job the last few, so I've forgotten some. I have the equations implemented in various math programs so tend to ignore them once they are working.
 

scooter

Active Member
Forum Donor
Joined
May 12, 2019
Messages
139
Likes
51
Good day gentlemen!
Sorry if this has been already discussed... I noticed that during DAC measurements Amir always welcomes the fact if line outs are supplying 2V or 8.23dBu. Based on all previous reviews I really believed that this is a standard and the most of analog line level inputs of audio devices (consumer or pro) are designed accordingly to accept this kind of level signal.
Now looking at the specs of my Yamaha MG06 mixer, I see that a line input (channels 3/4, 5/6) nominal level is -10dBu (245.1mV) and the maximum before clip is +4dBu (1.228V).
I was going to order SMSL M100 DAC because it measured very good enough for under 100$ and has USB/Optical inputs needed for my karaoke application.
So this DAC has 2V line level output at 0dBFS, if I connect it to my mixer's 3/4 or 5/6 channels, will it cause to severely clip them? Of course I could attenuate digital volume on laptop when using it via USB, but the most of the time it will be hooked up with my TV's Optical Digital output. Does this output have constant 0dBFS output or it can be also controlled by TV volume settings?
On the mixer side, the only gain controls are assigned to the 1 & 2 channels but those will be used for mics.
Sorry for my English and possible errors in audio terminology... I'm still learning here at ASR :)
 

Rja4000

Major Contributor
Forum Donor
Joined
May 31, 2019
Messages
2,682
Likes
4,220
Location
Liège, Belgium
Hi
That's pretty low input level for a line input.
I'm not sure about TV volume control on Toslink.
Even if 'cliping' of an analog entry may not be as brutal as in digital, you'd probably want to go for a DAC with volume control.
 

scooter

Active Member
Forum Donor
Joined
May 12, 2019
Messages
139
Likes
51
Hi, thanks for your time.
I just can't believe Yamaha didn't took into account this "standard" and released the product breaking all certification policies or rules. They are in audio business for a long time, doesn't this look strange?
But yes, it's really sad this mixer missing some headroom on line level inputs...

P.S. Can anybody confirm if TV S/PDIF output is a fixed digital level?
 
Top Bottom