ddf.minim.ugens
Class Line

java.lang.Object
  extended by ddf.minim.ugens.UGen
      extended by ddf.minim.ugens.Line

public class Line
extends UGen

A UGen that starts at a value and changes linearly to another value over a specified time.

Author:
nodog

Nested Class Summary
 
Nested classes/interfaces inherited from class ddf.minim.ugens.UGen
UGen.InputType, UGen.UGenInput
 
Constructor Summary
Line()
          Constructs a Line that starts a 1 and transitions to 0 over 1 second.
Line(float dT)
          Constructs a Line that starts at 1 and transtions to 0 over dT seconds.
Line(float dT, float beginningAmplitude)
          Constructs a Line that starts at beginningAmplitude and transtions to 0 over dT seconds.
Line(float dT, float begAmplitude, float endAmplitude)
          Constructs a Line that starts at begAmplitude and transitions to endAmplitude over dT seconds.
 
Method Summary
 void activate()
          Start the Line's transition.
protected  void sampleRateChanged()
          Change the timeStepSize when sampleRate changes.
 void setEndAmp(float newEndAmp)
          Set the ending value of the Line's transition
 void setLineTime(float newLineTime)
          Set the length of this Line's transition
protected  void uGenerate(float[] channels)
          Generate one sampleframe for this UGen.
 
Methods inherited from class ddf.minim.ugens.UGen
addInput, getLastValues, patch, patch, patch, printInputs, removeInput, sampleRate, setSampleRate, tick, unpatch, unpatch
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Line

public Line()
Constructs a Line that starts a 1 and transitions to 0 over 1 second.


Line

public Line(float dT)
Constructs a Line that starts at 1 and transtions to 0 over dT seconds.

Parameters:
dT - how long it should take, in seconds, to transtion from 1 to 0.

Line

public Line(float dT,
            float beginningAmplitude)
Constructs a Line that starts at beginningAmplitude and transtions to 0 over dT seconds.

Parameters:
dT - how long it should take, in seconds, to transition to 0.
beginningAmplitude - what value to begin at.

Line

public Line(float dT,
            float begAmplitude,
            float endAmplitude)
Constructs a Line that starts at begAmplitude and transitions to endAmplitude over dT seconds.

Parameters:
dT - how long it should take, in seconds, to transition
begAmplitude - the value to start at
endAmplitude - the value to end at
Method Detail

activate

public void activate()
Start the Line's transition.


setEndAmp

public void setEndAmp(float newEndAmp)
Set the ending value of the Line's transition

Parameters:
newEndAmp -

setLineTime

public void setLineTime(float newLineTime)
Set the length of this Line's transition

Parameters:
newLineTime - the new transition time (in seconds)

sampleRateChanged

protected void sampleRateChanged()
Change the timeStepSize when sampleRate changes.

Overrides:
sampleRateChanged in class UGen

uGenerate

protected void uGenerate(float[] channels)
Generate one sampleframe for this UGen.

Specified by:
uGenerate in class UGen
Parameters:
channels - an array representing one sample frame.