Class FunctionalInterval
- All Implemented Interfaces:
Translet.Parseable<FunctionalInterval>
3*augmented fifth
".-
Field Summary
Modifier and TypeFieldDescriptionstatic final FunctionalInterval
static final FunctionalInterval
static final FunctionalInterval
static final FunctionalInterval
static final FunctionalInterval
static final FunctionalInterval
static final FunctionalInterval
static final FunctionalInterval
static final FunctionalInterval
static final FunctionalInterval
static final FunctionalInterval
static final FunctionalInterval
static final FunctionalInterval
static final FunctionalInterval
static final FunctionalInterval
static final FunctionalInterval
static final FunctionalInterval
static final FunctionalInterval
static final FunctionalInterval
All languages which put the modifier after the base name.protected static Map<Integer,
Map<Integer, FunctionalInterval>> Maps diatonicDistance to maps from halftone distance to functional interval.static final EntityCatalog<FunctionalInterval>
The catalog in which all functional intervals are contained, adressable either with human language or with a synthetic name.protected int
The number of scale degrees bridged by this interval, i.e.protected int
The number of half-tone steps bridged by this interval.protected final boolean
Indicates that this interval is larger than a seventh, i.e.Represents the modifiers for the intervals size.protected final boolean
Indicates that this interval has only one un-altered form.Contains the names of the unmodified base intervals.Fields inherited from class eu.bandm.tscore.base.Entity
documentations
-
Method Summary
Modifier and TypeMethodDescriptionaddHalfTone
(int ht) Return the interval resulting from adding the half-tone modification.static void
addModifierTranslation
(int mod, String lang, String text) Modifiers are encoded by integers, NOT by a scalar type, because conceptually they can grow infinitely.addOctave
(int octave) Return the interval resulting from adding the octave tone modification.static void
addScalarStepsName
(int steps, String lang, String name) Add a new translation for a base interval.static void
Add the given language to those which put the modifier after the base name.void
dump
(PrintStream ps) Make a debug print out.int
Returns the number of diatonic steps bridged by this interval.int
Returns the number of chromatic steps / half tone steps bridged by this interval.boolean
Returns whether the interval is larger than an octave, i.e.Returns the smallest form modulo octave, i.e.plus
(FunctionalInterval other) Return the interval resulting from adding both intervals.static void
After translations for modifiers and base scale steps have been added for further languages, all names must be calculated anew.times
(int i) Return the interval defined by i-times applying this interval.Transpose a functional pitch class down (modulo octave) by the functional interval.Transpose a functional pitch downward by the functional interval.Transpose a functional pitch class up (modulo octave) by the functional interval.Transpose a functional pitch upward by the functional interval.static FunctionalInterval
valueOf
(int scaleDistance, int halfToneDistance) Returns the interval with the given scale and halftone distances.Methods inherited from class eu.bandm.tscore.base.Entity
addName, dump, getCatalog, getDocumentation, getDocumentation, getDocumentations, getName, getName, getNames, getParser, getParser, setDocumentation, toString, toString
-
Field Details
-
modifiers
Represents the modifiers for the intervals size. Basically, there are "imperfect" intervals which exist in a "major" / "groß" / "large" variant and in a "minor" / "klein" / "small" variant, vs. "perfect" intervals which only have one (default) form. (Reflected here by the value ofperfectKind
)(The single default form of perfect intervals is sometimes named with the modifier "pure" / "rein", to emphasize the contrast to "diminished", etc., but the modifier "pure" can be left out, and should be left out whenever it could be mixed up with "pure tuning".)
The inverval which is one half-step larger than the major or the pure form is the augmented form. The interval which is one half-step larger than the augmented form is the double augmented form. The inverval which is one half-step smaller than the minor or the pure form is the diminished form. The interval which is one half-step smaller than the diminished form is the double diminished form.
-
scalarStepsNames
Contains the names of the unmodified base intervals. Indexed by the number of diatonic steps they bridge. -
appendModifiers
All languages which put the modifier after the base name. -
catalog
The catalog in which all functional intervals are contained, adressable either with human language or with a synthetic name. Both kinds of names are calculated automatically from the basic interval names inscalarStepsNames
and the modifiers inmodifiers
. -
diatonicDistance
protected int diatonicDistanceThe number of scale degrees bridged by this interval, i.e. the number of keys of one particular diatonic scale. (This distance is the historic origin of the names of the intervals, when including also the start point in the figure. The "second" is the interval which goes one(1) step upward the diatonic scale. -
halfToneDistance
protected int halfToneDistanceThe number of half-tone steps bridged by this interval. This is the number of physical keys on a chromatic keyboard, not considering a diatonic context. -
byDiatonicDistance
Maps diatonicDistance to maps from halftone distance to functional interval. -
perfectKind
protected final boolean perfectKindIndicates that this interval has only one un-altered form. -
isOvershooting
protected final boolean isOvershootingIndicates that this interval is larger than a seventh, i.e. not relevant harmonically. -
_1
-
_kl2
-
_gr2
-
_kl3
-
_gr3
-
_4
-
_ue4
-
_verm5
-
_5
-
_kl6
-
_gr6
-
_kl7
-
_gr7
-
_okt
-
_klNon
-
_grNon
-
_klDez
-
_grDez
-
_2okt
-
-
Method Details
-
addModifierTranslation
Modifiers are encoded by integers, NOT by a scalar type, because conceptually they can grow infinitely.- 4 = augmented augmented augmented etc. (<-- synthesized, if not defined)
- 3 = double augmented
- 2 = augmented
- 1 = large/major
- 0 = pure/unmodified/rein
- -1 = small/minor
- -2 = diminished
- -3 = double diminished
- -4 = diminished^3 (<-- synthesized, if not defined)
-
addScalarStepsName
Add a new translation for a base interval. SeescalarStepsNames
. -
declareLanguageToAppendModifiers
Add the given language to those which put the modifier after the base name. -
moduloOctave
Returns the smallest form modulo octave, i.e. a harmonically relevant interval. -
valueOf
Returns the interval with the given scale and halftone distances. If no instance exists, a new one is created and a name is constructed in every language ever used for base intervals and modifiers. -
rehashNames
public static void rehashNames()After translations for modifiers and base scale steps have been added for further languages, all names must be calculated anew.The implemented algorithm assumes that adding a name is IDEMPOTENT! FIXME CHECK
-
times
Return the interval defined by i-times applying this interval.- Parameters:
i
- must be >= 0
-
plus
Return the interval resulting from adding both intervals. -
addHalfTone
Return the interval resulting from adding the half-tone modification. -
addOctave
Return the interval resulting from adding the octave tone modification.- Parameters:
octave
- must CURRENTLY FIXME be >= 0
-
get_diatonicDistance
public int get_diatonicDistance()Returns the number of diatonic steps bridged by this interval. -
get_halfToneDistance
public int get_halfToneDistance()Returns the number of chromatic steps / half tone steps bridged by this interval. -
get_isOvershooting
public boolean get_isOvershooting()Returns whether the interval is larger than an octave, i.e. harmonically (in the narrowest sense) not relevant. -
dump
Make a debug print out.- Overrides:
dump
in classEntity<FunctionalInterval>
-
transpose_up
Transpose a functional pitch upward by the functional interval. -
transpose_down
public FunctionalPitch transpose_down(PitchAndOctave<OctaveRegister, FunctionalPitchModOctave> pitch) Transpose a functional pitch downward by the functional interval. -
transpose_up
Transpose a functional pitch class up (modulo octave) by the functional interval. -
transpose_down
Transpose a functional pitch class down (modulo octave) by the functional interval.
-