Package uk.ac.qmul.eecs.depic.daw.beads
Class BeadsAutomation
- java.lang.Object
-
- UGen
-
- uk.ac.qmul.eecs.depic.daw.beads.BeadsAutomation
-
- All Implemented Interfaces:
- Automation, Sequence
public class BeadsAutomation extends UGen implements Automation
An automation implemented as a Beads UGen. Automations are a series of audio rate slopes that change an parameter over time. So this version is implemented as aUGen
that in theprocessBuffer
produces audio rate values by linearly interpolating between adjacent automation points ( automation points are represented asAutomationValue
objects )
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface uk.ac.qmul.eecs.depic.patterns.Sequence
Sequence.Value
-
-
Field Summary
-
Fields inherited from interface uk.ac.qmul.eecs.depic.daw.Automation
NONE_AUTOMATION
-
-
Constructor Summary
Constructors Constructor and Description BeadsAutomation(uk.ac.qmul.eecs.depic.daw.beads.BeadsSoundWave wave, Range<java.lang.Float> range, java.awt.Color color, float initialValue)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description AutomationValue
add(float position, float value)
Adds a newAutomationValue
object to this automation.void
addSequenceListener(SequenceListener l)
void
calculateBuffer()
protected void
fireAutomationListeners(SequenceEvent.What what, AutomationValue val)
float
getBegin()
java.awt.Color
getColor()
Returns the colour to draw this automation graphicallyfloat
getEnd()
float
getLen()
Returns the lenght of the automation in millisecondsRange<java.lang.Float>
getRange()
float
getValue()
AutomationValue
getValueAt(int index)
int
getValuesNum()
boolean
remove(Sequence.Value value)
Removes anAutomationValue
object from this automation.void
removeSequenceListener(SequenceListener l)
void
reset()
Removes all the automation values.void
setValue(float value)
java.lang.String
toString()
-
-
-
Constructor Detail
-
BeadsAutomation
public BeadsAutomation(uk.ac.qmul.eecs.depic.daw.beads.BeadsSoundWave wave, Range<java.lang.Float> range, java.awt.Color color, float initialValue)
-
-
Method Detail
-
getColor
public java.awt.Color getColor()
Description copied from interface:Automation
Returns the colour to draw this automation graphically- Specified by:
getColor
in interfaceAutomation
-
setValue
public void setValue(float value)
-
getValue
public float getValue()
-
add
public AutomationValue add(float position, float value)
Description copied from interface:Automation
Adds a newAutomationValue
object to this automation.- Specified by:
add
in interfaceAutomation
- Parameters:
position
- the position of the new objectvalue
- the value of the new object- Returns:
- the new automation just created
-
remove
public boolean remove(Sequence.Value value)
Description copied from interface:Automation
Removes anAutomationValue
object from this automation.- Specified by:
remove
in interfaceAutomation
- Returns:
true
if this automation changed as a result of the call
-
getLen
public float getLen()
Returns the lenght of the automation in milliseconds
-
reset
public void reset()
Description copied from interface:Automation
Removes all the automation values.- Specified by:
reset
in interfaceAutomation
-
calculateBuffer
public void calculateBuffer()
-
getValuesNum
public int getValuesNum()
- Specified by:
getValuesNum
in interfaceSequence
-
getValueAt
public AutomationValue getValueAt(int index)
- Specified by:
getValueAt
in interfaceSequence
-
toString
public java.lang.String toString()
-
addSequenceListener
public void addSequenceListener(SequenceListener l)
- Specified by:
addSequenceListener
in interfaceSequence
-
removeSequenceListener
public void removeSequenceListener(SequenceListener l)
- Specified by:
removeSequenceListener
in interfaceSequence
-
fireAutomationListeners
protected void fireAutomationListeners(SequenceEvent.What what, AutomationValue val)
-
-