public class RecursiveSequenceGenerator
extends java.lang.Object
value[n] = value[n-delay] + offset;
The parameters delay and offset are randomly generated. This algorithm was first developed in
1977 for a class project in FORTRAN. It was ported to Forth for HMSL in the late 80's. It was
then ported to Java for JSyn in 1997.Constructor and Description |
---|
RecursiveSequenceGenerator() |
RecursiveSequenceGenerator(int maxValue,
int maxInterval,
int arraySize) |
Modifier and Type | Method and Description |
---|---|
double |
getDensity() |
int |
getMaxInterval() |
int |
getMaxValue() |
java.util.Random |
getRandom() |
boolean |
isNextEnabled(boolean preferance) |
int |
next()
Change parameters based on random countdown.
|
int |
next(int beatIndex)
Change parameters using a probability based on beatIndex.
|
int |
nextValue()
Generate nextValue based on current delay and offset
|
int |
randomEvenInterval()
Random number evenly distributed from -maxInterval to +maxInterval
|
void |
randomize() |
int |
randomPowerOf2(int maxExp) |
void |
setDensity(double density)
Set density of notes.
|
void |
setMaxInterval(int maxInterval)
Set maximum for generated value.
|
void |
setMaxValue(int maxValue)
Set maximum for generated value.
|
void |
setRandom(java.util.Random random) |
public RecursiveSequenceGenerator()
public RecursiveSequenceGenerator(int maxValue, int maxInterval, int arraySize)
public void setDensity(double density)
public double getDensity()
public void setMaxValue(int maxValue)
public int getMaxValue()
public void setMaxInterval(int maxInterval)
public int getMaxInterval()
public boolean isNextEnabled(boolean preferance)
public int randomPowerOf2(int maxExp)
public int randomEvenInterval()
public void randomize()
public int next()
public int next(int beatIndex)
public int nextValue()
public java.util.Random getRandom()
public void setRandom(java.util.Random random)