31 sample * buffer = outputBuffer.monoBuffer(outBufNum);
36 logMsg(
"SimpleSine nextBuffer");
39 for (
unsigned i = 0; i < outputBuffer.mNumFrames; i++) {
40 *buffer++ = sin(mPhase);
41 mPhase += phaseIncrement;
63 #ifdef NOT_THIS_WAY // This is the really verbose way; see below for how to use the macros to make this easier
66 sample * buffer = outputBuffer.monoBuffer(outBufNum);
71 bool freqDyn = (freqUG != NULL);
76 this->pullInput(freqPort, outputBuffer);
82 for (
unsigned i = 0; i < outputBuffer.mNumFrames; i++) {
83 *buffer++ = sin(mPhase);
84 mPhase += (freqC * rateRecip);
101 sample * buffer = outputBuffer.monoBuffer(outBufNum);
102 unsigned numFrames = outputBuffer.mNumFrames;
107 logMsg(
"SineAsPhased nextBuffer");
111 for (
unsigned i = 0; i < numFrames; i++) {
112 *buffer++ = sin(mPhase);
113 mPhase += (freqValue * rateRecip);
143 #ifdef NOT_THIS_WAY // This is the really verbose way; see below for how to use the macros to make this easier
146 sample * buffer = outputBuffer.monoBuffer(outBufNum);
157 bool freqDyn = (freqUG != NULL);
158 bool scaleDyn = (scaleUG != NULL);
159 bool offsetDyn = (offsetUG != NULL);
164 float freqC, scaleC, offsetC
167 this->pullInput(freqPort, outputBuffer);
174 this->pullInput(scalePort, outputBuffer);
178 scaleC = scalePort->
mValue;
181 this->pullInput(offsetPort, outputBuffer);
185 offsetC = offsetPort->
mValue;
187 for (
unsigned i = 0; i < outputBuffer.mNumFrames; i++) {
188 *buffer++ = sin(mPhase);
189 mPhase += (freqC * rateRecip);
211 sample * buffer = outputBuffer.monoBuffer(outBufNum);
213 unsigned numFrames = outputBuffer.mNumFrames;
217 logMsg(
"SineAsScaled nextBuffer");
222 for (
unsigned i = 0; i < numFrames; i++) {
223 *buffer++ = (sin(mPhase) * scaleValue) + offsetValue;
224 mPhase += (freqValue * rateRecip);