public class Waves
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static Wavetable |
PHASOR
A perfect phasor wave going from 0 to 1.
|
static Wavetable |
QUARTERPULSE
A perfect square wave with a 25% duty cycle.
|
static Wavetable |
SAW
A perfect sawtooth wave.
|
static Wavetable |
SINE
A pure sine wave.
|
static Wavetable |
SQUARE
A perfect square wave with a 50% duty cycle.
|
static Wavetable |
TRIANGLE
A perfect triangle wave.
|
Constructor and Description |
---|
Waves() |
Modifier and Type | Method and Description |
---|---|
static Wavetable |
add(float[] amps,
Wavetable... waves)
Adds any number of Wavetables, each with their own amplitude
|
static Wavetable |
pulse(float dutyCycle)
Constructs a square wave with specficed duty cycle.
|
static Wavetable |
randomNHarms(int numberOfHarms)
Constructs a wave from the first numberofHarms harmonics given random amplitudes.
|
static Wavetable |
randomNOddHarms(int numberOfHarms)
Constructs a wave from the numberOfHarms even harmonics given random amplitudes.
|
static Wavetable |
randomNoise()
Constructs a wavetable of noise
|
static Wavetable |
saw(float dutyCycle)
Constructs a sawtooth wave with specficed duty cycle.
|
static Wavetable |
saw(int numberOfHarms)
Builds a sawtooth wave from the first numberofHarms harmonics.
|
static Wavetable |
square(float dutyCycle)
Constructs a square wave with specficed duty cycle.
|
static Wavetable |
square(int numberOfHarms)
Builds a square wave from the first numberofHarms harmonics.
|
static Wavetable |
triangle(float dutyCycle)
Constructs a triangle wave with specficed duty cycle.
|
static Wavetable |
triangle(int numberOfHarms)
Builds a triangle wave from the first numberofHarms harmonics.
|
public static final Wavetable SINE
public static final Wavetable SAW
public static final Wavetable PHASOR
public static final Wavetable SQUARE
public static final Wavetable TRIANGLE
public static final Wavetable QUARTERPULSE
public static Wavetable saw(int numberOfHarms)
numberOfHarms
- public static Wavetable square(int numberOfHarms)
numberOfHarms
- public static Wavetable triangle(int numberOfHarms)
numberOfHarms
- public static Wavetable pulse(float dutyCycle)
dutyCycle
- public static Wavetable triangle(float dutyCycle)
dutyCycle
- public static Wavetable saw(float dutyCycle)
dutyCycle
- public static Wavetable square(float dutyCycle)
dutyCycle
- public static Wavetable randomNHarms(int numberOfHarms)
numberOfHarms
- public static Wavetable randomNOddHarms(int numberOfHarms)
numberOfHarms
- public static Wavetable randomNoise()