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 Link icon

    • NOHARMONICS Link icon

      public static final double[] NOHARMONICS
  • Constructor Details Link icon

    • StandardSoundGenerator Link icon

      public StandardSoundGenerator(String name)
      Parameters:
      latLong -
  • Method Details Link icon

    • makeSquareHarmonics Link icon

      public static double[] makeSquareHarmonics(int nH)
    • makeTriangularHarmonics Link icon

      public static double[] makeTriangularHarmonics(int nH)
    • generateSound Link icon

      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 Link icon

      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 Link icon

      public StandardSoundParams getStandardSoundParams()
      Returns:
      the standardSoundParams
    • setStandardSoundParams Link icon

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

      public SoundWindow getSoundWindow()
      Returns:
      the soundWindow
    • setSoundWindow Link icon

      public void setSoundWindow(SoundWindow soundWindow)
      Parameters:
      soundWindow - the soundWindow to set
    • getHarmonics Link icon

      public double[] getHarmonics()
      Returns:
      the harmonics
    • setHarmonics Link icon

      public void setHarmonics(double[] harmonics)
      Parameters:
      harmonics - the harmonics to set
    • getFrequencyRange Link icon

      public double[] getFrequencyRange()
      Specified by:
      getFrequencyRange in class QASoundGenerator
      Returns:
      The nominal frequency range of the sound in Hz.
    • getDurationRange Link icon

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