English Amiga Board

English Amiga Board (https://eab.abime.net/index.php)
-   Amiga scene (https://eab.abime.net/forumdisplay.php?f=2)
-   -   Queries on AGA Copper and 14-bit Audio (https://eab.abime.net/showthread.php?t=83967)

Foebane 02 September 2016 08:28

Queries on AGA Copper and 14-bit Audio
 
I read somewhere that the AGA Copper is NOT 24-bit, so I couldn't, say, take 256 shades of blue only and recreate them in a copper list to fit on a 320x256 image - or have I misheard somewhere? Almost like not all bits are used to represent the levels of R, G, B.

Also, on a lot of demos that use 14-bit audio of Paula (and there are a lot more than I thought) I've noticed that when the sound first starts or fades out there is an audible clicking or pulsing - at first I thought this was just emulation but I've heard YouTube videos of real hardware that have the same issue. And yet, not ALL 14-bit audio demos are like that, some sound perfectly fine. Maybe it's different playback routines used, some worse than others?

Lazycow 02 September 2016 10:58

You can set the full 24bit RGB with the copper. Workbench is doing that, too.

Foebane 02 September 2016 11:42

Quote:

Originally Posted by Lazycow (Post 1109116)
You can set the full 24bit RGB with the copper. Workbench is doing that, too.

Well, then, why were they lying? And what about the clicking in the 14-bit audio?

robinsonb5 02 September 2016 13:29

Quote:

Originally Posted by Foebane (Post 1109121)
Well, then, why were they lying?

What they probably meant is that the copper didn't change for AGA, and can still only set 12 bits at a time - you have to load the upper 4 bits and lower 4 bits of each RGB colour register separately. There are still only 32 colour registers, and there are control bits which select which bank of colours these access, and whether they set the upper or lower bits of each palette entry.

meynaf 02 September 2016 13:38

Quote:

Originally Posted by Foebane (Post 1109121)
Well, then, why were they lying?

They weren't. It's simply that it takes several copper moves to be able to change a full AGA color and tricks that needed fast color changes won't work anymore if using the full color range.


Quote:

Originally Posted by Foebane (Post 1109121)
And what about the clicking in the 14-bit audio?

14-bit audio shouldn't click more than 8-bit audio.

Foebane 02 September 2016 17:57

Meynaf, I'm not talking about the odd click when a sample is played in a module, because with all 14-bit demos, there ARE no modules, it's literally an MP2 or WAV sample being played direct, and when the audio is quiet on some of these, you can hear a rhythmic regular clicking, it's really quiet but it's there. Thing is, some demo prods don't have it, most probably because the playback routines are better.

Can someone remind me in any case how 14-bit audio works? I heard it wasn't "true" 14-bit PCM audio, just some weird mixture of the volume per channel and 8-bit PCM audio.

meynaf 02 September 2016 18:09

Quote:

Originally Posted by Foebane (Post 1109182)
Meynaf, I'm not talking about the odd click when a sample is played in a module, because with all 14-bit demos, there ARE no modules, it's literally an MP2 or WAV sample being played direct, and when the audio is quiet on some of these, you can hear a rhythmic regular clicking, it's really quiet but it's there. Thing is, some demo prods don't have it, most probably because the playback routines are better.

Buffer overrun ? Wrong buffer size ? Bad 14-bit calibration on the machine ? Error in the music decoder ? Error in the music itself ?
There can be many reasons, however, for sure, mere 14-bit shouldn't be doing that.


Quote:

Originally Posted by Foebane (Post 1109182)
Can someone remind me in any case how 14-bit audio works? I heard it wasn't "true" 14-bit PCM audio, just some weird mixture of the volume per channel and 8-bit PCM audio.

It's one channel playing at volume 64 (doing the top 8 bits) mixed with another playing at volume 1 (doing the bottom 6 bits). Weird mixture, but total is really 14-bit (actually slightly more due to calibration).

Foebane 02 September 2016 19:57

I think I need further clarification on how Amiga PCM actually works, Meynaf.

I know that it's 8-bit, so I assume that means a range of 0 to 255 with 128 being the centre line, or something like -128 to 127 with 0 being the centre line if it's signed, right?

Quote:

It's one channel playing at volume 64 (doing the top 8 bits) mixed with another playing at volume 1 (doing the bottom 6 bits). Weird mixture, but total is really 14-bit (actually slightly more due to calibration).
I suppose that's only active with a memory location set to 1 or something? (I'm thinking of POKEs) Also, would the 14 bits be represented by the range 0 to 16383 or something similar? It's just that as far as I can see, your description above would favour the top 8 bits over the bottom 6 bits, and so it would be rather skewed. What I mean is, if the memory for the audio was POKEd from 0 to 16383 across 16384 memory registers, would it be a straight line from minimum to maximum?

Also, I know that there are volume settings for each channel, and I think a master for all of them, but I figured that they controlled the volume independently of whatever the waveform data was, down to the circuitry of Paula. Are you saying that the volume settings are 100% digital rather than analogue?

meynaf 02 September 2016 20:54

Quote:

Originally Posted by Foebane (Post 1109204)
I know that it's 8-bit, so I assume that means a range of 0 to 255 with 128 being the centre line, or something like -128 to 127 with 0 being the centre line if it's signed, right?

That's -128 to 127 with 0 being the centre.


Quote:

Originally Posted by Foebane (Post 1109204)
I suppose that's only active with a memory location set to 1 or something? (I'm thinking of POKEs) Also, would the 14 bits be represented by the range 0 to 16383 or something similar? It's just that as far as I can see, your description above would favour the top 8 bits over the bottom 6 bits, and so it would be rather skewed. What I mean is, if the memory for the audio was POKEd from 0 to 16383 across 16384 memory registers, would it be a straight line from minimum to maximum?

14 bit is played from 16 bit data. It's a simple table giving the data for each channel.
To make things simple, a data of 1 with a volume of 64 is the same as a data of 64 with a volume of 1 ; therefore a data of 32 with a volume of 1 would be 1/2, and so on down to 1/64.
Normally data from 0 to 16383 should be linear, even though it's not exactly so because of the properties of the D/A (on emulators it is, though).


Quote:

Originally Posted by Foebane (Post 1109204)
Also, I know that there are volume settings for each channel, and I think a master for all of them, but I figured that they controlled the volume independently of whatever the waveform data was, down to the circuitry of Paula. Are you saying that the volume settings are 100% digital rather than analogue?

Volume settings aren't analogue - the volume is reduced by setting the output level to zero during n/64th of the time (volume 64 is 100%, volume 63 is reduced by 1/64, etc).
The end result is - more or less - like if we had true 14 bit d/a.
There is no master affecting all channels.

I'm perhaps not the best guy to explain all this ; perhaps you could find some docs here and there.

Foebane 02 September 2016 21:32

Thanks for trying to explain, but I'm still not clear on this:

Quote:

To make things simple, a data of 1 with a volume of 64 is the same as a data of 64 with a volume of 1 ; therefore a data of 32 with a volume of 1 would be 1/2, and so on down to 1/64.
Maybe if it were written out in binary, with the high and low bits?

meynaf 02 September 2016 21:49

The principle is easy. If you have a volume of 1 then you have 1/64th the amplitude of what you'd have with a volume of 64. It's exactly like shifting the data for 6 positions.

Foebane 02 September 2016 22:17

I get the gist of what you're saying, but I'll be satisfied to just know that, regardless of D/A properties, the data from 0 to 16383 is linear.

Mrs Beanbag 04 September 2016 20:59

the data is really two sets of 8 bit data, it is two samples played at once, with one much louder than the other, so the quieter one can fill in the subtler details.

So on one channel you will have the range -128 to +127, and on the other (probably) 0 to +63.

This gives a total range of -128*64 = -8192, to 127*64+63 = 8191

paul1981 07 September 2016 19:48

@Foebane

The 6-bit volume control is an analogue volume control, that's how Paula is able to output true 14-bit stereo audio.

Foebane 18 September 2016 19:58

I haven't posted on here for a while, but I forgot to mention in my OP here that I'm using WinUAE for my Amiga, so maybe the clicking/pulsing is caused by emulation? Unless I can find a YouTube video of real hardware with the problem, I'll have to assume it is. BUT, not all 14-bit audio demos have that clicking/pulsing problem.

Foebane 18 September 2016 21:30

Quote:

Originally Posted by Mrs Beanbag (Post 1109539)
the data is really two sets of 8 bit data, it is two samples played at once, with one much louder than the other, so the quieter one can fill in the subtler details.

So on one channel you will have the range -128 to +127, and on the other (probably) 0 to +63.

This gives a total range of -128*64 = -8192, to 127*64+63 = 8191

So does Paula do this for you with one POKE, and you just provide the data, or do you have to set all this up with multiple POKEs?

pandy71 08 October 2016 16:28

Quote:

Originally Posted by paul1981 (Post 1110057)
@Foebane

The 6-bit volume control is an analogue volume control, that's how Paula is able to output true 14-bit stereo audio.


Nope it is digital (PWM) - that's why for sample rates higher than 56kHz volume control should be disabled (so in fact there is 65 levels attenuation not 64).
btw those 6 bits attenuation are more linear (as PWM is linear by definition) than remain DAC system - not sure about real Amiga DAC linearity - maybe i should hook Amiga to Audio Precision analyzer?

meynaf 08 October 2016 17:56

Quote:

Originally Posted by pandy71 (Post 1115290)
btw those 6 bits attenuation are more linear (as PWM is linear by definition) than remain DAC system - not sure about real Amiga DAC linearity - maybe i should hook Amiga to Audio Precision analyzer?

Try running a 14-bit calibration program. Then you will see that it's not only nonlinear, but it is also different from one machine to another.
What i don't know is why the characteristics are the same (or very very close) for left and right outputs.

pandy71 09 October 2016 20:11

Quote:

Originally Posted by meynaf (Post 1115308)
Try running a 14-bit calibration program. Then you will see that it's not only nonlinear, but it is also different from one machine to another.
What i don't know is why the characteristics are the same (or very very close) for left and right outputs.

PWM by definition of PWM is linear - real DAC is completely different topic and as such it was my curiosity what is non-linearity of 8 bit DAC used in Paula.

(After buying Vampire 500 definitely will try measure Paula with audio analyzer).

And your feedback just confirm my impression that in real life all those 14 bit tricks with stacking two 8 bit DAC is more close to 10 than 14 bits...

(i assume that it should be possible to partially compensate some nonlinearity but this require self calibration and not ear but some decent ADC in feedback loop - this is how some modern DAC perform self calibration - quite common in RF )

meynaf 10 October 2016 09:29

I real life you get a little more than 14 bits, in fact. You should really have a look at how the calibration works.


All times are GMT +2. The time now is 09:03.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.

Page generated in 0.05558 seconds with 11 queries