Package com.softsynth.jmsl.util
Class PtolemyTuning
java.lang.Object
com.softsynth.jmsl.util.Tuning
com.softsynth.jmsl.util.TuningTable
com.softsynth.jmsl.util.PtolemyTuning
public class PtolemyTuning extends TuningTable
-
Field Summary
Fields Modifier and Type Field Description static double[]
ratios
static double[] ratios = { TuningET.BASE_FREQ * 1.0, TuningET.BASE_FREQ * 16 / 15.0, TuningET.BASE_FREQ * 6 / 5.0, TuningET.BASE_FREQ * 5 / 4.0, TuningET.BASE_FREQ * 4 / 3.0, TuningET.BASE_FREQ * 45 / 32.0, TuningET.BASE_FREQ * 3 / 2.0, TuningET.BASE_FREQ * 8 / 5.0, TuningET.BASE_FREQ * 5 / 3.0, TuningET.BASE_FREQ * 9 / 5.0, TuningET.BASE_FREQ * 15 / 8.0 }; -
Constructor Summary
Constructors Constructor Description PtolemyTuning()
-
Method Summary
Modifier and Type Method Description static void
main(java.lang.String[] args)
Hear Ptolemy in the left channel, 12TET in the rightMethods inherited from class com.softsynth.jmsl.util.TuningTable
getFrequencies, getFrequency, getFrequency, getPitchClass, getStepsPerOctave, setFrequencies, setPitch, stretch, toString
Methods inherited from class com.softsynth.jmsl.util.Tuning
freqPlusCents, getOctaveRatio, getOctaveStretchCents, getReferenceFrequency, getReferencePitch, setOctaveRatio, setOctaveStretchCents, setReferenceFrequency, setReferencePitch
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Field Details
-
ratios
public static double[] ratiosstatic double[] ratios = { TuningET.BASE_FREQ * 1.0, TuningET.BASE_FREQ * 16 / 15.0, TuningET.BASE_FREQ * 6 / 5.0, TuningET.BASE_FREQ * 5 / 4.0, TuningET.BASE_FREQ * 4 / 3.0, TuningET.BASE_FREQ * 45 / 32.0, TuningET.BASE_FREQ * 3 / 2.0, TuningET.BASE_FREQ * 8 / 5.0, TuningET.BASE_FREQ * 5 / 3.0, TuningET.BASE_FREQ * 9 / 5.0, TuningET.BASE_FREQ * 15 / 8.0 };
-
-
Constructor Details
-
PtolemyTuning
public PtolemyTuning()
-
-
Method Details
-
main
public static void main(java.lang.String[] args)Hear Ptolemy in the left channel, 12TET in the rightpublic static void main(String args[]) { JSynMusicDevice.instance().open(); JMSL.clock.setAdvance(0.1); JSynUnitVoiceInstrument insPtolemy = new JSynUnitVoiceInstrument(8, com.softsynth.jmsl.jsyn2.unitvoices.FilteredSawtoothBL.class.getName()); insPtolemy.setName("Ptolemy"); JSynUnitVoiceInstrument ins12TET = new JSynUnitVoiceInstrument(8, com.softsynth.jmsl.jsyn2.unitvoices.FilteredSawtoothBL.class.getName()); ins12TET.setName("12tet"); JMSLMixerContainer mixer = new JMSLMixerContainer(); mixer.start(); mixer.addInstrument(insPtolemy, 0, 0.5); mixer.addInstrument(ins12TET, 1, 0.5); insPtolemy.setTuning(new PtolemyTuning()); // leave ins2 12tet MusicShape s1 = new MusicShape(4); s1.setInstrument(insPtolemy); s1.add(1.0, 60.0, 0.15, 4.0); s1.add(1.0, 62.0, 0.15, 4.0); s1.add(1.0, 64.0, 0.15, 4.0); s1.add(1.0, 65.0, 0.15, 4.0); s1.add(1.0, 67.0, 0.15, 4.0); s1.add(1.0, 69.0, 0.15, 4.0); s1.add(1.0, 71.0, 0.15, 4.0); s1.add(1.0, 72.0, 0.15, 6.0); MusicShape s2 = (MusicShape) s1.clone(); s2.setInstrument(ins12TET); Frame f = new Frame(); f.addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent e) { JMSL.closeMusicDevices(); System.exit(0); } }); f.add(mixer.getPanAmpControlPanel()); f.pack(); f.setVisible(true); ParallelCollection col = new ParallelCollection(s1, s2); col.launch(JMSL.now()); }
-