Enum Class Quantization

java.lang.Object
java.lang.Enum<Quantization>
org.jjazz.quantizer.api.Quantization
All Implemented Interfaces:
Serializable, Comparable<Quantization>, Constable

public enum Quantization extends Enum<Quantization>
Quantization possible values.
  • Enum Constant Details

  • Method Details

    • values

      public static Quantization[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static Quantization valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getSymbolicDuration

      public SymbolicDuration getSymbolicDuration()
      Get the symbolic duration of on quantized unit.
      Returns:
      Null for OFF or HALF_BAR.
    • isTernary

      public boolean isTernary()
    • getBeats

      public float[] getBeats()
      An array of the quantized values within a beat.

      Example: [0, 1/3, 2/3, 1]

      Returns:
      An empty array for OFF and HALF_BAR.
    • getBeatsAsList

      public List<Float> getBeatsAsList()
      Same as getBeats() but return a list.
      Returns:
    • getBeatsAsTreeSet

      public TreeSet<Float> getBeatsAsTreeSet()
      Same as getBeats() but return a TreeSet.
      Returns:
    • isValidStringValue

      public static boolean isValidStringValue(String value)
      Parameters:
      value -
      Returns:
      If true, using Quantization.valueOf(value) will not throw an exception.