|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.util.Observable com.softsynth.jsyn.SynthObject com.softsynth.jsyn.SynthTable com.softsynth.jsyn.util.HarmonicTable
public class HarmonicTable
A table containing harmonics of a fundamental sine wave. This can be used to generate periodic waveforms using additive synthesis.
Field Summary | |
---|---|
short[] |
data
Generated waveform will be placed in this array. |
Constructor Summary | |
---|---|
HarmonicTable(int numSamples,
int numPartials)
|
Method Summary | |
---|---|
void |
build()
Generate a waveform by adding sinewaves partials. |
void |
clear()
Zero the ampltudes and the waveform. |
int |
getNumPartials()
|
double |
getPartial(int index)
|
void |
sawtooth()
Set amplitudes for sawtooth waveform. |
void |
setPartial(int index,
double amplitude)
Specify the relative amplitude for a harmonic partial. |
void |
square()
Set amplitudes for square waveform. |
void |
triangle()
Set amplitudes for triangle waveform. |
Methods inherited from class com.softsynth.jsyn.SynthTable |
---|
allocate, length, write, write, write, write, write, write |
Methods inherited from class com.softsynth.jsyn.SynthObject |
---|
delete, deleteAll, enableDeletionByGarbageCollector, enableTracking, getPeer, getSynthContext, isTrackingEnabled, toString, track |
Methods inherited from class java.util.Observable |
---|
addObserver, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public short[] data
Constructor Detail |
---|
public HarmonicTable(int numSamples, int numPartials) throws SynthException
SynthException
Method Detail |
---|
public void setPartial(int index, double amplitude)
public double getPartial(int index)
public int getNumPartials()
public void build()
public void square()
public void triangle()
public void sawtooth()
public void clear()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |