Interface AdaptedRhythm
- All Superinterfaces:
Comparable<Rhythm>,Rhythm
- All Known Subinterfaces:
YamJJazzAdaptedRhythm
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
FieldsFields inherited from interface org.jjazz.rhythm.api.Rhythm
PROP_RESOURCES_LOADED -
Method Summary
Modifier and TypeMethodDescriptionstatic StringbuildDescription(Rhythm sourceRhythm, TimeSignature newTs) Convenience method to build the AdaptedRhythm description in a standard way.static StringbuildName(Rhythm sourceRhythm, TimeSignature newTs) Convenience method to build the AdaptedRhythm name in a standard way.static StringbuildUniqueId(String rhythmProviderId, Rhythm sourceRhythm, TimeSignature newTs) Convenience method to build the UniqueId as required.The 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
-
-
Method Details
-
buildUniqueId
Convenience method to build the UniqueId as required.- Parameters:
rhythmProviderId-sourceRhythm-newTs-- Returns:
-
buildName
Convenience method to build the AdaptedRhythm name in a standard way.- Parameters:
sourceRhythm-newTs-- Returns:
-
buildDescription
Convenience method to build the AdaptedRhythm description in a standard way.- Parameters:
sourceRhythm-newTs-- Returns:
-
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. Use buildUniqueId() to make sure you use the right syntax.
- Specified by:
getUniqueIdin interfaceRhythm- Returns:
- See Also:
-