24 sample *bufferPtr = outputBuffer.buffer(outBufNum);
25 unsigned numFrames = outputBuffer.mNumFrames;
30 logMsg(
"Lorenz oscillator's nextBuffer");
33 for(
unsigned i = 0; i < numFrames; i++ ) {
34 xx = mX + 0.01 * (-10. * mX + 10. * mY );
35 yy = mY + 0.01 * (20. * mX - mY - mX * mZ );
36 zz = mZ + 0.01 * (-8. * mZ / 3. + mX * mY );
37 max = (mX >
max) ? mX : max;
38 *bufferPtr++ = mX / 17.f - 0.1f;
void logMsg(const char *format,...)
These are the public logging messages.
AdditiveInstrument.h – Sum-of-sines synthesis instrument class.
unsigned mFrameRate
trigger ignored here
void nextBuffer(Buffer &outputBuffer, unsigned outBufNum)
really compute the next buffer given an offset base channel; this is called by nextBuffer, possibly multiple times
float sample
(could be changed to int, or double)
void dump()
pretty-print the receiver
Lorenz(float x=0.02, float y=20., float z=20.)
Constructor.
Buffer – the multi-channel sample buffer class (passed around between generators and IO guys)...
Base class of CSL exceptions (written upper-case). Has a string message.