MKSynthData Class In addition to patchpoints, you may need other
DSP memory. For example, you may want to load
a wave table. To do this, you allocate a
MKSynthData object.
To allocate a MKSynthData, you specify
the length and the space:
MKSynthData *sd = [orch allocSynthData: MK_xData length: 256]; |
To load the MKSynthData with an array:
DSPDatum someData[256] = {0, 1, 2, 3, ...};
[sd setData: someData];
|
To load the MKSynthData with a constant:
[sd setToConstant: 1]; |
Since patchpoints are actually MKSynthData,
you can use these methods for them as well.
For convenience, MKWaveTables have a
dataDSPLength: method:
[sd setData: [aWaveTable dataDSPLength: 256]]; |