DixShtix

com.dixshtix.audio.pitch
Class LinearTemperament

java.lang.Object
  |
  +--com.dixshtix.audio.pitch.AbstractTuning
        |
        +--com.dixshtix.audio.pitch.LinearTemperament

public class LinearTemperament
extends AbstractTuning

Linear Temperament is a system of altering fifths and thirds to make them "fit" into an octave.

There are two quite different kinds of temperament, the Linear and the Cyclic. The Linear contains an endless series of notes which never recur in pitch (because no combination of fifths and major thirds can be comeasurate with an octave). The cyclic contains also an endless series of notes which, however, do recur in pitch. Hence in Cyclic temperaments, all the intervals are made up of equal parts of an Octave. The advantage of the Cyclic over the Linear temperaments consists chiefly in a power of endless modulation, at the cost of harmoniousness.

Let us suppose that in any system of temperaments,

V
represents the adopted interval of a fifth.
T
represents the adopted interval of a major third.
K
represents the adopted interval corresponding to a Comma.
S
represents the adopted interval corresponding to a Skhisma.
O
represents the (perfect) interval of the octave.
Then the following relations must hold: , which imply: . Thus there only two independent equations among the four adopted intervals. K and S can be derived from V and T by the following relations: . Hence, on assuming values for any two of these intervals, we may find corresponding values for the other two. But no results are of any European interest unless V and T are very close to the values of AbstractTuning.justFifth and AbstractTuning.majorThird.

Version:
0.1
Author:
Richard C. Penner II

Field Summary
private  java.lang.String highNote
           
private  double K
           
private  java.lang.String lowNote
           
private  java.lang.String name
           
private  java.lang.String octaveBase
           
private  double S
           
private  double T
           
private  java.lang.String tuneBase
           
private  double tuneFrequency
           
private  double V
           
 
Fields inherited from class com.dixshtix.audio.pitch.AbstractTuning
A, Af, Aff, As, Ass, B, Bf, Bff, Bs, Bss, C, Cf, Cff, circleOfFifths, comma, Cs, Css, D, Df, Dff, didymusComma, doubleFlat, doubleSharp, Ds, Dss, E, Ef, Eff, equalTemperedFifth, equalTemperedThird, Es, Ess, F, Ff, Fff, flat, Fs, Fss, G, Gf, Gff, Gs, Gss, hemholtzFifth, justFifth, justOctave, majorThird, meantoneFifth, mercatorialComma, mercatorialFifth, pythagoreanComma, pythagoreanDiesis, sharp, skhisma, skhismicMajorThird
 
Constructor Summary
protected LinearTemperament(java.lang.String name, double V, double T, double K, double S)
           
 
Method Summary
 double getComma()
           
static double getCommaFromFifthAndThird(double V, double T)
          K = 4 V - T - 2 O
 double getFifth()
           
static double getFifthFromCommaAndSkhisma(double K, double S)
          V = 700 Cents + ( K + S ) / 12
 java.lang.String getName()
           
 java.lang.String getOctaveBase()
           
 double getSkhisma()
           
static double getSkhismaFromFifthAndComma(double V, double K)
          S = 12 V - 7 O - K
static double getSkhismaFromFifthAndThird(double V, double T)
          S = 8 V + T - 5 O
 double getThird()
           
static double getThirdFromCommaAndSkhisma(double K, double S)
          T = 400 Cents - ( 2 K - S ) / 3
static double getThirdFromFifthAndComma(double V, double K)
          T = 4 V - 2 O - K
 void setNoteRange(java.lang.String lowNoteName, java.lang.String highNoteName)
           
 void setOctaveBase(java.lang.String noteName)
           
 void tune(java.lang.String noteName, double baseFrequency)
           
 
Methods inherited from class com.dixshtix.audio.pitch.AbstractTuning
centsToInterval, intervalToCents
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

name

private final java.lang.String name

V

private final double V

T

private final double T

K

private final double K

S

private final double S

octaveBase

private java.lang.String octaveBase

tuneBase

private java.lang.String tuneBase

tuneFrequency

private double tuneFrequency

lowNote

private java.lang.String lowNote

highNote

private java.lang.String highNote
Constructor Detail

LinearTemperament

protected LinearTemperament(java.lang.String name,
                            double V,
                            double T,
                            double K,
                            double S)
Method Detail

getName

public java.lang.String getName()

getFifth

public double getFifth()

getThird

public double getThird()

getComma

public double getComma()

getSkhisma

public double getSkhisma()

setOctaveBase

public void setOctaveBase(java.lang.String noteName)

getOctaveBase

public java.lang.String getOctaveBase()

tune

public void tune(java.lang.String noteName,
                 double baseFrequency)

setNoteRange

public void setNoteRange(java.lang.String lowNoteName,
                         java.lang.String highNoteName)

getFifthFromCommaAndSkhisma

public static double getFifthFromCommaAndSkhisma(double K,
                                                 double S)
V = 700 Cents + ( K + S ) / 12

getThirdFromCommaAndSkhisma

public static double getThirdFromCommaAndSkhisma(double K,
                                                 double S)
T = 400 Cents - ( 2 K - S ) / 3

getThirdFromFifthAndComma

public static double getThirdFromFifthAndComma(double V,
                                               double K)
T = 4 V - 2 O - K

getCommaFromFifthAndThird

public static double getCommaFromFifthAndThird(double V,
                                               double T)
K = 4 V - T - 2 O

getSkhismaFromFifthAndThird

public static double getSkhismaFromFifthAndThird(double V,
                                                 double T)
S = 8 V + T - 5 O

getSkhismaFromFifthAndComma

public static double getSkhismaFromFifthAndComma(double V,
                                                 double K)
S = 12 V - 7 O - K

DixShtix