Class OctaveRegister

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

public class OctaveRegister extends Entity<OctaveRegister> implements Comparable<OctaveRegister>
The classical naming for pitch registers: Each such register has the width of one octave, and extends from a note called "c" upto, but excluding, the next higher note called "c" again.

The numeric value is that the "small c" is in octave register number "0" and the "c'" or "c-prime" in octave register number "1". Additionally the modern Midi/Jazz numbering is supported for retrieval.

The non-numerical naming is partly language specific (like "gr" for "groß", "sk" for "subkontra", but "'3" for "dreigestrichen")

Attention: According to Riemann ("Notenschrift und Notendruck. Festschrift zur 50-jährigen Jubelfeier des Bestehens der Firma Roeder", Leipzip 1896) historically there were many otherways to define octave registers: a upwards to g, f upwards to e, even b-natural upwards to b-flat! These variants are currently not implemented here.

  • Field Details

    • numericValue

      protected final int numericValue
      The numeric encoding. Follows the traditional way of assigning "1" to "e-prime", and "0" to "small-e".
    • byNum

      protected static final Map<Integer,OctaveRegister> byNum
      Local cache by numeric value.
    • catalog

      public static final EntityCatalog<OctaveRegister> catalog
      Catalog of all defined or used octave registers.
    • sk

      public static final OctaveRegister sk
      Octave register from c to c, midi label 0, classical label -3, "sub contra"
    • kt

      public static final OctaveRegister kt
      Octave register from c to c, midi label 1, classical label -2, "contra"
    • gr

      public static final OctaveRegister gr
      Octave register from c to c, midi label 2, classical label -1, "great"
    • kl

      public static final OctaveRegister kl
      Octave register from c to c, midi label 3, classical label 0, "small"
    • _1

      public static final OctaveRegister _1
      Octave register from c to c, midi label 4, classical label 1, "prime"/"one line"
    • _2

      public static final OctaveRegister _2
      Octave register from c to c, midi label 5, classical label 2, "two lines"
    • _3

      public static final OctaveRegister _3
      Octave register from c to c, midi label 6, classical label 3
    • _4

      public static final OctaveRegister _4
      Octave register from c to c, midi label 7, classical label 4
    • _5

      public static final OctaveRegister _5
      Octave register from c to c, midi label 8, classical label 5
    • _6

      public static final OctaveRegister _6
      Octave register from c to c, midi label 9, classical label 6
    • _7

      public static final OctaveRegister _7
      Octave register from c to c, midi label 10, classical label 7
  • Constructor Details

    • OctaveRegister

      protected OctaveRegister(int numeric, Map<String,String> names)
      Only constructor.
  • Method Details

    • compareTo

      public int compareTo(OctaveRegister other)
      Specified by:
      compareTo in interface Comparable<OctaveRegister>
    • byNumber

      public static OctaveRegister byNumber(int num)
      Returns the register defined for this numeric label (-3 = subcontra, 0=small, etc.)
    • byMidiLabel

      public static OctaveRegister byMidiLabel(int num)
      Returns the register defined for this midi-style numbering (0= subcontra, 3=small, etc.)
    • get_midiLabel

      public int get_midiLabel()
      Delivers the modern Jazz/Midi tradition, which assigns "3" to the "small octave" and "4" to the "prime octave".
    • get_numericValue

      public int get_numericValue()
      Delivers the register number in classical style (-3 = subcontra, 0=small, etc.)
    • add

      public OctaveRegister add(int i)
      Get the octave registers with the label given offset. If it does not exist, create it, and synthesize only the lilypond name by adding commas or apostrophes.
    • toString

      public String toString()
      Delivers the representation in the "lilypond" language.
      Overrides:
      toString in class Entity<OctaveRegister>