jass.generators
Class Impulse

java.lang.Object
  extended by jass.engine.Out
      extended by jass.generators.Impulse
All Implemented Interfaces:
Source
Direct Known Subclasses:
StickSlipSimple

public class Impulse
extends Out

Generate impulses with time intervals.

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

Field Summary
 float srate
           
protected  float t_pulse
          time interval
protected  float volume
           
 
Fields inherited from class jass.engine.Out
buf, bufferSize, bufOld, lock
 
Constructor Summary
Impulse(float srate, int bufferSize)
          Construct
 
Method Summary
 void computeBuffer()
          Compute the next buffer.
 void reset()
           
 void setPeriod(float dt)
          Set impulse period
 void setVolume(float val)
          Set magnitude.
 
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

t_pulse

protected float t_pulse
time interval


srate

public float srate

volume

protected float volume
Constructor Detail

Impulse

public Impulse(float srate,
               int bufferSize)
Construct

Parameters:
srate - sampling rate in Hertz.
bufferSize - bufferSize of this Out
Method Detail

reset

public void reset()

setVolume

public void setVolume(float val)
Set magnitude.

Parameters:
val - Volume.

setPeriod

public void setPeriod(float dt)
Set impulse period

Parameters:
dt - period

computeBuffer

public void computeBuffer()
Compute the next buffer.

Specified by:
computeBuffer in class Out