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
Modifier and TypeFieldDescriptionstatic final ClefUsage
The traditional alto clef.static final ClefUsage
The traditional bariton clef.static final ClefUsage
The standard bass clef.static final ClefUsage
Bass clef with additional "octave lower" sign.static final EntityCatalog<ClefUsage>
protected Clef
The clef symbol used.static final String
The default prefix for parsing clef usages, by name or symbolic.static final ClefUsage
The "french violin", one line lower than the standard violin clef.protected int
The nubmer of the line to which its reference point is aligned.static final ClefUsage
The traditional mezzo soprano clef.protected int
Additional octave displacements indicated graphically with the clef symbol.static final ClefUsage
The traditional soprano clef.static final ClefUsage
The traditional tenor clef.static final ClefUsage
The standard violin clef.static final ClefUsage
The violin clef with an additional "two octaces higher" sign.static final ClefUsage
The violin clef with an additional "8va higher" sign.static final ClefUsage
The 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
-
Method Summary
Modifier and TypeMethodDescriptionboolean
static 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.int
get_line()
Return the line indication, @see #lineint
Return the additional octave displacement.protected ClefUsage
withOctave
(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, getName, getNames, getParser, getParser, 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
-