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
Constructors -
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_DrumsTransformFind 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.booleanisCompatibleWith(RhythmParameter<?> rp) Indicate if rp is compatible with this RhythmParameter.booleanIndicate if this RhythmParameter is a primary parameter for its rhythm.booleanTry 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:RhythmParameterIndicate 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:
isPrimaryin interfaceRhythmParameter<RP_SYS_DrumsTransformValue>- Returns:
-
getRhythmVoice
-
getId
- Specified by:
getIdin interfaceRhythmParameter<RP_SYS_DrumsTransformValue>- Returns:
- A unique identifier. Usually the english name.
-
getDisplayName
- Specified by:
getDisplayNamein interfaceRhythmParameter<RP_SYS_DrumsTransformValue>- Returns:
- The localized display name of the rhythm parameter.
-
getDescription
Description copied from interface:RhythmParameterThe description of this rhythm parameter.- Specified by:
getDescriptionin interfaceRhythmParameter<RP_SYS_DrumsTransformValue>- Returns:
-
getValueDescription
Description copied from interface:RhythmParameterProvide an optional description or help text associated to the specified value.- Specified by:
getValueDescriptionin interfaceRhythmParameter<RP_SYS_DrumsTransformValue>- Returns:
- Can be null.
-
getDefaultValue
- Specified by:
getDefaultValuein interfaceRhythmParameter<RP_SYS_DrumsTransformValue>- Returns:
- Object The default value.
-
saveAsString
Description copied from interface:RhythmParameterTry to convert the specified RhythmParameter value to a string.- Specified by:
saveAsStringin 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:RhythmParameterTry to convert the specified string to a RhythmParameter value.- Specified by:
loadFromStringin interfaceRhythmParameter<RP_SYS_DrumsTransformValue>- Parameters:
s- A string produced by valueToString().- Returns:
- Can be null if conversion failed.
- See Also:
-
isValidValue
- Specified by:
isValidValuein interfaceRhythmParameter<RP_SYS_DrumsTransformValue>- Returns:
- True is value is valid.
-
cloneValue
Description copied from interface:RhythmParameterClone 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:
cloneValuein interfaceRhythmParameter<RP_SYS_DrumsTransformValue>- Returns:
- A copy of the specified value.
-
toString
-
isCompatibleWith
Description copied from interface:RhythmParameterIndicate 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:
isCompatibleWithin 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:RhythmParameterConvert the value of a compatible RhythmParameter to a value for this RhythmParameter.- Specified by:
convertValuein 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:RhythmParameterGet a short String representation of the value.- Specified by:
getDisplayValuein 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
-