Class GridChordContext

java.lang.Object
org.jjazz.rhythmmusicgeneration.api.GridChordContext

public class GridChordContext extends Object
A helper class to calculate a number of data related to one chord symbol of a chord sequence with an associated grid.

Data covers the zone from the chord symbol before (or the start of chord sequence if no previous chord symbol) to the chord symbol after (or end of chord sequence if no next chord symbol). When present the bounding chord symbols before/after are not part of the covered zone.

  • Field Details

    • chordSequence

      public final SimpleChordSequence chordSequence
    • grid

      public final Grid grid
    • chord

      public final CLI_ChordSymbol chord
    • timeSignature

      public final TimeSignature timeSignature
    • chordCell

      public final int chordCell
      The cell of the chord symbol.
    • chordPosInBeats

      public final float chordPosInBeats
      The absolute position of the chord symbol.
    • relPosInCell

      public final float relPosInCell
      The relative position in beat in the cell, can be negative !
    • relCellInBeat

      public final int relCellInBeat
      The relative cell within the beat.
    • toNextBeatCellRange

      public final IntRange toNextBeatCellRange
      from=chordCell+1, to=cell before next beat, can be empty.
    • fromBeatStartCellRange

      public final IntRange fromBeatStartCellRange
      from=beat start, to=chordCell-1, can be empty.
    • afterCellRange

      public final IntRange afterCellRange
      from=chordCell+1, to=cell before next chord symbol or end of grid, can be empty.
    • beforeCellRange

      public final IntRange beforeCellRange
      from=cell after previous chord symbol or start of grid, to=chordCell-1, can be empty.
    • cellRange

      public final IntRange cellRange
      from=1st cell of this zone, to=last cell of this zone
    • afterBeatRange

      public final FloatRange afterBeatRange
      from=chord position, to=end of the zone (last cell position minus the pre-cell window)
  • Constructor Details

  • Method Details