Black Cat Systems

Follow our tweets!

Lost Reg Code?
Online KiwiSDRs
macOS Software
Windows Software
Ham Radio iPhone/iPad
Linux Software
Update Policy

USB Icom CI-V Interface

Radio Hobbyist Products

  22m Programmable Beacon Kit
  22m Part 15 Beacon Kit
  CW Keyer For Beacons Kit
  Jellyfish Transformer
  Cyclops Antenna Transformer

General Interest Programs

  Atomic Mac/PC
  Audio Toolbox
  Black Cat Timer
  Diet Sleuth
  Graph Paper Maker
  Health Tracker
  Image Resizer
  Knitting Wizard
  Label Wizard
  Prog Audio Gen
  Sound Byte
  Synth 76477

Amateur Radio Programs
  AirSpyHF+ Server
  Black Cat ACARS
  Black Cat ALE
  Black Cat ALE Vacuum Cleaner
  Black Cat NetFinder
  Black Cat GMDSS
  Black Cat HF Fax
  Black Cat SSTV
  Carrier Sleuth
  Cocoa 1090
  Cocoa RTL Server
  DGPS Decoding
  DX Toolbox
  eQSL Factory
  KiwiSDR Monitor
  KiwiSDR Sound Client
  Morse Mania
  RF Toolbox
  SDRuno Plugin
  SDRuno Equalizer Plugin

iPhone/iPad Apps
  Atoms To Go
  dB Calc
  Clik Trak
  DGPS Decoder
  Drill Calc
  DX Toolbox
  Elmer Extra
  Elmer General
  Elmer Tech
  Feld Hellschreiber
  Field Strength Calc
  Function Generator Pad
  HF Weather Fax
  Morse Mania
  Morse Pad
  Packet Pad
  PSK31 Pad
  SSTV Pad
  Photon Calc
  Rad Map Tracker
  RF Link Calc
  SelCall Tone Gen
  Sound Byte
  Sound Byte Control
  Spectrum Pad
  SWBC Schedules
  Synth 76477
  Synth Motion
  Transmission Line Calc
  Weather Calc
  Wire Calc

iPhone/iPad Bundles
  RF Calculator Apps
  Ham Radio Decoder Apps
  Audio Utility Apps
  Shortwave Weather Apps
  Ham Radio Exam Study Apps
  Shortwave Decoder Apps

Android Apps
  Audio Function Generator
Audio Spectrum Analyzer
DGPS Decoder
  HF Weather Fax
  Rad Map Tracker
  SelCall Tone Gen
  Sound Byte Control
  SWBC Schedules
  Wire Calc

About Black Cat Systems
Site Map
Our software for Mac OSX
Privacy Policy
Apple /// Emulator

Macintosh Links
Shortwave Radio
Pirate Radio
Spy Numbers Stations
Science and Electronics
Ham Radio Software


PAG - Programmable Audio Generator

What is it?
PAG - Programmable Audio Generator - is a program for creating audio files containing a series of tones.

Why would you use it?
PAG is useful for creating files of test tones, for testing audio software, or equipment. Let's say you wanted to make a file of DTMF (Touch Tone) tones to test out some equipment. You can use PAG to generate such a file.

How do you use it?
PAG reads in a text file to define what audio to produce. There are four sections to the file:

  • File format
  • Defintion of tones
  • Macros
  • Tones to send

Below is an actual file, let's take a look at it:

#format WAVE 44100 16 1 dtmf.wav
1 0.2 697 50 50 1209 50 50
2 0.2 697 50 50 1336 50 50
3 0.2 697 50 50 1477 50 50
4 0.2 770 50 50 1209 50 50
5 0.2 770 50 50 1336 50 50
6 0.2 770 50 50 1477 50 50
7 0.2 852 50 50 1209 50 50
8 0.2 852 50 50 1336 50 50
9 0.2 852 50 50 1477 50 50
* 0.2 941 50 50 1209 50 50
0 0.2 941 50 50 1336 50 50
# 0.2 941 50 50 1477 50 50
A 0.2 697 50 50 1633 50 50
B 0.2 770 50 50 1633 50 50
C 0.2 852 50 50 1633 50 50
D 0.2 941 50 50 1633 50 50
s 0.2 1 1 1 1 1 1
h 8675309
The first line defines the format of the file to produce:
#format WAVE 44100 16 1 dtmf.wav
The format of the this line is:
#format fileType sampling bits channels fileName
fileType can be one of: WAVE, AIFF, AU
sampling is the sampling rate in Hz, such as 44100, 11025, 8000, etc
bits is the sample size, only 8 and 16 are allowed
channels is 1 or 2, for mono or stereo
fileName is, as expected, the name of the file to produce

Next come the definitions for the tones. Each tone is assigned to a character, whenever that character appears in the fourth section of the file (tones to send) it is produced. A tone can actually be defined to produce more than one frequency at a time, which is necessary in cases like DTMF where two tones must be played at the same time for each button on the phone. For example, the definition for the 1 button:

1 0.2 697 50 50 1209 50 50
The definition of this line is:
character length freq1 ampL1 ampL2 ... freqN ampLN ampRN
The first letter in the line is the character assigned to that tone. Any printable or non printable character may be used, except for the tilde ~ which is actually mapped to the space character, since it is more likely you will want to define the space than the tilde. That is, you use the tilde here to define the tones to send when the space character is encountered. Hopefully that isn't too confusing.

The second value is the length (in seconds) that tone should be played for.

Next, we take values in blocks of three, such as 697 50 50 in that line. The 697 means to play 697 Hz, the 50 50 means to set the amplitude to 50% for both the left and right channels. The next set of three values is 1209 50 50 which means we want to play a second tone at the same time, of 1209 Hz, also 50% amplitude in each channel. You can have different amplitudes for each tone and channel of course, but for a given channel, the sum of all the amplitudes for all the frequencies should not exceed 100%, or distortion will result.

You can define up to ten frequencies for each character. You must specify all three values for each, including both amplitudes, even if the sound file is monophonic.

After all of the tones are defined, you define the macros, preceeded by the line:

You must include this line, even if no macros follow. Macros are easy to define, in our example, we have one macro definition:
h 8675309
This means that whenever the character h is encountered, to substitute the characters 8675309 instead. Don't define a macro using a letter already assigned to a tone.

After the macros have been defined, there should be the following line:

And following this, the text to be converted into tones. In our example:
In this case we are sending each tone tone button's tone pairs, with a space between them, as s was defined to be a 1 Hz tone of amplitude 1%, making it inaudible. Then we have the letter h, which is a macro, which means that the tones for buttons 8675309 are sent.

We do have returns in our data portion, but as we have not defined them to map to any tones, they cause no additional output.

That's really about it.

There is a text editor in the program, or you can use your own, like BBEdit. TextEdit that comes with Mac OS X doesn't always save in a plain text format. Windows users can use any editor, like Notepad, if they'd prefer.

After you have your text file opened in PAG, select Process File from the File menu. It may take a few seconds (or more!) depending on the length of the sound file being produced. After it is done, it displays a second window with some debugging results (which are also contained in three text files it produces). You can send this to me (along with the input file!) if you're having difficulties, it may help determine the problem.

Download Options:
PAG 1.2.0 for Mac OS X - Mac OS X 10.2 and later (964k)

PAG 1.2.0 for MacOS Classic - Mac OS 8.6 and later (956k) PAG 1.2.0 for Windows - Windows 98 later (702k)

PAG is only $19.99!

Before buying, you should download a copy and make sure it works on your particular configuration.

Email your comments and questions to

Last modified October 25, 2017