Hi there, Can anyone explain why this code is not right for amplitude modulation vst? (steinberg kit) Trem= (1- fDepth) + fDepth * (sin ((2 * PI * 10)* getSampleRate())
amplitude moduallation
Started by ●April 24, 2008
Reply by ●April 24, 20082008-04-24
chinglnc wrote:> Hi there, > > Can anyone explain why this code is not right for amplitude modulation > vst? > (steinberg kit) > > Trem= (1- fDepth) + fDepth * (sin ((2 * PI * 10)* getSampleRate())At a guess I'd say you probably want: Trem = (1 - fDepth) + fDepth * (sin ((2 * PI * 10) / getSampleRate()) Paul
Reply by ●April 25, 20082008-04-25
Reply by ●April 25, 20082008-04-25
chinglnc wrote:> it's not working either.....If you want help then you'll need to supply a little more information. Paul
Reply by ●April 25, 20082008-04-25
Hi, I have my sine modulator working by putting in the counter.... however, I'm now having problem with my sawtooth..i just can't get the logic right.......help please......i heard loads of glitches and distortion.. float sRate = getSampleRate(); float Trem ; long cycleDur, cycleDur_half; cycleDur= (1/fFreq* sRate); cycleDur_half= cycleDur/2; while(--sampleFrames >= 0) { if (counter < cycleDur-1) { counter ++; } *out1 = *out2= Trem * (*in1+ *in2); Trem= (1- fDepth) + fDepth * (fFreq*10)* (counter/sRate); Buffer[iWrite] = *in1 + *in2;
Reply by ●April 25, 20082008-04-25
Hi, I have my sine modulator working by putting in the counter.... however, I'm now having problem with my sawtooth..i just can't get the logic right.......help please......i heard loads of glitches and distortion.. float sRate = getSampleRate(); float Trem ; long cycleDur, cycleDur_half; cycleDur= (1/fFreq* sRate); cycleDur_half= cycleDur/2; while(--sampleFrames >= 0) { if (counter < cycleDur-1) { counter ++; } *out1 = *out2= Trem * (*in1+ *in2); Trem= (1- fDepth) + fDepth * (fFreq*10)* (counter/sRate); Buffer[iWrite] = *in1 + *in2;