Class PointGrouping

  • All Implemented Interfaces:
    Serializable, OptionDataListener, org.zkoss.json.JSONAware

    public class PointGrouping
    extends Optionable
    Options for grouping data points together when sonifying. This allows for the visual presentation to contain more points than what is being played. If not enabled, all visible / uncropped points are played.
    Since:
    11.2.0.0
    Author:
    Jamson Chan
    See Also:
    Serialized Form
    • Constructor Detail

      • PointGrouping

        public PointGrouping()
    • Method Detail

      • getAlgorithm

        public String getAlgorithm()
        Returns The grouping algorithm, deciding which points to keep when grouping a set of points together. By default "minmax" is used, which keeps both the minimum and maximum points.

        The other algorithms will either keep the first point in the group (time wise), last point, middle point, or both the first and the last point.

        The timing of the resulting point(s) is then adjusted to play evenly, regardless of its original position within the group.

        Default: "minmax"

      • setAlgorithm

        public void setAlgorithm​(String algorithm)
        Sets The grouping algorithm, deciding which points to keep when grouping a set of points together. By default "minmax" is used, which keeps both the minimum and maximum points.

        The other algorithms will either keep the first point in the group (time wise), last point, middle point, or both the first and the last point.

        The timing of the resulting point(s) is then adjusted to play evenly, regardless of its original position within the group.

      • isEnabled

        public boolean isEnabled()
        Returns whether or not to group points

        Default: true

      • setEnabled

        public void setEnabled​(Boolean enabled)
        Sets whether or not to group points
      • getGroupTimespan

        public Number getGroupTimespan()
        Returns the size of each group in milliseconds. Audio events closer than this are grouped together.

        Default: 15

      • setGroupTimespan

        public void setGroupTimespan​(Number groupTimespan)
        Sets the size of each group in milliseconds. Audio events closer than this are grouped together.
      • getProp

        public String getProp()
        Returns the data property for each point to compare when deciding which points to keep in the group.

        By default it is "y", which means that if the "minmax" algorithm is used, the two points the group with the lowest and highest y value will be kept, and the others not played.

        Default: "y"

      • setProp

        public void setProp​(String prop)
        Sets the data property for each point to compare when deciding which points to keep in the group.

        By default it is "y", which means that if the "minmax" algorithm is used, the two points the group with the lowest and highest y value will be kept, and the others not played.