Package net.paulhertz.pixelaudio.granular

# Class GestureGranularConfig.Builder

java.lang.Object
net.paulhertz.pixelaudio.granular.GestureGranularConfig.Builder

Enclosing class:
  GestureGranularConfig

public static final class GestureGranularConfig.Builder extends Object

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `boolean`
  `autoBurstGainComp`
  `int`
  `baseDurationMs`
  `int`
  `basePointCount`
  `int`
  `burstGrains`
  `float`
  `curveBias`
  `int`
  `curveSteps`
  `ADSRParams`
  `env`
  `float`
  `gainDb`
  `int`
  `grainLengthSamples`
  `int`
  `hopLengthSamples`
  `GestureGranularConfig.HopMode`
  `hopMode`
  `GestureGranularConfig.PathMode`
  `pathMode`
  `float`
  `pitchSemitones`
  `float`
  `rdpEpsilon`
  `int`
  `resampleCount`
  `int`
  `targetDurationMs`
  `GestureGranularConfig.TimeTransform`
  `timingMode`
  `boolean`
  `useArcLengthTime`
  `float`
  `warpExponent`
  `GestureGranularConfig.WarpShape`
  `warpShape`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Builder()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `GestureGranularConfig`
  `build()`
  Build an immutable snapshot safe to pass into scheduler/renderer threads.
  `GestureGranularConfig.Builder`
  `copy()`
  `void`
  `copyFrom(GestureGranularConfig.Builder src)`
  `GestureGranularConfig.Builder`
  `gainDb(float gainDb)`
  `GestureGranularConfig.Builder`
  `granularEnvelope(ADSRParams env)`
  Makes explicit to the caller that the envelope is being set for GRANULAR synthesis.
  `GestureGranularConfig.Builder`
  `samplerEnvelope(ADSRParams env)`
  Makes explicit to the caller that the envelope is being set for SAMPLER synthesis.
  `void`
  `setBaselinesFromSchedule(GestureSchedule s)`
  `void`
  `validate()`
  Optional: throw early if GUI creates impossible states.

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

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

- ## Field Details

  - ### pathMode

    public GestureGranularConfig.PathMode pathMode

  - ### rdpEpsilon

    public float rdpEpsilon

  - ### curveSteps

    public int curveSteps

  - ### curveBias

    public float curveBias

  - ### hopMode

    public GestureGranularConfig.HopMode hopMode

  - ### hopLengthSamples

    public int hopLengthSamples

  - ### timingMode

    public GestureGranularConfig.TimeTransform timingMode

  - ### basePointCount

    public int basePointCount

  - ### baseDurationMs

    public int baseDurationMs

  - ### resampleCount

    public int resampleCount

  - ### targetDurationMs

    public int targetDurationMs

  - ### warpShape

    public GestureGranularConfig.WarpShape warpShape

  - ### warpExponent

    public float warpExponent

  - ### grainLengthSamples

    public int grainLengthSamples

  - ### env

    public ADSRParams env

  - ### gainDb

    public float gainDb

  - ### pitchSemitones

    public float pitchSemitones

  - ### burstGrains

    public int burstGrains

  - ### autoBurstGainComp

    public boolean autoBurstGainComp

  - ### useArcLengthTime

    public boolean useArcLengthTime

- ## Constructor Details

  - ### Builder

    public Builder()

- ## Method Details

  - ### gainDb

    public GestureGranularConfig.Builder gainDb(float gainDb)
    Parameters:
      `gainDb` - desired gain in dB
    Returns:
      reference to this Builder

  - ### granularEnvelope

    public GestureGranularConfig.Builder granularEnvelope(ADSRParams env)
    Makes explicit to the caller that the envelope is being set for GRANULAR synthesis.
    Parameters:
      `env` - an ADSRParams instance to set the envelope
    Returns:
      this

  - ### samplerEnvelope

    public GestureGranularConfig.Builder samplerEnvelope(ADSRParams env)
    Makes explicit to the caller that the envelope is being set for SAMPLER synthesis.
    Parameters:
      `env` - an ADSRParams instance to set the envelope, nominally for sampler synthesis
    Returns:
      this

  - ### build

    public GestureGranularConfig build()
    Build an immutable snapshot safe to pass into scheduler/renderer threads.

  - ### setBaselinesFromSchedule

    public void setBaselinesFromSchedule(GestureSchedule s)

  - ### validate

    public void validate()
    Optional: throw early if GUI creates impossible states.

  - ### copy

    public GestureGranularConfig.Builder copy()

  - ### copyFrom

    public void copyFrom(GestureGranularConfig.Builder src)