com.jsyn.engine
Class MultiTable

java.lang.Object
  extended by com.jsyn.engine.MultiTable

public class MultiTable
extends java.lang.Object


Field Summary
static int CYCLE_SIZE
           
static int NUM_TABLES
           
 
Constructor Summary
MultiTable(int numTables, int cycleSize)
          Initialise sawtooth wavetables.
 
Method Summary
 double calculateSawtooth(double currentPhase, double positivePhaseIncrement, double flevel)
           
 double convertPhaseIncrementToLevel(double positivePhaseIncrement)
           
static MultiTable getInstance()
           
static float normalizeArray(float[] fdata)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NUM_TABLES

public static final int NUM_TABLES
See Also:
Constant Field Values

CYCLE_SIZE

public static final int CYCLE_SIZE
See Also:
Constant Field Values
Constructor Detail

MultiTable

public MultiTable(int numTables,
                  int cycleSize)
Initialise sawtooth wavetables. Table[0] should contain a pure sine wave. Succeeding tables should have increasing numbers of partials.

Method Detail

normalizeArray

public static float normalizeArray(float[] fdata)

calculateSawtooth

public double calculateSawtooth(double currentPhase,
                                double positivePhaseIncrement,
                                double flevel)

convertPhaseIncrementToLevel

public double convertPhaseIncrementToLevel(double positivePhaseIncrement)

getInstance

public static MultiTable getInstance()