English Amiga Board


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

 
 
Thread Tools
Old 11 January 2021, 20:45   #1
Thomas Richter
Registered User
 
Join Date: Jan 2019
Location: Germany
Posts: 1,149
Amiga "14-bit audio" refuted

A while ago some folks here claimed that Amiga can generate CD-quality audio, by means of using two channels, calibration, and 56kHz output and I had serious doubts about that. So, how to refute that? Measure! So here is the setup: a) A PC with a emu10k1 / SBLive! sound card, able to generate 16 bit / 44.1kHz output, and able to sample its input at 44.1kHz in 16 bit. Actually, while the output frequency can be adjusted, the input sampling frequency is 48kHz and is then interpolated. Nevertheless, sampling frequency is set to 44.1Khz including the interpolation. b) A Marantz PM-80, used as a "cross bar" that routes the audio output of the Amiga or the PC back to the SBLive! input. c) audacity to sample the input and save it as 16bit wav. d) A small test program that generates a wav file of 16secs 441Hz (1/100th of the sampling frequency) e) aplay on the PC (the alsa audio player) f) a program that fits the input data to the original frequency (441Hz) and computes the SNR as SNR = -10 * log_10 ( noise / signal) where signal is the sampled signal, and noise the difference between the recorded signal and the fitted sine wave.
Thomas Richter is offline  
Old 11 January 2021, 20:54   #2
Thomas Richter
Registered User
 
Join Date: Jan 2019
Location: Germany
Posts: 1,149
Here are the two test programs. They are a bit "sloppy" as I tried several approaches. The major challenge was the analyzer that has to cope with the fact that the playout frequency and the original frequency are not identical. It thus has to adjust the phase of the reference signal continuously (or, equivalently, adjust its frequency to lock into the frequency of the play out).


I also tried an FFT approach, but that turned out not to be precise enough.



The phase gradient computation then required another phase unwrapping.


Actually, the difference between the "constant phase per period" and "adjusted phase over a period" does not make too much of a difference (approximately 1dB), but better is better.
Attached Files
File Type: zip tests.zip (3.8 KB, 79 views)
Thomas Richter is offline  
Old 11 January 2021, 20:57   #3
Thomas Richter
Registered User
 
Join Date: Jan 2019
Location: Germany
Posts: 1,149
On Amiga, I used Play16 to play out the signal. The screen was set to a 31kHz mode, PAULA was calibrated "as good as possible" by ear. On the PC, I used only aplay and audacity, and the supplied programs.
Thomas Richter is offline  
Old 11 January 2021, 21:00   #4
Thomas Richter
Registered User
 
Join Date: Jan 2019
Location: Germany
Posts: 1,149
Findings:
1) The phase drift on the Amiga is approximately one magnitude larger than on the PC. In other words, the Amiga cannot really reproduce the target frequency precisely, less precise than the PC. That is probably no surprise given that the PAULA frequencies cannot match precisely the target frequency (44100 Hz).


2) The SNR on the Amiga is approximately 30dB (!) worse than that of the PC. In particular, the PC quality is approximately 64dB, that of the Amiga "14 bit sound" approximately 33dB.


By a "rule of thumb", 6dB correspond to approximately 1 bit. That is, there is approximately a 5bit difference between Amiga and PC.


Note that the entire distortion of the "round trip" is measured. Generation, "cross-bar", and recorder.
Thomas Richter is offline  
Old 11 January 2021, 21:03   #5
Thomas Richter
Registered User
 
Join Date: Jan 2019
Location: Germany
Posts: 1,149
Conclusion: If the PC precision is 16bit, and Amiga is 5 bit worse, then the Amiga "14 bit audio" is approximately worth 11bits. Not 14. That corresponds approximately to my estimate. It is better than the 8 bit output, but not close to 14 bit.



Anyhow, the programs are there - they are certainly sloppy - but try to reproduce yourself.
Thomas Richter is offline  
Old 11 January 2021, 21:22   #6
nikosidis
Registered User

 
Join Date: Jan 2020
Location: oslo/norway
Posts: 838
Try this one:
http://aminet.net/mus/play/Eagleplayer.lha

It will give you the best sound quality using Paula with CD quality files.
There are for sure differences between players. Paula in Amiga 1200 and Amiga 600 will also give better Quality. They have different, better audio filter.
Are you using AHI? I would not use AHI for best possible SQ from Paula.



This is take out of the readme file, Eagleplayer.

Detailed version:
- some more 68000 related fixes (some plugins are still 68020+)
- 14 Bit Amplifier: significant audio quality improvements
- automatic limitation to 28 kHz sampling rate on OCS and when
non doublescan display modes are detected
- way better defaults for the 14 bit table for uncalibrated systems
(previous default was closer to 13.5 Bit - like AHI)
- fixed 14 bit table for calibrated setups: the C. Buchner
quantization approach was wrong, resulting in unnecessary artifacts
- fixed transition delay from one song to another
- added optional noise shaping for 16-14 bit conversion (060 or faster)
- adjusted default volume for filtered mixing modes
- support for stereo 14 bit calibration
- Amiga1200 autodetection with appropriate adjustment for the "highboost"
equalization filter (A600 and A1200 have a different audio filter
compared to the other Amiga models)

What I notice is that the noise floor is worse than on a real 16-bit soundcard.
Other than that I think it sounds damed good. Can for sure not compare with a high-end DAC, but
most will be happy with it!

What I could do is record the output of my A1200 and you could have a look at it?

Last edited by nikosidis; 11 January 2021 at 21:49.
nikosidis is offline  
Old 11 January 2021, 21:56   #7
grond
Registered User

 
Join Date: Jun 2015
Location: Germany
Posts: 1,033
Henryk of eagleplayer fame might disagree. He wrote a nice paper where he showed that preemphasis can do the trick.
grond is offline  
Old 11 January 2021, 22:05   #8
Thomas Richter
Registered User
 
Join Date: Jan 2019
Location: Germany
Posts: 1,149
Quote:
Originally Posted by grond View Post
Henryk of eagleplayer fame might disagree. He wrote a nice paper where he showed that preemphasis can do the trick.
I don't care what people claim. I'm a physicist. I care what I can measure.
Thomas Richter is offline  
Old 11 January 2021, 22:25   #9
Frog
Junior Member

Frog's Avatar
 
Join Date: Aug 2001
Location: France
Posts: 1,339
interesting post. Thank you for your work.

i got the best sound approach with the Deli14bit Genie make by Chris hodges.
I think it was far better than the 14bit Amplifier distributed with Eagleplayer
Frog is offline  
Old 11 January 2021, 22:26   #10
nikosidis
Registered User

 
Join Date: Jan 2020
Location: oslo/norway
Posts: 838
Quote:
Originally Posted by Thomas Richter View Post
I don't care what people claim. I'm a physicist. I care what I can measure.
Did you use AHI? Did you use the best program to playback?
Good you can measure, but give the Amiga the best possible conditions.
nikosidis is offline  
Old 11 January 2021, 23:14   #11
no9
Registered User

no9's Avatar
 
Join Date: Feb 2018
Location: Poland
Posts: 199
Good work.

I think that measuring different players would also be worth a try.
no9 is offline  
Old 12 January 2021, 08:57   #12
Bruce Abbott
Registered User

Bruce Abbott's Avatar
 
Join Date: Mar 2018
Location: Hastings, New Zealand
Posts: 675
Quote:
Originally Posted by nikosidis View Post
https://files.scene.org/view/parties...[2019].mp3

I took this file and converted to AIFF and transfered to my A1200. I have this Zoom recorder so I took the outputs from my A1200, using EaglePlayer for playback. I took the file out of the Zoom and made MP3 again. This is the result.

Amiga 1200/030, Screenmode MULTISCAN:Productivity

https://files.fm/u/tpf5n8mhp
Can you do the same with this?

https://www.mediacollege.com/audio/t...6bit_30sec.wav

(from here).
Bruce Abbott is offline  
Old 12 January 2021, 10:11   #13
Thomas Richter
Registered User
 
Join Date: Jan 2019
Location: Germany
Posts: 1,149
By all means, please do NOT use mp3 for this. This will create false signals without a strong phase correlation that is needed for the test. (Saying me, working at the "home of MP3"). Please use WAV only, or some lossless codec. Or simply rerun the generation code. 44100 kHz sampling frequency, 441 Hz base frequency. The base frequency should be an integer divisor of the sampling frequency, and this divisor should also be a multiple of 4 to generate optimal results.

E.g. 44100/441 = 100, and 100 is divisible by 4.
Thomas Richter is offline  
Old 12 January 2021, 10:15   #14
Thomas Richter
Registered User
 
Join Date: Jan 2019
Location: Germany
Posts: 1,149
Quote:
Originally Posted by nikosidis View Post
Did you use AHI? Did you use the best program to playback?
Good you can measure, but give the Amiga the best possible conditions.
I used play16 for this. You are invited to use any other program you consider fit, and any other equipment.


Concerning the claims: The ability of generating 14-bit audio is based on a couple of assumptions that may not necessarily true. First, Paula having a DAC that is precise enough in its steps such that the scaled down steps of a second voice "fit" into the coarse steps of the 8-bit scale. Second, that the two channels can be started in exact sync, and third that the analog part of the audio hardware is designed well enough to keep external noise out.


I doubt any of these asumptions are valid, explaining the rather poor quality. If I monitor the Amiga output in idle mode with audacity, I already get a non-zero noise floor that limits precision - not so with the PC output.
Thomas Richter is offline  
Old 12 January 2021, 10:15   #15
roondar
Registered User

 
Join Date: Jul 2015
Location: The Netherlands
Posts: 2,894
An interesting question might be how the "14 bit audio" of the Amiga compares to the 16 bit soundcards in common use on PC's when it first appeared in the early/mid 1990's. My gut feeling is that it actually compares better to those than we might think based on these measurements.

As I recall it, most early 16 bit audio cards were pretty poor and often had quite a bit of audible noise on line in/out. I'm sure that Amiga's "14 bit audio" output compares fairly well to those. Which is probably why people like me never really questioned it's performance (i.e. it sounded well enough or even better when compared to other "16 bit sources").

Comparing it to a Soundblaster Live (this is the PCI model I guess?) is an interesting choice. Not only as it's a design from well after Commodore's demise, but also as it was widely known back the day to be the first sound card by Creative that actually had "good" audio quality, which was a big part in it's success.

Which is why comparing it to say a Soundblaster 16 might be an interesting experiment to see how it does compared to more contemporary sources.
roondar is online now  
Old 12 January 2021, 10:17   #16
nikosidis
Registered User

 
Join Date: Jan 2020
Location: oslo/norway
Posts: 838
Quote:
Originally Posted by Bruce Abbott View Post
Can you do the same with this?

https://www.mediacollege.com/audio/t...6bit_30sec.wav

(from here).
Here it is:

https://files.fm/u/ame2bbgm2#/view/am96ycgz2
nikosidis is offline  
Old 12 January 2021, 10:21   #17
nikosidis
Registered User

 
Join Date: Jan 2020
Location: oslo/norway
Posts: 838
Quote:
Originally Posted by Thomas Richter View Post
By all means, please do NOT use mp3 for this. This will create false signals without a strong phase correlation that is needed for the test. (Saying me, working at the "home of MP3"). Please use WAV only, or some lossless codec. Or simply rerun the generation code. 44100 kHz sampling frequency, 441 Hz base frequency. The base frequency should be an integer divisor of the sampling frequency, and this divisor should also be a multiple of 4 to generate optimal results.

E.g. 44100/441 = 100, and 100 is divisible by 4.
Ok

I will test that now.
nikosidis is offline  
Old 12 January 2021, 10:48   #18
nikosidis
Registered User

 
Join Date: Jan 2020
Location: oslo/norway
Posts: 838
I used this FLAC file from Assembly 2018
https://files.scene.org/view/parties...chreibung.flac

This is the output from my Amiga 1200. I converted the FLAC to AIFF, the recorder use WAV so no compression. It think Paula sounds great here!! It is different but I can not choose who I like the best.

https://files.fm/u/h8q8by2gs#/view/hdgyaq8qs

Last edited by nikosidis; 12 January 2021 at 11:07.
nikosidis is offline  
Old 12 January 2021, 12:21   #19
chb
Registered User

 
Join Date: Dec 2014
Location: germany
Posts: 324
Quote:
Originally Posted by Thomas Richter View Post
Concerning the claims: The ability of generating 14-bit audio is based on a couple of assumptions that may not necessarily true. First, Paula having a DAC that is precise enough in its steps such that the scaled down steps of a second voice "fit" into the coarse steps of the 8-bit scale.
AFAIK the second channel is playing at volume 1 and uses only the lower 6 bits, so at least in theory there shouldn't be any steps of voice 2 fitting into the voice 1 steps, just non-overlapping ranges. Still it's probably not a very linear DAC which introduces distortions.

Quote:
Originally Posted by Thomas Richter View Post
Second, that the two channels can be started in exact sync
Toni Wilen thinks that's possible in this post

Quote:
Originally Posted by Thomas Richter View Post
and third that the analog part of the audio hardware is designed well enough to keep external noise out.
That's very likely not the case, I guess it's quite safe to say that the designers did not have high-end audio in their minds when creating the chipset and the boards.

Still, I guess you can compare the quality of "14 bit" audio @56 kHz on an A1200 (weak filter) to a decent vinyl record player, which is good enough for most people for a lot of musical genres. Orchestral works with extreme dynamics will show it's weaknesses compared to CD audio, of course.
chb is offline  
Old 12 January 2021, 12:25   #20
daxb
Registered User
 
Join Date: Oct 2009
Location: Germany
Posts: 2,854
Don't forget that 14 bit playback needs 16 bit source to make sense. On Amiga everything is 8 bit. So you need to copy uncompressed 16 bit 44kHz audio material to Amiga first. I don't see much use of it.

All the 8 bit sound on Amiga (8SVX, RAW, ... samples) used for music and soundfx will be played with native Paula. Sounds good enough and it is recommended.

I don't know how 14 bit sounds or should sound and I guess nearly nobody knows it. Do exits 14 bit playback devices? That might be interesting to compare Amiga 14 bit playback with a 14 bit reference device. Comparing with a bad 16 bit sound card doesn't make sense to me.
daxb 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 00:05
"Voices8" 8 Channel Soundtracker "DemoSongI" song - "This is the Amiga with 8 Voices" DemosongIHunter request.Music 44 27 October 2019 19: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 08:22
Amiga Power "Games Massive" Audio Tracks twcustom project.TOSEC (amiga only) 4 21 July 2016 21:09
"Bit för bit" demo (Swedish TV-show, hard to find!) Ziaxx request.Demos 5 10 March 2009 18: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 18:20.


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