Class Accidental

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

public class Accidental extends Entity<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 Details

    • fifth_per_chromaticStep

      public static final int fifth_per_chromaticStep
      Explains one chromatic step upward as seven functional fifths upward.
      See Also:
    • shift_chromaticSteps

      protected int shift_chromaticSteps
      The chromatic steps caused by this accidental. Positive numbers go upward.
    • shift_fifths

      protected int shift_fifths
      The number of fifths caused by this accidental. Positive numbers go upward.
    • by_chromaticSteps

      protected static final Map<Integer,Accidental> by_chromaticSteps
      Index of the defined accidentals by chromatic steps. Positive numbers go upward.
    • catalog

      protected static final EntityCatalog<Accidental> catalog
      The catalog holding accidentals defined with a name.
    • b

      public static final Accidental b
      The single flat.
    • bb

      public static final Accidental bb
      The double flat.
    • nat

      public static final Accidental nat
      The natural sign. (The symbolic sign "=" is inherited from musictex and lilypond.
    • h

      public static final Accidental h
      The single sharp.
    • hh

      public static final Accidental 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

      protected Accidental(int shift_chromaticSteps, MuLi muli)
      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

      public static 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.