Package eu.bandm.music.entities
Class Accidental
- All Implemented Interfaces:
Translet.Parseable<Accidental>
Represents accidentals, used for key indications and for pitches, when combined with
white keys.
This class only represents the conventional accidental signs,
which stand for half tone / chromatic steps.
Quarter tone / sixth tone / ecmelic accidentals require a different implementation,
but also follow a very different theory.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final Accidental
The single flat.static final Accidental
The double flat.protected static final Map<Integer,
Accidental> Index of the defined accidentals by chromatic steps.protected static final EntityCatalog<Accidental>
The catalog holding accidentals defined with a name.static final int
Explains one chromatic step upward as seven functional fifths upward.static final Accidental
The single sharp.static final Accidental
The double sharp.static final Accidental
The natural sign.protected int
The chromatic steps caused by this accidental.protected int
The number of fifths caused by this accidental.Fields inherited from class eu.bandm.tscore.base.Entity
documentations
-
Constructor Summary
ModifierConstructorDescriptionprotected
Accidental
(int shift_chromaticSteps) Constructor with no names in (human) languages.protected
Accidental
(int shift_chromaticSteps, MuLi muli) Constructor giving names in different (human) languages. -
Method Summary
Modifier and TypeMethodDescriptionstatic Accidental
byChromaticSteps
(int i) Return the accidental defined for this number of chromatic steps, or define a new one (with synthetic and symbolic name only), if necessary.int
Return the number of chromatic shifts caused by this accidental.int
Return the number of shifts by a fifths (in functional harmonic space) caused by this accidental.Methods inherited from class eu.bandm.tscore.base.Entity
addName, dump, dump, getCatalog, getDocumentation, getDocumentation, getDocumentations, getName, getName, getNames, getParser, getParser, setDocumentation, toString, toString
-
Field Details
-
fifth_per_chromaticStep
public static final int fifth_per_chromaticStepExplains one chromatic step upward as seven functional fifths upward.- See Also:
-
shift_chromaticSteps
protected int shift_chromaticStepsThe chromatic steps caused by this accidental. Positive numbers go upward. -
shift_fifths
protected int shift_fifthsThe number of fifths caused by this accidental. Positive numbers go upward. -
by_chromaticSteps
Index of the defined accidentals by chromatic steps. Positive numbers go upward. -
catalog
The catalog holding accidentals defined with a name. -
b
The single flat. -
bb
The double flat. -
nat
The natural sign. (The symbolic sign "=" is inherited from musictex and lilypond. -
h
The single sharp. -
hh
The double sharp. While the synthetic triple, quadruple,... sharps will have "###
" etc. as their symbolic name, this instance has traditionally "x
".
-
-
Constructor Details
-
Accidental
Constructor giving names in different (human) languages. The symbolic name will be added automatically. -
Accidental
protected Accidental(int shift_chromaticSteps) Constructor with no names in (human) languages. The symbolic name will be added automatically.
-
-
Method Details
-
get_chromaticSteps_shift
public int get_chromaticSteps_shift()Return the number of chromatic shifts caused by this accidental. Positive numbers mean upward interval. -
get_fifths_shift
public int get_fifths_shift()Return the number of shifts by a fifths (in functional harmonic space) caused by this accidental. Positive numbers mean upward interval. -
byChromaticSteps
Return the accidental defined for this number of chromatic steps, or define a new one (with synthetic and symbolic name only), if necessary.
-