English Amiga Board (http://eab.abime.net/index.php)
-   Coders. Asm / Hardware (http://eab.abime.net/forumdisplay.php?f=112)
-   -   Amiga "14-bit audio" refuted (http://eab.abime.net/showthread.php?t=105355)

 Thomas Richter 11 January 2021 20:45

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 11 January 2021 20:54

1 Attachment(s)
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.

 Thomas Richter 11 January 2021 20:57

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 11 January 2021 21:00

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 11 January 2021 21:03

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.

 nikosidis 11 January 2021 21:22

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?

 grond 11 January 2021 21:56

Henryk of eagleplayer fame might disagree. He wrote a nice paper where he showed that preemphasis can do the trick.

 Thomas Richter 11 January 2021 22:05

Quote:
 Originally Posted by grond (Post 1452708) 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.

 Frog 11 January 2021 22:25

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

 nikosidis 11 January 2021 22:26

Quote:
 Originally Posted by Thomas Richter (Post 1452713) 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.

 no9 11 January 2021 23:14

Good work.

I think that measuring different players would also be worth a try.

 Bruce Abbott 12 January 2021 08:57

Quote:
 Originally Posted by nikosidis (Post 1452765) 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).

 Thomas Richter 12 January 2021 10:11

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 12 January 2021 10:15

Quote:
 Originally Posted by nikosidis (Post 1452724) 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.

 roondar 12 January 2021 10:15

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.

 nikosidis 12 January 2021 10:17

Quote:
 Originally Posted by Bruce Abbott (Post 1452838) 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 12 January 2021 10:21

Quote:
 Originally Posted by Thomas Richter (Post 1452852) 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 12 January 2021 10:48

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

 chb 12 January 2021 12:21

Quote:
 Originally Posted by Thomas Richter (Post 1452858) 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 (Post 1452858) 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 (Post 1452858) 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.

 daxb 12 January 2021 12:25

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.

All times are GMT +2. The time now is 05:36.