public Synthesizer() {
        for (int i = 0; i < voices.length; i++) {
            voices[i] = new Voice();
            voices[i].setSourceShape(WaveShapes.SINE, 0.5f);
        }

        //32khz samplerate, 8 bit depth, 1 channel, signed, big endian
        AudioFormat format = new AudioFormat(SAMPLE_RATE, 8, 1, true, true);
        System.out.println("Trying to open an output stream...");
        try {
            lineOut = AudioSystem.getSourceDataLine(format);
            lineOut.open();
            lineOut.start();
            lowBufferThreshold = Math.round(lineOut.getBufferSize() * .05f);
            System.out.println("Opened output stream sucessfully!\n");
        } catch (LineUnavailableException lue) {
            System.out.println("Could not open line out!");
            System.out.println("Exception thrown: " + lue);
        }

        outputHistory = new ArrayList();
    }