Package eu.bandm.music.entities
Class ClefUsage
- All Implemented Interfaces:
Translet.Parseable<ClefUsage>
A ClefUsage combines a clef form, the line number on which it is
positioned, and possibly an additional octave displacement.
Lines count from one(1) as the bottom line.
Every combination is possible, but not all are sensible.
Common combinations are identified by MuLi names.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ClefUsageThe traditional alto clef.static final ClefUsageThe traditional bariton clef.static final ClefUsageThe standard bass clef.static final ClefUsageBass clef with additional "octave lower" sign.static final EntityCatalog<ClefUsage> protected ClefThe clef symbol used.static final StringThe default prefix for parsing clef usages, by name or symbolic.static final ClefUsageThe "french violin", one line lower than the standard violin clef.protected intThe nubmer of the line to which its reference point is aligned.static final ClefUsageThe traditional mezzo soprano clef.protected intAdditional octave displacements indicated graphically with the clef symbol.static final ClefUsageThe traditional soprano clef.static final ClefUsageThe traditional tenor clef.static final ClefUsageThe standard violin clef.static final ClefUsageThe violin clef with an additional "two octaces higher" sign.static final ClefUsageThe violin clef with an additional "8va higher" sign.static final ClefUsageThe violin clef with an additional "8va lower" sign, as sometimes used for tenor voices.Fields inherited from class eu.bandm.tscore.base.Entity
documentations -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic final Translet.Parser<ClefUsage> fullParser(String lang) Accepts generic version (seegenericParser(String,String)) OR the predefined standard clef usages, both in the given language, withdefault_prefix.static final Translet.Parser<ClefUsage> fullParser(String lang, String prefix) Accepts generic version (seegenericParser(String,String)) OR the predefined standard clef usages, with given language and prefix.static final Translet.Parser<ClefUsage> genericParser(String lang) Accepts only the generic version (seegenericParser(String,String)) in the given language, withdefault_prefix.static final Translet.Parser<ClefUsage> genericParser(String lang, String prefix) Accepts only the generic format, which is a sequence of the given prefix, the clef name in the given language, the line number where to place the clef (1 is bottom line) and finally optionally "+1"/"+2"/"-1"/"-2" for maximally two additional octaves displacement.get_clef()Return the clef symbol.intget_line()Return the line indication, @see #lineintReturn the additional octave displacement.protected ClefUsagewithOctave(int octave) Clone a copy with the given octave displacement.Methods inherited from class eu.bandm.tscore.base.Entity
addName, dump, dump, getCatalog, getDocumentation, getDocumentation, getDocumentations, getName, getNames, getParser, getParser, getSpecific, setDocumentation, toString, toString
-
Field Details
-
catalog
-
clef
The clef symbol used. -
line
protected int lineThe nubmer of the line to which its reference point is aligned. Lines count from 1, the bottom line. -
octaves
protected int octavesAdditional octave displacements indicated graphically with the clef symbol. (Like "8" or "8va" or "15", etc., set above or below the clef symbol.) -
bass
The standard bass clef. -
bass8va
Bass clef with additional "octave lower" sign. -
violin
The standard violin clef. -
frenchViolin
The "french violin", one line lower than the standard violin clef. -
violin8va
The violin clef with an additional "8va higher" sign. -
violin8vaBassa
The violin clef with an additional "8va lower" sign, as sometimes used for tenor voices. -
violin15va
The violin clef with an additional "two octaces higher" sign. -
sopran
The traditional soprano clef. -
mezzp
The traditional mezzo soprano clef. -
alt
The traditional alto clef. -
tenor
The traditional tenor clef. -
bariton
The traditional bariton clef. -
default_prefix
The default prefix for parsing clef usages, by name or symbolic.- See Also:
-
-
Constructor Details
-
ClefUsage
Complete constructor, fixing all parameters. -
ClefUsage
Convenience constructor, with no naming for this case of usage.
-
-
Method Details
-
get_clef
Return the clef symbol. -
get_line
public int get_line()Return the line indication, @see #line -
get_octaves
public int get_octaves()Return the additional octave displacement. @see #octaves -
equals
-
withOctave
Clone a copy with the given octave displacement. -
genericParser
Accepts only the generic version (seegenericParser(String,String)) in the given language, withdefault_prefix. -
fullParser
Accepts generic version (seegenericParser(String,String)) OR the predefined standard clef usages, both in the given language, withdefault_prefix. -
genericParser
Accepts only the generic format, which is a sequence of the given prefix, the clef name in the given language, the line number where to place the clef (1 is bottom line) and finally optionally "+1"/"+2"/"-1"/"-2" for maximally two additional octaves displacement.- Throws:
NullPointerException- if one of the arguments is null
-
fullParser
Accepts generic version (seegenericParser(String,String)) OR the predefined standard clef usages, with given language and prefix.- Throws:
NullPointerException- if one of the arguments is null
-