English Amiga Board Amiga Lore


Go Back   English Amiga Board > Main > Amiga scene

 
 
Thread Tools
Old 02 September 2016, 09:28   #1
Foebane
Registered User
 
Join Date: Sep 2011
Location: Cardiff, UK
Posts: 200
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?
Foebane is offline  
AdSense AdSense  
Old 02 September 2016, 11:58   #2
Lazycow
Registered User
Lazycow's Avatar
 
Join Date: Oct 2014
Location: Germany
Posts: 122
You can set the full 24bit RGB with the copper. Workbench is doing that, too.
Lazycow is offline  
Old 02 September 2016, 12:42   #3
Foebane
Registered User
 
Join Date: Sep 2011
Location: Cardiff, UK
Posts: 200
Quote:
Originally Posted by Lazycow View Post
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?
Foebane is offline  
Old 02 September 2016, 14:29   #4
robinsonb5
Registered User
 
Join Date: Mar 2012
Location: Norfolk, UK
Posts: 438
Quote:
Originally Posted by Foebane View Post
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.
robinsonb5 is offline  
Old 02 September 2016, 14:38   #5
meynaf
68k wisdom
meynaf's Avatar
 
Join Date: Nov 2007
Location: Lyon (France)
Age: 43
Posts: 1,988
Quote:
Originally Posted by Foebane View Post
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 View Post
And what about the clicking in the 14-bit audio?
14-bit audio shouldn't click more than 8-bit audio.
meynaf is offline  
Old 02 September 2016, 18:57   #6
Foebane
Registered User
 
Join Date: Sep 2011
Location: Cardiff, UK
Posts: 200
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.
Foebane is offline  
Old 02 September 2016, 19:09   #7
meynaf
68k wisdom
meynaf's Avatar
 
Join Date: Nov 2007
Location: Lyon (France)
Age: 43
Posts: 1,988
Quote:
Originally Posted by Foebane View Post
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 View Post
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).
meynaf is offline  
Old 02 September 2016, 20:57   #8
Foebane
Registered User
 
Join Date: Sep 2011
Location: Cardiff, UK
Posts: 200
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?
Foebane is offline  
Old 02 September 2016, 21:54   #9
meynaf
68k wisdom
meynaf's Avatar
 
Join Date: Nov 2007
Location: Lyon (France)
Age: 43
Posts: 1,988
Quote:
Originally Posted by Foebane View Post
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 View Post
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 View Post
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.
meynaf is offline  
Old 02 September 2016, 22:32   #10
Foebane
Registered User
 
Join Date: Sep 2011
Location: Cardiff, UK
Posts: 200
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?
Foebane is offline  
Old 02 September 2016, 22:49   #11
meynaf
68k wisdom
meynaf's Avatar
 
Join Date: Nov 2007
Location: Lyon (France)
Age: 43
Posts: 1,988
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.
meynaf is offline  
Old 02 September 2016, 23:17   #12
Foebane
Registered User
 
Join Date: Sep 2011
Location: Cardiff, UK
Posts: 200
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.
Foebane is offline  
Old 04 September 2016, 21:59   #13
Mrs Beanbag
Glastonbridge Software
Mrs Beanbag's Avatar
 
Join Date: Jan 2012
Location: Edinburgh/Scotland
Posts: 2,202
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

Last edited by Mrs Beanbag; 04 September 2016 at 22:20.
Mrs Beanbag is offline  
Old 07 September 2016, 20:48   #14
paul1981
Registered User

paul1981's Avatar
 
Join Date: Oct 2013
Location: England
Posts: 82
@Foebane

The 6-bit volume control is an analogue volume control, that's how Paula is able to output true 14-bit stereo audio.
paul1981 is offline  
Old 18 September 2016, 20:58   #15
Foebane
Registered User
 
Join Date: Sep 2011
Location: Cardiff, UK
Posts: 200
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 is offline  
Old 18 September 2016, 22:30   #16
Foebane
Registered User
 
Join Date: Sep 2011
Location: Cardiff, UK
Posts: 200
Quote:
Originally Posted by Mrs Beanbag View Post
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?
Foebane is offline  
Old 08 October 2016, 17:28   #17
pandy71
Registered User
 
Join Date: Jun 2010
Location: NL/PL
Posts: 1,473
Quote:
Originally Posted by paul1981 View Post
@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?
pandy71 is offline  
Old 08 October 2016, 18:56   #18
meynaf
68k wisdom
meynaf's Avatar
 
Join Date: Nov 2007
Location: Lyon (France)
Age: 43
Posts: 1,988
Quote:
Originally Posted by pandy71 View Post
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.
meynaf is offline  
Old 09 October 2016, 21:11   #19
pandy71
Registered User
 
Join Date: Jun 2010
Location: NL/PL
Posts: 1,473
Quote:
Originally Posted by meynaf View Post
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 )
pandy71 is offline  
Old 10 October 2016, 10:29   #20
meynaf
68k wisdom
meynaf's Avatar
 
Join Date: Nov 2007
Location: Lyon (France)
Age: 43
Posts: 1,988
I real life you get a little more than 14 bits, in fact. You should really have a look at how the calibration works.
meynaf is offline  
AdSense AdSense  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Questions about 14 bit audio playback xxxxx Coders. Asm / Hardware 16 22 December 2014 20:30
15 bit 44 khz audio idea. Thorham Coders. General 30 07 November 2013 21:37
High Quality reproduction of Audio on 8 bit. pandy71 Amiga scene 0 01 July 2013 16:08
Using two voices for 56K sample/second audio output rate -- OCS -- No CPU or Copper mc6809e Coders. Asm / Hardware 2 28 January 2012 01:29
Simple 14 bit audio question... Thorham Coders. General 7 06 June 2010 11:55

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 17:58.


Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2016, vBulletin Solutions, Inc.
Page generated in 0.25433 seconds with 12 queries