public class Line extends UGen
UGen.InputType, UGen.UGenInput
Constructor and Description |
---|
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.
|
Modifier and Type | Method and Description |
---|---|
void |
activate()
Start the Line's transition.
|
void |
activate(float duration,
float beginAmp,
float endingAmp) |
boolean |
isAtEnd()
Has the line completed its lerp.
|
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.
|
addInput, getLastValues, patch, patch, patch, printInputs, removeInput, sampleRate, setAudioChannelCount, setSampleRate, tick, unpatch, unpatch
public Line()
public Line(float dT)
dT
- how long it should take, in seconds, to transtion from 1 to 0.public Line(float dT, float beginningAmplitude)
dT
- how long it should take, in seconds, to transition to 0.beginningAmplitude
- what value to begin at.public Line(float dT, float begAmplitude, float endAmplitude)
dT
- how long it should take, in seconds, to transitionbegAmplitude
- the value to start atendAmplitude
- the value to end atpublic void activate()
public void activate(float duration, float beginAmp, float endingAmp)
public boolean isAtEnd()
public void setEndAmp(float newEndAmp)
newEndAmp
- public void setLineTime(float newLineTime)
newLineTime
- the new transition time (in seconds)protected void sampleRateChanged()
sampleRateChanged
in class UGen