|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.frinika.contrib.boblang.WaveSupport
public class WaveSupport
Support methods for creating PCM wave forms
| Field Summary | |
|---|---|
static double |
MAX_AMPLITUDE
|
static int |
MAX_GRAPH_HANDLE
|
static int |
PROP_COPY
|
static int |
PROP_GLIDE
|
static int |
PROP_ROTATE
|
| Constructor Summary | |
|---|---|
WaveSupport()
|
|
| Method Summary | |
|---|---|
static void |
addGraph(int handle,
java.awt.Color inColour,
int[] inArray,
int inElements)
Method to add a further plot to an existing graph. |
static void |
addGraph(int handle,
java.awt.Color inColour,
int[] inArray,
int inFirst,
int inLast)
Method to add an array subset as a further plot to an existing graph. |
static int[] |
changeWaveLength(int[] inWave,
int newWaveLength)
Method to change the wavelength waveform using linear interpolation. |
static int[] |
filter(int[] halfWave,
int filterWidth,
int option)
Method to apply a rectangular filter to a half wave and return the resulting filtered output. |
static int[] |
increasingFilter(int[] halfWave,
int filterWidth,
int filterIncr,
int desiredSize,
int option)
Method to apply an increasing filter across a waveform. |
static double |
localCosine(double degrees)
Local version of cosine method (with parameter in degrees) |
static double |
localSine(double degrees)
Local version of sine method (with parameter in degrees) |
static void |
plotFourier(int handle,
double[] inArray,
int fourierSamples,
int sampleRate,
int inElements)
Method to plot the data in as a FFT. |
static void |
plotGraph(int handle,
java.lang.String inTitle,
java.lang.String inSubTitle,
java.lang.String inXTitle,
java.lang.String inYTitle,
int[] inArray,
int inElements)
Method to plot an array as a graph. |
static void |
plotGraph(int handle,
java.lang.String inTitle,
java.lang.String inSubTitle,
java.lang.String inXTitle,
java.lang.String inYTitle,
int[] inArray,
int inFirst,
int inLast)
Method to plot a section of an array as a graph. |
static int[] |
propagate(int[] halfWave,
int desiredSize,
int option)
Method to propagate a waveform to fill a complete array. |
static int[] |
rescale(int[] waveform)
Rescale the wave form so it uses (most of) the full dynamic range. |
static int[] |
rescale(int[] waveform,
double amplitude)
Rescale the wave form so it uses the dynamic range specified by the given amplitude. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int PROP_COPY
public static final int PROP_GLIDE
public static final int PROP_ROTATE
public static final double MAX_AMPLITUDE
public static final int MAX_GRAPH_HANDLE
| Constructor Detail |
|---|
public WaveSupport()
| Method Detail |
|---|
public static int[] rescale(int[] waveform,
double amplitude)
waveform - - array containing the waveform to be rescaledamplitude - - amplitude of the rescaled waveformpublic static int[] rescale(int[] waveform)
waveform - - array containing the waveform to be rescaled
public static int[] propagate(int[] halfWave,
int desiredSize,
int option)
halfWave - - an array containing a half wavedesiredSize - - the number of samples in the output arrayoption - - the propagation option
public static int[] filter(int[] halfWave,
int filterWidth,
int option)
public static int[] increasingFilter(int[] halfWave,
int filterWidth,
int filterIncr,
int desiredSize,
int option)
halfWave - - an array containing a half wavefilterWidth - - the initial filterWidthfilterIncr - - number of samples at which filter incrementsdesiredSize - - the number of samples in the output arrayoption - - the propagation option
public static int[] changeWaveLength(int[] inWave,
int newWaveLength)
public static void plotGraph(int handle,
java.lang.String inTitle,
java.lang.String inSubTitle,
java.lang.String inXTitle,
java.lang.String inYTitle,
int[] inArray,
int inElements)
handle - - graph window to create or re-useinTitle - - The overall graph titleinXTitle - - X axis titleinYTitle - - Y axis titleinArray - - array to be plottedinElements - - number of elements to plot
public static void plotGraph(int handle,
java.lang.String inTitle,
java.lang.String inSubTitle,
java.lang.String inXTitle,
java.lang.String inYTitle,
int[] inArray,
int inFirst,
int inLast)
handle - - graph window to create or re-useinTitle - - The overall graph titleinXTitle - - X axis titleinYTitle - - Y axis titleinArray - - array to be plottedinFirst - - first element to plotinLast - - last element to plot
public static void addGraph(int handle,
java.awt.Color inColour,
int[] inArray,
int inElements)
handle - - graph window to create or re-useinArray - - array to be plottedinElements - - number of elements to plot
public static void addGraph(int handle,
java.awt.Color inColour,
int[] inArray,
int inFirst,
int inLast)
handle - - graph window to create or re-useinArray - - array to be plottedinElements - - number of elements to plot
public static void plotFourier(int handle,
double[] inArray,
int fourierSamples,
int sampleRate,
int inElements)
handle - - graph window to create or re-useinArray - - output from FFTfourierSamples - - number of samples in FFTsampleRate - - sample rate in samples/secinElements - - number of elements to plotpublic static final double localSine(double degrees)
public static final double localCosine(double degrees)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||