Welcome, Guest. Please login or register.

Author Topic: Amiga sound playback routine/format questions  (Read 3981 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline bubblebobble

  • Jr. Member
  • **
  • Join Date: Dec 2003
  • Posts: 66
    • Show all replies
    • http://www.hd-rec.de
Re: Amiga sound playback routine/format questions
« on: August 09, 2010, 08:50:49 PM »
Not that I know of.

It's all easily possible with the includes (ADPCM4 Codec, AHI Playback), but not with a 7MHz nacked Amiga.

I wrote a 14bit Audio output routine once for BlitzBasic in inline ASM. But I dont know if I have it still somewere. If you know how to deal with the Paula Registers, 14bit playback is not so hard to do. I also think that the ADPCM4 Codec (4bit per sample) I wrote is fast enough for 7MHz (depends on the Samplerate of course), but I think it would be quite busy then.
--
Author of
HD-Rec, Sweeper, Samplemanager, ArTKanoid, Monkeyscript, Toadies, AsteroidsTR, TuiTED, PosTED, TKPlayer, AudioConverter, ScreenCam, PerlinFX, MapEdit, AB3 Includes and many more...
Homepage: http://www.hd-rec.de
 

Offline bubblebobble

  • Jr. Member
  • **
  • Join Date: Dec 2003
  • Posts: 66
    • Show all replies
    • http://www.hd-rec.de
Re: Amiga sound playback routine/format questions
« Reply #1 on: August 10, 2010, 10:33:38 AM »
@bloodline

You forgot to mention that the lower byte has to be shifted down 2 bits. This is where the 14bit comes into play. 64 is only 2^6. If they had made the volume control with a granulariy of 256 instead of 64, you could get 16bit playback.

Looseless goes not beyond 1:2 compression. But lossy ADPCM is cheaper to decode and at 8bit sounds pretty good (I cant hear a difference with HQ equipment). It still sounds acceptable at 4bit, but high frequencies get a little rough though.

We had this discussion once already:

PCM 16bit
ADPCM 8bit
ADPCM 4bit
ADPCM 2bit

Those are all plain .wav files, but have been encoded&decoded.
--
Author of
HD-Rec, Sweeper, Samplemanager, ArTKanoid, Monkeyscript, Toadies, AsteroidsTR, TuiTED, PosTED, TKPlayer, AudioConverter, ScreenCam, PerlinFX, MapEdit, AB3 Includes and many more...
Homepage: http://www.hd-rec.de
 

Offline bubblebobble

  • Jr. Member
  • **
  • Join Date: Dec 2003
  • Posts: 66
    • Show all replies
    • http://www.hd-rec.de
Re: Amiga sound playback routine/format questions
« Reply #2 on: August 10, 2010, 12:43:26 PM »
Quote from: Piru;574151
As Britelite pointed out at boozembly, plain shifting is slightly wrong though. If you want "perfect" scaling typically you'll use a lookup table.

Sure, and if you want to do it really perfect, you do dithering.
But we are talking about a hack that adds two audio signals to resemble 14bit. Because the playback is far from beeing perfect/linear etc., the result is not perfect 14bit. I would say the noise from artefacts is somehow comparable with something like 12bit. So you do not really gain a lot from trying to be better than a simple shift, which is the fastest way to do it.
--
Author of
HD-Rec, Sweeper, Samplemanager, ArTKanoid, Monkeyscript, Toadies, AsteroidsTR, TuiTED, PosTED, TKPlayer, AudioConverter, ScreenCam, PerlinFX, MapEdit, AB3 Includes and many more...
Homepage: http://www.hd-rec.de
 

Offline bubblebobble

  • Jr. Member
  • **
  • Join Date: Dec 2003
  • Posts: 66
    • Show all replies
    • http://www.hd-rec.de
Re: Amiga sound playback routine/format questions
« Reply #3 on: August 10, 2010, 05:07:38 PM »
> Yeah, I do get 3.3:1 compression in my Gita multimedia CD
This is probably due so relatively silent parts in the samples and/or the 8bit quantisation.
Try the same on some randrom music in 16bit. In average, you wont get better than 1:2 when you go loosless.
http://wiki.hydrogenaudio.org/index.php?title=Lossless_comparison

And Amiga_Nut needs something fast enough for a nacked A500 that should do some GFX in the meanwhile.
--
Author of
HD-Rec, Sweeper, Samplemanager, ArTKanoid, Monkeyscript, Toadies, AsteroidsTR, TuiTED, PosTED, TKPlayer, AudioConverter, ScreenCam, PerlinFX, MapEdit, AB3 Includes and many more...
Homepage: http://www.hd-rec.de
 

Offline bubblebobble

  • Jr. Member
  • **
  • Join Date: Dec 2003
  • Posts: 66
    • Show all replies
    • http://www.hd-rec.de
Re: Amiga sound playback routine/format questions
« Reply #4 on: August 10, 2010, 05:48:24 PM »
If Paula is a 14bit DA Converter, what is the "calibration" for then?

As for th downsampling, this is another story, but can be done "offline". I used to do 44.1kHz with interrupt, but on a 68060.
With dithering I mean to reduce (or better mask, it is some kind of noise shaping) the audible quantisation noise. Just like dithering in images with low bit depth.
--
Author of
HD-Rec, Sweeper, Samplemanager, ArTKanoid, Monkeyscript, Toadies, AsteroidsTR, TuiTED, PosTED, TKPlayer, AudioConverter, ScreenCam, PerlinFX, MapEdit, AB3 Includes and many more...
Homepage: http://www.hd-rec.de