|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ddf.minim.ugens.UGen ddf.minim.ugens.WaveShaper
public class WaveShaper
A UGen which provides waveshaping distortion. The incoming "audio" signal is used as an index to a Wavetable containing a "mapping" function and the output of the waveshaper is the value in the Wavetable given by the index. The incoming wave is expected to have values between -1 and 1 although exceeding this range can be used expressively. The input signal is then normalized so that -1 to 1 becomes 0 and 1 to provide the index value. The output waveshape is then multiplied by an output amplitude. A library of shapes is defined, that the user can call. The shapes are Wavetables, which can be used in a creative way (using waveforms from the Waves library for example).
Nested Class Summary |
---|
Nested classes/interfaces inherited from class ddf.minim.ugens.UGen |
---|
UGen.InputType, UGen.UGenInput |
Field Summary | |
---|---|
UGen.UGenInput |
audio
The default input is "audio." |
UGen.UGenInput |
mapAmplitude
The mapping amplitude of the input signal |
UGen.UGenInput |
outAmplitude
The output amplitude |
Constructor Summary | |
---|---|
WaveShaper(float outAmp,
float mapAmp,
Wavetable mapShape)
Constructor for WaveShaper. |
|
WaveShaper(float outAmp,
float mapAmp,
Wavetable mapShape,
boolean wrapMap)
Constructor for WaveShaper. |
Method Summary | |
---|---|
protected void |
uGenerate(float[] channels)
Implement this method when you extend UGen. |
Methods inherited from class ddf.minim.ugens.UGen |
---|
addInput, getLastValues, patch, patch, patch, printInputs, removeInput, sampleRate, sampleRateChanged, setSampleRate, tick, unpatch, unpatch |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public UGen.UGenInput audio
public UGen.UGenInput outAmplitude
public UGen.UGenInput mapAmplitude
Constructor Detail |
---|
public WaveShaper(float outAmp, float mapAmp, Wavetable mapShape)
outAmp
- the output amplitude multiplier of the shaped wavemapAmp
- amplitude over which to map the incoming signalmapShape
- waveshape over which to map the incoming signalpublic WaveShaper(float outAmp, float mapAmp, Wavetable mapShape, boolean wrapMap)
outAmp
- the output amplitude multiplier of the shaped wavemapAmp
- amplitude over which to map the incoming signalmapShape
- waveshape over which to map the incoming signalwrapMap
- boolean flag to wrap the map instead of hit the edge and stickMethod Detail |
---|
protected void uGenerate(float[] channels)
UGen
getLastValues
method of your audio UGenInput to retrieve the audio you want to modify,
which you will then modify however
you need to, assigning the result to the values in channels
.
uGenerate
in class UGen
channels
- an array representing one sample frame.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |