POV-Ray : Newsgroups : povray.off-topic : Random: FFT, Organ, Blahblah.. : Re: Random: FFT, Organ, Blahblah.. Server Time
6 Sep 2024 07:17:41 EDT (-0400)
  Re: Random: FFT, Organ, Blahblah..  
From: Invisible
Date: 30 Jan 2009 10:56:54
Message: <49832346$1@news.povray.org>
> You should give C# a try, really. It doesn't bite. :) I promise... ;)
> 
> You seem to think this will be exceedingly difficult?

Well for a start I'd need the hated .NET runtime first... :-P

>>> If you set the tones to the fundamental, then 1x 2x 4x etc ... it 
>>> sound exactly like an organ.
>>
>> Yes. I myself have in fact used this in a musical composition. I wrote 
>> a small BASIC program that generated various waveforms, and then used 
>> OctaMED to play tunes with them.
> 
> So, combining square waves?

Well, I wrote a program that would sum sinewaves together in various 
ways to produce different waveforms. It sounded a bit like a filter 
sweep. (Back when I was 12, I didn't know how to perform a *real* filter 
sweep!)

> Odd how all sounds are some fundamental frequency + a combination of 
> related frequencies (either harmonic or aharmonic)

Er, no... Actually it's a basic consequence of physics, and that's why 
the human auditory system is turned to detect it. ;-)

As an aside: You can use waveshaping to add new *higher* frequency 
components, but never *lower* frequency ones.

>>> if you do 1x 3x 5x 7x setting each subesequent to half, you get an 
>>> approximation of a square wave.
>>
>> Assuming the amplitude is the reciprocol of the frequency, yes. This 
>> is the Fourier series of that waveform.
> 
> amplitude was 1/harmonic * 100. It was darn close. Interestingly the 
> right channel was 90° out of phase, which produced an interesting 
> looking but identical sounding wave.

Yes. The human ear is insensitive to the relative phase between 
frequency components. (Lossy compression algorithms frequently take 
advantage of this.) Note that nonlinear systems that the waves pass 
though might respond differently though (e.g., your speakers).

> It should be possible to generate a Fourier series by using an iFFT to 
> get a band limited saw/square/triangle, no?

Yes.

> ... rather than iteratively combine the waveforms (which takes forever 

Depends how many waves you want, at what sampling frequency. But yes, at 
some point FFT becomes faster.


Post a reply to this message

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