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
FieldsModifier and TypeFieldDescriptionfinal FloatRangefrom=chord position, to=end of the zone (last cell position minus the pre-cell window)final IntRangefrom=chordCell+1, to=cell before next chord symbol or end of grid, can be empty.final IntRangefrom=cell after previous chord symbol or start of grid, to=chordCell-1, can be empty.final IntRangefrom=1st cell of this zone, to=last cell of this zonefinal CLI_ChordSymbolfinal intThe cell of the chord symbol.final floatThe absolute position of the chord symbol.final SimpleChordSequencefinal IntRangefrom=beat start, to=chordCell-1, can be empty.final Gridfinal intThe relative cell within the beat.final floatThe relative position in beat in the cell, can be negative !final TimeSignaturefinal IntRangefrom=chordCell+1, to=cell before next beat, can be empty. -
Constructor Summary
ConstructorsConstructorDescriptionGridChordContext(CLI_ChordSymbol cliCs, SimpleChordSequence cSeq, Grid grid) -
Method Summary
-
Field Details
-
chordSequence
-
grid
-
chord
-
timeSignature
-
chordCell
public final int chordCellThe cell of the chord symbol. -
chordPosInBeats
public final float chordPosInBeatsThe absolute position of the chord symbol. -
relPosInCell
public final float relPosInCellThe relative position in beat in the cell, can be negative ! -
relCellInBeat
public final 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
-
-
Method Details
-
toString
-