Package net.paulhertz.pixelaudio.curves
Interface PAGesture
- All Known Implementing Classes:
GestureSchedule,PACurveMaker
public interface PAGesture
PAGesture provides a interface for "gesture" defined by:
- a list of points and
- a list of time offsets where
- both lists have the same cardinality and
- time offsets are monotonically non-decreasing. In addition,
- 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 TypeMethodDescriptionList<processing.core.PVector>Dense gesture points.default GestureScheduleConvenience: a schedule over the dense gesture.longAbsolute start time (e.g.float[]Time offsets in ms, same length as getAllPoints(), first element typically 0.default booleanisEmpty()Reports whether the gesture contains no points.default intsize()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
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
-