<< Chapter < Page Chapter >> Page >

A template for evaluating functions

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 .

The audio pulse rate

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.

Play or 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.

Not a substitute for an embossed image

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.

Discussion and sample code

The program named Sinc01

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 .

A sinc function

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.

Questions & Answers

what is phylogeny
Odigie Reply
evolutionary history and relationship of an organism or group of organisms
AI-Robot
ok
Deng
what is biology
Hajah Reply
the study of living organisms and their interactions with one another and their environments
AI-Robot
what is biology
Victoria Reply
HOW CAN MAN ORGAN FUNCTION
Alfred Reply
the diagram of the digestive system
Assiatu Reply
allimentary cannel
Ogenrwot
How does twins formed
William Reply
They formed in two ways first when one sperm and one egg are splited by mitosis or two sperm and two eggs join together
Oluwatobi
what is genetics
Josephine Reply
Genetics is the study of heredity
Misack
how does twins formed?
Misack
What is manual
Hassan Reply
discuss biological phenomenon and provide pieces of evidence to show that it was responsible for the formation of eukaryotic organelles
Joseph Reply
what is biology
Yousuf Reply
the study of living organisms and their interactions with one another and their environment.
Wine
discuss the biological phenomenon and provide pieces of evidence to show that it was responsible for the formation of eukaryotic organelles in an essay form
Joseph Reply
what is the blood cells
Shaker Reply
list any five characteristics of the blood cells
Shaker
lack electricity and its more savely than electronic microscope because its naturally by using of light
Abdullahi Reply
advantage of electronic microscope is easily and clearly while disadvantage is dangerous because its electronic. advantage of light microscope is savely and naturally by sun while disadvantage is not easily,means its not sharp and not clear
Abdullahi
cell theory state that every organisms composed of one or more cell,cell is the basic unit of life
Abdullahi
is like gone fail us
DENG
cells is the basic structure and functions of all living things
Ramadan
What is classification
ISCONT Reply
is organisms that are similar into groups called tara
Yamosa
in what situation (s) would be the use of a scanning electron microscope be ideal and why?
Kenna Reply
A scanning electron microscope (SEM) is ideal for situations requiring high-resolution imaging of surfaces. It is commonly used in materials science, biology, and geology to examine the topography and composition of samples at a nanoscale level. SEM is particularly useful for studying fine details,
Hilary
Got questions? Join the online conversation and get instant answers!
Jobilize.com Reply

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, Accessible objected-oriented programming concepts for blind students using java. OpenStax CNX. Sep 01, 2014 Download for free at https://legacy.cnx.org/content/col11349/1.17
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Accessible objected-oriented programming concepts for blind students using java' conversation and receive update notifications?

Ask