|
![](/i/fill.gif) |
Invisible wrote:
>> Next: write an FFT filtering algorithm and export the resulting wav.
>
> Good luck! ;-)
>
Heh. Thanks. I'll post the program (and the results) when I'm done ;)
I'm doing all of this in C#. You should give C# a try, really. It
doesn't bite. :) I promise... ;)
You seem to think this will be exceedingly difficult?
>> 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?
> Thinking about it... one technique frequently used in real organs is to
> play several stops at once, each tuned to some octave of the
> fundamental. (I.e., a power of two of the frequency.) If you assume the
> tone of each pipe is approximately a pure sinewave, this is what you get.
>
Yep. I was actually attempting to seek out the organ sound. I knew the
frequencies were related, I just couldn't figure out the relationship
till I tried 4 frequencies spaced an octave apart.
Odd how all sounds are some fundamental frequency + a combination of
related frequencies (either harmonic or aharmonic)
>> 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.
>> 1x 2x 3x 4x, again half each, you get an approximation of a sawtooth
>> wave.
>
> Again, yes.
>
> Also, if you take the square wave, make the amplitude the reciprocol of
> the *square* of the frequency, and make every other wave shifted 180°
> out of phase, you get a triangle wave.
It should be possible to generate a Fourier series by using an iFFT to
get a band limited saw/square/triangle, no?
... rather than iteratively combine the waveforms (which takes forever
... the DOSBOX MT32 used that technique. it would generate the waves and
save the resulting wavetable to disk after the first run. Yes, the MT32
emulator was part wavetable/part pcm sampler, the real thing was part
pcm/part subtractive)
It seems this would be a much quicker way to generate the proper waveforms.
--
~Mike
Post a reply to this message
|
![](/i/fill.gif) |