|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.softsynth.jmsl.util.Tuning com.softsynth.jmsl.util.TuningET
public class TuningET
TuningET Equal tempered Tuning
Example: TuningET western12 = new TuningET(12, 22.0); TuningET quarterTone = new TuningET(24, 22.0);
Field Summary | |
---|---|
static double |
BASE_FREQ
in unstretched 12 tone ET, BASE_FREQ = 8.175 can be used as lowest pitch |
static double |
MIDDLE_C_FREQ
in 12 tone ET, this reference frequency for pitch 60 ( Middle C ) is 261.6255653005986 Hz [This makes A4 440Hz] |
static double |
MIDDLE_C_PITCH
reference pitch 60 |
Constructor Summary | |
---|---|
TuningET()
Build ET tuning with pitch MIDDLE_C_PITCH (60) referenced to MIDDLE_C_FREQ (261.6255653005986 Hz), No octave stretch. |
|
TuningET(int stepsPerOctave)
Build ET tuning with specifie stepsPerOctave, uses pitch 0 referenced to BASE_FREQ (8.175 Hz) |
|
TuningET(int stepsPerOctave,
double baseFrequency)
Build ET tuning with pitch 0 referenced to baseFrequency |
|
TuningET(int stepsPerOctave,
double referenceFrequency,
double referencePitch,
int octaveStretchInCents)
Build ET tuning with pitch MIDDLE_C_PITCH (60) referenced to MIDDLE_C_FREQ (261.625565 Hz), specify octave stretch in cents |
|
TuningET(int stepsPerOctave,
double baseFrequency,
int octaveStretchInCents)
Build ET tuning with pitch 0 referenced to baseFrequency, adding octave stretch in cents. |
Method Summary | |
---|---|
double |
getBaseFrequency()
Deprecated. Use getReferenceFrequency() and getReferencePitch() |
double |
getFrequency(double pitch)
|
double |
getFrequency(double pitch,
int octaveNumber)
pitchIndex is 0..stepsPerOctave-1. |
double |
getNotesPerOctave()
Deprecated. use getStepsPerOctave() |
double |
getPitch(double frequency)
convert frequency to double precision pitch |
double |
getStepsPerOctave()
|
static void |
main(java.lang.String[] args)
|
void |
setBaseFrequency(double f)
Deprecated. Use setReferenceFrequency() and setReferencePitch() |
void |
setNotesPerOctave(double n)
Deprecated. use setStepsPerOctave() |
void |
setStepsPerOctave(double n)
|
Methods inherited from class com.softsynth.jmsl.util.Tuning |
---|
freqPlusCents, getOctaveRatio, getOctaveStretchCents, getReferenceFrequency, getReferencePitch, setOctaveRatio, setOctaveStretchCents, setReferenceFrequency, setReferencePitch, stretch |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final double BASE_FREQ
public static final double MIDDLE_C_FREQ
public static final double MIDDLE_C_PITCH
Constructor Detail |
---|
public TuningET()
public TuningET(int stepsPerOctave, double baseFrequency)
public TuningET(int stepsPerOctave, double baseFrequency, int octaveStretchInCents)
public TuningET(int stepsPerOctave, double referenceFrequency, double referencePitch, int octaveStretchInCents)
public TuningET(int stepsPerOctave)
Method Detail |
---|
public double getFrequency(double pitch, int octaveNumber)
getFrequency
in class Tuning
public double getPitch(double frequency)
public double getFrequency(double pitch)
getFrequency
in class Tuning
public void setBaseFrequency(double f)
public double getBaseFrequency()
public void setNotesPerOctave(double n)
public double getNotesPerOctave()
public void setStepsPerOctave(double n)
public double getStepsPerOctave()
getStepsPerOctave
in class Tuning
public static void main(java.lang.String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |