ddf.minim.ugens
Class UGen.UGenInput

java.lang.Object
  extended by ddf.minim.ugens.UGen.UGenInput
Enclosing class:
UGen

public final class UGen.UGenInput
extends java.lang.Object

This inner class, UGenInput, is used to connect the output of other UGens to this UGen

Author:
Anderson Mills

Constructor Summary
UGen.UGenInput()
          This constructor generates an AUDIO input.
UGen.UGenInput(UGen.InputType it)
          This constructor generates a UGenInput of the specified type.
 
Method Summary
 UGen getIncomingUGen()
          returns the UGen which is giving values to this input.
 UGen.InputType getInputType()
          returns the InputType of this UGenInput
 java.lang.String getInputTypeAsString()
          return the m_inputType as a string (for debugging)
 float getLastValue()
          Returns the first value in the array of last values.
 float[] getLastValues()
           
 UGen getOuterUGen()
          returns the outer UGen of which this is an input.
 boolean isPatched()
          returns true if this input has an m_incoming UGen
 void printInput()
          print information about this UGenInput (for debugging)
 void setChannelCount(int numberOfChannels)
          Set the number of channels this input should generate.
 void setIncomingUGen(UGen in)
          set the UGen which is giving values to this input
 void setLastValue(float value)
          Sets all values in the last values array to the provided value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UGen.UGenInput

public UGen.UGenInput()
This constructor generates an AUDIO input.


UGen.UGenInput

public UGen.UGenInput(UGen.InputType it)
This constructor generates a UGenInput of the specified type.

Parameters:
it -
Method Detail

setChannelCount

public void setChannelCount(int numberOfChannels)
Set the number of channels this input should generate.

Parameters:
numberOfChannels -

getInputType

public UGen.InputType getInputType()
returns the InputType of this UGenInput

Returns:

getOuterUGen

public UGen getOuterUGen()
returns the outer UGen of which this is an input.

Returns:

getIncomingUGen

public UGen getIncomingUGen()
returns the UGen which is giving values to this input.

Returns:

setIncomingUGen

public void setIncomingUGen(UGen in)
set the UGen which is giving values to this input

Parameters:
in -

isPatched

public boolean isPatched()
returns true if this input has an m_incoming UGen

Returns:

getLastValues

public float[] getLastValues()
Returns:
the last values generated by this input

getLastValue

public float getLastValue()
Returns the first value in the array of last values. This is meant to make code that gets values from control inputs easier to read.


setLastValue

public void setLastValue(float value)
Sets all values in the last values array to the provided value. If you want to set last values in the different channels of this input to different values, you should use getLastValues to do so. For example:
 ugen.anInput.getLastValues()[0] = 1.f;
 ugen.anInput.getLastValues()[1] = 0.f;
 

Parameters:
value - the value to set all last values to

getInputTypeAsString

public java.lang.String getInputTypeAsString()
return the m_inputType as a string (for debugging)

Returns:

printInput

public void printInput()
print information about this UGenInput (for debugging)