Package heronarts.lx

Enum Class Tempo.Division

java.lang.Object
java.lang.Enum<Tempo.Division>
heronarts.lx.Tempo.Division
All Implemented Interfaces:
Tempo.Quantization, Serializable, Comparable<Tempo.Division>, Constable
Enclosing class:
Tempo

public static enum Tempo.Division extends Enum<Tempo.Division> implements Tempo.Quantization
  • Enum Constant Details

  • Field Details

    • multiplier

      public final double multiplier
      Ratio between the duration of this division and a quarter note, where the quarter note is the numerator and this division is the divisor, e.g. QUARTER is 1 and an EIGHTH note is QUARTER / EIGTH = 2. Can also be expressed as "how many of this division make one beat"
    • label

      public final String label
  • Method Details

    • values

      public static Tempo.Division[] 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 Tempo.Division 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
    • isActive

      public boolean isActive()
      Whether this tempo division is active in the current animation frame
      Returns:
      true if division is presently triggering
    • getCycleCount

      public int getCycleCount()
      How many cycles of this division have taken place
      Returns:
      Count of cycles of this tempo division on master metronome
    • toString

      public String toString()
      Overrides:
      toString in class Enum<Tempo.Division>
    • getDivision

      public Tempo.Division getDivision()
      Specified by:
      getDivision in interface Tempo.Quantization
    • toQuantization

      public Tempo.Quantization toQuantization(String label)