Class StandardSoundGenerator

java.lang.Object
qa.generator.QASoundGenerator
qa.generator.sounds.StandardSoundGenerator
Direct Known Subclasses:
DolphinClickGenerator, RandomToneGenerator, SpermWhaleGenerator

public class StandardSoundGenerator extends QASoundGenerator
  • Field Details

    • NOHARMONICS

      public static final double[] NOHARMONICS
  • Constructor Details

    • StandardSoundGenerator

      public StandardSoundGenerator(String name)
      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: QASoundGenerator
      Generate a sound
      Specified by:
      generateSound in class QASoundGenerator
      Parameters:
      sourceSample - the sample number at which the source was generated
      sampleRate - sample rate of data to receive the sound
      delays - delays in samples from generation of the sound to it's reception on each hydrophone
      amplitudes - 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 1
      amplitude - amplitude multiplier.
      Returns:
      waveform for a single channel
    • getStandardSoundParams

      public StandardSoundParams getStandardSoundParams()
      Returns:
      the standardSoundParams
    • setStandardSoundParams

      public void setStandardSoundParams(StandardSoundParams standardSoundParams)
      Parameters:
      standardSoundParams - the standardSoundParams to set
    • getSoundWindow

      public SoundWindow getSoundWindow()
      Returns:
      the soundWindow
    • setSoundWindow

      public void setSoundWindow(SoundWindow soundWindow)
      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:
      getFrequencyRange in class QASoundGenerator
      Returns:
      The nominal frequency range of the sound in Hz.
    • getDurationRange

      public double[] getDurationRange()
      Specified by:
      getDurationRange in class QASoundGenerator
      Returns:
      the nominal duration of the sound in seconds.