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 SimpleChordSequence chordSequence
    • grid

      public Grid grid
    • chord

      public CLI_ChordSymbol chord
    • timeSignature

      public TimeSignature timeSignature
    • cSeqStartPosInBeats

      public float cSeqStartPosInBeats
    • chordCell

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

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

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

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

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

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

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

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

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

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

  • Method Details