Package eu.bandm.music.entities
Class OctaveRegister
- All Implemented Interfaces:
Translet.Parseable<OctaveRegister>
,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 Summary
Modifier and TypeFieldDescriptionstatic final OctaveRegister
Octave register from c to c, midi label 4, classical label 1, "prime"/"one line"static final OctaveRegister
Octave register from c to c, midi label 5, classical label 2, "two lines"static final OctaveRegister
Octave register from c to c, midi label 6, classical label 3static final OctaveRegister
Octave register from c to c, midi label 7, classical label 4static final OctaveRegister
Octave register from c to c, midi label 8, classical label 5static final OctaveRegister
Octave register from c to c, midi label 9, classical label 6static final OctaveRegister
Octave register from c to c, midi label 10, classical label 7protected static final Map<Integer,
OctaveRegister> Local cache by numeric value.static final EntityCatalog<OctaveRegister>
Catalog of all defined or used octave registers.static final OctaveRegister
Octave register from c to c, midi label 2, classical label -1, "great"static final OctaveRegister
Octave register from c to c, midi label 3, classical label 0, "small"static final OctaveRegister
Octave register from c to c, midi label 1, classical label -2, "contra"protected final int
The numeric encoding.static final OctaveRegister
Octave register from c to c, midi label 0, classical label -3, "sub contra"Fields inherited from class eu.bandm.tscore.base.Entity
documentations
-
Constructor Summary
ModifierConstructorDescriptionprotected
OctaveRegister
(int numeric, Map<String, String> names) Only constructor. -
Method Summary
Modifier and TypeMethodDescriptionadd
(int i) Get the octave registers with the label given offset.static OctaveRegister
byMidiLabel
(int num) Returns the register defined for this midi-style numbering (0= subcontra, 3=small, etc.)static OctaveRegister
byNumber
(int num) Returns the register defined for this numeric label (-3 = subcontra, 0=small, etc.)int
compareTo
(OctaveRegister other) int
Delivers the modern Jazz/Midi tradition, which assigns "3" to the "small octave" and "4" to the "prime octave".int
Delivers the register number in classical style (-3 = subcontra, 0=small, etc.)toString()
Delivers the representation in the "lilypond" language.Methods inherited from class eu.bandm.tscore.base.Entity
addName, dump, dump, getCatalog, getDocumentation, getDocumentation, getDocumentations, getName, getName, getNames, getParser, getParser, setDocumentation, toString
-
Field Details
-
numericValue
protected final int numericValueThe numeric encoding. Follows the traditional way of assigning "1" to "e-prime", and "0" to "small-e". -
byNum
Local cache by numeric value. -
catalog
Catalog of all defined or used octave registers. -
sk
Octave register from c to c, midi label 0, classical label -3, "sub contra" -
kt
Octave register from c to c, midi label 1, classical label -2, "contra" -
gr
Octave register from c to c, midi label 2, classical label -1, "great" -
kl
Octave register from c to c, midi label 3, classical label 0, "small" -
_1
Octave register from c to c, midi label 4, classical label 1, "prime"/"one line" -
_2
Octave register from c to c, midi label 5, classical label 2, "two lines" -
_3
Octave register from c to c, midi label 6, classical label 3 -
_4
Octave register from c to c, midi label 7, classical label 4 -
_5
Octave register from c to c, midi label 8, classical label 5 -
_6
Octave register from c to c, midi label 9, classical label 6 -
_7
Octave register from c to c, midi label 10, classical label 7
-
-
Constructor Details
-
OctaveRegister
Only constructor.
-
-
Method Details
-
compareTo
- Specified by:
compareTo
in interfaceComparable<OctaveRegister>
-
byNumber
Returns the register defined for this numeric label (-3 = subcontra, 0=small, etc.) -
byMidiLabel
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
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
Delivers the representation in the "lilypond" language.- Overrides:
toString
in classEntity<OctaveRegister>
-