Class SimSignal

java.lang.Object
simulatedAcquisition.sounds.SimSignal
Direct Known Subclasses:
ClickSound, ImpulseSignal, RandomQuadratics, WhiteNoise

public abstract class SimSignal extends Object
Class to hold information and generate a signal of a specific type
Author:
Doug Gillespie
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    abstract String
     
    abstract double[]
    getSignal(int channel, float sampleRate, double sampleOffset)
    Get a single simulated signal.
    void
    Called just before simsound loops through channels and propagation paths so that parameters of a new sound can be set up.
     

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • SimSignal

      public SimSignal()
      Parameters:
      sampleRate -
  • Method Details

    • getName

      public abstract String getName()
      Returns:
      friendly name for displaying
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getSignal

      public abstract double[] getSignal(int channel, float sampleRate, double sampleOffset)
      Get a single simulated signal.
      Parameters:
      sampleRate - sample rate of data
      sampleOffset - sample offset - 0invalid input: '<'=sampleOffsetinvalid input: '<'1
      How far into the sound the first sample is, i.e. 0 means that the first sample point will be right on the start of the sound (value 0 if it's sin wave based), value 0.5 would be half a sample later.
      Returns:
      a signal for a single channel.
    • prepareSignal

      public void prepareSignal()
      Called just before simsound loops through channels and propagation paths so that parameters of a new sound can be set up. Generally, if the sounds are deterministic and all the same, nothing has to be done here. but if sounds contain random elements, then it will be necessary to set up the random bit here so that the generatet sound is the same on all channels.