SciLib.SP
Class Wave

java.lang.Object
  extended by SciLib.SP.Sound
      extended by SciLib.SP.Wave

public class Wave
extends Sound


Field Summary
 
Fields inherited from class SciLib.SP.Sound
audioData, audioDataStream, byteSignal, sampleRate
 
Constructor Summary
Wave(double frequency, int length)
          Make a wave signal constructor with a specific frequency and length
 
Method Summary
 double actualFrequency()
          Compute the actual frequency
 double getFrequency()
          get Frequency
 void makeAM()
          make AM signal
 void makeFM()
          make FM signal
 vector makeSawWave()
          make a Saw wave
 vector makeSineWave()
          make a sine wave
 vector makeSquareWave()
          make a square wave
 vector makeTriangleWave()
          make a triangle wave
 void setModulationFrequency(double fm)
          set modulation frequency
 void setModulationIndex(double d)
          set modulation index
 
Methods inherited from class SciLib.SP.Sound
duration, getAudioData, getAudioData, getAudioData, getByteData, getSampleRate, max, min, normalize, play, size, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Wave

public Wave(double frequency,
            int length)
Make a wave signal constructor with a specific frequency and length

Parameters:
frequency - The signal frequency in Hz
length - The length of the signal
Method Detail

actualFrequency

public double actualFrequency()
Compute the actual frequency


makeSineWave

public vector makeSineWave()
make a sine wave


makeSawWave

public vector makeSawWave()
make a Saw wave


makeSquareWave

public vector makeSquareWave()
make a square wave


makeTriangleWave

public vector makeTriangleWave()
make a triangle wave


getFrequency

public double getFrequency()
get Frequency


setModulationIndex

public void setModulationIndex(double d)
set modulation index

Parameters:
d - A double value

setModulationFrequency

public void setModulationFrequency(double fm)
set modulation frequency

Parameters:
fm - A double value

makeFM

public void makeFM()
make FM signal


makeAM

public void makeAM()
make AM signal