Package org.jjazz.quantizer.api
Enum Class Quantization
- All Implemented Interfaces:
Serializable
,Comparable<Quantization>
,Constable
Quantization possible values.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescription -
Method Summary
Modifier and TypeMethodDescriptionfloat[]
getBeats()
An array of the quantized values within a beat.Same as getBeats() but return a list.Same as getBeats() but return a TreeSet.Get the symbolic duration of on quantized unit.boolean
static boolean
isValidStringValue
(String value) static Quantization
Returns the enum constant of this class with the specified name.static Quantization[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class java.lang.Enum
compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Enum Constant Details
-
HALF_BAR
-
BEAT
-
HALF_BEAT
-
ONE_THIRD_BEAT
-
ONE_QUARTER_BEAT
-
ONE_SIXTH_BEAT
-
OFF
-
-
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
-
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
Same as getBeats() but return a list.- Returns:
-
getBeatsAsTreeSet
Same as getBeats() but return a TreeSet.- Returns:
-
isValidStringValue
- Parameters:
value
-- Returns:
- If true, using Quantization.valueOf(value) will not throw an exception.
-