<< Chapter < Page | Chapter >> Page > |
In addition to the AudioGraph generator program named MusicComposer10 , this module also develops a simple template for writing programs to evaluate functions and to write theresults into a text file. The zip file mentioned earlier contains the source code for programs to evaluate all of the functions in the above list . This template is so simple that a student with minimal programming knowledge could easily write her ownprograms to evaluate other functions. I will explain the template later .
You may have noticed that the output pulses in most of the audio files in the above list are delivered to the speakers at a fairly rapid rate. The output pulse rate (in pulses per second) is specified by the user as a command-line parameter when the program is run. (Most of the examples in the above list were run at 12 pulses per second but Sinusoid01 was run at only 5 pulses per second.) An overview of the output from a function can be achieved using a fast output pulse rate. A more detailed audio analysis of the outputcan then be achieved by running the program with a slower output rate. And, if you need to do detailed numeric analysis, the numeric data is available forexamination in the corresponding text file.
Another user input parameter specifies whether the melody is to be played immediately or is to be saved in an audio file for playback later. Saving it inan audio file makes it very convenient to listen to over and over to allow the information content to "sink into" the brain. In addition, a student can buildup a library of audio files for different functions for review later, such as when studying for a test.
An AudioGraph is not a substitute for an embossed image of a graph. However, it may be much quicker and easier to produce, it may tell you if you need totake the time and effort to create an embossed image, and it may enhance the learning process even if you do produce an embossed image.
For the benefit of those students who have the ability to produce embossed images, the Figures section provides an image for each AudioGraph listed above . In addition, the downloadable zip file contains the JPEG files for those images.
Since this module is all about evaluating functions, I will begin with an explanation of the template that I have developed to evaluate a function and to writethe results of the evaluation into an output text file. A complete listing of the program named Sinc01 is provided in Listing 16 . As is my custom, I will break the program down and explain it in fragments.
This program produces an output text file containing values for y as a function of x for the so called sinc function (more on this later) .
The contents of the text file can be converted into audio and either played or written into an audio file of type AU for playback later using the programnamed AudioGraph01 .
The function that is evaluated by this program is the classic sin(x)/x function, otherwise known a the sinc function. It appears frequently in digital signal processing (DSP) and is one ofmy favorites.
Notification Switch
Would you like to follow the 'Accessible objected-oriented programming concepts for blind students using java' conversation and receive update notifications?