|
 |
scott wrote:
>> Its been a while since I did it ... I can't remember.
>
> Oh just because I once made a program to generate a sweep something like
> this:
>
> for sample = 0 to 100000
> frequency = sample / 1000
> wave[sample]= waveFunction(sample/sampleRate*2*pi*frequency)
>
> Where waveFunction can be your sine wave, square wave or whatever.
>
> But of course it doesn't work like that as I found out...
>
>
I think I had something similar. I really can't remember though. I then
moved to a wavetable method, where I had generated a cycle of saw,
square, and triangle at a low enough frequency where I wouldn't need to
stretch it. For sine, I think I just used the sine function (can't
remember, exactly). and dropped the appropriate number of samples to
raise pitch, using an even spacing. It worked pretty well with the
generated waves. Basically just scaling the waves up and down.
--
~Mike
Post a reply to this message
|
 |