|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jsyn.data.SequentialDataCommon
com.jsyn.data.SegmentedEnvelope
public class SegmentedEnvelope
Store an envelope as a series of line segments. Each line is described as a duration and a target value.
Constructor Summary | |
---|---|
SegmentedEnvelope(double[] pairs)
|
|
SegmentedEnvelope(int numFrames)
|
Method Summary | |
---|---|
void |
allocate(int numFrames)
|
int |
getChannelsPerFrame()
|
int |
getNumFrames()
|
double |
getRateScaler(int index,
double synthesisPeriod)
Get rate to play the data. |
void |
read(double[] data)
|
void |
read(int startFrame,
double[] data,
int startIndex,
int numToRead)
|
double |
readDouble(int index)
Read the value of an envelope, not the duration. |
void |
write(double[] data)
|
void |
write(int startFrame,
double[] data,
int startIndex,
int numToWrite)
Write frames of envelope data. |
void |
writeDouble(int index,
double value)
Write a value at the given index. |
Methods inherited from class com.jsyn.data.SequentialDataCommon |
---|
getReleaseBegin, getReleaseEnd, getSustainBegin, getSustainEnd, setReleaseBegin, setReleaseEnd, setSustainBegin, setSustainEnd |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SegmentedEnvelope(int numFrames)
public SegmentedEnvelope(double[] pairs)
Method Detail |
---|
public void allocate(int numFrames)
public void write(int startFrame, double[] data, int startIndex, int numToWrite)
startFrame
- Index of frame in envelope to write to.data
- Pairs of duration and value.startIndex
- Index of frame in data[] to read from.numToWrite
- Number of frames (pairs) to write.public void read(int startFrame, double[] data, int startIndex, int numToRead)
public void write(double[] data)
public void read(double[] data)
public double readDouble(int index)
readDouble
in interface SequentialData
readDouble
in class SequentialDataCommon
public void writeDouble(int index, double value)
SequentialData
writeDouble
in interface SequentialData
writeDouble
in class SequentialDataCommon
public double getRateScaler(int index, double synthesisPeriod)
SequentialData
getRateScaler
in interface SequentialData
getRateScaler
in class SequentialDataCommon
public int getChannelsPerFrame()
getChannelsPerFrame
in interface SequentialData
getChannelsPerFrame
in class SequentialDataCommon
public int getNumFrames()
getNumFrames
in interface SequentialData
getNumFrames
in class SequentialDataCommon
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |