Package org.jjazz.rhythm.api
Interface RpEnumerable<E>
- Type Parameters:
E
- The type of value of this RhythmParameter.
- All Known Implementing Classes:
RP_Integer
,RP_State
,RP_STD_Feel
,RP_STD_Fill
,RP_STD_Intensity
,RP_STD_Variation
,RP_StringSet
,RP_SYS_Marker
,RP_SYS_Mute
,RP_SYS_TempoFactor
public interface RpEnumerable<E>
A RhythmParameter capability : enumerable.
-
Method Summary
Modifier and TypeMethodDescriptiondouble
calculatePercentage
(E value) calculateValue
(double percentage) Calculate the RhythmParameter value corresponding to a percentage of the value range.getNextValue
(E value) Get the next value after specified value.Get the list of possible values for this RhythmParameter.getPreviousValue
(E value) Get the next value before specified value.
-
Method Details
-
getMaxValue
E getMaxValue() -
getMinValue
E getMinValue() -
calculatePercentage
- Parameters:
value
-- Returns:
- A percentage between 0 and 1 representing value in the range of the possible values.
-
calculateValue
Calculate the RhythmParameter value corresponding to a percentage of the value range.For example if RhythmParameter is an integer between 0 and 4: percentage=0 -> value=0 percentage=0.5 -> value=2 percentage=1 -> value=4.
- Parameters:
percentage
- A float between 0 and 1.- Returns:
- A RhythmParameter value.
-
getNextValue
Get the next value after specified value.- Parameters:
value
-- Returns:
- Object
-
getPreviousValue
Get the next value before specified value.- Parameters:
value
-- Returns:
- Object
-
getPossibleValues
Get the list of possible values for this RhythmParameter.Only the first 10000 values are returned.
- Returns:
-