Version 1.2 10 Apr 1991 WaveMaker --------- W. T. Meyer 12 Physics Iowa State University Ames, IA 50010 Introduction ------------ Have you ever wondered how a flute and a trumpet can both play the same note and sound so different? The answer is that when they both play a C, for example, neither of them produces a sound purely at the pitch of C, but mixes in a lot of sounds at higher frequencies. The particular mix of these higher frequency sounds gives each instrument its distinctive quality. Wavemaker lets you cook up your own mixture of sound waves, see what it looks like, and hear what it sounds like. Using the mouse to control the mix and playing the keyboard like a piano, you can explore this world of sound. Play around with WaveMaker. What does a pure wave sound like? What kind of mix produces a hollow sound? What produces a harsh sound? What happens if you set all the waves to the same value (20 works well)? The concept of mixing waves to form a complicated waveform is an important one in physics. Students encounter it in acoustics, optics, wave motion, and quantum mechanics. Comments for Instructors ------------------------ 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. 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 it can also be very useful as a demonstration. Encourage experimentation and playing around - I've even included 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. If you are using WaveMaker in an academic setting at any level, I would appreciate a brief note or e-mail message from you telling me how you are using it. Suggestions for improvements are welcome. Getting Started --------------- In this discussion, the user is assumed to be familiar with the Amiga Workbench interface. 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 five controls and one numerical display. The numerical 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. The fifth control is a square with a gold outline. When selected, this becomes a solid square. Use this control to select one or more waves to be included in a partial sum displayed as a gold trace in the waveform display area. Thus you can see what an individual wave or group of waves is contributing to the total. It is especially helpful when trying to match the mystery wave in the game. 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 lalmkfile ----------------------------------------setup.c------- | | C# | D# | | F# | Gsound.c| | C# | | | | | | guts.c | | | | | S | D | F | GWaveMaker.docs K | L | ; | -----veMaker.info------------------------------------------- WaveMaker.doc.info D | E | F | G | A | B | C Addwaves.c | | | | | | | | ReadMe.fnf | | Z | X | C | V | B | N wavemaker.c| . | / | ---------------------------utils.c-------------------------- You can press up to fourWaveMakernce to create chords. Menus ----- Menus appear when you press the right mouse button. Here are the meanings of the 4A 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 -  4 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, also resets all four sound channels. TRIANGLE - creates a triangle waveform. SAWTOO 5=TH - 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 - star 5t 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 uon collections of freely distributable software sold for a nominal fee. Copyright is retained by the author.  6RRH~$H$I,xGr <`&Q)O)NBp"<0NCpN)@Z fpd`&&n)kJg 8)@ k"h r)IЁ^@)@ H@@"<N:Jf </g @)@L Sԁ SQ S"  Q"/`r)k:pRѬA\NA\N)@/$@ *$g,lZ @"()AN"* g$<N)@g @'h l/Hl h$)hN&@N3p` // ,g @NN> ,x"lZ NbN&Jg",gN,xN|"lN` , g"l  75N. .lL~Nudos.libraryNUe8H?2NLN BN9.N=fN >XO|`p0A8`BRFp@eNPN lCX,lN"l iVp(r/NEXO` l(0(2(&h?@*?A($(Yg@vgbv gg>gg.`tNr,lZ Np``N"BN XO`Lp0/*/N hXO`8pk&rxk&?@$QAgQAgQAgQAgA g`~>/$A8`&H JkR`Sp0/$/N .N XOr2/A&/ A px"lp"<$/*&<(,lNd$_`~>/$A8`&H JkS`R( 7p0/$/N .N XOr2/A&/ A px"lp"<$/*&<(,lNd$_`*p0/$A8`Dp0/$/N XO`Ap0/$&H,>&Jgv6A"08&C>`A>N`pk&r8k&?@$QAgQAgQAgQAgA g`zp0/$A8`$H Jjz k"p0("H//N $p0/,.N PO`J0/*"A@?@$?A&J@f4/(BfH/,>/N4PO0/$g0/&H/NzXO/,(NCNBhHx/,>NB\OG0` /NBXOXA@e/,NB.NBBN- ACp "Q H/5N LXO  @ d@0;N|rhhhhPB4( l,lN lN l,lNHx/,>NAPOHx/,>NAPOG0` /NBXOXA@e/,NAXO/,NAXOr,lZ NpLHN]Nue3a)@f Hx aXOa)@f Hx aXO/,aaXONuNUe3H"l i2)H$Hx/NAHxmHxYHxHx(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mHmNXOz-, ~d"pTrNJfn`mR`~-dprA0ځR`pTrNJf -rcRp-Sڀ rNh*p-ڀ rHxNLHN]Nu**5 Ho Stack Overflow **EXITintuition.librarypaH0$&HBHCCHBBBЂL NuJjDJj Da DNuaDDNuJj DaDNu/HA4f"H@HAHB4g0H@40HB2$Nu/v AdQC AdYC A dUCJAkSC4HBBBHC604HAdSCЁdr2HCH@A&$NuNUH32~ l(pOo. C`SdB5x,xN&@ +gH$@,*8Jf,+Jg4"A$v ,lZ N GR  "A$&,lZ Np`RCp,xN+@fp`:A)H/-Hx,_Nu/,y"oN&,_Nu/,y"o / N,_NuH0,y oLN 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, also resets all four sound channels. 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.