com.softsynth.jmsl.util
Class PtolemyTuning

java.lang.Object
  extended by com.softsynth.jmsl.util.Tuning
      extended by com.softsynth.jmsl.util.TuningTable
          extended by com.softsynth.jmsl.util.PtolemyTuning

public class PtolemyTuning
extends TuningTable


Constructor Summary
PtolemyTuning()
           
 
Method Summary
static void main(java.lang.String[] args)
          Hear Ptolemy in the left channel, 12TET in the right
 
Methods inherited from class com.softsynth.jmsl.util.TuningTable
getFrequencies, getFrequency, getFrequency, 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
 

Constructor Detail

PtolemyTuning

public PtolemyTuning()
Method Detail

main

public static void main(java.lang.String[] args)
Hear Ptolemy in the left channel, 12TET in the right
          public static void main(String args[]) {
                JSynMusicDevice.instance().open();
                JMSL.clock.setAdvance(0.1);

                JSynInsFromClassName insPtolemy = new JSynInsFromClassName(8, "com.softsynth.jsyn.circuits.FilteredSawtoothBL");
                insPtolemy.setName("Ptolemy");
                JSynInsFromClassName ins12TET = new JSynInsFromClassName(8, "com.softsynth.jsyn.circuits.FilteredSawtoothBL");
                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());
        }