ddf.minim.ugens
Class Multiplier

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

public class Multiplier
extends UGen

Multiplier is a UGen that will simply multiply the incoming audio signal by either a fixed value or by whatever its amplitude input is currently generating.

Author:
Damien Di Fede

Nested Class Summary
 
Nested classes/interfaces inherited from class ddf.minim.ugens.UGen
UGen.InputType, UGen.UGenInput
 
Field Summary
 UGen.UGenInput amplitude
          The amplitude input allows you to control the value being used for multiplying with another UGen.
 UGen.UGenInput audio
          The audio input is where incoming audio should be patched, but you can simply patch to the Multiplier itself.
 
Constructor Summary
Multiplier()
          Construct a Multiplier with a fixed value of 1, which will mean incoming audio is not changed.
Multiplier(float multValue)
          Construct a Multiplier with the fixed value of multValue.
 
Method Summary
 void setValue(float multValue)
          Set the fixed value of this Multiplier.
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

audio

public UGen.UGenInput audio
The audio input is where incoming audio should be patched, but you can simply patch to the Multiplier itself.


amplitude

public UGen.UGenInput amplitude
The amplitude input allows you to control the value being used for multiplying with another UGen.

Constructor Detail

Multiplier

public Multiplier()
Construct a Multiplier with a fixed value of 1, which will mean incoming audio is not changed.


Multiplier

public Multiplier(float multValue)
Construct a Multiplier with the fixed value of multValue.

Parameters:
multValue -
Method Detail

setValue

public void setValue(float multValue)
Set the fixed value of this Multiplier.

Parameters:
gainVal -

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.