public class MelodySequenceEngine extends AbstractSequenceEngine
AbstractSequenceEngine.PatternRestartMode
logger, patternRestartMode, randomSeed
Constructor and Description |
---|
MelodySequenceEngine()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
configure(SongContext songContext,
Node node)
Configures the instance using the specified XML node.
|
int |
getMaxPitch() |
int |
getMinPitch() |
int[] |
getPitchDistances() |
Track |
render(SongContext songContext,
ActivityVector[] activityVectors)
Renders one or more sequences (i.e., voices) as a track.
|
void |
setMaxPitch(int maxPitch) |
void |
setMelodies(int[] melodies) |
void |
setMinPitch(int minPitch) |
void |
setPattern(Pattern pattern) |
void |
setPitchDistances(int[] pitchDistances) |
configurePatternRestartMode, getActivityVectorCount, getNextPatternRestartTick, getRandomSeed, setPatternRestartMode, setRandomSeed
public Track render(SongContext songContext, ActivityVector[] activityVectors)
SequenceEngine
songContext
- the song contextactivityVectors
- the activity vectorspublic void configure(SongContext songContext, Node node) throws XPathException
XMLConfigurable
songContext
- the song contextnode
- the parent XML node of the configuration tagsXPathException
- in case of an XPath problempublic void setPattern(Pattern pattern)
public int getMinPitch()
public void setMinPitch(int minPitch)
public int getMaxPitch()
public void setMaxPitch(int maxPitch)
public int[] getPitchDistances()
public void setPitchDistances(int[] pitchDistances)
public void setMelodies(int[] melodies)