[Stk] Stk tick Questiion
masahiko hagio
delay at b04.itscom.net
Sun Nov 16 06:29:08 PST 2008
I'm newbee Xocde synth making,so I found Cocoa STK .
now, I'm studing hard about Xcode baisic and reading the Examples
( HelloStkx.zip)
so,I want to add effects , I added code is below....
------------------------------------------------------------------------
--
int tick(char *buffer, int bufferSize, void *dataPointer)
{
WaveLoop *sine = (WaveLoop *) [(id)dataPointer sine];
register StkFloat *samples = (StkFloat *) buffer;
Chorus Chorus;
Chorus.setModDepth([(id)dataPointer amp] * 2.0);
Chorus.setModFrequency(5.0);
for ( int i=0; i<bufferSize; i++ ) {
// *samples++ = delay.tick( sine->tick());
*samples++ = Chorus.tick(sine->tick());
}
return 0;
};
------------------------------------------------------------------------
--
build and cmpile is no problem, but, sound is strange...
I konw it couse adding code is wrong, or I do not understand
[ tick] meanings...
More information about the Stk
mailing list