jass.generators
Class StatPulses

java.lang.Object
  extended by jass.engine.Out
      extended by jass.generators.StatPulses
All Implemented Interfaces:
Source

public class StatPulses
extends Out

Output random pulses. Interpulse time T is stochastic. Gaussian with mean meanT, and standard deviation stdT. Amplitudes are modeled as in RandPulses.

Author:
Kees van den Doel (kvdoel@cs.ubc.ca)

Field Summary
protected  double exponent
           
protected  float gain
           
protected  int interval_i
           
protected  double meanT
           
protected  int pulseInterval
           
protected  float srate
           
protected  double stdT
           
 
Fields inherited from class jass.engine.Out
buf, bufferSize, bufOld, lock
 
Constructor Summary
StatPulses(float srate, int bufferSize)
           
 
Method Summary
protected  void computeBuffer()
          Compute the next buffer and store in member float[] buf.
 float getMeanT()
          Get mean interpulse time
protected  double getPulseInterval()
           
 float getStdT()
          Get std of interpulse time
 void reset()
          Recompute pulse interval
 void setGain(float gain)
          Set pulse gain
 void setMeanT(float meanT)
          Set mean interpulse time
 void setProbabilityDistributionExponent(float exponent)
          Set impulse prob.
 void setStdT(float stdT)
          Set std of interpulse time
 
Methods inherited from class jass.engine.Out
clearBuffer, copyToOld, getBuffer, getBuffer, getBufferSize, getTime, peekAtBuffer, resetTime, setBufferSize, setTime, setTimeAndNotify
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

meanT

protected double meanT

srate

protected float srate

stdT

protected double stdT

gain

protected float gain

exponent

protected double exponent

pulseInterval

protected int pulseInterval

interval_i

protected int interval_i
Constructor Detail

StatPulses

public StatPulses(float srate,
                  int bufferSize)
Method Detail

setMeanT

public void setMeanT(float meanT)
Set mean interpulse time

Parameters:
meanT - mean interpulse time

setGain

public void setGain(float gain)
Set pulse gain

Parameters:
gain - gain

setStdT

public void setStdT(float stdT)
Set std of interpulse time

Parameters:
stdT - standard deviation

getMeanT

public float getMeanT()
Get mean interpulse time

Returns:
meanT mean interpulse time

getStdT

public float getStdT()
Get std of interpulse time

Returns:
stdT standard deviation

setProbabilityDistributionExponent

public void setProbabilityDistributionExponent(float exponent)
Set impulse prob. exponent. Volume of impact is r^exponent, with r uniform on [0 1]

Parameters:
exponent - exponent of prob. distribution

getPulseInterval

protected double getPulseInterval()

reset

public void reset()
Recompute pulse interval


computeBuffer

protected void computeBuffer()
Description copied from class: Out
Compute the next buffer and store in member float[] buf. This is the core processing method which will be implemented for each generator.

Specified by:
computeBuffer in class Out