Package org.jjazz.rhythm.api
Interface AdaptedRhythm
- All Superinterfaces:
Comparable<Rhythm>
,Rhythm
A marker interface for a rhythm which is an adapted version of an existing rhythm but for a different time signature.
This is used when there is e.g. a 2/4 bar in a 4/4 song (so with a 4/4 rhythm) and we don't want to have a specific 2/4 rhythm, but just the same 4/4 rhythm truncated to a 2/2 bar.
An AdaptedRhythm should have only RhythmVoiceDelegate instances as RhythmVoices, so that they do not take "Midi channel space" in a song's MidiMix.
-
Field Summary
Fields inherited from interface org.jjazz.rhythm.api.Rhythm
PROP_RESOURCES_LOADED
-
Method Summary
Modifier and TypeMethodDescriptionThe source rhythm for this object.A unique string identifier representing this adapted rhythm.Methods inherited from interface org.jjazz.rhythm.api.Rhythm
addPropertyChangeListener, compareTo, getAuthor, getDescription, getFeatures, getFile, getName, getPreferredTempo, getRhythmParameters, getRhythmVoices, getTags, getTimeSignature, getVersion, isResourcesLoaded, loadResources, releaseResources, removePropertyChangeListener
-
Field Details
-
RHYTHM_ID_DELIMITER
Delimiter to be used by getUniqueId().- See Also:
-
-
Method Details
-
getSourceRhythm
Rhythm getSourceRhythm()The source rhythm for this object.- Returns:
- A rhythm with a different time signature than this rhythm.
-
getUniqueId
String getUniqueId()A unique string identifier representing this adapted rhythm.As an AdaptedRhythm, the returned id must follow this syntax:
<RhythmProviderId><RHYTHM_ID_DELIMITER><RhythmId><RHYTHM_ID_DELIMITER><TimeSignature>
Example: "YamJJazzRhythmProviderID$@$BossaNova.s25.styID$@$3/4"
RhythmId must a valid rhythm id for the rhythm provider identified by RhythmProviderId.It will be used by other serialized objects who want to refer this rhythm -typically a Song object.
- Specified by:
getUniqueId
in interfaceRhythm
- Returns:
-