Interface AdaptedRhythm

All Superinterfaces:
Comparable<Rhythm>, Rhythm

public interface AdaptedRhythm extends 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 Details

  • 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&gt<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 interface Rhythm
      Returns: