Package voltage.controllers

# Class PercussionEnvelope

java.lang.Object
voltage.controllers.PercussionEnvelope

public class PercussionEnvelope extends Object
A Percussion envelope is an attack/hold/release envelope

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `PercussionEnvelope()`
  Constructs a PercussionEnvelope object.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `double`
  `GetValue()`
  Gets the envelope's value.
  `boolean`
  `IsActive()`
  Is it currently generating audio?
  `void`
  `Reset()`
  Resets the envelope stage and value.
  `void`
  `SetAttackHoldTime(double holdMs)`
  Sets the amount of time to stay at maximum attack level of 100%.
  `void`
  `SetDecayCurve(double decayCurve)`
  Sets the decay curve
  `void`
  `SetDecayTime(double decayTime)`
  The amount of time to decay to 0%
  `void`
  `SetSmoothAttack(boolean bSmoothAttack)`
  Sets the envelope to use the attack stage.
  `void`
  `Trigger()`
  Start the percussion envelope

  ### Methods inherited from class java.lang.Object

  `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### PercussionEnvelope

    public PercussionEnvelope()
    Constructs a PercussionEnvelope object.

- ## Method Details

  - ### SetAttackHoldTime

    public void SetAttackHoldTime(double holdMs)
    Sets the amount of time to stay at maximum attack level of 100%.
    Parameters:
      `holdMs` - the milliseconds to last.

  - ### SetDecayTime

    public void SetDecayTime(double decayTime)
    The amount of time to decay to 0%
    Parameters:
      `decayTime` - milliseconds

  - ### SetDecayCurve

    public void SetDecayCurve(double decayCurve)
    Sets the decay curve
    Parameters:
      `decayCurve` - (-1.0 to 1.0). -1.0 will be a slow to fade out that finishes fast in the last 20% or so. 1.0 is a fast fade out with the last 80% slowly fading.

  - ### SetSmoothAttack

    public void SetSmoothAttack(boolean bSmoothAttack)
    Sets the envelope to use the attack stage.
    Parameters:
      `bSmoothAttack` - if true, the attack stage will be used.

  - ### Trigger

    public void Trigger()
    Start the percussion envelope

  - ### Reset

    public void Reset()
    Resets the envelope stage and value.

  - ### IsActive

    public boolean IsActive()
    Is it currently generating audio?
    Returns:
      true if active.

  - ### GetValue

    public double GetValue()
    Gets the envelope's value.
    Returns:
      the envelope's value from 0 to 5.0.