home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Frozen Fish 1: Amiga
/
FrozenFish-Apr94.iso
/
bbs
/
alib
/
d3xx
/
d318
/
wavemaker.lha
/
WaveMaker
/
WaveMaker.doc
< prev
next >
Wrap
Text File
|
1990-02-14
|
7KB
|
164 lines
Version 1.1
26 Jan 1990
WaveMaker
---------
W. T. Meyer
12 Physics
Iowa State University
Ames, IA 50010
Introduction
------------
One of the important concepts in physics is understanding how sine waves
having frequencies which are multiples of some fundamental frequency can be
added to construct a composite waveform. Students encounter this concept in
studying such topics as acoustics, optics, wave motion, and quantum
mechanics.
WaveMaker enables the beginning student to get a feel for wave
synthesis by providing controls for adjusting the amount of each wave to be
used. A large visual display shows the resulting waveform and use of the
keyboard in a "piano mode" allows the user to hear the waveform via the
digital-to-analog converters of the Amiga's custom sound chip.
WaveMaker is intended to be used "hands on" by the student, although
demonstration use by instructors is certainly possible. Experimentation
and playing around are encouraged - there is even a game mode, in which
the student tries to reproduce a mystery wave created by the computer.
WaveMaker runs on any Amiga and is fully compatible with the Amiga's
multitasking operating system. A mouse and icon interface make it easy
to use by students with little computer experience.
In the discussion that follows, the user is assumed to be familiar with
the Amiga Workbench interface.
Sound as an example of waves
----------------------------
Sound waves are a good example for learning the basics of waveform
synthesis because their properties are familiar in everyday life. Wave
amplitude corresponds to volume and wave frequency corresponds to pitch.
The difference between two composite waveforms which have the same
fundamental frequency but differ in their composition of higher frequency
components can be related to what musicians call timbre, or tone quality.
This is the characteristic which lets the ear readily distinguish the
brassy sound of a trumpet from the soft sound of a flute, even when they
are playing the same note. One of the most interesting things to do with
wavemaker, in fact, is to see how varying the amount of harmonics (higher
frequency waves) affects the tone quality.
Getting Started
---------------
WaveMaker is started from the Amiga Workbench in the same way as any
other program: double-click on its icon with the mouse. When the wavemaker
screen appears, you will see a waveform display area (initially with only a
gray line in it) in the top half of the screen and eight sets of amplitude
controls in the bottom half. Each of these sets has four controls and
one numerical display. The display shows the current amplitude as an
integer between -127 and +127. The most useful control is the tall,
thin slider. In it is a small rectangle called the knob. By dragging
the knob up or down with the mouse, you can set the amplitude.
The numerical display will change to show you the new setting. You can
change the amplitude by a smaller amount (about 4 or 5 counts) by clicking
in the open area inside the slider above or below the knob. The
two arrow controls to the left of the slider provide very fine tuning by
changing the amplitude by one count up or down each time you click in them.
The fourth control is the box marked with a "+" and "-" symbol. Clicking
here changes the sign of the amplitude, i.e. +50 becomes -50 and -75 becomes
+75.
Take a few minutes to play with the controls. Try each of them
separately to see what the individual waves look like. See what happens
when you change the sign. Now try turning on several waves at the same
time.
If the display tries to go off scale while you are changing the
amplitudes, WaveMaker will rescale automatically, keeping the relative
amount of each wave the same.
The Keyboard
------------
The keyboard can be used to hear the current waveform. The lowest two
rows of keys have been programmed to act like a piano, with the lowest
row being the white keys and the next row the black ones. The key layout
is:
-------------------------------------------------------
| | C# | D# | | F# | G# | A# | | C# |
| | | | | | | | | |
| S | D | F | G | H | J | K | L | ; |
-------------------------------------------------------------
| B | C | D | E | F | G | A | B | C | D |
| | | | | | | | | | |
| Z | X | C | V | B | N | M | , | . | / |
-------------------------------------------------------------
You can press up to four keys at once to create chords.
Menus
-----
Menus appear when you press the right mouse button. Here are the meanings
of the various options:
PROJECT
-------
ABOUT - gives information about the program and an address
for sending kudos, suggestions, and complaints.
FULL SCALE - scales the current waveform to fill the display
window.
SCREEN TO BACK - moves the WaveMaker screen to the back of the
Workbench, allowing access to other tasks that may
be running.
SCREEN TO FRONT - moves the WaveMaker screen to the front of the Work-
bench.
QUIT - exits WaveMaker. This is the same as clicking on the
"quit" button in the upper left corner of the screen.
WAVEFORMS
---------
This contains four pre-calculated waveforms to use as examples.
RESET - sets all amplitudes to zero, provided as a convenience.
TRIANGLE - creates a triangle waveform.
SAWTOOTH - creates a sawtooth waveform.
SQUARE - creates a square waveform.
GAME
----
The computer randomly selects four or eight amplitudes depending on
the game mode, scales the wave to fill the display, and displays it as
a green trace. The user then tries to match the wave using the controls.
In the "easy" mode only the first four waves are used; in the hard mode
all eight are used. The hard mode is a real challenge!
START-EASY -
START-HARD - start the game. This can be selected at any time. If a
game is already in progress, the old amplitudes will be
discarded and new ones calculated. The only difference between
START-EASY and START-HARD is that the easy mode only uses four
amplitudes, while the hard mode uses all eight.
STOP - displays the answers and then exits the game mode.
WaveMaker is freely distributable, but it cannot be sold for profit. It
may be included on collections of freely distributable software sold for
a nominal fee. Copyright is retained by the author.