English Amiga Board


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

 
 
Thread Tools
Old 13 January 2021, 15:12   #61
daxb
Registered User
 
Join Date: Oct 2009
Location: Germany
Posts: 2,728
Quote:
Originally Posted by ross View Post
A not too complex article on bit-depth and sound quality:
https://www.soundguys.com/audio-bit-...plained-23706/
and why for a casual listener 12 bit audio may even be good.
I think the last sentence can be a bit misleading. I would say 12 bit can (as you say with may) be enough (not always) but it depends. The article (at the end) explains why. It is a bit complicated (at least for me) because of several variables in conjunction. For example, my experiences with 8 bit sampling is that you can get very clear (seldom) and very noisy (most the time) results depending on the source. I would guess that the same can happen with 12 bit sampling. However, this hasn't much to do with the topic.
daxb is offline  
Old 13 January 2021, 20:28   #62
Thorham
Computer Nerd

Thorham's Avatar
 
Join Date: Sep 2007
Location: Rotterdam/Netherlands
Age: 44
Posts: 3,162
Quote:
Originally Posted by bloodline View Post
I think you are being a little generous suggesting that the output is approximately to 11bit, I would suggest it is closer to 10bit.
By ear I have to say it's somewhere between 10 and 11 bit. I made a 10 bit and 11 bit version of a WAV file (from FLAC). The same track with full 16 bits sounds less noisy than the 10 bit one on my A1200 but slightly more noisy than the 11 bit one.

Yes, i was wrong about the audio being 14 bit Thomas Richter is certainly right about measuring. In this case measuring using the ear is enough to determine that the audio is indeed not 14 bit, or even 11 bit as it so turns out.

I wonder if Paula can't do better using the amplitude modulation feature.
Thorham is offline  
Old 13 January 2021, 21:07   #63
bloodline
Registered User

bloodline's Avatar
 
Join Date: Jan 2017
Location: London, UK
Posts: 357
Quote:
Originally Posted by Thorham View Post
By ear I have to say it's somewhere between 10 and 11 bit. I made a 10 bit and 11 bit version of a WAV file (from FLAC). The same track with full 16 bits sounds less noisy than the 10 bit one on my A1200 but slightly more noisy than the 11 bit one.
Yeah, I’ll go with you on that. Probably too many variables when subranging Paula to be super precise.

Quote:
Yes, i was wrong about the audio being 14 bit Thomas Richter is certainly right about measuring. In this case measuring using the ear is enough to determine that the audio is indeed not 14 bit, or even 11 bit as it so turns out.
If I hadn’t tried to get my A1200 to play 16bit audio using this method back when I was 15, I might never have got into audio coding...
bloodline is offline  
Old 13 January 2021, 23:03   #64
buggs
Registered User

 
Join Date: May 2016
Location: Rostock/Germany
Posts: 98
Paula's capabilities wrt. actually achievable bit depth in the 14 Bit mode are in the ballpark of 10-11 bit with ECS Paula, depending on the Amiga model. Two major factors contribute to the observed limitations:
a) DAC output levels are not linear with respect to the intended 8 bit source amplitudes
b) the low volume channel is not synchronized in time and actual frequency to the high volume channel due to Paula's implicit resampling at volumes <64

What I disagree with are the estimated noise figures that started this thread. An SNR of 30dB corresponds an effective resolution of less than 5 bits.

My own measurements return different results, consistent with theoretical expectations and existing publications. My baseline measurement in classic 8 Bit resolution landed at 45.8 dB (theoretical optimum: 49.9 dB, old papers around 42 dB). I observed up to 59.6 dB in calibrated 14 Bit mode (A4000) which amounts to a sad hard number of 10 Bit resolution.

With some leniency towards correlated components of the noise figure (i.e. jitter in the low channel), generous rounding and a comparison of the noise floor with 11 bit ideal quantizers, one might be inclined to call it close to 11 bit.

I've updated my Paula writeup with Details to these measurements. The PDF can be found here

buggs is offline  
Old 14 January 2021, 00:15   #65
buggs
Registered User

 
Join Date: May 2016
Location: Rostock/Germany
Posts: 98
Quote:
Originally Posted by Thorham View Post
I wonder if Paula can't do better using the amplitude modulation feature.
One side effect of the amplitude modulation is that the samples are subject to 55.4 kHz resampling which Paula needs for the differential PWM. At higher sampling rates, the intermodulation byproducts become relevant.
I did some preliminary of testing vol 63+vol 1 channel stacking back in the 90s and abandoned that quickly due to artifacts of the implicit resampling.

Last edited by buggs; 14 January 2021 at 00:16. Reason: formatting
buggs is offline  
Old 14 January 2021, 00:48   #66
buggs
Registered User

 
Join Date: May 2016
Location: Rostock/Germany
Posts: 98
Quote:
Originally Posted by chb View Post
I do not think that pre-emphasis would have any effect on a 441 Hz signal, as it is well below the LPF frequency. But his improved calibration may.

True, any frequency well below the 3dB cutoff is unimpeded.

The pre-emphasis has to compensate for 15 dB attenuation around 18 kHz (A500/2000/4000), 12 dB for A3000 and 4 dB for A1200. The latter is hardly of consequence, ofc. But this process involves a trade-off between the dynamic range of the output signal and filter headroom. A near flat frequency response out of an Amiga is nice but won't help wrt. SNR. That's why I left it out of my experiments.



Concerning the calibration update: I don't expect a large impact on measurements with sine tones at 0 dBFS. I've only noticed (and disliked) the quantization table issue with signals of low amplitudes.
buggs is offline  
Old 14 January 2021, 01:43   #67
bloodline
Registered User

bloodline's Avatar
 
Join Date: Jan 2017
Location: London, UK
Posts: 357
Quote:
Originally Posted by buggs View Post
My own measurements return different results, consistent with theoretical expectations and existing publications. My baseline measurement in classic 8 Bit resolution landed at 45.8 dB (theoretical optimum: 49.9 dB, old papers around 42 dB). I observed up to 59.6 dB in calibrated 14 Bit mode (A4000) which amounts to a sad hard number of 10 Bit resolution.
10bit equivalent SNR is inline with my observation using the Amiga for professional audio recording.

Quote:

I've updated my Paula writeup with Details to these measurements. The PDF can be found here
Someone posted your write up a few days ago, it was a very enjoyable read!
bloodline is offline  
Old 14 January 2021, 13:15   #68
chb
Registered User

 
Join Date: Dec 2014
Location: germany
Posts: 308
Quote:
Originally Posted by buggs View Post
Paula's capabilities wrt. actually achievable bit depth in the 14 Bit mode are in the ballpark of 10-11 bit with ECS Paula, depending on the Amiga model. Two major factors contribute to the observed limitations:
a) DAC output levels are not linear with respect to the intended 8 bit source amplitudes
b) the low volume channel is not synchronized in time and actual frequency to the high volume channel due to Paula's implicit resampling at volumes <64

[...]

I've updated my Paula writeup with Details to these measurements. The PDF can be found here
Thank you for this extremely interesting and comprehensive paper! It never occurred to me that the mismatch between the sampling frequency and the PWM-period introduces noise.

Do you have an estimate what fraction of the total noise is due to that internal resampling? What SNR would be achievable at 55.4 kHz? It's rather pointless for practical purposes because it'S such an uncommon sampling frequency, and good quality resampling probably beyond the capabilities of an Amiga CPU.
chb is online now  
Old 14 January 2021, 14:04   #69
roondar
Registered User

 
Join Date: Jul 2015
Location: The Netherlands
Posts: 2,423
Quote:
Originally Posted by bloodline View Post
10bit equivalent SNR is inline with my observation using the Amiga for professional audio recording.
Well, it's not 14 bits. But still, around 10 dB of extra SNR is nothing to sneeze at - it's still essentially free extra quality. Maybe the knowledge it's 10 bits can even lead to new replayers that take advantage of this somehow.

All this does make me wonder about two things (one was kind of answered, but I didn't really get the answer so maybe someone can clarify?):
  • How does Paula's ability to do amplitude modulation where one channel can modulate the amplitude of the other affect these results? (this is the one I didn't quite get the answer to as it seemed to me to only refer to a frequency that Paula relied on and not anything about SNR)
  • What does this mean when we're talking about other systems with "16 bit sound"? Early PC cards with 16 bit DAC's often had terribly noisy output/real world SNR values. Can those still be called 16 bits, if SNR is essentially how we measure how many bits can be represented?
roondar is offline  
Old 14 January 2021, 14:39   #70
chb
Registered User

 
Join Date: Dec 2014
Location: germany
Posts: 308
Quote:
Originally Posted by roondar View Post
  • How does Paula's ability to do amplitude modulation where one channel can modulate the amplitude of the other affect these results? (this is the one I didn't quite get the answer to as it seemed to me to only refer to a frequency that Paula relied on and not anything about SNR)
From what I got from Henryk's paper, Paula works at a base frequency of ~3.58 MHz, and PWM is using 64 cycles. So when setting a replay period of 64 (equaling a sample replay frequency of 3.58 Mhz/64 = 55.4 kHz) or any integer multiple of that period, every sample overlaps perfectly with a PWM period. If the replay period is different, a PWM period can overlap two samples, which will lead to distortions. I guess a modulated PWM (AM approach) will lead to worse results than having a channel set at a fixed volume of 1.

I am however not 100% sure I understand everything correctly, and I had more of a glimpse at the paper than really working through the math.

Last edited by chb; 14 January 2021 at 14:49.
chb is online now  
Old 14 January 2021, 16:12   #71
Akira
Black Lives Matter

Akira's Avatar
 
Join Date: May 2001
Location: New York
Posts: 19,429
Quote:
Originally Posted by daxb View Post
Thomas did some measure. Most judge by opinion. I doubt that most users know how 14 bit or 12 bit or 10 bit sound.
THANK YOU.
And to add insult to injury, most these people don't have even half the Amiga knowledge Thomas does.

Quote:
Originally Posted by nikosidis View Post
All the tech. talk might be interesting for some, but the proof is in what you are hearing.
Quote:
I played guitar since I was a kid and I have a high-end stereo sound system.


It doesn't matter how good you THINK you hear (excuse us, "god ear"), you're not a measuring device and what's being discussed and posited here, is hard, solid, concise data.

You're the kind of people that say "vinyl sounds better".
Akira is offline  
Old 14 January 2021, 16:25   #72
ross
Defendit numerus

ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 50
Posts: 2,979
Quote:
Originally Posted by Akira View Post
You're the kind of people that say "vinyl sounds better".
Coincidentally I wrote:
"and about vinyl, yes for me also sound 'better' than CD, it is more colorful and full-bodied (and I'm not talking about the 'physical' or 'measurable' qualities of sound at all)"

Otherwise there would be no reason for someone's preference in something and even this entire forum would not make sense at all.
ross is offline  
Old 14 January 2021, 17:41   #73
buggs
Registered User

 
Join Date: May 2016
Location: Rostock/Germany
Posts: 98
Quote:
Originally Posted by chb View Post
Thank you for this extremely interesting and comprehensive paper! It never occurred to me that the mismatch between the sampling frequency and the PWM-period introduces noise.
In the end, (Re)Sampling is amplitude modulation, just with an impulse train instead of the customary complex exponential (or cosine). Since in the case of digital resampling the originating signal is discrete already, it will have a periodic spectrum that gets convoluted with a periodic spectrum of the (Re)sampler. If just point sampling is done (i.e. somewhat near ideal sampling), then the original spectrum is kept and maps to the new "usable" spectrum. Anyway, that's outside the audible range.
In case of digital resampling, especially the approximation of point sampling (or nearest neighbor), is the more important other side of the coin. Nearest neighbor resampling can be decomposed into two fundamental operations: convolution of the input signal with a rectangle (=implicit interpolation), followed by sampling at the new rate. The frequency domain correspondence to the rectangle is part of the new spectrum and introduces the relevant noise.

Quote:
Do you have an estimate what fraction of the total noise is due to that internal resampling? What SNR would be achievable at 55.4 kHz? It's rather pointless for practical purposes because it'S such an uncommon sampling frequency, and good quality resampling probably beyond the capabilities of an Amiga CPU.
I don't have actual figures at hand, simply because I tend to avoid nearest neighbor as often as possible.

55 kHz: I could not get any of my Amigas to play sound at 55.4 kHz properly. The maximum I could obtain was 54.5 kHz and I didn't do any measurements at that rate.

Last edited by buggs; 14 January 2021 at 17:41. Reason: I never get the newlines right here.
buggs is offline  
Old 14 January 2021, 17:47   #74
buggs
Registered User

 
Join Date: May 2016
Location: Rostock/Germany
Posts: 98
Quote:
Originally Posted by roondar View Post
How does Paula's ability to do amplitude modulation where one channel can modulate the amplitude of the other affect these results? (this is the one I didn't quite get the answer to as it seemed to me to only refer to a frequency that Paula relied on and not anything about SNR)
My hypothesis is that the volume setting is updated just like the regular volume register alongside the switch from the previous sample to the next one. But I did not (oscillo)scope it out. Maybe Toni (or somebody else with an overview of past threads in here) can weigh in on that topic.
buggs is offline  
Old 14 January 2021, 17:58   #75
buggs
Registered User

 
Join Date: May 2016
Location: Rostock/Germany
Posts: 98
Quote:
Originally Posted by bloodline View Post
Someone posted your write up a few days ago, it was a very enjoyable read!
Thx. Honestly, I did not advertise it's existence because I've more or less maintained it as journal for me and also because it didn't get a thorough peer review.
buggs is offline  
Old 14 January 2021, 18:02   #76
buggs
Registered User

 
Join Date: May 2016
Location: Rostock/Germany
Posts: 98
Quote:
Originally Posted by ross View Post
Perhaps first it is better to decide which machine to try Paula with.
- Amiga 500/2000: 4.42 kHz (100 nF, 360 ohm)
- A600 Rev2: 27.7 kHz (3.9 nF, 1.5k ohm)

- A1200 Rev1d: 27.7 kHz (3.9 nF, 1.5k ohm)
- A1200 Rev2: 34.4 kHz (6.8 nF, 680 ohm)
- A4000: 4.52 kHz (47 nF, 750 ohm)
The question about the A600 has been settled earlier in here, but I'd like to add some words. I extracted the previously stated numbers for the A600 filter from a schematics PDF that's circulating, which in turn actually contained A1200 Rev1d specs in the audio filter.
As luck would have it, I was just handed an A600 for fixing. And unsurprisingly by now, that A600 has the same filter as A500/2000, 100nF+390Ohms.
buggs is offline  
Old 14 January 2021, 18:17   #77
Thorham
Computer Nerd

Thorham's Avatar
 
Join Date: Sep 2007
Location: Rotterdam/Netherlands
Age: 44
Posts: 3,162
Quote:
Originally Posted by Akira View Post
I performed my own test by ear after Thomas Richter posted his test results and I came to the same conclusion. Don't be so quick to dismiss the ear. In this case it becomes crystal cleear very quickly if the ear is good enough, and it certainly turned out to be the case. Might be a coincidence, of course
Thorham is offline  
Old 14 January 2021, 18:30   #78
ross
Defendit numerus

ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 50
Posts: 2,979
Problem here is that Paula is a strange beast, it's not like the usual PCM or PDM emitter of today. It' a mixed PCM/PWM state machine, prone to distortions due to her inner working. Add to this: specific period granularity, different phase for the channels, different filters, different components, different D/A separations, home made 'software' linear calibration (that any technician would shiver to conceive such 'unreliable' thing )... Many of these properties are not bad per se (far from it!) but they make it difficult to compare it with the existing.

Yes, you can measure the 'math quality' of the sound and decide that Paula is 10, 11, 12 bit or alike (I am not among those who think it is even remotely similar to 14 or 16bit).
But the 'reconstruction' that Paula do from the discrete quantized bits is pretty unique and not so simply comparable with the existing.
What are the conditions that allow it to perform at its best in the 'emulation' of the original signal? I don't think there is anyone here with a precise answer..

So blind test is probably a path to try (as mentioned in a previous message) .
But under the conditions of the first post Thomas is right.
ross is offline  
Old 14 January 2021, 18:38   #79
ross
Defendit numerus

ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 50
Posts: 2,979
Quote:
Originally Posted by buggs View Post
My hypothesis is that the volume setting is updated just like the regular volume register alongside the switch from the previous sample to the next one. But I did not (oscillo)scope it out. Maybe Toni (or somebody else with an overview of past threads in here) can weigh in on that topic.
Can this code be useful?:
http://eab.abime.net/showpost.php?p=...6&postcount=92
ross is offline  
Old 14 January 2021, 18:50   #80
roondar
Registered User

 
Join Date: Jul 2015
Location: The Netherlands
Posts: 2,423
Well, the reason for asking is kind of like this: suppose you have a sample playing at a non-maximum volume and then use Paula's amplitude modulation on it. What happens?

Does the amplitude modulation simply "overwrite" the volume setting of the channel with a new one, or does it affect the output separately? If it does the latter, you might be able to reach volume levels that are not normally possible, which might be interesting. Or does it perhaps merely alter the digital value of the sample pair currently read?

I guess I'm asking if it's:
  • Paula amplitude modulation affects digital value of sample, staying inside of the -128/+127 range
  • Paula amplitude modulation affects channel volume, staying inside of the 0-65 range
  • Paula amplitude modulation is a separate process from the above (and therefore can change sample output outside of the normal 8-bit limits/outside of normal 0-65 volume range)

Last edited by roondar; 14 January 2021 at 18:54. Reason: Order of text in my post was confusing.
roondar is offline  
 


Currently Active Users Viewing This Thread: 2 (1 members and 1 guests)
chb
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 03:53.


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