Interface PAGesture

All Known Implementing Classes:
GestureSchedule, PACurveMaker

public interface PAGesture
PAGesture provides a interface for "gesture" defined by:
  1. a list of points and
  2. a list of time offsets where
  3. both lists have the same cardinality and
  4. time offsets are monotonically non-decreasing. In addition,
  5. the time list is expected (but not required) to start with a first element 0.

Absolute time of gesture creation can be returned from getStartTimeMs(), possibly as millis from application start.

Gestures are often captured from GUI interaction, as is the case with PACurveMaker. PAGesture opens the way to use many different sources for generating gestures. "Gesture" is a core concept in the PixelAudio library, implemented by PACurveMaker, in particular.

See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    List<processing.core.PVector>
    Dense gesture points.
    Convenience: a schedule over the dense gesture.
    long
    Absolute start time (e.g.
    float[]
    Time offsets in ms, same length as getAllPoints(), first element typically 0.
    default boolean
    Reports whether the gesture contains no points.
    default int
    Returns the number of gesture points.
  • Method Details

    • getAllPoints

      List<processing.core.PVector> getAllPoints()
      Dense gesture points.
      Returns:
      gesture points
    • getTimeOffsetsMs

      float[] getTimeOffsetsMs()
      Time offsets in ms, same length as getAllPoints(), first element typically 0.
      Returns:
      gesture time offsets in milliseconds
    • getStartTimeMs

      long getStartTimeMs()
      Absolute start time (e.g. millis() when gesture began).
      Returns:
      absolute gesture start time in milliseconds
    • getAllPointsSchedule

      default GestureSchedule getAllPointsSchedule()
      Convenience: a schedule over the dense gesture.
    • size

      default int size()
      Returns the number of gesture points.
      Returns:
      gesture point count
    • isEmpty

      default boolean isEmpty()
      Reports whether the gesture contains no points.
      Returns:
      true when the gesture has no points