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

    Constructors
    Constructor
    Description
     
  • Method Summary Link icon

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

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

    • SimSignal Link icon

      public SimSignal()
      Parameters:
      sampleRate -
  • Method Details Link icon

    • getName Link icon

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

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

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

      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.