Class ClefUsage

java.lang.Object
eu.bandm.tscore.base.Entity<ClefUsage>
eu.bandm.music.entities.ClefUsage
All Implemented Interfaces:
Translet.Parseable<ClefUsage>

public class ClefUsage extends Entity<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.

Attention: The rare case of postioning a clef to a space instead of a line is notsupported. (See Ross 1987, p.166)

  • Field Details

    • catalog

      public static final EntityCatalog<ClefUsage> catalog
    • clef

      protected Clef clef
      The clef symbol used.
    • line

      protected int line
      The nubmer of the line to which its reference point is aligned. Lines count from 1, the bottom line.
    • octaves

      protected int octaves
      Additional octave displacements indicated graphically with the clef symbol. (Like "8" or "8va" or "15", etc., set above or below the clef symbol.)
    • bass

      public static final ClefUsage bass
      The standard bass clef.
    • bass8va

      public static final ClefUsage bass8va
      Bass clef with additional "octave lower" sign.
    • violin

      public static final ClefUsage violin
      The standard violin clef.
    • frenchViolin

      public static final ClefUsage frenchViolin
      The "french violin", one line lower than the standard violin clef.
    • violin8va

      public static final ClefUsage violin8va
      The violin clef with an additional "8va higher" sign.
    • violin8vaBassa

      public static final ClefUsage violin8vaBassa
      The violin clef with an additional "8va lower" sign, as sometimes used for tenor voices.
    • violin15va

      public static final ClefUsage violin15va
      The violin clef with an additional "two octaces higher" sign.
    • sopran

      public static final ClefUsage sopran
      The traditional soprano clef.
    • mezzp

      public static final ClefUsage mezzp
      The traditional mezzo soprano clef.
    • alt

      public static final ClefUsage alt
      The traditional alto clef.
    • tenor

      public static final ClefUsage tenor
      The traditional tenor clef.
    • bariton

      public static final ClefUsage bariton
      The traditional bariton clef.
    • default_prefix

      public static final String default_prefix
      The default prefix for parsing clef usages, by name or symbolic.
      See Also:
  • Constructor Details

    • ClefUsage

      public ClefUsage(Clef clef, int line, int octaves, Map<String,String> names)
      Complete constructor, fixing all parameters.
    • ClefUsage

      public ClefUsage(Clef clef, int line, int octaves)
      Convenience constructor, with no naming for this case of usage.
  • Method Details

    • get_clef

      public Clef 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

      public boolean equals(ClefUsage other)
    • withOctave

      protected ClefUsage withOctave(int octave)
      Clone a copy with the given octave displacement.
    • genericParser

      public static final Translet.Parser<ClefUsage> genericParser(String lang)
      Accepts only the generic version (see genericParser(String,String)) in the given language, with default_prefix.
    • fullParser

      public static final Translet.Parser<ClefUsage> fullParser(String lang)
      Accepts generic version (see genericParser(String,String)) OR the predefined standard clef usages, both in the given language, with default_prefix.
    • genericParser

      public 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.
      Throws:
      NullPointerException - if one of the arguments is null
    • fullParser

      public static final Translet.Parser<ClefUsage> fullParser(String lang, String prefix)
      Accepts generic version (see genericParser(String,String)) OR the predefined standard clef usages, with given language and prefix.
      Throws:
      NullPointerException - if one of the arguments is null