Class RP_SYS_DrumsTransform
java.lang.Object
org.jjazz.phrasetransform.api.rps.RP_SYS_DrumsTransform
- All Implemented Interfaces:
RhythmParameter<RP_SYS_DrumsTransformValue>
public class RP_SYS_DrumsTransform
extends Object
implements RhythmParameter<RP_SYS_DrumsTransformValue>
A RhythmParameter to transform a drums phrase.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionClone the specified value.convertValue
(RhythmParameter<T> rp, T rpValue) Convert the value of a compatible RhythmParameter to a value for this RhythmParameter.The description of this rhythm parameter.Get a short String representation of the value.static RP_SYS_DrumsTransform
Find the first RP_SYS_DrumsTransform instance in the rhythm parameters of r.getId()
Provide an optional description or help text associated to the specified value.boolean
isCompatibleWith
(RhythmParameter<?> rp) Indicate if rp is compatible with this RhythmParameter.boolean
Indicate if this RhythmParameter is a primary parameter for its rhythm.boolean
Try to convert the specified string to a RhythmParameter value.Try to convert the specified RhythmParameter value to a string.toString()
-
Constructor Details
-
RP_SYS_DrumsTransform
- Parameters:
rv
- Must have a Rhythm container defined and type==RhythmVoice.Type.DRUMSprimary
-
-
-
Method Details
-
getRhythm
-
isPrimary
public boolean isPrimary()Description copied from interface:RhythmParameter
Indicate if this RhythmParameter is a primary parameter for its rhythm.This information is made available mainly for the user interface, e.g. to select which RhythmParameters to show first.
Default implementation returns true.
- Specified by:
isPrimary
in interfaceRhythmParameter<RP_SYS_DrumsTransformValue>
- Returns:
-
getRhythmVoice
-
getId
- Specified by:
getId
in interfaceRhythmParameter<RP_SYS_DrumsTransformValue>
- Returns:
- A unique identifier. Usually the english name.
-
getDisplayName
- Specified by:
getDisplayName
in interfaceRhythmParameter<RP_SYS_DrumsTransformValue>
- Returns:
- The localized display name of the rhythm parameter.
-
getDescription
Description copied from interface:RhythmParameter
The description of this rhythm parameter.- Specified by:
getDescription
in interfaceRhythmParameter<RP_SYS_DrumsTransformValue>
- Returns:
-
getValueDescription
Description copied from interface:RhythmParameter
Provide an optional description or help text associated to the specified value.- Specified by:
getValueDescription
in interfaceRhythmParameter<RP_SYS_DrumsTransformValue>
- Returns:
- Can be null.
-
getDefaultValue
- Specified by:
getDefaultValue
in interfaceRhythmParameter<RP_SYS_DrumsTransformValue>
- Returns:
- Object The default value.
-
saveAsString
Description copied from interface:RhythmParameter
Try to convert the specified RhythmParameter value to a string.- Specified by:
saveAsString
in interfaceRhythmParameter<RP_SYS_DrumsTransformValue>
- Returns:
- Can be null if value is invalid or RhytmParameter does not have this capability.
- See Also:
-
loadFromString
Description copied from interface:RhythmParameter
Try to convert the specified string to a RhythmParameter value.- Specified by:
loadFromString
in interfaceRhythmParameter<RP_SYS_DrumsTransformValue>
- Parameters:
s
- A string produced by valueToString().- Returns:
- Can be null if conversion failed.
- See Also:
-
isValidValue
- Specified by:
isValidValue
in interfaceRhythmParameter<RP_SYS_DrumsTransformValue>
- Returns:
- True is value is valid.
-
cloneValue
Description copied from interface:RhythmParameter
Clone the specified value.The default implementation just return value, which is fine is E is an immutable class. If E is mutable, this method must be overridden.
- Specified by:
cloneValue
in interfaceRhythmParameter<RP_SYS_DrumsTransformValue>
- Returns:
- A copy of the specified value.
-
toString
-
isCompatibleWith
Description copied from interface:RhythmParameter
Indicate if rp is compatible with this RhythmParameter.NOTE: if rp1 is compatible with rp2, then rp2 must be compatible with rp1 as well.
- Specified by:
isCompatibleWith
in interfaceRhythmParameter<RP_SYS_DrumsTransformValue>
- Returns:
- True if a rp's value can be converted to a value for this RhythmParameter.
-
convertValue
Description copied from interface:RhythmParameter
Convert the value of a compatible RhythmParameter to a value for this RhythmParameter.- Specified by:
convertValue
in interfaceRhythmParameter<RP_SYS_DrumsTransformValue>
- Type Parameters:
T
- A RhythmParameter value- Parameters:
rp
- A compatible RhythmParameterrpValue
- The value to convert- Returns:
- The rpValue converted for this RhythmParameter. Can't be null.
-
getDisplayValue
Description copied from interface:RhythmParameter
Get a short String representation of the value.- Specified by:
getDisplayValue
in interfaceRhythmParameter<RP_SYS_DrumsTransformValue>
- Returns:
- Can be an empty String.
-
getDrumsTransformRp
Find the first RP_SYS_DrumsTransform instance in the rhythm parameters of r.- Parameters:
r
-- Returns:
- Can be null if not found
-