How to gradually increase or decrease an FMSound frequency over
time?
Hans-Martin Mosner
hmm at heeg.de
Thu Apr 20 05:41:40 UTC 2006
Rob Rothwell wrote:
> Craig,
>
> Thanks for your reply:
>
> > Just send >>pitch: to the FMSound at the appropriate times,
> sweeping
> >between your two values?
>
> I had thought of doing that, but I was hoping that I could end up at
> a specific frequency at a specific time. However, for my purposes,
> the frequencies are more important to me than the times, so that may
> be what I end up doing.
>
> Basically, I am trying to use Squeak to generate Binaural Beat
> Sequences for brainwave entrainment. A Binaural Beat basically
> consists of a beat at carrier frequency pair, so I want to be able to
> write something like:
Have you looked at the PitchEnvelope class? It allows you to sweep a
sound between frequencies.
You would need to take into account that it's working on a logarithmic
scale, so it does not interpolate frequencies linearly, but musical
notes. In many cases this would be the desired behaviour, I don't know
enough about your application to say whether it is acceptable here as well.
Cheers,
Hans-Martin
More information about the Squeak-dev
mailing list
|