10 February 2021, 16:51 | #121 | ||
Registered User
Join Date: Feb 2021
Location: Becej / Serbia
Posts: 120
|
Quote:
x = (32b - 3a - 26c) / 3 y = (3a + 32c - 32b) / 3 Where: x - value for channel 0, y - value for channel 3, a - previous value for channel 3, b and c - current and next values in the 55khz audio. Quote:
Anyways, assuming we don't find a way to change the delay, here is the best I can do to get 55Khz-ish audio. This version compensates for the 1/32 delay between channels 0 and 1 and for the 3/32 delay between 0 and 3. It is a bit more complicated now, but at least I managed to get it into a single pass filter that doesn't need future values, so it can be used for realtime conversion: http://s000.tinyupload.com/index.php...03843381162848 |
||
10 February 2021, 16:57 | #122 |
Defendit numerus
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 53
Posts: 4,468
|
Hi Toni, it's the image of the message http://eab.abime.net/showpost.php?p=...9&postcount=57
congruent with the 4 CCK delay found by orangespider in message http://eab.abime.net/showpost.php?p=...&postcount=113 ? Unfortunately I do not know the conditions in which you had done the test in 2012 (from the picture it is not clear how much delay it is).. Thanks. |
10 February 2021, 17:09 | #123 | |
Registered User
Join Date: May 2017
Location: Munich/Bavaria
Posts: 2,294
|
Quote:
(also a good upscaler uses probably better math than just linear ...) |
|
10 February 2021, 17:15 | #124 | |
Registered User
Join Date: Feb 2021
Location: Becej / Serbia
Posts: 120
|
Quote:
bbbbbbbbbbbbbbbbcccccccccccccccc and the destination signal is like this: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx aaayyyyyyyyyyyyyyyyyyyyyyyyyyyyy So all you need is to convert the 55khz audio into the 3 channels that have a 3/32 delay between them. If you invert the equation I wrote and then average out for the first 16 values, you will get b and for the second 16 values you will get c. So it's a way to play 55Khz audio on c0 and c3. |
|
10 February 2021, 17:41 | #125 | |
Registered User
Join Date: May 2017
Location: Munich/Bavaria
Posts: 2,294
|
Quote:
that depends totally on your source material! If you are coming from a 384kHz PCM file that you would want to resample it to 277kHz and pick the values like I suggested earlier. Otherwise you lose more information than necessary. |
|
10 February 2021, 18:02 | #126 | |
Registered User
Join Date: May 2017
Location: Munich/Bavaria
Posts: 2,294
|
Quote:
Code:
b.....c.....d.....e.....f..... | | T0 T1 (dots represent unknown/unsampled values) and your destination Code:
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx aaaaaayyyyyyyyyyyyyyyyyyyyyyyy | | T0 T1 T1: the combination of x+y must match c (d, e and f are never matched and ignored - Nyquist is still fulfilled because we used 5x oversampling in our case) edit: some picture... Code:
Max-| ,-'''-. | ,-' `-. V1<-------' `. | ,'| `. | / | \ |/ | \ ----+----|--------------------\-------------------------- | | __ __ \ __ / __ | | ||/2 || \ 3||/2 / 2|| | | `. ,' | | `. ,' | | `-. ,-' Min-| | `-,,,-' v v T0 T1 Nyquist theorem does NOT tell you that the values between your samples are constant, but that all kinds of sines my occur between those points ... Last edited by Gorf; 10 February 2021 at 22:24. |
|
10 February 2021, 22:11 | #127 |
Ex nihilo nihil
Join Date: Oct 2017
Location: CH
Posts: 4,856
|
Really interesting and positive thread
|
10 February 2021, 22:43 | #128 |
Registered User
Join Date: Jan 2020
Location: oslo/norway
Posts: 1,607
|
|
10 February 2021, 23:11 | #129 | ||
Registered User
Join Date: Feb 2021
Location: Becej / Serbia
Posts: 120
|
Quote:
Code:
bbbbccccdddd | | | T0 T1 T2 (dots represent unknown/unsampled values) Code:
xxxxxxxx ayyyyyyy | | | T0 T1 T2 Quote:
|
||
10 February 2021, 23:50 | #130 | |||||
Registered User
Join Date: May 2017
Location: Munich/Bavaria
Posts: 2,294
|
I don't "want" anything, I am just describing the way it is.
Quote:
Quote:
Code:
b...c...d...e...f...g...h... | | | | T0 T1 T2 T3 (dots represent unknown/unsampled values) Quote:
Quote:
Sampling by definition means ignoring all values between your sample points ... Quote:
Last edited by Gorf; 11 February 2021 at 00:08. |
|||||
11 February 2021, 03:19 | #131 |
Registered User
Join Date: Feb 2021
Location: Becej / Serbia
Posts: 120
|
Ok. Here is an idea. You write the code for your transformation, I write it for mine. We compare results and see which works better. Either way one of us will have better quality and then we can both use it.
|
11 February 2021, 06:41 | #132 | |
Registered User
Join Date: Feb 2021
Location: Becej / Serbia
Posts: 120
|
Quote:
Your way really loses high frequencies much more heavily than mine and mine is much more noisy than yours. While you do have some valid points, the issue with your approach is that you are looking at points, while in actuality the signal is sustained over a period of time. Just sampling a point at the edges of the signal will lose too much data. Consider this 55Khz input: -1, 1, -1, 1, -1, 1 If you upscale that 16x you will get some curve that is like: -1, -0.99, -0.95, -0.85... etc So your method will then sample this as: -1, -0.85 and your output will be -1, -0.85, -1, -0.85, -1, -0.85, etc (note: duration of first one is 3, the second one is 29 at 885khz) My method on the other hand will overcompensate the first value because it is shorter and we will get something like this: -9.67, 1, -9.67, 1, -9.67, 1... etc Now if you average my method out over 55Khz frequency, it will average to (-9.67*3 + 1*12)/16, 1*16/16 which is: -1, 1, -1, 1, -1, 1, -1, 1 However even the short burst of -9.67 will generate too much noise. A third approach would be to average the values from the upscaled version and then we end up with this: -0.98, 0.1 Interestingly enough this when averaged to 55Khz will produce: -0.1, 0.1, -0.1, 0.1, -0.1, 0.1... etc So at this time we have retained the correct frequency but our amplitude is 9.667 times lower for c0/c3 (and 31 times lower for c1/c2). From all the tested methods, this gives the best result. It is both cleaner than your approach and retains more high frequency. We could increase the distance between the 2 values by doing a haar transform and then multiplying the high frequency value 9.6667 times for c0/c3 and 31 times for c1/c2, however this would probably just put the result back to my original method. edit: I am an idiot. We know what the exact frequency loss is, so we can pre process the signal before we do anything and compensate. Just increase the 27710 frequency range by a factor of 29/3 for c0/c3 and 31 of c1/c2 and then do the processing using the average values as before. Except this time we didn't only get a very clean audio, we also kept all the frequency ranges intact. edit 2: http://s000.tinyupload.com/index.php...53815532511093 I've uploaded the following: audio1.exe -- test with the song from nikosidis at 55420Hz on PAL audio2.exe -- piano solo at 55420Hz on PAL audio.asm -- assembler player converter.pas -- delphi function from PC that converts 32bit float stereo raw audio to the amiga 4 channel 8bit format hardware.i -- just in case someone doesn't have it As far as I am concerned the quality is as good as it can get, I will convert it to realtime player code for amiga assembler and post that source too, but until then if someone wants to experiment with this or try to improve it, feel free. The output currently 9bit - 15bit quality in the range of -12223 to 12223 (depending on the source) and then that drops to 9bit quality at the maximum range of -16129 to 16129. The bit loss is dithered between the channels on the same side. Last edited by orangespider; 11 February 2021 at 08:21. |
|
11 February 2021, 09:31 | #133 |
Registered User
Join Date: Jan 2020
Location: oslo/norway
Posts: 1,607
|
Recorded from A1200, PAL, audio1.exe
https://files.fm/u/3x7fbfnt8 Recorded from A1200, PAL, audio2.exe https://files.fm/u/36x3x5veh Download the files and playback from your computer. The streaming is not good I think. The quality is fantastic I think Looking so much forward to also hear this in full sample rate. This is still so good that I would call this revolutionary regarding Paula stereo output. The player must be named after orangespider. Maybe OrangeS-Player? Some demo scene group must do a demo with this audio quality. Even if it is just still pictures. Edit: Do you like me to record this also from A600 output? Last edited by nikosidis; 11 February 2021 at 09:45. |
11 February 2021, 09:50 | #134 | ||||
Registered User
Join Date: Feb 2021
Location: Becej / Serbia
Posts: 120
|
Quote:
Quote:
Quote:
Quote:
Does the A600 output sound different than the A1200 one with this player? |
||||
11 February 2021, 10:08 | #135 | ||
Registered User
Join Date: Jul 2015
Location: The Netherlands
Posts: 3,409
|
Quote:
Quote:
|
||
11 February 2021, 10:16 | #136 | |
son of 68k
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,323
|
Quote:
|
|
11 February 2021, 10:25 | #137 | |
Defendit numerus
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 53
Posts: 4,468
|
Better and better
Quote:
If you use IRQs it is not important that it is Productivity resolution but any resolution that allows you to set Period = 64 (DMA must be fast enough to provide Paula with the data in time). Then you follow the IRQ frequency, not the VBI one. |
|
11 February 2021, 10:30 | #138 |
Registered User
Join Date: Feb 2021
Location: Becej / Serbia
Posts: 120
|
I still need to know the output frequency because if I think it's 55Khz, but it's 56Khz, then the music we're playing will be out of tune. I need to know the exact frequency I am converting to.
|
11 February 2021, 10:30 | #139 | |
Registered User
Join Date: Mar 2012
Location: Norfolk, UK
Posts: 1,153
|
Quote:
PAL Amigas and NTSC Amigas have slightly different base clocks. CCLK on an NTSC Amiga will be 3.579545MHz while on a PAL system it will be 3.546895. The frequency you get for a period value will be CCLK divided by that period value. What does depend on the screenmode is whether the DMA system can fetch data fast enough to keep the audio system fed at your chosen frequency. |
|
11 February 2021, 10:35 | #140 | ||
Registered User
Join Date: Feb 2021
Location: Becej / Serbia
Posts: 120
|
Quote:
I might be completely wrong about this though, but will try it with these values anyway. eidt: And wrong I was. Quote:
|
||
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 |
|
|