|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object SimpleSound Sound
public class Sound
Class that represents a sound. This class is used by the students to extend the capabilities of SimpleSound. Copyright Georgia Institute of Technology 2004
Constructor Summary | |
---|---|
Sound(int numSeconds)
Constructor that takes the number of seconds that this sound will have |
|
Sound(Sound copySound)
Constructor that takes a sound to copy |
|
Sound(java.lang.String fileName)
Constructor that takes a file name |
Method Summary | |
---|---|
void |
add(Sound s)
|
void |
amplify(double increase)
|
void |
blend(Sound sound1,
Sound sound2)
|
static Sound |
blendedChord()
|
void |
changeFrequency(double factor)
|
DiffSound |
compress()
Compresses the receiver as a DiffSound, encoded as an array of _differences_ between adjacent samples. |
Sound |
deepenTheVoice()
|
void |
displaySamples(int count)
|
void |
echo(int delay)
|
int |
maximumDifference()
Computes the maximum difference between any two samples. |
Sound |
reverse()
|
java.lang.String |
toString()
Method to return the string representation of this sound |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Sound(java.lang.String fileName)
fileName
- the name of the file to read the sound frompublic Sound(int numSeconds)
numSeconds
- the number of seconds desiredpublic Sound(Sound copySound)
Method Detail |
---|
public java.lang.String toString()
public DiffSound compress()
public int maximumDifference()
public void add(Sound s)
public void blend(Sound sound1, Sound sound2)
public static Sound blendedChord()
public void echo(int delay)
public void changeFrequency(double factor)
public Sound reverse()
public Sound deepenTheVoice()
public void displaySamples(int count)
public void amplify(double increase)
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |