net.beadsproject.beads.ugens
Class Breakbeat

java.lang.Object
  extended by net.beadsproject.beads.core.Bead
      extended by net.beadsproject.beads.core.UGen
          extended by net.beadsproject.beads.ugens.Gain
              extended by net.beadsproject.beads.ugens.Breakbeat

public class Breakbeat
extends Gain

A UGen that plays back a Sample using GranularSamplePlayer such that the Sample's playback rate is controlled by an envelope that also controls the rate of a Clock. Breakbeat is actually a subclass of Gain and inherits its gain controls.

Author:
ollie

Field Summary
 
Fields inherited from class net.beadsproject.beads.core.UGen
bufferSize, bufIn, bufOut, context, ins, outs
 
Constructor Summary
Breakbeat(AudioContext context, Sample s, float sampleInterval, UGen masterIntervalEnvelope)
          Instantiates a new Breakbeat with the specified AudioContext, Sample, sample interval, and interval envelope.
 
Method Summary
 GranularSamplePlayer getGSP()
          Gets the GranularSamplePlayer.
 void reTrigger()
          Causes the GranularSamplePlayer to reset, and unpauses the Breakbeat if it is paused.
 void setPosition(float pos)
          Sets the position of the GranularSamplePlayer in milliseconds.
 
Methods inherited from class net.beadsproject.beads.ugens.Gain
calculateBuffer, getGainEnvelope, setGainEnvelope
 
Methods inherited from class net.beadsproject.beads.core.UGen
addDependent, addInput, addInput, clearInputConnections, getContext, getIns, getNumberOfConnectedUGens, getOuts, getValue, getValue, noInputs, pause, printInputList, printOutBuffers, removeAllConnections, removeDependent, 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

Breakbeat

public Breakbeat(AudioContext context,
                 Sample s,
                 float sampleInterval,
                 UGen masterIntervalEnvelope)
Instantiates a new Breakbeat with the specified AudioContext, Sample, sample interval, and interval envelope.

Parameters:
context - the AudioContext.
s - the Sample.
sampleInterval - a value, in milliseconds, that indicates the interval between beats in the sample.
masterIntervalEnvelope - a UGen which also controls a Clock. If the Breakbeat is triggered by the Clock then the Breakbeat and the Clock will be in synch.
Method Detail

reTrigger

public void reTrigger()
Causes the GranularSamplePlayer to reset, and unpauses the Breakbeat if it is paused.


getGSP

public GranularSamplePlayer getGSP()
Gets the GranularSamplePlayer.

Returns:
the GranularSamplePlayer.

setPosition

public void setPosition(float pos)
Sets the position of the GranularSamplePlayer in milliseconds.

Parameters:
pos - the new position.