sonification
Class ToSoundFile

java.lang.Object
  extended by sonification.ToSoundFile

public class ToSoundFile
extends java.lang.Object

OscillatorFile Saving waveform data to a file (standard version) Purpose Generates waveform data (sine, square, ...) and saves them to a file. This program uses AudioSystem.write() to write the file. Usage java OscillatorFile audiofile Parameters the waveform to play. One of sine, sqaure, triangle and sawtooth. Default: sine. the frequency of the signal to create. Default: 1000 Hz. the sample rate to use. Default: 44.1 kHz. the amplitude of the generated signal. May range from 0.0 to 1.0. 1.0 means a full-scale wave. Default: 0.7. audiofile the name of the audio file to store the resulting waveform in. Bugs, limitations Full-scale waves can lead to clipping. It currently not known which component is responsible for this. Source code OscillatorFile.java, Oscillator.java, gnu.getopt.Getopt


Constructor Summary
ToSoundFile(double[][] curve, double sampleRate, java.lang.String fileName)
           
 
Method Summary
 void makeNoise(java.lang.String soundFormat)
           
static double[][] readData()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ToSoundFile

public ToSoundFile(double[][] curve,
                   double sampleRate,
                   java.lang.String fileName)
Method Detail

makeNoise

public void makeNoise(java.lang.String soundFormat)
               throws java.io.IOException
Throws:
java.io.IOException

readData

public static double[][] readData()
                           throws java.io.IOException
Throws:
java.io.IOException