Class GestureGranularConfig.Builder

java.lang.Object
net.paulhertz.pixelaudio.granular.GestureGranularConfig.Builder
Enclosing class:
GestureGranularConfig

public static final class GestureGranularConfig.Builder extends Object
  • Field Details

    • pathMode

    • rdpEpsilon

      public float rdpEpsilon
    • curveSteps

      public int curveSteps
    • curveBias

      public float curveBias
    • hopMode

    • hopLengthSamples

      public int hopLengthSamples
    • timingMode

    • basePointCount

      public int basePointCount
    • baseDurationMs

      public int baseDurationMs
    • resampleCount

      public int resampleCount
    • targetDurationMs

      public int targetDurationMs
    • 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

    • copyFrom

      public void copyFrom(GestureGranularConfig.Builder src)