ddf.minim.ugens
Class TickRate

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

public class TickRate
extends UGen


Nested Class Summary
 
Nested classes/interfaces inherited from class ddf.minim.ugens.UGen
UGen.InputType, UGen.UGenInput
 
Field Summary
 UGen.UGenInput value
           
 
Constructor Summary
TickRate()
           
TickRate(float tickRate)
           
 
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.
 boolean isInterpolating()
           
protected  void removeInput(UGen in)
          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 setAudioChannelCount(int numberOfChannels)
          Let this UGen know how many channels of audio you will be asking it for.
 void setInterpolation(boolean doInterpolate)
           
protected  void uGenerate(float[] channels)
          Implement this method when you extend UGen.
 
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

value

public UGen.UGenInput value
Constructor Detail

TickRate

public TickRate()

TickRate

public TickRate(float tickRate)
Method Detail

setInterpolation

public final void setInterpolation(boolean doInterpolate)

isInterpolating

public final boolean isInterpolating()

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 in)
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

setAudioChannelCount

public void setAudioChannelCount(int numberOfChannels)
Description copied from class: UGen
Let this UGen know how many channels of audio you will be asking it for. This will be called automatically when a UGen is patched to an AudioOuput and propagated to all UGenInputs of type AUDIO.

Overrides:
setAudioChannelCount in class UGen
Parameters:
numberOfChannels - how many channels of audio you will be generating with this UGen

uGenerate

protected void uGenerate(float[] channels)
Description copied from class: UGen
Implement this method when you extend UGen. It will be called when your UGen needs to generate one sample frame of audio. It is expected that you will assign values to the array and not simply modify the existing values. In the case where you write a UGen that takes audio input and modifies it, the pattern to follow is to have the first UGenInput you create be your audio input and then in uGenerate you will use the 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.

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