Package eu.bandm.music.entities
Class FunctionalKey
- All Implemented Interfaces:
Translet.Parseable<FunctionalKey>
Indicates a tonal key (/"Tonart"/"diatonics") in tonal theory.
Please note that the concrete meaning of the instances can vary widely,
depending on the context. For instance, a particular scale of
pitches of set of pitch classes may or may not be determined
by a particular value. This depends on the applied theory.
Nevertheless, values of this type are frequently used to name
opera.
-
Field Summary
Modifier and TypeFieldDescriptionprotected FunctionalPitchModOctave
The root or base tone of this key.static final EntityCatalog<FunctionalKey>
Catalog of all defined keys.protected FunctionalGender
The gender(/"mode") of this key.Fields inherited from class eu.bandm.tscore.base.Entity
documentations
-
Method Summary
Modifier and TypeMethodDescriptionget_base()
Return the base pitch of the key.int
Get the distance of the base (in case of major) or the base of the relative key (/"parallele Durtonart") in case of minor, from the pitch class of "C".Return the gender of the key.static Translet.Parser<FunctionalKey>
getCapitalizationAdjustedParser
(String lang, String delim) Delivers a parser which accepts the lower-initial variant of a pitch class followed by the word for minor, and the upper-initial variant for major.static Translet.Parser<FunctionalKey>
Delivers a parser which accepts only the pitch class names and derives the gender/mode from the case of the initial character.static Translet.Parser<FunctionalKey>
getExplicitParser
(String lang, String delim) Delivers a parser which accepts the names of the pitch classes (only) as they were defined.Returns a name in the given language.toString()
Get any name, preferable in theEntityCatalog.symbolic
language, as defined inMuLi.get(String...)
.Returns a name in the given language.static FunctionalKey
valueOf
(FunctionalPitchModOctave base, FunctionalGender gender) Methods inherited from class eu.bandm.tscore.base.Entity
addName, dump, dump, getCatalog, getDocumentation, getDocumentation, getDocumentations, getName, getNames, getParser, getParser, setDocumentation, toString
-
Field Details
-
base
The root or base tone of this key. -
gender
The gender(/"mode") of this key. -
catalog
Catalog of all defined keys.
-
-
Method Details
-
get_gender
Return the gender of the key. -
get_base
Return the base pitch of the key. -
get_fifthsFromC
public int get_fifthsFromC()Get the distance of the base (in case of major) or the base of the relative key (/"parallele Durtonart") in case of minor, from the pitch class of "C". This is the fundamentel means of sorting keys in the so-called "Circle of Fifths" (which is indeed per se a spiral and not a circle.) -
valueOf
-
toString
Returns a name in the given language. This algorithm follows the tradition to write major keys capitalized and minor keys with lower case initials. -
getName
Returns a name in the given language. This algorithm follows the tradition to write major keys capitalized and minor keys with lower case initials.- Overrides:
getName
in classEntity<FunctionalKey>
-
toString
Description copied from class:Entity
Get any name, preferable in theEntityCatalog.symbolic
language, as defined inMuLi.get(String...)
. If this fails, get built-inObject.toString()
conversion result.- Overrides:
toString
in classEntity<FunctionalKey>
-
getExplicitParser
Delivers a parser which accepts the names of the pitch classes (only) as they were defined. These are followed by the delimiter (which may be the empty string) and the explict word for major/minor selection, -
getCapitalizationAdjustedParser
public static Translet.Parser<FunctionalKey> getCapitalizationAdjustedParser(String lang, String delim) Delivers a parser which accepts the lower-initial variant of a pitch class followed by the word for minor, and the upper-initial variant for major. Separaterd by the string delim, which may be the empty string. -
getCapitalizationOnlyParser
Delivers a parser which accepts only the pitch class names and derives the gender/mode from the case of the initial character.
-