net.beadsproject.beads.gui
Class Slider

java.lang.Object
  extended by net.beadsproject.beads.core.Bead
      extended by net.beadsproject.beads.core.UGen
          extended by net.beadsproject.beads.ugens.Envelope
              extended by net.beadsproject.beads.gui.Slider
All Implemented Interfaces:
InterfaceElement

public class Slider
extends Envelope
implements InterfaceElement

The Class Slider.

Author:
ollie A UGen which provides a GUI slider for audio control. incomplete

Nested Class Summary
 
Nested classes/interfaces inherited from class net.beadsproject.beads.ugens.Envelope
Envelope.Segment
 
Nested classes/interfaces inherited from class net.beadsproject.beads.core.UGen
UGen.OutputInitializationRegime, UGen.OutputPauseRegime
 
Field Summary
 
Fields inherited from class net.beadsproject.beads.ugens.Envelope
myBufOut
 
Fields inherited from class net.beadsproject.beads.core.UGen
bufferSize, bufIn, bufOut, context, ins, outputInitializationRegime, outputPauseRegime, outs
 
Constructor Summary
Slider(AudioContext context, java.lang.String nam, float min, float max, float val)
          Instantiates a new slider.
Slider(AudioContext context, java.lang.String nam, float min, float max, float val, boolean log)
           
 
Method Summary
 void calculateBuffer()
          Called by the signal chain to update this UGen's ouput data.
 float calculateValueFromFract(float fract)
           
 javax.swing.JComponent getComponent()
          Gets the panel.
 float getMax()
          Gets the max.
 float getMin()
          Gets the min.
 java.lang.String getName()
          Gets the Bead's name.
 float getSmoothnessInterval()
           
 float getValueFract()
           
static void main(java.lang.String[] args)
           
 void runTextSelectPanel()
           
 void setMax(float max)
          Sets the max.
 void setMin(float min)
          Sets the min.
 void setSmoothnessInterval(float smoothnessInterval)
           
 void setValue(float val)
          Clears the list of Segments and sets the current value of the Envelope immediately.
 void setValueFract(float fract)
           
 void storeValue(float f)
           
 void useLogBuffer(boolean useLogBuffer)
           
 
Methods inherited from class net.beadsproject.beads.ugens.Envelope
addSegment, addSegment, addSegment, addSegments, clear, getCurrentValue, getValue, isLocked, lock
 
Methods inherited from class net.beadsproject.beads.core.UGen
addDependent, addInput, addInput, clearDependents, clearInputConnections, containsInput, crossfadeInput, getConnectedInputs, getContext, getEnvelopes, getIns, getNumberOfConnectedUGens, getOuts, getTimeTakenLastUpdate, getValue, initializeOuts, isTimerMode, isUpdated, noInputs, pause, printInBuffers, printInputList, printOutBuffers, removeAllConnections, removeDependent, setInputProxy, setOutputProxy, setOutsToPause, setProxy, setTimerMode, update, zeroIns, zeroOuts
 
Methods inherited from class net.beadsproject.beads.core.Bead
getKillListener, 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

Slider

public Slider(AudioContext context,
              java.lang.String nam,
              float min,
              float max,
              float val)
Instantiates a new slider.

Parameters:
context - the context
name - the name
min - the min
max - the max
value - the value

Slider

public Slider(AudioContext context,
              java.lang.String nam,
              float min,
              float max,
              float val,
              boolean log)
Method Detail

calculateValueFromFract

public float calculateValueFromFract(float fract)

setValueFract

public void setValueFract(float fract)

getValueFract

public float getValueFract()

getName

public java.lang.String getName()
Description copied from class: Bead
Gets the Bead's name.

Overrides:
getName in class Bead
Returns:
the name.

setValue

public void setValue(float val)
Description copied from class: Envelope
Clears the list of Segments and sets the current value of the Envelope immediately.

Overrides:
setValue in class Envelope
Parameters:
val - the new value.
See Also:
Envelope.setValue(float)

getMin

public float getMin()
Gets the min.

Returns:
the min

setMin

public void setMin(float min)
Sets the min.

Parameters:
min - the new min

getMax

public float getMax()
Gets the max.

Returns:
the max

setMax

public void setMax(float max)
Sets the max.

Parameters:
max - the new max

getSmoothnessInterval

public float getSmoothnessInterval()

setSmoothnessInterval

public void setSmoothnessInterval(float smoothnessInterval)

calculateBuffer

public void calculateBuffer()
Description copied from class: UGen
Called by the signal chain to update this UGen's ouput data. Subclassses of UGen should implement the UGen's DSP perform routine here. In general this involves grabbing data from UGen.bufIn and putting data into UGen.bufOut in some way. UGen.bufIn and UGen.bufOut are 2D arrays of floats of the form float[numChannels][bufferSize]. The length of the buffers is given by UGen.bufferSize, and the number of channels of the input and output buffers are given by UGen.ins and UGen.outs respectively.

Overrides:
calculateBuffer in class Envelope

getComponent

public javax.swing.JComponent getComponent()
Gets the panel.

Specified by:
getComponent in interface InterfaceElement
Returns:
the panel

storeValue

public void storeValue(float f)

runTextSelectPanel

public void runTextSelectPanel()

useLogBuffer

public void useLogBuffer(boolean useLogBuffer)

main

public static void main(java.lang.String[] args)