Welcome, Guest. Please login or register.

Author Topic: Amiga audio capabilities  (Read 8049 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline minatorTopic starter

  • Hero Member
  • *****
  • Join Date: Jan 2003
  • Posts: 592
    • Show only replies by minator
    • http://www.blachford.info
Amiga audio capabilities
« on: August 21, 2010, 11:01:35 PM »
I've been reading about the audio hardware in retro systems recently and I found an interesting opinion in one blog post I found.  According to the poster while the term chiptune first appeared on the Amiga it isn't actually capable of them because it uses sample based hardware.

I didn't agree with this for various reasons but I thought I'd dig out the hardware reference manual and see what it said.  I was quite surprised:

Paula is quite a capable girl, she can do:

4 channel 8 bit audio
2 channel 8 bit audio modulated by 6 bit volume (how the 14bit playback systems work).

OK, we all know that, but she can do much more:

2 channel 8 bit modulated by 6 bit volume at audio frequencies is known as amplitude modulation (AM). Analogue synth nuts know this as "ring modulation".

You can also have chains of modulation so channel 0 mods-> 1 mods-> 2 mods-> 3.
So your ring mod can ring mod it's ring mod.  Complex stuff, I don't know of anything else that can do this other than modular synths.

Modulation of this sort is uncommon as it's highly complex but on the other hand chains of modulation is exactly how frequency modulation (FM) synths work.

Guess what? The Amiga can also do FM.  The set up is the same as Amplitude modulation so you can have:

2 channels modulated by the other 2 channels.
1 channel modulated by a chain of the other 3 channels.

So the Amiga can act as a pretty complex FM monosynth, the limited bit depth and playback rate means it's not exactly going to be a DX7 but it will give it a grungy quality the DX7 (or any other FM synth) doesn't have.

But it gets better - Paula can have the FM and AM on at the same time.  That'll allow über complex modulation and wave mutilation possibilities.  I don't know of *anything* else that can do that sort of thing.


But back to the original question: Can the Amiga do chip tunes?

The question is really about is the Amiga used as a sampler or as a synth.  Actually the Amiga can do both.

The Amiga normally plays back samples but these "samples" can also be computer generated waveforms.  It is thus quite capable of doing pure synthesis (known as wavetable synthesis).

The Amiga has been doing this from the very beginning and it's still done today, If you use the Octamed synth waveform editor you are using the Amiga as a wavetable synth, indeed this appears the term chiptune probably came from the use of this feature.

You can use the Amiga for sample playback but even here it has special "features".  Actually they're not features but limitations of the system that give it a unique sound.

Paula plays sounds by playing 8 bit samples from memory, but it does it in an interesting way.  Most systems (including mixed Amiga audio) work by mixing the waveforms together and playing them through a pair of channels at a fixed frequency.

The Amiga doesn't do this, it plays different notes by changing the playback speed of the samples.  This isn't unique (the PPG Wave synth did the same) but the limitations of 8 bit and low sampling frequencies combine with this have an interesting effect.

Early Amiga mods had to fit on a disc so samples often used a very low sampling rate.  I seem to remember a lot used to be around 8KHz in the old days.

The problem is 8 bit sounds suffer from quantisation noise. When you sample at too low a rate (like 8KHz...) you also get aliasing noise.  These are quite noticeable on Amiga audio samples when you compare it to a modern system.

The interesting bit is because of the way the Amiga speeds up and slows down samples to play them, it also speeds up and slows down the noise.  The noise isn't just in the background, it becomes part and parcel of the Amiga sound.

I don't know if any of the Amiga emulators or even things like minimig etc. try to emulate this effect.

So, all in all the Amiga has a much more powerful audio system than you might think.
Because of the ability to play samples, I don't think Paula has ever been pushed to see what she can do.  Unlike say SID on the C64 which has been investigated throughly.
Clearly Paula is capable of some highly sophisticated synthesis with FM, AM samples and wavetable capabilities - all of which could conceivably be used at once.  Then of course is the 68K itself which unlike the 8 bit micros got upgraded, there's nothing from throwing some real time sample generation or wave manipulation into the mix as well.

So, yes the Amiga can do chip tunes, but it's capable of much, much more.  Far more than we ever used it for.


Oh, BTW Paula can also do a 1.7 MHz (yes that's MHz) carrier thing...
 

Offline Zac67

  • Hero Member
  • *****
  • Join Date: Nov 2004
  • Posts: 2890
    • Show only replies by Zac67
Re: Amiga audio capabilities
« Reply #1 on: August 22, 2010, 10:40:09 AM »
Interesting - completely forgot about the AM/FM modulation capabilities - have they ever been used?

However, 14 bit playback isn't done with AM but rather two synchronized channels, one running at highest, the other at lowest volume. Due to the 6 bit volume resolution, they overlap 'in the middle' so two bits need to be eliminated. (You just put the high byte in the high channel, and for low byte you shift right two bits and then put it on the low channel.)

Using AM for high resolution playback is an interesting idea - it'd be a kind of highly dynamic compression that follows the wave level. But then again, each sample would only have 8 bit resolution even at highly varying volume levels.

Also, Paula's sampling speed isn't really limited to 28 kHz - but the DMA system is. On ECS with a increased scan rate or the - rarely used - PIO mode it can be much higher. Is that 1.7 MHz the maximum hardware sampling speed?

Just wondering - with 14 bit DAC resolution but 4x oversampling you could recreate the two dropped bits through PWM. E.g. an '030 with fast RAM should easily be capable of feeding Paula... ;)
« Last Edit: August 22, 2010, 10:46:23 AM by Zac67 »
 

Offline bloodline

  • Master Sock Abuser
  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 12113
    • Show only replies by bloodline
    • http://www.troubled-mind.com
Re: Amiga audio capabilities
« Reply #2 on: August 22, 2010, 10:55:57 AM »
Just had a thought... If the Amiga can play back samples at 1.7Mhz then it could easily do 1-bit Pulse Density Modulation playback... With a sample stream of -128 and +127 samples only... that would give the playback the same quality as expensive Hi-Fi equipment... I guess the only problem would be the amount of RAM required... 2MB of ram would give a second of playback?

Offline Thorham

  • Hero Member
  • *****
  • Join Date: Oct 2009
  • Posts: 1149
    • Show only replies by Thorham
Re: Amiga audio capabilities
« Reply #3 on: August 22, 2010, 11:07:33 AM »
Quote from: bloodline;575629
I guess the only problem would be the amount of RAM required... 2MB of ram would give a second of playback?
Can't you convert a 16 bit sample to PDM in real time?
 

Offline Piru

  • \' union select name,pwd--
  • Hero Member
  • *****
  • Join Date: Aug 2002
  • Posts: 6946
    • Show only replies by Piru
    • http://www.iki.fi/sintonen/
Re: Amiga audio capabilities
« Reply #4 on: August 22, 2010, 11:16:19 AM »
Quote from: minator;575596
The Amiga has been doing this from the very beginning and it's still done today, If you use the Octamed synth waveform editor you are using the Amiga as a wavetable synth, indeed this appears the term chiptune probably came from the use of this feature.

Chiptunes predate Octamed or trackers. Obviously there are several different ways to produce the effect, but easily the most common is to use very short looping samples.

Here's a 350MB collection of chip music, using wide range of different trackers:
Code: [Select]
rsync -avP zakalwe.fi::chip /local/path
 

Offline bloodline

  • Master Sock Abuser
  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 12113
    • Show only replies by bloodline
    • http://www.troubled-mind.com
Re: Amiga audio capabilities
« Reply #5 on: August 22, 2010, 11:32:08 AM »
Quote from: Thorham;575630
Can't you convert a 16 bit sample to PDM in real time?
No idea... Certainly not with any of the 68k family I would wager...

Offline Karlos

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16867
  • Country: gb
  • Thanked: 4 times
    • Show only replies by Karlos
Re: Amiga audio capabilities
« Reply #6 on: August 22, 2010, 11:33:46 AM »
Quote from: bloodline;575633
No idea... Certainly not with any of the 68k family I would wager...

Lookup tables? You could store precomputed patterns of bits against delta values between samples that can be decoded quickly into a chain of +/-128 by simply shifting the bit pattern left and testing the sign.

-edit-

I suspect the bigger problem would be computing the required bit patterns as it would could depend on the existing low pass filter characteristics and I bet no two amigas have the same characteristics there.
« Last Edit: August 22, 2010, 12:42:33 PM by Karlos »
int p; // A
 

Offline CodePoet

  • Full Member
  • ***
  • Join Date: Aug 2003
  • Posts: 224
    • Show only replies by CodePoet
    • http://www.UltraKeet.com.au
Re: Amiga audio capabilities
« Reply #7 on: August 22, 2010, 11:36:49 AM »
Quote from: Piru;575632
Here's a 350MB collection of chip music, using wide range of different trackers:
Code: [Select]
rsync -avP zakalwe.fi::chip /local/path

I freakin' love you, man.

Edit: I Just downloaded 13,903 chiptunes! It's going to be an AWESOME night
« Last Edit: August 22, 2010, 11:46:11 AM by CodePoet »
 

Offline Karlos

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16867
  • Country: gb
  • Thanked: 4 times
    • Show only replies by Karlos
Re: Amiga audio capabilities
« Reply #8 on: August 22, 2010, 11:37:30 AM »
Quote
2 channel 8 bit modulated by 6 bit volume at audio frequencies is known as amplitude modulation (AM). Analogue synth nuts know this as "ring modulation".

You can also have chains of modulation so channel 0 mods-> 1 mods-> 2 mods-> 3.
So your ring mod can ring mod it's ring mod. Complex stuff, I don't know of anything else that can do this other than modular synths.

Modulation of this sort is uncommon as it's highly complex but on the other hand chains of modulation is exactly how frequency modulation (FM) synths work.

Guess what? The Amiga can also do FM. The set up is the same as Amplitude modulation so you can have:

2 channels modulated by the other 2 channels.
1 channel modulated by a chain of the other 3 channels.

So the Amiga can act as a pretty complex FM monosynth, the limited bit depth and playback rate means it's not exactly going to be a DX7 but it will give it a grungy quality the DX7 (or any other FM synth) doesn't have.

But it gets better - Paula can have the FM and AM on at the same time. That'll allow über complex modulation and wave mutilation possibilities. I don't know of *anything* else that can do that sort of thing.


I recall reading this in the hardware manual but don't recall ever seeing it used.
int p; // A
 

Offline bubblebobble

  • Jr. Member
  • **
  • Join Date: Dec 2003
  • Posts: 66
    • Show only replies by bubblebobble
    • http://www.hd-rec.de
Re: Amiga audio capabilities
« Reply #9 on: August 22, 2010, 12:06:02 PM »
Well, a mono synth isn't suitable do play a real music score, even 2 voices are quite minimalistic.
But I think what makes it even more powerful is the fact, that the Paula Chip can invoke an interrupt everytime a pair of samples is played back. So, having a little CPU involved, you can do AM, FM, WaveShaping etc. even with 4 Channels. And I think this was sometimes used in game music.
--
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 Karlos

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16867
  • Country: gb
  • Thanked: 4 times
    • Show only replies by Karlos
Re: Amiga audio capabilities
« Reply #10 on: August 22, 2010, 12:31:13 PM »
Quote from: bubblebobble;575640
Well, a mono synth isn't suitable do play a real music score, even 2 voices are quite minimalistic.
But I think what makes it even more powerful is the fact, that the Paula Chip can invoke an interrupt everytime a pair of samples is played back. So, having a little CPU involved, you can do AM, FM, WaveShaping etc. even with 4 Channels. And I think this was sometimes used in game music.

Plenty of lead synths were mono (single voice) back in the day. Even my tone generator has a mono synth plugin board.
« Last Edit: August 22, 2010, 12:49:39 PM by Karlos »
int p; // A
 

Offline dentunes

  • Full Member
  • ***
  • Join Date: Jun 2007
  • Posts: 108
    • Show only replies by dentunes
Re: Amiga audio capabilities
« Reply #11 on: August 22, 2010, 01:42:33 PM »
The term chip tune actually dates back many, many years and refers to the tunes that occur on pianos during manufacturing. Obviously, different meaning, though interesting tidbit.

It is another term for pitch raising, which is the process of increasing the pitch of the strings in a piano to concert pitch prior to the final tune.
Amiga, Amiga, Where for art thou Amiga?
 

Offline minatorTopic starter

  • Hero Member
  • *****
  • Join Date: Jan 2003
  • Posts: 592
    • Show only replies by minator
    • http://www.blachford.info
Re: Amiga audio capabilities
« Reply #12 on: August 22, 2010, 02:05:42 PM »
Quote from: Zac67;575627
Interesting - completely forgot about the AM/FM modulation capabilities - have they ever been used?

However, 14 bit playback isn't done with AM but rather two synchronized channels, one running at highest, the other at lowest volume. Due to the 6 bit volume resolution, they overlap 'in the middle' so two bits need to be eliminated. (You just put the high byte in the high channel, and for low byte you shift right two bits and then put it on the low channel.)


Never knew they did it that way, how completely bizarre.

Quote
Using AM for high resolution playback is an interesting idea - it'd be a kind of highly dynamic compression that follows the wave level. But then again, each sample would only have 8 bit resolution even at highly varying volume levels.


Er, depends how it works.  If it's modulating the channel directly then yes it'll stay as 8 bit.  However, if it's modulating the volume of the channel (I assume it does this) then it'll effectively be 14 bit.

Either way, it'd be interesting to compare them.

Quote
Also, Paula's sampling speed isn't really limited to 28 kHz - but the DMA system is. On ECS with a increased scan rate or the - rarely used - PIO mode it can be much higher. Is that 1.7 MHz the maximum hardware sampling speed?
Quote


As I understand it's the maximum output speed from a pair of samples in a buffer, however it's not clear if you can update the samples any faster than the normal maximum playback rate - you might be able to get the CPU to write them but it depends on how faster the buffer updates.

There's only one paragraph and it doesn't say much, so who knows what happens.
 

Offline minatorTopic starter

  • Hero Member
  • *****
  • Join Date: Jan 2003
  • Posts: 592
    • Show only replies by minator
    • http://www.blachford.info
Re: Amiga audio capabilities
« Reply #13 on: August 22, 2010, 02:35:15 PM »
Quote from: Piru;575632
Chiptunes predate Octamed or trackers.


Sure, anything from the early 8bit micros is by definition chip music.

What I mean is the term appears to have come from the Amiga.  Probably as a means of distinguishing between sample based music and internal wave based stuff.

I guess it all boils down to what "chiptune" means. ...I've seen people describe all tracker music as chiptunes.

I think of it as a form of computer generated music, not based on sampled sound.

Quote
Obviously there are several different ways to produce the effect, but easily the most common is to use very short looping samples.


Yes, this is what wavetable synthesis means, though this term is also (mis)used to mean sample playback.
 

Offline Zac67

  • Hero Member
  • *****
  • Join Date: Nov 2004
  • Posts: 2890
    • Show only replies by Zac67
Re: Amiga audio capabilities
« Reply #14 on: August 22, 2010, 02:36:59 PM »
Quote from: minator;575653
Er, depends how it works.  If it's modulating the channel directly then yes it'll stay as 8 bit.  However, if it's modulating the volume of the channel (I assume it does this) then it'll effectively be 14 bit.
Yes, you're right. The volume knob just multiplies the 8 bit sample by something from 1 to 63 - which would be the same (depending on how exactly the volume works, of course).

Quote
Either way, it'd be interesting to compare them.
Sure, maybe someone will code something like that some day.

Quote
As I understand it's the maximum output speed from a pair of samples in a buffer, however it's not clear if you can update the samples any faster than the normal maximum playback rate - you might be able to get the CPU to write them but it depends on how faster the buffer updates.
Usually the DAC buffers are updated through DMA and the DMA update rate is limited to two samples per scan line (why this boils down to 28.8 kHz I don't recall, sorry), so you either raise the scan rate or 'manually' feed the buffers from the CPU (just update the buffer before the next sample is played back).