Class GridChordContext
java.lang.Object
org.jjazz.rhythmmusicgeneration.api.GridChordContext
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 Summary
Modifier and TypeFieldDescriptionfrom=chord position, to=end of the zone (last cell position minus the pre-cell window)from=chordCell+1, to=cell before next chord symbol or end of grid, can be empty.from=cell after previous chord symbol or start of grid, to=chordCell-1, can be empty.from=1st cell of this zone, to=last cell of this zoneint
The cell of the chord symbol.float
The absolute position of the chord symbol.float
from=beat start, to=chordCell-1, can be empty.int
The relative cell within the beat.float
The relative position in beat in the cell, can be negative !from=chordCell+1, to=cell before next beat, can be empty. -
Constructor Summary
ConstructorDescriptionGridChordContext
(CLI_ChordSymbol cliCs, SimpleChordSequence cSeq, float cSeqStartPosInBeats, Grid grid) -
Method Summary
-
Field Details
-
chordSequence
-
grid
-
chord
-
timeSignature
-
cSeqStartPosInBeats
public float cSeqStartPosInBeats -
chordCell
public int chordCellThe cell of the chord symbol. -
chordPosInBeats
public float chordPosInBeatsThe absolute position of the chord symbol. -
relPosInCell
public float relPosInCellThe relative position in beat in the cell, can be negative ! -
relCellInBeat
public int relCellInBeatThe relative cell within the beat. -
toNextBeatCellRange
from=chordCell+1, to=cell before next beat, can be empty. -
fromBeatStartCellRange
from=beat start, to=chordCell-1, can be empty. -
afterCellRange
from=chordCell+1, to=cell before next chord symbol or end of grid, can be empty. -
beforeCellRange
from=cell after previous chord symbol or start of grid, to=chordCell-1, can be empty. -
cellRange
from=1st cell of this zone, to=last cell of this zone -
afterBeatRange
from=chord position, to=end of the zone (last cell position minus the pre-cell window)
-
-
Constructor Details
-
GridChordContext
public GridChordContext(CLI_ChordSymbol cliCs, SimpleChordSequence cSeq, float cSeqStartPosInBeats, Grid grid)
-
-
Method Details