[Stk] How to use Modulate?

Gary Scavone gary at ccrma.Stanford.EDU
Thu Apr 15 06:57:02 PDT 2010


Hi Yonatan,

The Modulate class can give you a sinusoid (of specified frequency) with some random gain modulation.  Or you can use the output of Modulate as a control for the frequency input of an external sinusoid.  Modulate is used in the SingWave class ... you can look there to see how it is used.

Regards,

--gary

On 2010-04-15, at 6:17 AM, Yonatan Doron wrote:

> Hi,
> 
> I assume Modulate can be used as a vibrato effect.
> I didn't quite understand how to use it?
> Suppose I have the following code which generates a sine wave:
> 
> for (int i = 0 ; i < BUFFER_LENGTH; i++)
> {
>        StkFloat sample = sine.tick();
>       // do something with the sample...
> }
> 
> How would I add Modulate here so that it applies vibrato to the sine ?
> 
> Thanks in advance,
> Yonatan.
> _______________________________________________
> Stk mailing list
> Stk at ccrma.stanford.edu
> http://ccrma-mail.stanford.edu/mailman/listinfo/stk




More information about the Stk mailing list