09 February 2021, 04:13 | #1 |
Registered User
Join Date: Feb 2021
Location: Becej / Serbia
Posts: 120
|
14.57731 bit audio
Hello,
I've been writing about this in another thread, but thought this is important enough to warrant it's own thread. I have just finished testing a solution to get a bit higher audio quality out of Amiga. The solution works both in emulators and on the real machine. The difference between this and the 14bit audio we've been using for ages is that you're getting the combined samples by using a channel set to 64 and 63 volume instead of 64 and 1. The combined values work well in the range -12223 to 12222, which is ~14.57731 bit quality. You can also modify the conversion to work with the range -16256 to 16129, but then you will get lower quality as you reach those higher levels because some values can not be derived from a*64 + b*63 (where both a and b are in range of -128 to 127) This system, also gives higher volume compared to the old 14bit system, and reaches ~75% of the volume of just playing 8 bit sound on both channels at maximum volume. I have attached the conversion tables, both ones that convert in the -12223 to 12222 range - if you generated audio into that range, or converted from higher bits to that range, as well as for -32768 to 32767 range, if you just want to convert 16bit sound into this format. It should be pretty straightforward to implement into any audio players, so I hope someone will make something useful out of this. The files in the attachment are: 24446tab63.dat -- values to convert from -12223 to 12222 range for the 63 volume channel 24446tab64.dat -- values to convert from -12223 to 12222 range for the 64 volume channel 65536tab63.dat -- values to convert from 16bit for the 63 volume channel 65536tab64.dat -- values to convert from 16bit for the 64 volume channel |
09 February 2021, 10:37 | #2 |
Registered User
Join Date: Jul 2015
Location: The Netherlands
Posts: 3,408
|
This is a fascinating development, I'll be sure to look into it
Did you do any tests (other than listening) on the quality you get by using this method? |
09 February 2021, 10:41 | #3 | |
Registered User
Join Date: Feb 2021
Location: Becej / Serbia
Posts: 120
|
Quote:
The base PSNR is lower than in the 14bit audio, but I have absolutely no idea what distortions happen in the machine once the digital signal gets there. |
|
09 February 2021, 10:44 | #4 | |
Registered User
Join Date: Jun 2010
Location: PL?
Posts: 2,742
|
There is 65 levels from Max to null. http://amiga-dev.wikidot.com/hardware:audxvol - special coder (mapper) should use approach where one DAC is free from PWM and remain fraction is PWM active - with proper reconstruction filter most of harmonics should be removed giving as such higher SNR.
I can prepare signals if you are interested to verify your idea (and to simplify overall process lets stick to normal sample rates to avoid all issues with ECS/AGA). Quote:
|
|
09 February 2021, 10:48 | #5 | |
Registered User
Join Date: Feb 2021
Location: Becej / Serbia
Posts: 120
|
Quote:
Yeah, but my PC has a wretched audio in, I get noise on everything. |
|
09 February 2021, 11:03 | #6 | |
Registered User
Join Date: Jan 2020
Location: oslo/norway
Posts: 1,607
|
Quote:
|
|
09 February 2021, 11:09 | #7 | |
Registered User
Join Date: Feb 2021
Location: Becej / Serbia
Posts: 120
|
Quote:
edit: The lookup table usage is pretty simple, especially the 65536 ones, it goes something like this:
|
|
09 February 2021, 11:10 | #8 |
Registered User
Join Date: Jun 2010
Location: PL?
Posts: 2,742
|
|
09 February 2021, 11:16 | #9 |
Registered User
Join Date: Feb 2021
Location: Becej / Serbia
Posts: 120
|
Are you talking about AUDxPER or sample period? Because if you're talking about AUDxPER, I've never read it has additional distortions at different periods. (That's what I was talking about).
|
09 February 2021, 11:25 | #10 | |
Registered User
Join Date: Jan 2020
Location: oslo/norway
Posts: 1,607
|
Quote:
https://files.scene.org/get/parties/2019/revision19/streaming-music/wright_and_bastard_-_the_fat_dandy_butterfly_slims.zip In the archive use the .wav file. This will be interesting |
|
09 February 2021, 11:40 | #11 | |
Registered User
Join Date: Mar 2012
Location: Norfolk, UK
Posts: 1,153
|
Quote:
Using AUDxPER of 128 will give you exactly 2 iterations of the PWM per sample. |
|
09 February 2021, 12:11 | #12 | ||
Registered User
Join Date: Feb 2021
Location: Becej / Serbia
Posts: 120
|
Quote:
Quote:
audiotest.exe -- my quick and dirty playback program (do not start it unless you're on a PAL screen or you'll probably get a mess) audiotest.wav -- the resampled/cut 16bit version of the song you can play with other players to compare quality edit: forgot the link: http://s000.tinyupload.com/index.php...55144672142109 |
||
09 February 2021, 12:32 | #13 |
Computer Nerd
Join Date: Sep 2007
Location: Rotterdam/Netherlands
Age: 47
Posts: 3,751
|
VERY interesting
Is the source code available? I'd like to try with some other kinds of music. |
09 February 2021, 12:37 | #14 |
Registered User
Join Date: Feb 2021
Location: Becej / Serbia
Posts: 120
|
Well I can post the source code of the player, but it's just playing back the pre converted files (which are added as INCBIN). It's also just rushed. But you can easily make your own player just use the lookup tables attached to my original post. If you point at the center of the table, and read a 16 bit audio value, it will give you the 8 bit value you should use. The value from the 63 table should be used in the channel with 63 volume, the value from the 64 table should be used in the channel with 64 volume.
|
09 February 2021, 12:44 | #15 | ||
Registered User
Join Date: Jun 2010
Location: PL?
Posts: 2,742
|
Quote:
you should read very good analysis of Paula made by buggs Quote:
Also Paula is limited - there is no separate power for DAC, IC layout seem to be also futile from HQ perspective. Last edited by pandy71; 09 February 2021 at 12:50. |
||
09 February 2021, 12:45 | #16 |
Registered User
Join Date: Mar 2012
Location: Norfolk, UK
Posts: 1,153
|
Calibrating this will be an "interesting" problem to solve!
It definitely needs testing with some much more dynamic music. (The kind of music where if you tried to listen to it while driving, most of it would be lost in the road noise.) |
09 February 2021, 12:46 | #17 | |
Registered User
Join Date: Feb 2021
Location: Becej / Serbia
Posts: 120
|
Quote:
|
|
09 February 2021, 12:47 | #18 |
Computer Nerd
Join Date: Sep 2007
Location: Rotterdam/Netherlands
Age: 47
Posts: 3,751
|
|
09 February 2021, 12:51 | #19 | |
Registered User
Join Date: Feb 2021
Location: Becej / Serbia
Posts: 120
|
Quote:
Code:
move.l #c_left64, d0 move.l d0, aud0lc move.w #32768, aud0len move.w #128, aud0per move.w #64, aud0vol move.l #c_right64, d0 move.l d0, aud1lc move.w #32768, aud1len move.w #128, aud1per move.w #64, aud1vol move.l #c_right63, d0 move.l d0, aud2lc move.w #32768, aud2len move.w #128, aud2per move.w #63, aud2vol move.l #c_left63, d0 move.l d0, aud3lc move.w #32768, aud3len move.w #128, aud3per move.w #63, aud3vol move.w #%0000000011111111, adkcon move.w #%1000000000001111, dmacon ; dma set on |
|
09 February 2021, 13:01 | #20 |
Computer Nerd
Join Date: Sep 2007
Location: Rotterdam/Netherlands
Age: 47
Posts: 3,751
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
15 bit 44 khz audio idea. | Thorham | Coders. General | 33 | 15 September 2021 06:22 |
24 or 32 bit audio capture within WinUAE | EAUniW | support.WinUAE | 7 | 17 September 2018 22:22 |
Questions about 14 bit audio playback | xxxxx | Coders. Asm / Hardware | 16 | 22 December 2014 19:30 |
High Quality reproduction of Audio on 8 bit. | pandy71 | Amiga scene | 0 | 01 July 2013 15:08 |
Simple 14 bit audio question... | Thorham | Coders. General | 7 | 06 June 2010 10:55 |
|
|