Table of contents
- Preface
- General background information
-
Discussion and sample code
- The class named AudioPlayOrFile01
- The class named AudioFormatParameters01
- Disk organization
- The class named MusicComposer04
- The class named AudioSignalGenerator02
-
The class named WhiteNoise
- Beginning of the class named WhiteNoise
- The constructor for the WhiteNoise class
- Beginning of the getMelody method
- Overall structure of the program
- The predefined audio parameters
- Miscellaneous setup operations
- Generating the white (random) noise
- A stream of pseudorandom numbers
- The sound of a stream of random numbers
- Run the program
- Miscellaneous
- Complete program listings
Preface
This module is part of a collection titled Accessible Objected-Oriented Programming Concepts for Blind Students using Java . It explains how to write a program that creates an audio output consistingof white noise.
Viewing tip
I recommend that you open another copy of this module in a separate browser window and use the following links to easily find the listings while you are reading about them.
Listings
- Listing 1 . Beginning of class MusicComposer04.
- Listing 2 . The file named WhiteNoise.bat.
- Listing 3 . Beginning of the constructor for MusicComposer04.
- Listing 4 . Get and play or file the sound.
- Listing 5 . Beginning of the class named AudioSignalGenerator02.
- Listing 6 . The constructor for AudioSignalGenerator02.
- Listing 7 . The abstract method named getMelody.
- Listing 8 . Beginning of the class named WhiteNoise.
- Listing 9 . Beginning of the getMelody method.
- Listing 10 . Miscellaneous setup operations.
- Listing 11 . Generating the white (random) noise.
- Listing 12 . The class named AudioPlayOrFile01.
- Listing 13 . The class named AudioFormatParameters01.
- Listing 14 . The class named MusicComposer04.
- Listing 15 . The class named AudioSignalGenerator02.
- Listing 16 . The class named WhiteNoise.
General background information
By this point in the course, you should have learned enough that you can put Java OOP to work in a substantive way. In this course, which is designedspecifically for blind students, you will write substantive programs that deal with something that you are probably very good at -- sound.
An earlier module explained some of the physical aspects of sound. It also explained a little about how you can write programs to create sound with acomputer.
This module will show you how to write a Java OOP program that uses a random number generator to produce white noise .