ddf.minim.ugens
Class Pan

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

public class Pan
extends UGen

A UGen for panning a mono signal in a stereo field

Author:
nb, ddf

Nested Class Summary
 
Nested classes/interfaces inherited from class ddf.minim.ugens.UGen
UGen.InputType, UGen.UGenInput
 
Field Summary
 UGen.UGenInput pan
          UGens patched to pan should generate values between -1 and +1.
 
Constructor Summary
Pan(float panValue)
          Construct a Pan UGen with a particular balance and width.
 
Method Summary
protected  void addInput(UGen in)
          If you want to do something other than the default behavior when your UGen is patched to, you can override this method in your derived class.
protected  void removeInput(UGen input)
          If you need to do something specific when something is unpatched from your UGen, you can override this method.
protected  void sampleRateChanged()
          Override this method in your derived class to receive a notification when the sample rate of your UGen has changed.
 void setPan(float panValue)
          Set the pan value of this Pan.
protected  void uGenerate(float[] channels)
          NOTE: Currently only supports stereo audio!
 
Methods inherited from class ddf.minim.ugens.UGen
getLastValues, patch, patch, patch, printInputs, sampleRate, setSampleRate, tick, unpatch, unpatch
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

pan

public UGen.UGenInput pan
UGens patched to pan should generate values between -1 and +1.

Constructor Detail

Pan

public Pan(float panValue)
Construct a Pan UGen with a particular balance and width.

Parameters:
fBalance - a value of 0 means to pan dead center, -1 hard left, and 1 hard right.
Method Detail

setPan

public void setPan(float panValue)
Set the pan value of this Pan. Values passed to this method should be between -1 and +1.

Parameters:
panValue -

addInput

protected void addInput(UGen in)
Description copied from class: UGen
If you want to do something other than the default behavior when your UGen is patched to, you can override this method in your derived class. Summer, for instance, keeps a list of all the UGens that have been patched to it, so that it can tick them and sum the results when it uGenerates.

Overrides:
addInput in class UGen

removeInput

protected void removeInput(UGen input)
Description copied from class: UGen
If you need to do something specific when something is unpatched from your UGen, you can override this method.

Overrides:
removeInput in class UGen

sampleRateChanged

protected void sampleRateChanged()
Description copied from class: UGen
Override this method in your derived class to receive a notification when the sample rate of your UGen has changed. You might need to do this to recalculate sample rate dependent values, such as the step size for an oscillator.

Overrides:
sampleRateChanged in class UGen

uGenerate

protected void uGenerate(float[] channels)
NOTE: Currently only supports stereo audio!

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