Welcome, Guest. Please login or register.
Amiga Kit Amiga Store Iridium Banner AMIStore App Store A1200/A600 4xIDE Interface

AuthorTopic: Paula Audio Emulation AudioUnit  (Read 2764 times)

0 Members and 1 Guest are viewing this topic.

Offline bloodline

  • Master Sock Abuser
  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 12113
  • Total likes: 0
    • http://www.troubled-mind.com
Re: Paula Audio Emulation AudioUnit
« Reply #15 on: March 25, 2012, 10:00:23 AM »
Quote from: Karlos;685140
Didn't we also conclude that aliasing played a big part in the colouring of Paula's audio?

I found that for certain bright sounds, like cymbals, there were quite noticeable effects as you approached the regular PAL 27kHz playback limit, specifically a bit like the old aphex corp's "aural exciter" effect.
Indeed, once I get the resolution issues sorted (An idea hit me last night at the pub with some friends)... I will look at how to recreate the effect of the amiga sample rates...

Offline ChaosLord

Re: Paula Audio Emulation AudioUnit
« Reply #16 on: March 25, 2012, 01:47:13 PM »
Amiga has a 14-bit (or more) DAC.

You are confusing the sample size with the DAC size.  The samples are sadly, only 8-bits, but they happily get 6 bits of volume control added to them for a total of 14 bits that the DAC outputs.

If the DAC was only 8-bits then the volume control registers would have no effect and all Amiga mods would sound like crap.
Wanna try a wonderfull strategy game with lots of handdrawn anims,
Magic Spells and Monsters, Incredible playability and lastability,
English speech, etc. Total Chaos AGA
 

Offline Karlos

Re: Paula Audio Emulation AudioUnit
« Reply #17 on: March 25, 2012, 02:42:33 PM »
Quote from: ChaosLord;685284
Amiga has a 14-bit (or more) DAC..


You are talking cross purposes. Bloodline isn't trying to reproduce 14-bit replay, he's trying to reproduce how 8-bit audio sounds when it's played back through the DAC at a given volume.

The output precision of Paula itself is not what is being modelled here, it's the response behaviour.

Paula is very non-linear. For a fixed channel volume, the output does not vary linearly as a function of the input 8-bit sample. Likewise, the output does not vary linearly as a function of channel volume for a fixed input 8-bit sample value.

Finally, these variances themselves change from one Paula to another.

The guy (sorry, the name escapes me just now) that wrote the original 14-bit Cybersound driver that was later assimilated into AHI was well aware of this. He developed a calibration tool that relies on the user manually eliminating a simple square wave (IIRC) across a spread of input values by adjusting a set of scaling factors. The idea was that for each input value, you had to adjust the scaling factor until the square wave was as inaudible as possible.

It was my original suggestion to Bloodline that the resulting calibration table should contain the necessary data (likely requiring some inversion) for his proposed application.

We then went on to discuss other factors affecting the audio. On the digital side, there is sample aliasing and on the analogue side, the frequency response (always kinda bassy to my ear) of the op-amps that boost the output from the DAC and, of course, the low pass filter (if enabled).
int p; // A
 

Offline Bif

Re: Paula Audio Emulation AudioUnit
« Reply #18 on: March 26, 2012, 06:17:52 AM »
Cool research. If you want to be serious about knowing if the changes you make are truly audible and not a placebo effect you should be performing ABX tests: http://wiki.hydrogenaudio.org/index.php?title=ABX

It may sound silly if you have never been exposed to it but the brain plays surprising tricks on you, especially when you start to think of audio with warm nostalgic feelings - you perceive it that way even if it isn't.

In what you have done so far you can try to ABX the non-linear vs. linear response to see if you can confidently hear a difference.

If you get Paula better emulated via crude resampling/etc. then you probably want to ABX against what you do in software and an actual recording of the Paula, ensuring they are level matched and time aligned. Heck if you can get that close you could just start to compare the recorded audio files directly to check for bit differences to see how close you are.

I'm not a Paula guru, but I would also suspect it is the crude and noisy/aliasing resampling + 8-bit that provides most of the distinctiveness of the output you hear, not so much the non-linearity.
 

Offline Thorham

Re: Paula Audio Emulation AudioUnit
« Reply #19 on: April 29, 2012, 11:59:49 AM »
Quote from: TheBilgeRat;685089
You may not tell a difference, but I bet there's some audiophile out there who possibly could.
With 8 bit samples at maximum volume, no, but with 14 bit playback, the soft parts of a sample will sound noisy.

Quote from: bloodline;685248
Not really, you can't count the 6 volume bits when talking about audio reproduction. The Amiga's audio chip is fed with 8 bit signed integer values and at full volume, the DAC is an 8 bit DAC... So those extra 6 bits are simply altering the maximum output value, the resolution of the input remains 8 bit.
No, the 6 volume bits are part of the DAC. 8 bits are used for the sample, 6 bits are used for the volume.

Quote from: Karlos;685293
You are talking cross purposes. Bloodline isn't trying to reproduce 14-bit replay, he's trying to reproduce how 8-bit audio sounds when it's played back through the DAC at a given volume.
Which means it's perfectly relevant that Paula is 14 bit, given that 6 bits are used to control volume. Especially in MODs that use different volumes all the time, this may be important.

Generally speaking these non-linearities will result in some noise, and probably nothing more. The only thing that's special about the Paula is the ridiculous speed at which it can operate when using the CPU to feed it with data.
« Last Edit: April 29, 2012, 12:01:59 PM by Thorham »