Package net.paulhertz.pixelaudio.schedule

# Class GestureScheduleBuilder

java.lang.Object
net.paulhertz.pixelaudio.schedule.GestureScheduleBuilder

public final class GestureScheduleBuilder extends Object
Build schedules for classes that implement PAGesture or use PAGesture implementers, for example to to build, interpolate, and warp time and point lists.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `GestureScheduleBuilder()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `GestureSchedule`
  `build(PACurveMaker brush, GestureGranularConfig cfg, float sampleRate)`
  `(package private) static float`
  `constrain01(float u)`
  `(package private) static float`
  `easeInOutPow(float u, float exp)`
  `private static int`
  `findSegment(float[] u, float uk)`
  `private GestureSchedule`
  `getBaseSchedule(PACurveMaker brush, GestureGranularConfig cfg)`
  `private static float`
  `lerpFloatByU(float[] a, float[] u, float uk)`
  `private static processing.core.PVector`
  `lerpPointByU(List<processing.core.PVector> pts, float[] u, float uk)`
  `private static GestureSchedule`
  `resampleToCount(GestureSchedule in, int count)`
  `private static GestureSchedule`
  `scaleToDurationMs(GestureSchedule in, int targetDurationMs)`
  `private static GestureSchedule`
  `toFixedHopScheduleMs(GestureSchedule in, int hopSamples, float sampleRate)`
  `private static GestureSchedule`
  `warpScheduleTimesMs(GestureSchedule in, GestureGranularConfig.WarpShape shape, float exponent)`
  `private static float`
  `warpU(float u, GestureGranularConfig.WarpShape shape, float exponent)`

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

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

- ## Constructor Details

  - ### GestureScheduleBuilder

    public GestureScheduleBuilder()

- ## Method Details

  - ### build

    public GestureSchedule build(PACurveMaker brush, GestureGranularConfig cfg, float sampleRate)

  - ### getBaseSchedule

    private GestureSchedule getBaseSchedule(PACurveMaker brush, GestureGranularConfig cfg)

  - ### toFixedHopScheduleMs

    private static GestureSchedule toFixedHopScheduleMs(GestureSchedule in, int hopSamples, float sampleRate)

  - ### resampleToCount

    private static GestureSchedule resampleToCount(GestureSchedule in, int count)

  - ### lerpPointByU

    private static processing.core.PVector lerpPointByU(List<processing.core.PVector> pts, float[] u, float uk)

  - ### lerpFloatByU

    private static float lerpFloatByU(float[] a, float[] u, float uk)

  - ### findSegment

    private static int findSegment(float[] u, float uk)

  - ### scaleToDurationMs

    private static GestureSchedule scaleToDurationMs(GestureSchedule in, int targetDurationMs)

  - ### warpScheduleTimesMs

    private static GestureSchedule warpScheduleTimesMs(GestureSchedule in, GestureGranularConfig.WarpShape shape, float exponent)

  - ### warpU

    private static float warpU(float u, GestureGranularConfig.WarpShape shape, float exponent)

  - ### easeInOutPow

    static float easeInOutPow(float u, float exp)

  - ### constrain01

    static float constrain01(float u)