net.beadsproject.beads.ugens
Class Reverb

java.lang.Object
  extended by net.beadsproject.beads.core.Bead
      extended by net.beadsproject.beads.core.UGen
          extended by net.beadsproject.beads.core.UGenChain
              extended by net.beadsproject.beads.ugens.Reverb
All Implemented Interfaces:
DataBeadReceiver

public class Reverb
extends UGenChain
implements DataBeadReceiver

A basic reverb unit with adjustable room size, high-frequency damping, and early reflections and late reverb levels. If specified, creates a de-correlated multi-channel effect.

Version:
0.9.5
Author:
Benito Crawford

Nested Class Summary
 
Nested classes/interfaces inherited from class net.beadsproject.beads.core.UGen
UGen.OutputInitializationRegime, UGen.OutputPauseRegime
 
Field Summary
 
Fields inherited from class net.beadsproject.beads.core.UGen
bufferSize, bufIn, bufOut, context, ins, outputInitializationRegime, outputPauseRegime, outs
 
Constructor Summary
Reverb(AudioContext context)
          Constructor for a reverb unit with one output channel.
Reverb(AudioContext context, int outChannels)
          Constructor for a reverb unit with the specified number of output channels.
 
Method Summary
 float getDamping()
          Gets the damping factor.
 float getEarlyReflectionsLevel()
          Gets the early reflections level.
 float getLateReverbLevel()
          Gets the late reverb level.
 DataBead getParams()
          Gets a new DataBead filled with parameter values stored in the keys "damping", "roomSize", "earlyReflectionsLevel", and "lateReverbLevel".
 float getSize()
          Gets the "room size".
protected  void preFrame()
          Called before the signal chain is updated for this Chain.
 DataBeadReceiver sendData(DataBead db)
          Sets the reverb parameters with a DataBead, using values stored in the keys "damping", "roomSize", "earlyReflectionsLevel", and "lateReverbLevel".
 Reverb setDamping(float damping)
          Sets the damping factor.
 Reverb setEarlyReflectionsLevel(float earlyLevel)
          Sets the early reflections level (the amount of early reflections heard in the output).
 Reverb setLateReverbLevel(float lateLevel)
          Sets the late reverb level (the amount of late reverb heard in the output).
 Reverb setSize(float size)
          Sets the "room size".
 
Methods inherited from class net.beadsproject.beads.core.UGenChain
addToChainOutput, addToChainOutput, addToChainOutput, calculateBuffer, drawFromChainInput, drawFromChainInput, drawFromChainInput, postFrame
 
Methods inherited from class net.beadsproject.beads.core.UGen
addDependent, addInput, addInput, clearDependents, clearInputConnections, containsInput, crossfadeInput, getConnectedInputs, getContext, getEnvelopes, getIns, getNumberOfConnectedUGens, getNumberOfDependents, getOutBuffer, getOuts, getTimeTakenLastUpdate, getValue, getValue, getValueDouble, getValueDouble, initializeOuts, isTimerMode, isUpdated, noInputs, pause, printInBuffers, printInputList, printOutBuffers, removeAllConnections, removeConnection, removeDependent, setOutsToPause, setTimerMode, setValue, update, zeroIns, zeroOuts
 
Methods inherited from class net.beadsproject.beads.core.Bead
getKillListener, getName, isDeleted, isPaused, kill, message, messageReceived, setKillListener, setName, start, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Reverb

public Reverb(AudioContext context)
Constructor for a reverb unit with one output channel.

Parameters:
context - The audio context.

Reverb

public Reverb(AudioContext context,
              int outChannels)
Constructor for a reverb unit with the specified number of output channels.

Parameters:
context - The audio context.
outChannels - The number of output channels.
Method Detail

preFrame

protected void preFrame()
Description copied from class: UGenChain
Called before the signal chain is updated for this Chain. Does nothing by default; can be implemented with code as needed.

Overrides:
preFrame in class UGenChain

getSize

public float getSize()
Gets the "room size".

Returns:
The "room size", between 0 and 1.

setSize

public Reverb setSize(float size)
Sets the "room size". Valid value range from 0 to 1 (.5 is the default). The larger the value, the longer the decay time.

Parameters:
size - The "room size".
Returns:
This reverb instance.

getDamping

public float getDamping()
Gets the damping factor.

Returns:
The damping factor, between 0 and 1.

setDamping

public Reverb setDamping(float damping)
Sets the damping factor. Valid values range from 0 to 1 (.7 is the default). Higher values filter out higher frequencies faster.

Parameters:
damping - The damping factor.
Returns:
This reverb instance.

getEarlyReflectionsLevel

public float getEarlyReflectionsLevel()
Gets the early reflections level.

Returns:
The early reflections level.

setEarlyReflectionsLevel

public Reverb setEarlyReflectionsLevel(float earlyLevel)
Sets the early reflections level (the amount of early reflections heard in the output). The default value is 1.

Parameters:
earlyLevel - The early reflections level.
Returns:
This reverb instance.

getLateReverbLevel

public float getLateReverbLevel()
Gets the late reverb level.

Returns:
The late reverb level.

setLateReverbLevel

public Reverb setLateReverbLevel(float lateLevel)
Sets the late reverb level (the amount of late reverb heard in the output). The default value is 1.

Parameters:
lateLevel - The late reverb level.
Returns:
This reverb instance.

sendData

public DataBeadReceiver sendData(DataBead db)
Sets the reverb parameters with a DataBead, using values stored in the keys "damping", "roomSize", "earlyReflectionsLevel", and "lateReverbLevel".

Specified by:
sendData in interface DataBeadReceiver
Parameters:
db - The parameter DataBead.
Returns:
Typically, the object instance: this.

getParams

public DataBead getParams()
Gets a new DataBead filled with parameter values stored in the keys "damping", "roomSize", "earlyReflectionsLevel", and "lateReverbLevel".

Returns:
The parameter DataBead.