POV-Ray : Newsgroups : povray.off-topic : What the Hell he's doing. : Re: What the Hell he's doing. Server Time
6 Sep 2024 23:24:31 EDT (-0400)
  Re: What the Hell he's doing.  
From: Mike Raiford
Date: 20 Nov 2008 10:06:41
Message: <49257d01$1@news.povray.org>
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

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.