Package qa.generator.sounds
Class StandardSoundGenerator
java.lang.Object
qa.generator.QASoundGenerator
qa.generator.sounds.StandardSoundGenerator
- Direct Known Subclasses:
 DolphinClickGenerator,RandomToneGenerator,SpermWhaleGenerator
- 
Field Summary
Fields - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptiongenerateSound(long sourceSample, double sampleRate, double[] delays, double[] amplitudes) Generate a sounddouble[]double[]double[]protected double[]makePhase(double sampleRate, double sampleOffset, double amplitude) static double[]makeSquareHarmonics(int nH) static double[]makeTriangularHarmonics(int nH) final double[]makeWave(double sampleRate, double sampleOffset, double amplitude) voidsetHarmonics(double[] harmonics) voidsetSoundWindow(SoundWindow soundWindow) voidsetStandardSoundParams(StandardSoundParams standardSoundParams) Methods inherited from class qa.generator.QASoundGenerator
getName, setName 
- 
Field Details
- 
NOHARMONICS
public static final double[] NOHARMONICS 
 - 
 - 
Constructor Details
- 
StandardSoundGenerator
- Parameters:
 latLong-
 
 - 
 - 
Method Details
- 
makeSquareHarmonics
public static double[] makeSquareHarmonics(int nH)  - 
makeTriangularHarmonics
public static double[] makeTriangularHarmonics(int nH)  - 
generateSound
public QASound generateSound(long sourceSample, double sampleRate, double[] delays, double[] amplitudes) Description copied from class:QASoundGeneratorGenerate a sound- Specified by:
 generateSoundin classQASoundGenerator- Parameters:
 sourceSample- the sample number at which the source was generatedsampleRate- sample rate of data to receive the sounddelays- delays in samples from generation of the sound to it's reception on each hydrophoneamplitudes- amplitudes on a linear scale (notDB) which incorporates the system full scale and the spreading loss but doesn't yet contain frequency dependent attenuation.- Returns:
 - a generated sound.
 
 - 
makeWave
public final double[] makeWave(double sampleRate, double sampleOffset, double amplitude) - Parameters:
 sampleOffset- actual time of first sample - between 0 and 1amplitude- amplitude multiplier.- Returns:
 - waveform for a single channel
 
 - 
makePhase
protected double[] makePhase(double sampleRate, double sampleOffset, double amplitude)  - 
getStandardSoundParams
- Returns:
 - the standardSoundParams
 
 - 
setStandardSoundParams
- Parameters:
 standardSoundParams- the standardSoundParams to set
 - 
getSoundWindow
- Returns:
 - the soundWindow
 
 - 
setSoundWindow
- Parameters:
 soundWindow- the soundWindow to set
 - 
getHarmonics
public double[] getHarmonics()- Returns:
 - the harmonics
 
 - 
setHarmonics
public void setHarmonics(double[] harmonics) - Parameters:
 harmonics- the harmonics to set
 - 
getFrequencyRange
public double[] getFrequencyRange()- Specified by:
 getFrequencyRangein classQASoundGenerator- Returns:
 - The nominal frequency range of the sound in Hz.
 
 - 
getDurationRange
public double[] getDurationRange()- Specified by:
 getDurationRangein classQASoundGenerator- Returns:
 - the nominal duration of the sound in seconds.
 
 
 -