com.softsynth.jmsl.jsyn
Class WAVRecorderPanel

java.lang.Object
  extended by com.softsynth.jmsl.view.PVPanelAdapter
      extended by com.softsynth.jmsl.jsyn.WAVRecorderPanel
All Implemented Interfaces:
PVComponent, PVPanel, java.awt.event.ActionListener, java.util.EventListener

public class WAVRecorderPanel
extends PVPanelAdapter
implements java.awt.event.ActionListener

GUI for WAV recorder. Included in JSynMixer, but you can use it independently.
Simple to use:

 com.softsynth.jmsl.jsyn.WAVRecorderPanel p = new com.softsynth.jmsl.jsyn.WAVRecorderPanel();
 try {
      p.buildWAVRecorder("test.WAV", 2);
 } catch (IOException ioe) {
     System.out.println("Error opening WAV file for output: " + ioe);
 }
 mySynthCircuit.output.connect(0, p.getInput(), 0);
 mySynthCircuit.output.connect(1, p.getInput(), 1); // make first part number 0 if mySynthCircuit only has one part
 myFrameOrPanel.add(p.getComponent());
 

Author:
Nick Didkovsky, 10/8/00

Constructor Summary
WAVRecorderPanel()
           
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
           
 void addWAVRecorderPanelListener(WAVRecorderPanelListener listener)
           
 void buildWAVRecorder(java.lang.String filename, int numChannels)
           
 void connect(com.softsynth.jsyn.SynthOutput sig, int partNum)
           
 com.softsynth.jsyn.SynthInput getInput()
           
 void handleStop()
           
static void main(java.lang.String[] args)
          A slow, panning gliss captured to a raw stereo soundfile.
 void removeWAVRecorderPanelListener(WAVRecorderPanelListener listener)
           
 
Methods inherited from class com.softsynth.jmsl.view.PVPanelAdapter
add, add, addKeyListener, equals, getBackground, getBounds, getComponent, getFont, getParent, hashCode, isEnabled, remove, removeAll, removeKeyListener, setBackground, setEnabled, setFont, setLayout, setLocation, setVisible, toString, validate
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WAVRecorderPanel

public WAVRecorderPanel()
Method Detail

addWAVRecorderPanelListener

public void addWAVRecorderPanelListener(WAVRecorderPanelListener listener)

removeWAVRecorderPanelListener

public void removeWAVRecorderPanelListener(WAVRecorderPanelListener listener)

buildWAVRecorder

public void buildWAVRecorder(java.lang.String filename,
                             int numChannels)
                      throws java.io.IOException
Throws:
java.io.IOException

getInput

public com.softsynth.jsyn.SynthInput getInput()

connect

public void connect(com.softsynth.jsyn.SynthOutput sig,
                    int partNum)

handleStop

public void handleStop()
                throws java.io.IOException
Throws:
java.io.IOException

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
Specified by:
actionPerformed in interface java.awt.event.ActionListener

main

public static void main(java.lang.String[] args)
A slow, panning gliss captured to a raw stereo soundfile. Sound starts right away, so hit "record" button soon! Then listen to test.wav
 
 
 // BUILD RECORDER PANEL AND CONNECT IT
 WAVRecorderPanel p = new WAVRecorderPanel();
 p.buildWAVRecorder("test.WAV", 2);
 panner.output.connect(0, p.getInput(), 0);
 panner.output.connect(1, p.getInput(), 1);