[Background off] | [Frames off] |
This is an archived site, kept for reference and, er, historical interest. The current site is here.
Even if this page is mainly for developers who are using the AHI audio system in their own products, a short introduction of AHI may be appropriate.
AHI is for sound cards what CyberGraphX is for graphic cards. A common way of talking to sound cards, and even the internal audio chip (Paula), makes it possible for programmers to make their music and audio programs work with all supported sound cards - without even owning one. Furthermore, special features of more advanced sound cards (like DSP and effect chips) will automatically be used by AHI applications. The system is designed to be easy to use, fast, efficient and future safe.
AHI User's Guide is available on-line, if you're interested.
For a more technical description of AHI, please read the ahidev.readme file or the AHI Developers's Guide. You can also have a quick look at the device and driver functions in the autodocs. Comments are welcome! Write me!
The first time I heard about AHI was from the news group. Then I
downloaded the user and developer package from Martin's homepage and
played with it at home. I was very impressed. The first thing which
come into my mind was: "This would be the new audio standard" and
look how it's going now :). I started immediately to make a
NotePlayer to APlayer with AHI and it took me only a few days before
the first version was finished.
If I have some problems or bug reports, I contacted Martin and he is
very helpful. Thanks for all your help :)
- Thomas Neumann / The APlayer-Team
AHI is the greatest thing since sliced toast, finally
our DraCo is no longer a mute! When people realise what AHI is
about it will be as big as CybergraphX. It's time we got rid of the 8-bit
audio limit! Great work Martin!
- Johan Otterström / Örebro Videoreklam (DraCo reseller)
AHI is the easiest way for programmers to implement
support for various audio cards. No more messing
up with hard-to-figure-out outdated or non existing programming
documentations. Just use AHI for it and relax..
Best general purpose Sound API for Amiga ever!
- Pauli Porkka / Digital Audio Systems Designs (author of D.A.S. Module Player)
Finally there's a powerful retargetable audio standard for Amiga!
- Thomas Wenzel, A.C.T. (designers of the Prelude soundcard)
For details, see Recent changes below.
Traditionally, the Delfina mailing list have been used for AHI support as well. This list has recently moved to Yahoo! Groups
On a WWW page, you can use the following code to link to this page:
<a href="http://www.lysator.liu.se/ahi/v4-site/"><img src="ahi-compatible.tiny.jpg" border=0 width=121 height=79 alt="[AHI compatible]"></a>
AHI is available to you as freeware. This means that you does not have to pay anything to use AHI for neither personal nor commercial use, but it is still copyrighted. You may not modify the files or archives in any way. For more information, see AHI User's Guide.
The latest updates:
Here are some extras, too:
While I have yet to make any money on AHI, I no longer ask for donations. I just do AHI for fun, and earn my living elsewhere.
For detailed revision history, see the History file found in the AHI User's and Developer's archives.
R4.14 Bug fixes. The Paula driver can now be told to swap left and right channel. Toccata driver updated, should work fine on Draco Motion again. Added Melody to the distribution. R4.16 Bug fixes in the device code. Updated documentation. New translation (hrvatski). Added driver for Maestro Pro to the distribution. Added driver for Concierto to the distribution.
PowerPC
AHI and AmigaOS 4.0
The Paula driver and >28 kHz sample rates
Low volume
Speak Freely
PowerPC
A PowerPC version of AHI (version 5, will be bumped to 6 when stable) has been available since August 2000, the day of the first public release of MorphOS. Although still considered beta, it works just great for a number of people (and not so great for some, but I'm working on it).
Unfortunately, my Cyberstorm/PPC died in late 2001, so until I can get my hands on a Pegasos system, I'm basically coding "in the blind". Don't expect miracles.
There will be no AHI version for neither PowerUp or WarpUp, since both
systems lack the required capabilities.
AHI and AmigaOS 4.0
Hyperion is planning to ship AHI with AmigaOS 4.0. Since I have no
system capable for running AmigaOS 4, they will handle the porting
themselves.
The Paula driver and >28 kHz sample rates
First of all, for general questions regarding the Paula driver read the documentation. That's why I wrote it. The Paula driver documentation can be found in the AHI User's Guide, in the System description/System Files/The Drivers/paula.audio section.
Now, in order to enable higher sample rates than 28 kHz, you need to make sure that the native Amiga video output is a VGA mode. If you're not using a graphic card and only have a PAL/NTSC monitor, you're simply out of luck. If you're using a VGA or multisync monitor, all you have to do is to select one of the VGA modes (not the Super72 mode, it's not a VGA mode!), and then you should be able to select sample frequencies up to 48 kHz.
If you're using a graphic card, things become a little more complicated. Let's take the easiest case first. If you use Picasso 96, all you have to do is to set the environment variable Picasso96/AmigaVideo to 31kHz. Example:
SetEnv Picasso96/AmigaVideo 31kHz
SetEnv EnvArc:Picasso96/AmigaVideo 31kHz
If you're a CyberGraphX user, the matter is a little more complicated. CyberGraphX "remembers" the last used Amiga video mode, which means that if you open a Amiga VGA screen and then close it, you will still be able to select frequencies up to 48 kHz. One way to open and close such a screen is to use the AddAudioModes program, like this:
AddAudioModes DBLSCAN
See the documentation of AddAudioModes for more information (AHI User's Guide, in the System description/AddAudioModes section).
Naturally, you need an Amiga that can output VGA frequencies (read AGA
Amiga), and have the appropriate monitor driver in
Devs:Monitors.
AHI always performs sound mixing in order to be able to play several
sounds at the same time. In order to avoid distortion, each time the
number of channels are doubled, the volume is halved. But there are
ways around this, at least when using programs that offer an audio
mode requester. Many of these programs also offer the setting of
volume boosting, which will raise the volume but can
introduce distortion. To minimize this distortion, the user should
select Master volume with clipping from the advanced page
in the preference program. This will enable saturated arithmetics when
mixing, at the expense of 128 kB large table.
If you have problem with a program that does not offer an audio mode
requester but uses one of the four "units" instead, all you can do it
lowering the number of channels for the used unit. Often, it is not
neccessary to have more than one or two channels enabled.
My port of Speak Freely seem to be causing trouble for many.
Since it's almost a direct Un*x port, it requires ixemul.library.
The latest release is available from
ftp.ninemoons.com (gzipped tar file!), but some of you might prefer
to get it from Aminet as a lha file instead:
You just need the library itself to use Speak Freely. Get
the approptiate library version and put it in
LIBS:. Then, you need a termcap file in your
ETC:. You can use mine, if you'd like. If you
don't already have an ETC: assign, create one and move
the file termcap to that directory. And, as a last step,
you need to set the environment variable TERM to
Amiga. You can do this by typing:
There you go! That should be enough to start the program. However, you
probably have to configure AHI, too. Speak Freely uses
Unit 0 as default device. You can change this by setting
the environment variables SPEAKFREE_PLAY_UNIT and
SPEAKFREE_RECORD_UNIT to the desired unit. There are
three possible configurations:
Oh, don't forget to mount AUDIO: before you start sfmike
or sfspeaker.
(This was written from memory, so please let me know you find anything wrong. I don't
use Speak Freely myself, I have no mike....)
PowerPC
A PowerPC version of AHI (version 5, will be bumped to 6 when stable)
has been available since August 2000, the day of the first public
release of MorphOS. Although still considered beta, it works just
great for a number of people (and not so great for some, but I'm
working on it).
Unfortunately, my Cyberstorm/PPC died in late 2001, so until I can get
my hands on a Pegasos system, I'm basically coding "in the
blind". Don't expect miracles.
There will be no AHI version for neither PowerUp or WarpUp, since both
systems lack the required capabilities.
Hyperion is planning to ship AHI with AmigaOS 4.0. Since I have no
system capable for running AmigaOS 4, they will handle the porting
themselves.
First of all, for general questions regarding the Paula driver
read the documentation. That's why I wrote it. The Paula
driver documentation can be found in the AHI User's Guide,
in the System description/System Files/The
Drivers/paula.audio section.
Now, in order to enable higher sample rates than 28 kHz, you need to
make sure that the native Amiga video output is a VGA
mode. If you're not using a graphic card and only have a PAL/NTSC
monitor, you're simply out of luck. If you're using a VGA or multisync
monitor, all you have to do is to select one of the VGA modes (not the
Super72 mode, it's not a VGA mode!), and then you should be able to
select sample frequencies up to 48 kHz.
If you're using a graphic card, things become a little more
complicated. Let's take the easiest case first. If you use
Picasso 96, all you have to do is to set the environment
variable Picasso96/AmigaVideo to
31kHz. Example:
SetEnv Picasso96/AmigaVideo 31kHz
If you're a CyberGraphX user, the matter is a little more
complicated. CyberGraphX "remembers" the last used Amiga
video mode, which means that if you open a Amiga VGA screen and then
close it, you will still be able to select frequencies up to 48
kHz. One way to open and close such a screen is to use the
AddAudioModes program, like this:
AddAudioModes DBLSCAN
See the documentation of AddAudioModes for more information
(AHI User's Guide, in the System
description/AddAudioModes section).
Naturally, you need an Amiga that can output VGA frequencies (read AGA
Amiga), and have the appropriate monitor driver in
Devs:Monitors.
AHI always performs sound mixing in order to be able to play several
sounds at the same time. In order to avoid distortion, each time the
number of channels are doubled, the volume is halved. But there are
ways around this, at least when using programs that offer an audio
mode requester. Many of these programs also offer the setting of
volume boosting, which will raise the volume but can
introduce distortion. To minimize this distortion, the user should
select Master volume with clipping from the advanced page
in the preference program. This will enable saturated arithmetics when
mixing, at the expense of 128 kB large table.
If you have problem with a program that does not offer an audio mode
requester but uses one of the four "units" instead, all you can do it
lowering the number of channels for the used unit. Often, it is not
neccessary to have more than one or two channels enabled.
My port of Speak Freely seem to be causing trouble for many.
Since it's almost a direct Un*x port, it requires ixemul.library.
The latest release is available from
ftp.ninemoons.com (gzipped tar file!), but some of you might prefer
to get it from Aminet as a lha file instead:
You just need the library itself to use Speak Freely. Get
the approptiate library version and put it in
LIBS:. Then, you need a termcap file in your
ETC:. You can use mine, if you'd like. If you
don't already have an ETC: assign, create one and move
the file termcap to that directory. And, as a last step,
you need to set the environment variable TERM to
Amiga. You can do this by typing:
There you go! That should be enough to start the program. However, you
probably have to configure AHI, too. Speak Freely uses
Unit 0 as default device. You can change this by setting
the environment variables SPEAKFREE_PLAY_UNIT and
SPEAKFREE_RECORD_UNIT to the desired unit. There are
three possible configurations:
Oh, don't forget to mount AUDIO: before you start sfmike
or sfspeaker.
(This was written from memory, so please let me know you find anything wrong. I don't
use Speak Freely myself, I have no mike....)
Low volume
Speak Freely
ixemul-000n.lha util/libs 138K+Ixemul V47.2 library 68000 notrap
ixemul-000s.lha util/libs 127K+Ixemul V47.2 library 68000
ixemul-000t.lha util/libs 130K+Ixemul V47.2 library 68000 trace-version
ixemul-020f.lha util/libs 125K+Ixemul V47.2 library 68020/030 + FPU
ixemul-020s.lha util/libs 126K+Ixemul V47.2 library 68020/030 w/o FPU
ixemul-040f.lha util/libs 125K+Ixemul V47.2 library 68040 + FPU
ixemul-040s.lha util/libs 126K+Ixemul V47.2 library 68040 w/o FPU
ixemul-bin.lha util/libs 78K+Ixemul V47.2 binary utilities
ixemul-doc.lha util/libs 52K+Ixemul V47.2 documentation
ixemul-sdk.lha util/libs 917K+Ixemul V47.2 includes, libs, manpages
ixemul-tz.lha util/libs 258K+Ixemul V47.2 timezone-utilities (all CPUs
1> SetEnv TERM Amiga
1> SetEnv ENVARC:TERM Amiga
No sound card
If you have no sound card, you have to make sure you're using a full
duplex mode, and SPEAKFREE_PLAY_UNIT and
SPEAKFREE_RECORD_UNIT must be set to the same value! The
default is 0. A good mode here is Paula: Fast 8 bit mono,
8000 Hz, 1 channel.
Don't forget to set the input source to the correct sampler type.
Half-duplex sound card
Speak Freely really needs full duplex. You can pretend you
have it, by using the sound card to record and Paula to play. For
example, set Unit 0 to Paula: Fast 8 bit mono,
8000 Hz, 1 channel, and set Unit 1 to [SoundCard]:
Fast 8 bit mono, 8000 Hz, 1 channel. Then ask Speak
Freely to play to Unit 0 and record from Unit
1:
1> SetEnv SPEAKFREE_PLAY_UNIT 0
1> SetEnv ENVARC:SPEAKFREE_PLAY_UNIT 0
1> SetEnv SPEAKFREE_RECORD_UNIT 1
1> SetEnv ENVARC:SPEAKFREE_RECORD_UNIT 1
Don't forget to set the input source to the correct desired input (mic, probably).
Full duplex sound card
Just like if you had no sound card, you have to make sure that
SPEAKFREE_PLAY_UNIT and
SPEAKFREE_RECORD_UNIT is set to the same value. The
default is 0. A good mode here is [SoundCard]: Fast 8 bit mono,
8000 Hz, 1 channel.
Don't forget to set the input source to the correct desired input (mic, probably).
Frequently Asked Questions about AHI
Welcome to the FAQ section. Please, make sure you have searched this
page before you ask me directly.
Index
AHI and AmigaOS 4.0
The Paula driver and >28 kHz sample rates
Low volume
Speak Freely
PowerPC
AHI and AmigaOS 4.0
The Paula driver and >28 kHz sample rates
SetEnv EnvArc:Picasso96/AmigaVideo 31kHz
Low volume
Speak Freely
ixemul-000n.lha util/libs 138K+Ixemul V47.2 library 68000 notrap
ixemul-000s.lha util/libs 127K+Ixemul V47.2 library 68000
ixemul-000t.lha util/libs 130K+Ixemul V47.2 library 68000 trace-version
ixemul-020f.lha util/libs 125K+Ixemul V47.2 library 68020/030 + FPU
ixemul-020s.lha util/libs 126K+Ixemul V47.2 library 68020/030 w/o FPU
ixemul-040f.lha util/libs 125K+Ixemul V47.2 library 68040 + FPU
ixemul-040s.lha util/libs 126K+Ixemul V47.2 library 68040 w/o FPU
ixemul-bin.lha util/libs 78K+Ixemul V47.2 binary utilities
ixemul-doc.lha util/libs 52K+Ixemul V47.2 documentation
ixemul-sdk.lha util/libs 917K+Ixemul V47.2 includes, libs, manpages
ixemul-tz.lha util/libs 258K+Ixemul V47.2 timezone-utilities (all CPUs
1> SetEnv TERM Amiga
1> SetEnv ENVARC:TERM Amiga
No sound card
If you have no sound card, you have to make sure you're using a full
duplex mode, and SPEAKFREE_PLAY_UNIT and
SPEAKFREE_RECORD_UNIT must be set to the same value! The
default is 0. A good mode here is Paula: Fast 8 bit mono,
8000 Hz, 1 channel.
Don't forget to set the input source to the correct sampler type.
Half-duplex sound card
Speak Freely really needs full duplex. You can pretend you
have it, by using the sound card to record and Paula to play. For
example, set Unit 0 to Paula: Fast 8 bit mono,
8000 Hz, 1 channel, and set Unit 1 to [SoundCard]:
Fast 8 bit mono, 8000 Hz, 1 channel. Then ask Speak
Freely to play to Unit 0 and record from Unit
1:
1> SetEnv SPEAKFREE_PLAY_UNIT 0
1> SetEnv ENVARC:SPEAKFREE_PLAY_UNIT 0
1> SetEnv SPEAKFREE_RECORD_UNIT 1
1> SetEnv ENVARC:SPEAKFREE_RECORD_UNIT 1
Don't forget to set the input source to the correct desired input (mic, probably).
Full duplex sound card
Just like if you had no sound card, you have to make sure that
SPEAKFREE_PLAY_UNIT and
SPEAKFREE_RECORD_UNIT is set to the same value. The
default is 0. A good mode here is [SoundCard]: Fast 8 bit mono,
8000 Hz, 1 channel.
Don't forget to set the input source to the correct desired input (mic, probably).
Last update: Stardate 39006.5 (October 2006).