Audio Interface
cocoaModem uses numerical algorithms to demodulate and
decode digital mode signals. An analog waveform from a
radio has to be sampled into a stream of numbers for
cocoaModem to use. A device that converts an analog
waveform into a digital stream is called an
analog-to-digital converter (A/D converter). It is also
known as an Audio Interface, or a codec, or a "Sound Card."
For output, the numerical stream of numbers that cocoaModem
generates has to be converted into an analog waveform for
modulating a radio. A device to perform this is called a
digital-to-analog converter (D/A converter). It is also
known as an Audio Output Interface, or the output section
of a codec or a Sound Card.
The term "Sound Card" comes from the fact that the audio
interfaces are often built into PCI cards which plug into
the computer backplanes. Today, many sound devices are
built into external enclosures which are connected to the
computer with a USB or Firewire interface. But the name
"Sound Card" continues to be used for them.
Macintosh Built-in Sound
Many models of Macintosh now come with built-in sound input
and sound output. The following is a screen shot of the
System Profiler on a MacBook Pro
The Line In and Headphone (or Line Out ) connections can be
temporarily used as the audio interface for cocoaModem. For
long term use, I
highly
recommend that you use an external Audio Interface instead,
especially if you are using a VOX base mechanism (such as a
SignaLink) for PTT.
The reason is that the built-in sound outputs are also used
in the Mac OS by system chimes, application alert sounds,
iTunes music and other sounds. These sounds will modulate
your transmitter with potentially illegal signals.
Sampling Rate of Audio Interfaces
An analog signal from the radio is sampled (measured)
periodically by the input audio interface. The rate at
which you take samples is known as the
sampling
rate or sample rate of the interface.
From the Nyquist theorem, a band-limited signal can be
uniquely represented in the digital domain even if
you don't continuously take samples from it, as long as the
sampling rate is at least twice that of the highest
frequency component (called the
Nyquist Frequency) of the analog
signal.
With real world implementation, you will need to sample at
a little bit more often than twice the highest frequency
component in your signal. A sampling rate of 11025
samples/second is sufficient, for example, to accurately
represent signals up to 4 kHz.
Software Defined Radios work with a pair of
signals, called the In-phase and Quadrature (or I and Q)
components. When I and Q components of a signal are
available, you will only need to sample at the Nyquist rate
to get a complete representation of the same signal.
The sampling rates for sound devices usually come from two
families. One of them is based on the 8000 samples/second
rate that was used by early researchers of digital
telephony at Bell Labs. For wider bandwidths, integer
multiples of 8000, such as 16000, 32000, 48000, 96000 and
192000 samples per second are used.
The second family of sampling rates became popular due to
Philips' choice of 44100 samples/second as the sampling
rate for music CDs that encode analog signals up to 20 kHz.
This family of sampling rate includes rates of 11025, 22050
for lower bandwidth signals and 88200 samples per second
for higher bandwidth signals.
Most Audio Interfaces that you buy will typically include
one or more of the rates from either or both families.
Rates of 11025 and 44100 are most often found in consumer
products and rates of 96000 and 192000 are typical of what
is found in professional recoding equipment.
The built-in sound device on a Macintosh is usually fixed
at 44100 samples/second. For compatibility with most
Macintosh models, cocoaModem uses either 11025 or 44100 as
the two default sampling rates.
Resolution of Audio Interfaces
When the audio devices takes a sample from the analog
waveform, it encodes the voltage into a number. The number
can be recorded with various resolutions, such as 8, 16, 20
or 24 bits. An 8 bit device can record up to 256 voltage
levels, a 16 bit device can record up to 65,536 voltage
levels, a 20 bit device can record up to a million voltage
levels and a 24 but device can record up to 16 million
voltage levels.
An 8 bit device can therefore represent numbers up to a 48
dB range, a 16 bit device can record up to a 96 dB range,
and the higher resolution devices have the potential of
recording larger ranges.
The resolution of a device merely determines the maximum
dynamic range you can achieve with the device; the true
dynamic range of an audio interface is also determined by
other factors, such as the noise floor and the linearity of
the device. A 20 bit device is not a guarantee that it will
be better than a 16-bit device.
You must never operate the audio interface so that signals
clips or saturates the devices. In the output direction, it
will cause severe interference to adjacent stations and can
violate the bandwidth requirements of the amateur sub-band
that you are operating in. In the input direction, you will
get degraded copy of a signal. cocoaModem provides an audio
level meter in all of its interfaces so you can monitor if
the audio interface is clipped.