Package heronarts.lx
Enum Class Tempo.Division
- All Implemented Interfaces:
Tempo.Quantization
,Serializable
,Comparable<Tempo.Division>
,Constable
- Enclosing class:
Tempo
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescription -
Field Summary
FieldsModifier and TypeFieldDescriptionfinal String
final double
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.Fields inherited from interface heronarts.lx.Tempo.Quantization
NONE
-
Method Summary
Modifier and TypeMethodDescriptionint
How many cycles of this division have taken placeboolean
isActive()
Whether this tempo division is active in the current animation frametoQuantization
(String label) toString()
static Tempo.Division
Returns the enum constant of this class with the specified name.static Tempo.Division[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class java.lang.Enum
clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOf
Methods inherited from interface heronarts.lx.Tempo.Quantization
hasDivision
-
Enum Constant Details
-
SIXTEENTH
-
EIGHTH_TRIPLET
-
EIGHTH
-
EIGHTH_DOT
-
QUARTER
-
QUARTER_TRIPLET
-
HALF_TRIPLET
-
QUARTER_DOT
-
HALF
-
HALF_DOT
-
WHOLE
-
WHOLE_DOT
-
DOUBLE
-
FOUR
-
EIGHT
-
SIXTEEN
-
-
Field Details
-
multiplier
public final double multiplierRatio 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
-
-
Method Details
-
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
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 nameNullPointerException
- 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
- Overrides:
toString
in classEnum<Tempo.Division>
-
getDivision
- Specified by:
getDivision
in interfaceTempo.Quantization
-
toQuantization
-