0.6 Jbs2020-square wave sound  (Page 2/7)

 Page 2 / 7

An audio graph of a square wave

I explained the concept of an audio graph in the earlier module titled Jbs2000-What is Sound? but I will explain it again here for your convenience. (Click AudioGraphSquareWave to hear an audio representation of the graph of a square wave.)

This audio graph file contains an 8-second melody consisting of 32 uniformly spaced pulses at different frequencies. The frequencies (pitches) of the pulses are centered on middle-C (261.63 Hz) . The frequency deviation from middle-C versus time is based on a square wave function with a frequency of0.5 Hz.

Points on graph

Each pulse represents one point on a graph of the square wave. Pulses with frequencies at or above middle-C are delivered to the left speaker. Pulses withfrequencies below middle-C are delivered to the right speaker.

The audio output can be thought of as an audio representation of a graph of a square wave. Pulses with frequencies above middle-C represent points on thepositive lobe of the square wave. Increasing pitch represents increasing amplitude on the graph of the square wave.

Pulses with frequencies below middle-C can be thought of as representing points on the negative lobe of the square wave. In this case, decreasing pitchrepresents points on the square wave that are further from the horizontal axis in the negative direction.

Pulses with a frequency of middle-C can be thought of as representing points on the horizontal axis with a value of zero but there are no points on thehorizontal axis for a square wave.

Four complete cycles of the 0.5 Hz square wave are represented by the 32 pulses in the 8-second melody.

Hopefully, by listening to this audio file, you can get an idea of the shape of a square wave.

Discussion and sample code

This program requires the following five classes:

Three classes are unchanged

I won't bore you by repeating the discussion from earlier modules. The first three classes in the above list are completely unchanged from the module titled Jbs2010-Your First Sound Program . Therefore, I won't discuss them furtherin this module.

The class named MusicComposer05

The class named MusicComposer05 differs from the previous version only in the following respects:

• Changes in the explanatory comments.
• Replacement of the term WhiteNoise with the term SquareWave .
• Replacement of the term whiteNoise with the term squareWave .

Therefore, I also won't discuss this class further in this module.

The class named SquareWave

A complete listing of the class named SquareWave is provided in Listing 11 . I will break this class down and explain it in fragments.

Beginning of the class named SquareWave

The sound that you heard when you listened to the audio file named SquareWave was produced by the getMelody method of the SquareWave class. The SquareWave class begins in Listing 1 and the getMelody method begins in Listing 2 .

The code in Listing 1 differs from the corresponding WhiteNoise code from the earlier module only with respect to the name of the class.Therefore, I won't discuss it further.

Questions & Answers

are nano particles real
Missy Reply
yeah
Joseph
Hello, if I study Physics teacher in bachelor, can I study Nanotechnology in master?
Lale Reply
no can't
Lohitha
where we get a research paper on Nano chemistry....?
Maira Reply
nanopartical of organic/inorganic / physical chemistry , pdf / thesis / review
Ali
what are the products of Nano chemistry?
Maira Reply
There are lots of products of nano chemistry... Like nano coatings.....carbon fiber.. And lots of others..
learn
Even nanotechnology is pretty much all about chemistry... Its the chemistry on quantum or atomic level
learn
Google
da
no nanotechnology is also a part of physics and maths it requires angle formulas and some pressure regarding concepts
Bhagvanji
hey
Giriraj
Preparation and Applications of Nanomaterial for Drug Delivery
Hafiz Reply
revolt
da
Application of nanotechnology in medicine
has a lot of application modern world
Kamaluddeen
yes
narayan
what is variations in raman spectra for nanomaterials
Jyoti Reply
ya I also want to know the raman spectra
Bhagvanji
I only see partial conversation and what's the question here!
Crow Reply
what about nanotechnology for water purification
RAW Reply
please someone correct me if I'm wrong but I think one can use nanoparticles, specially silver nanoparticles for water treatment.
Damian
yes that's correct
Professor
I think
Professor
Nasa has use it in the 60's, copper as water purification in the moon travel.
Alexandre
nanocopper obvius
Alexandre
what is the stm
Brian Reply
is there industrial application of fullrenes. What is the method to prepare fullrene on large scale.?
Rafiq
industrial application...? mmm I think on the medical side as drug carrier, but you should go deeper on your research, I may be wrong
Damian
How we are making nano material?
LITNING Reply
what is a peer
LITNING Reply
What is meant by 'nano scale'?
LITNING Reply
What is STMs full form?
LITNING
scanning tunneling microscope
Sahil
how nano science is used for hydrophobicity
Santosh
Do u think that Graphene and Fullrene fiber can be used to make Air Plane body structure the lightest and strongest. Rafiq
Rafiq
what is differents between GO and RGO?
Mahi
what is simplest way to understand the applications of nano robots used to detect the cancer affected cell of human body.? How this robot is carried to required site of body cell.? what will be the carrier material and how can be detected that correct delivery of drug is done Rafiq
Rafiq
if virus is killing to make ARTIFICIAL DNA OF GRAPHENE FOR KILLED THE VIRUS .THIS IS OUR ASSUMPTION
Anam
analytical skills graphene is prepared to kill any type viruses .
Anam
Any one who tell me about Preparation and application of Nanomaterial for drug Delivery
Hafiz
what is Nano technology ?
Bob Reply
write examples of Nano molecule?
Bob
The nanotechnology is as new science, to scale nanometric
brayan
nanotechnology is the study, desing, synthesis, manipulation and application of materials and functional systems through control of matter at nanoscale
Damian
Is there any normative that regulates the use of silver nanoparticles?
Damian Reply
what king of growth are you checking .?
Renato
how did you get the value of 2000N.What calculations are needed to arrive at it
Smarajit Reply
Privacy Information Security Software Version 1.1a
Good
Got questions? Join the online conversation and get instant answers!
Jobilize.com Reply

Read also:

Get Jobilize Job Search Mobile App in your pocket 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?

 By Brooke Delaney By Brooke Delaney By Jessica Collett By By Sarah Warren By Nick Swain By Sandy Yamane By Sarah Warren By OpenStax By David Bourgeois