English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Asm / Hardware

 
 
Thread Tools
Old 17 January 2021, 15:30   #121
nikosidis
Registered User

 
Join Date: Jan 2020
Location: oslo/norway
Posts: 543
Quote:
Originally Posted by Bruce Abbott View Post
I created a sequence of 1kHz tones at different levels ranging from 0dB to -90dB using Audacity on my PC, then played them on my A1200 in Eagle player with its 'calibrated 14 bit' engine. Going down to -65db, -67.2dB, -70dB and -75dB the tone got progressively weaker, but still sounded pure. At -76.5dB it suddenly dropped out. All levels below that produced nothing.

The 16 bit values in the -75dB file ranged from -6 to +6 = 13 levels, which is slightly less than 4 bits. Dividing 75dB by 6.06dB per bit we get an effective 12.4 bits.

That's not 14 bits, but is it a big deal? -75dBm is a pretty low level. With my amp set to normal listening volume the -75dB tone was inaudible. I had to crank the volume knob all the way up to '100' to hear it, which of course brought up some mains hum (probably caused by a ground loop between my amp and other components) and faint rumbling sounds whenever the Amiga's mouse moved or hard drive was accessed.

To get a better idea of what noise might be present I hooked my oscilloscope up to one of the A1200's audio outputs. There was ~5mV of high frequency pulses which appeared be coming from Paula and not completely filtered out, and the trace bounced around at a low frequency due to that ground loop, but at -60dB the sine wave looked pure. At -70dB it became distorted, indicating insufficient bits to form a good waveform. At this level it was very hard to get a stable display due to all the high frequency noise. So the scope showed a lot of inaudible stuff that made the signal look much worse than it sounded.
What you done here seams to me a very realistic measurement! using the right method and equipment.

Also what you say about inaudiable stuff is very important to consider.
It is always funny how companies use data about things that we can not see or hear to try to prove something is better.
Just have a look at all the bullshit high-end cable claims. There is not a single blind test that prove people can hear a difference in a cable. The cables can still measure different.
That said, it is easy to tell from a good hi-fi setup that it can be cleaner than Paula.
That does not equal better SQ for most.

Last edited by nikosidis; 17 January 2021 at 15:37.
nikosidis is offline  
Old 17 January 2021, 16:10   #122
roondar
Registered User

 
Join Date: Jul 2015
Location: The Netherlands
Posts: 2,430
Ok, this begs the same question I asked before (but in reverse): how come Bruce's measurement results are so much better than the other ones?

There's a huge difference between 60dB and 75dB. Reading all these different numbers is kind of confusing, I'd expect everyone who starts measuring to get roughly the same results (at least say within 3-6 dB, which is already quite a large difference) and that doesn't appear to be the case.
roondar is offline  
Old 17 January 2021, 16:40   #123
Thomas Richter
Registered User
 
Join Date: Jan 2019
Location: Germany
Posts: 857
Quote:
Originally Posted by Bruce Abbott View Post
I created a sequence of 1kHz tones at different levels ranging from 0dB to -90dB using Audacity on my PC, then played them on my A1200 in Eagle player with its 'calibrated 14 bit' engine. Going down to -65db, -67.2dB, -70dB and -75dB the tone got progressively weaker, but still sounded pure. At -76.5dB it suddenly dropped out. All levels below that produced nothing.
That measures the smallest/least significant quantization level, but not the SNR. In other words, this type of measurement allows you to identify the smallest step the (implicit) quantizer can reproduce, but it does not allow you to measure the non-linearities due to non-equally spaced quantization levels.


SNR is (as the name says) the ratio between the signal, and all deviations (distortions) of the signal compared to the original.


Quote:
Originally Posted by Bruce Abbott View Post
To get a better idea of what noise might be present I hooked my oscilloscope up to one of the A1200's audio outputs. There was ~5mV of high frequency pulses which appeared be coming from Paula and not completely filtered out, and the trace bounced around at a low frequency due to that ground loop, but at -60dB the sine wave looked pure. At -70dB it became distorted, indicating insufficient bits to form a good waveform. At this level it was very hard to get a stable display due to all the high frequency noise. So the scope showed a lot of inaudible stuff that made the signal look much worse than it sounded.
It is always distorted, but the distortions may be non-obvious to observe unless the signal amplitude is small.


I measured at maximal signal amplitude.
Thomas Richter is offline  
Old 17 January 2021, 16:42   #124
Thomas Richter
Registered User
 
Join Date: Jan 2019
Location: Germany
Posts: 857
Quote:
Originally Posted by roondar View Post
Ok, this begs the same question I asked before (but in reverse): how come Bruce's measurement results are so much better than the other ones?
Because they measure something different. See my answer below. If you just turn down the volume until the signal fades away completely, you ignore all other noise that may arise on the channel, such as noise due to imperfections in the quantizer linearity, but also signals from other sources such as the video signal noise at 56Hz I found in the spectrum.
Thomas Richter is offline  
Old 17 January 2021, 16:44   #125
Thomas Richter
Registered User
 
Join Date: Jan 2019
Location: Germany
Posts: 857
Quote:
Originally Posted by Gorf View Post
Why?
You can download PDM encoded music - so called DSD formal. E.g. here:
https://bluecoastmusic.com/free-downloads

Fine, but how do you feed that into your speakers from a computer? The PC soundcard cannot provide a PWM modulated signal with pulse modulation frequency at Mhz rate. They typically play back at 48Khz or 96kHz, or some adjustable frequency below, depending on the technology.
Thomas Richter is offline  
Old 17 January 2021, 16:47   #126
Thomas Richter
Registered User
 
Join Date: Jan 2019
Location: Germany
Posts: 857
Quote:
Originally Posted by nikosidis View Post
The best proof is still always in the listening.

That's called "subjective quality", which is certainly the gold standard. However, that wasn't quite the starting point. Maybe the Paula "14 bit audio" is satisfactory for some listeners - and I do not object to that - but the question was whether it would be equivalent to the output of a 14-bit DAC.


This doesn't ask for subjective quality. It asks for an analysis of the quantizer noise and other noise sources in the loop. This is a question which can be perfectly answered by "objective quality", with all of its deficiencies and its probably poor correlation to subjective quality understood.
Thomas Richter is offline  
Old 17 January 2021, 17:00   #127
Gorf
Registered User

 
Join Date: May 2017
Location: Munich/Bavaria
Posts: 1,227
Quote:
Originally Posted by Thomas Richter View Post
Fine, but how do you feed that into your speakers from a computer? The PC soundcard cannot provide a PWM modulated signal with pulse modulation frequency at Mhz rate. They typically play back at 48Khz or 96kHz, or some adjustable frequency below, depending on the technology.
http://eab.abime.net/showpost.php?p=...&postcount=117

That is why this format has to be transferred into something the PC or the Amiga can handle - on each machine a different approach would lead to the best outcome. After this the results can be compared to each other and to the "original".
(DSD can eg be played back using a RasPi and a Teac 301 ...)

Last edited by Gorf; 17 January 2021 at 17:24.
Gorf is offline  
Old 17 January 2021, 17:16   #128
nikosidis
Registered User

 
Join Date: Jan 2020
Location: oslo/norway
Posts: 543
Quote:
Originally Posted by Thomas Richter View Post
Because they measure something different. See my answer below. If you just turn down the volume until the signal fades away completely, you ignore all other noise that may arise on the channel, such as noise due to imperfections in the quantizer linearity, but also signals from other sources such as the video signal noise at 56Hz I found in the spectrum.
That make sense.
nikosidis is offline  
Old 17 January 2021, 18:01   #129
ross
Defendit numerus

ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 50
Posts: 2,982
I would not underestimate the report by Bruce and also confirmed by others in the forum (that A1200 dynamic range is close or better than 75 dB).
If we find a way to make quantization uniform, then 12 bits are usable/reachable.
The problem is figuring out if and how to do it (14 bit calibrated mode is good, but could something better be done?)..

EDIT:
In any case, I don't know how much this 'quest for uniform quantization' makes sense.
The today digital signals are processed and compressed in so many ways and the analog outputs are so artifact that having a system that sounds like a 12 bits dynamic range one, even if somehow distorted and colored, is fine by me.

Last edited by ross; 17 January 2021 at 18:22.
ross is offline  
Old 17 January 2021, 19:36   #130
Thorham
Computer Nerd

Thorham's Avatar
 
Join Date: Sep 2007
Location: Rotterdam/Netherlands
Age: 44
Posts: 3,164
Quote:
Originally Posted by Thomas Richter View Post
That's called "subjective quality", which is certainly the gold standard. However, that wasn't quite the starting point. Maybe the Paula "14 bit audio" is satisfactory for some listeners - and I do not object to that - but the question was whether it would be equivalent to the output of a 14-bit DAC.
My own hearing based test tells me that my A1200 produces somewhere between 10 and 11 bit quality. Seems in line with what you measured.
Thorham is offline  
Old 17 January 2021, 19:49   #131
nikosidis
Registered User

 
Join Date: Jan 2020
Location: oslo/norway
Posts: 543
I used the small condensator mics that are build into Zoom R16 and recorded A1200, EaglePlayer 14-bit amp, through the speakers playing.
I do not know if it is possible to tell the dynamic range of that sound wave but if someone is interested here it is: https://easyupload.io/cbznv0

Last edited by nikosidis; 17 January 2021 at 21:23.
nikosidis is offline  
Old 17 January 2021, 21:08   #132
buggs
Registered User

 
Join Date: May 2016
Location: Rostock/Germany
Posts: 100
Quote:
Originally Posted by Thomas Richter View Post
With a 16 bit quantizer? How is that supposed to happen? With ~6dB per Bit (you should know that), you are limited to 96dB.
The shorthand 6.02*Bits does not apply to these tests because it implies a uniform PDF of the signal to be quantized (you should know that). Instead, 6.02*Bits+1.76 dB is appropriate for the PDF of a sinusoid signal, which in turn results in 98 dB dynamic range. With a commonly referenced loss of 1 LSB on ADC, you're still well above 90 dB. Your SBLive! doesn't have an exceptional AD/DA chipset but still is rated above 91 dB for an AD-DA cycle.


I did all my tests (further up in the thread, see the linked PDF there for details on materials and methods) with a 24 Bit ADC @ 48 kHz and saved the files as 32 Bit Floating Point AIFF prior to the analysis. The algorithm I've applied works as follows:
- trim away silence at start/end of the file
- avoidance of leakage by zero cross detection and matching trim on both ends

- PSD calculation plus maximum detection of fundamental frequency

- SNR calculation from PSD after removal of the fundamental and it's harmonics (for reference: Matlab's snr() removes the first 6 harmonics)
buggs is offline  
Old 18 January 2021, 02:55   #133
Bruce Abbott
Registered User

Bruce Abbott's Avatar
 
Join Date: Mar 2018
Location: Hastings, New Zealand
Posts: 444
Quote:
Originally Posted by Thomas Richter View Post
That measures the smallest/least significant quantization level, but not the SNR. In other words, this type of measurement allows you to identify the smallest step the (implicit) quantizer can reproduce, but it does not allow you to measure the non-linearities due to non-equally spaced quantization levels.
That's right. I was only interested in how many bits were involved, no how much distortion or noise may be present. However my results do show that where it matters most (quiet parts of the music) those bits are doing the job - not as good a job as a better DAC, but still better than not having them.

Quote:
SNR is (as the name says) the ratio between the signal, and all deviations (distortions) of the signal compared to the original.
Bear in mind that SNR is bandwidth dependent, which is why an A weighted measurement should be made to get a noise figure that is relevant to the listener.

Quote:
I measured at maximal signal amplitude.
Noise may be greater at maximum volume, but less noticeable to the human ear because it is masked by the higher amplitude signal. I encoded a song in 8 bit stereo at 15kHz, with and without 'dither'. Without dither the signal became become 'bitty' at low volume. With dither the noise floor increased, but sound was 'smoother' and the higher noise level was not noticeable in loud parts of the music.

I also encoded the same song without dither in 16 bit stereo at 44kHz, and played it back with HippoPlayer using the AHI 14 bit engine. It sounded vastly better than either of the 8 bit samples, and the noise floor was inaudible at normal listening level. I know that in '14 bit' mode there is additional distortion and noise compared to a perfect DAC, but the difference is too small to worry about. What is important is that I was able to play a 44kHz 16 bit stereo file on my A1200 with a quality that is good enough for my ears, while 8 bits is not.
Bruce Abbott is offline  
Old 18 January 2021, 19:41   #134
ross
Defendit numerus

ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 50
Posts: 2,982
Attempt for a new approach, it might even be completely useless or bad

All Amiga 14-bit players, calibrated or not, try to make the most by spreading 6-bit (the least significants) from the discrete original PCM signal to the 'PWM' stage (this give the fine steps to the output signal).
Unfortunately, as we have seen, making it uniform is complex and imprecise (the full volume PCM channel is usually instead quite linear).

Furthermore, seems that the dynamic range output from the [A1200] Amiga does not allow in any case more that ~76db.

So why not deliberately decrease the resolution but generate a less distorted signal? I'll try to explain it.

What is now being done is this:
Vbit = lg2(PCM(h8)) + lg2(PWM(PCM(l6))/x), which to fully exploit the 14 bits uses:
x = 1 -> Vbit = lg2 (256) + lg2 (64/1) = 8+6 =14.0 bit

Suppose we change instead the x value to:
x = 2 -> Vbit = lg2 (256) + lg2 (64/2) = 8 + 5 = 13.0 bit
x = 3 -> Vbit = lg2 (256) + lg2 (64/3) = 8 + 4.415 = 12.415 bit
x = 4 -> Vbit = lg2 (256) + lg2 (64/4) = 8 + 4 = 12.0 bit
x = 5 -> Vbit = lg2 (256) + lg2 (64/5) = 8 + 3.678 = 11.678 bit

x is simply the Volume for the 'precision' channel (the one using the PWM property), so we would no longer use volume 1 but 2, 3, 4, 5 ...

This would mean changing the calibration and managing the distribution of values completely differently to make it as uniform as possible
(how values overlap? maybe a table approach is needed for high and low bits in both channels...).

Last edited by ross; 18 January 2021 at 19:52.
ross is offline  
Old Yesterday, 00:32   #135
buggs
Registered User

 
Join Date: May 2016
Location: Rostock/Germany
Posts: 100
Quote:
Originally Posted by ross View Post
So why not deliberately decrease the resolution but generate a less distorted signal? I'll try to explain it.
I'm currently thinking about possible avenues in that direction, too.

Your proposal boosts the LO channel by a given factor. While that won't help with the fundamental problem of HI-channel quantization noise we'd like to suppress as far as possible, there is a potential gain around the zero level (in the HI channel). The biggest problem I see with the former is (at the moment) Paula's comb filter that emits 1/3.5 MHz pulses in bypass mode, which are not sufficiently suppressed by the simple RC-lowpass used in the integrator OpAmp such that they produce harmonics levels we would normally not expect from an 8 bit DAC.

But I tend to think you are onto something with the latter. There are currently nasty distortions in the low amplitude area, typically somewhere at and below -30 dBFS signals, resulting in +1/0/-1 on the HI channel. I fixed most of these when I've proposed the corrected quantizer (for EP and AHI-Paula) but some may still be audible. With a higher amplitude on the LO channel, that channel can be used without resorting to changes in the HI channel amplitudes at a wider range around 0.

Also, another look at the VOL63+VOL1 approach to 14 Bit approximation may be worthwhile. I've played a little around with 8 Bit / 44.3 kHz at volume 63 and found the intermodulation effects way less pronounced than I remembered them. This way, HI and LO of channel stacking would be synchronous in time, though still not to the same temporal location (but IIRC closer than the current 55.4kHz cycle average). There's a chance that some more of the HI channel quantization noise could be cancelled out by the LO channel in that setup (speculation, for now).

Im pursuing a further approach for a while now, by not looking "down" into the dynamic range but rather "upwards" this time. I do get about 50 dB SNR in 9 Bit mode out of my A1200 (close to uncalibrated 14 Bit btw.) Moreover, the 9 Bit approach provides twice the amplitude (+6dB) compared to 14 Bit.
In the next step I've combined the 9 Bit mode with a classic 14 Bit mode, adaptively switching between the former and the latter based on the current amplitudes of the signal to be played. This happens in my prototype code at a granularity of about 11 ms. This still won't rival a true uniform 15 Bit quantizer. On the other hand, adaptive quantization relying on masking effects has been successfully used for ages: in G.711 PCM, ADPCM, MPEGA audio etc.
buggs is offline  
Old Yesterday, 00:55   #136
ross
Defendit numerus

ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 50
Posts: 2,982
Quote:
Originally Posted by buggs View Post
With a higher amplitude on the LO channel, that channel can be used without resorting to changes in the HI channel amplitudes at a wider range around 0.


---

Just out of curiosity, how did you solve the problem of the different phase between the left and right channel?
From the DMA allocator it seems that for the right channels (HI+LO) there are 45°, for the left(s) 135°...
Or did you use the same calibration for both and it works fine?

Last edited by ross; Yesterday at 01:37. Reason: opss, inverted the stereo..
ross is offline  
Old Yesterday, 01:22   #137
buggs
Registered User

 
Join Date: May 2016
Location: Rostock/Germany
Posts: 100
Quote:
Originally Posted by ross View Post
Just out of curiosity, how did you solve the problem of the different phase between the left and right channel?
From the DMA allocator it seems that for the right channels (HI+LO) there are 45°, for the left(s) 135°...
Or did you use the same calibration for both and it works fine?
I do use stereo calibration. You'll find my proposal for stereo calibration in https://aminet.net/package/driver/audio/AHI-Paula or alongside EP. Basically, the updated calibration utility outputs a file twice as large where the first 256 bytes are a "joint stereo" (or 1-level discrete Haar Transform) representation of the calibration for legacy applications. The other 256 bytes provide the difference data.
buggs is offline  
Old Yesterday, 01:34   #138
ross
Defendit numerus

ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 50
Posts: 2,982
Quote:
Originally Posted by buggs View Post
I do use stereo calibration. You'll find my proposal for stereo calibration in https://aminet.net/package/driver/audio/AHI-Paula or alongside EP. Basically, the updated calibration utility outputs a file twice as large where the first 256 bytes are a "joint stereo" (or 1-level discrete Haar Transform) representation of the calibration for legacy applications. The other 256 bytes provide the difference data.
Thanks for the link (that I'd missed till now..)
ross is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
IDE 40/44 pin adapter to work in Amiga 1200,a bit "dirty" hack. Possible? hda support.Hardware 4 11 September 2020 01:05
"Voices8" 8 Channel Soundtracker "DemoSongI" song - "This is the Amiga with 8 Voices" DemosongIHunter request.Music 44 27 October 2019 20:04
Question on audio settings: Should I use UAE "sinc" or OpenAL "4-point sync" or both? Dr.Venom support.FS-UAE 3 14 September 2017 09:22
Amiga Power "Games Massive" Audio Tracks twcustom project.TOSEC (amiga only) 4 21 July 2016 22:09
"Bit för bit" demo (Swedish TV-show, hard to find!) Ziaxx request.Demos 5 10 March 2009 19:38

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

Forum Jump


All times are GMT +2. The time now is 08:24.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, vBulletin Solutions Inc.
Page generated in 0.09795 seconds with 15 queries