### Author Topic: Fourier Synthesis  (Read 408595 times)

#### Fu-Kwun Hwang

• Hero Member
• Posts: 3062
##### Fourier Synthesis
« on: January 29, 2004, 07:04:29 pm »
Registed user can get files related to this applet for offline access.
Problem viewing java?Add http://www.phy.ntnu.edu.tw/ to exception site list

You can check out EJS version of the same Fourier Symthesis

Click get button to fetch coefficients. Click set button to modify coefficients.

 0f f 2f 3f 4f 5f 6f 7f sin cos 8f 9f 10f 11f 12f 13f 14f 15f sin cos

How to play:

1. Left click and drag the [ball, green] circles to change the magnitude of each Fourier functions [Sin nf, Cos nf].

2. Right click the mouse button to change the magnitude between 0 and 1.0

3. Click Play to turn on the sound effect, Stop to turn it off.

4. The coefficient of sin(0f) is used as amplification factor for all modes.

5. (Use it to change the sound level)?the coefficient of cos(0f) is the DC component.

6. Click the checkbox at the top(after stop) will show square the the amplitude of the signal.

The default value for base frequency is f=2200Hz, you can change it from the TextField. (20 < f < 2000). The ear is 1000 times more sensitive at 1kHz than at 100Hz.

 frequency range speech song adult male 80-240 up to 700 adult female 140-500 up to 1100

How to play:

1. Left click and drag the [ball, green] circles to change the magnitude of each Fourier functions [Sin nf, Cos nf].

2. Right click the mouse button to change the magnitude between 0 and 1.0

3. Click Play to turn on the sound effect, Stop to turn it off.

4. The coefficient of sin(0f) is used as amplification factor for all modes.

5. (Use it to change the sound level)¡Athe coefficient of cos(0f) is the DC component.

6. Click the checkbox at the top(after stop) will show square the the amplitude of the signal.

The default value for base frequency is f=2200Hz, you can change it from the TextField. (20 < f < 2000). The ear is 1000 times more sensitive at 1kHz than at 100Hz.

 frequency range speech song adult male 80-240 up to 700 adult female 140-500 up to 1100

Registed user can get files related to this applet for offline access.
Problem viewing java?Add http://www.phy.ntnu.edu.tw/ to exception site list

• Guest
##### topic17
« Reply #1 on: January 30, 2004, 08:44:50 am »
Subject: java and sound
Date: Fri, 12 Sep 1997 14:19:41 +0800
From: "Harlan W. Lefevre" <hwl@solconch.uoregon.edu>
To: hwang@phy.ntnu.edu.tw
Dear Dr. Hwang,
I have used several of your applets in my physics courses here.
And I asked our people to mirror your site here for fast access.
The applets are really useful. Thank you.
I usually roll an NCD Xterminal into my classroom and use a remote Sun as server.
Unfortunately java only writes audio to /dev/audio and Xwindows won't deliver the audio to the Xterm.
So the beauty of your Fourier Synthesis program is largely lost when one can't do the sound.
Do you have a solution to this problem?
Sincerely yours,
Harlan Lefevre

• Guest
##### topic17
« Reply #2 on: February 28, 2004, 03:35:53 pm »
Hello,

I've just played around with your Fourier-Synthesis-Applet which realy is great. Just the best I've found in the net :-)
I could use it very well for my students. How can I let it run an my stand alone PC?
It would be great for me, if I could let it run until thuesday.
Thanks you

Have a nice weekend

Daniel

-*-

• Guest
##### topic17
« Reply #3 on: September 06, 2004, 08:55:24 pm »
Ditto!
I could really do to have this run offline on my PC.
Ta!

#### Spirit

• Newbie
• Posts: 3
##### topic17
« Reply #4 on: October 26, 2005, 08:56:39 pm »
Hi,

I am an A-level student, studying further mathematics, and physics and have seen 'fourier series' listed as a module in one of the university prospectus, by chance i came accross this and thought i'd ask if anyone would mind giving a brief expllanation to what it actually is. What can i say, it has sparked my curiosity!

#### Fu-Kwun Hwang

• Hero Member
• Posts: 3062
##### topic17
« Reply #5 on: October 27, 2005, 08:11:15 am »
All the wave (no matter what kind of shape) can be decompositive into series of wave with the same base frequency(or period).
For example: You can look at sound wave of your voice with oscilloscope or recored with computer.
You know everyone sound differently. But it not easy to find out the difference from the waveform.
If we make a Fourier transform of the sound wave, i.e., calculate the weighting of each frequency component.
Then, the ratio of those components are characteristic of each person.
So it can be used as voice recognition.

You should be able to find detail information from physics textbook.

#### Spirit

• Newbie
• Posts: 3
##### topic17
« Reply #6 on: October 27, 2005, 08:48:19 am »
Thank you very much for your help and time.

#### chef

• Newbie
• Posts: 3
##### Hi i need help
« Reply #7 on: May 21, 2006, 05:32:00 am »
Hey so i am doing this lab for my school and i don't know how to put sound in it so i was thinking maybe someone could help thanks!!!!!!!!!!!!!!

#### Fu-Kwun Hwang

• Hero Member
• Posts: 3062
##### topic17
« Reply #8 on: May 21, 2006, 10:55:57 am »
Try to check out JSresource.org.

#### Fu-Kwun Hwang

• Hero Member
• Posts: 3062
##### Re: Fourier Synthesis
« Reply #9 on: February 28, 2007, 11:50:20 pm »
The following copy of email messages from one of the user:
**********************************************
Quote
Dear Sirs,

Congratulations for the excellent page http://www.phy.ntnu.edu.tw/java/sound/sound.html

I have 3 questions

1.Any periodically repeating wave - however complex its shape is - can be resolved into sine and cosine waves. okay. It is possible to resolve any complex shaped signal similarly into sines and cosines, even if it is not periodically repeating - considering wave length as infinity and approximating..
Now consider a recorded wave form of a song (amplitude vs time) lasting say 5 minutes. This wave when resolved into component sines and cosines shall contain a lot of harmonics. Each with its specific frequency. If all the important components are selected and replayed the sound produced will be an approximate reproduction of the original sound. This is done posteriori.
Now consider a small intervel of time. say one second. after say 2 minutes from the start. The portion of the signal in this small duration if seperately considered and resolved (done in the current running time) the condition of the constituent harmonics will be same as that of the original signal of 5 minute duration considered for this particular one second.

But while we do this, we donot know what is going to happen after say the 3rd minute. But the happenings after the 3rd minute (or all the instants after the 2nd minute and one secondth instant) decide what should be shape of this particular one second - being part of the larger 5 minute duration. There is an apparent anomaly of having the future already getting fixed or a future event determining the present condition. What is the wrong in this argument?
Please check out the following URL :Fourier Analysis of Time Series

It is just a superposition of linear signal. For different time interval, the sume of the contribution is not the same. It is a relation between two different representations.  It is not one of them determined another one.

Quote
2. High level languages like Basic etc. have words for sound. But can, at a time, produce only one sound of only one frequency. A complex wave after resolving into its components can be heard faithfully only if the multiple frequencies weighted with its respective amplitudes are heard simultaneously. In your programme how it is achieved?
The program was written many years ago with JDK1.0.2.  At the time, it was an undocumented java library (I found out how to generate single frequency sound with java code from the web. However, I can not remember where I found it).

Quote
3. The amplitude Vs time wave form of a song (vocal) if resolved into components, will contain what range of harmonics?
Thanking you,
Mathematically, there are infiniite number of possible frequency. However, we can not hear it if it's requency is not within 20Hz-20000Hz.

#### neodasa

• Newbie
• Posts: 5
##### Re: Fourier Synthesis
« Reply #10 on: December 10, 2008, 09:14:16 am »
Dear Mr. Hwang,

Thank you for such a nice synthesis.  However, after I had used it for a few minutes, my screen went to a monochrome-blue/green, and now I don't know how to get it back to normal.  I don't even know if it happened because I was using all the different tones in the Fourier Synthesis.

If you would like to see what it does to my screen, I've uploaded a copy of news page to my website and can be viewed at:

Please let me know what you think.

My monitor is new and adjusting the settings doesn't help.

Thanks,

neodasa

#### Fu-Kwun Hwang

• Hero Member
• Posts: 3062
##### Re: Fourier Synthesis
« Reply #11 on: December 10, 2008, 10:02:11 pm »
The image I saw is a web page at www.foxnews.com
I do not what happened to your monitor.
The program was written more than 10 years ago with JDK1.0.2
May be something in the hardware/software structure has been changed.
Please let me know what exactly happened, otherwise I would not be able to help.

#### neodasa

• Newbie
• Posts: 5
##### Re: Fourier Synthesis
« Reply #12 on: December 11, 2008, 02:32:31 am »
Well, it happened just after I began using the Fourier Synthesis.  The image link I gave you is for the Fox News page.  I used it to show an example of the bluish/greenish (sometimes purple) monochrome appearance that my monitor is now displaying.  I was in the middle of using the Fourier Synthesis when my screen changed from its usual brightness to the bluish/greenish/purple monochrome appearance on the Fox page.

My question is: is it possible for the frequencies from the Fourier Synthesis to interfere with the imaging frequencies of one's monitor?  I know this sounds bizarre, but it's the only thing I can think of.  Have you ever heard of sound frequencies changing the lighting frequencies on one's monitor?

Click on the link below to see how your Forum looks on my monitor.  I did a screen dump of a portion of your Forum and then added it as an extension of my webpage:

Let me know?

Thanks.

#### neodasa

• Newbie
• Posts: 5
##### Re: Fourier Synthesis
« Reply #13 on: December 11, 2008, 02:42:17 am »
Here's another example of what my monitor is displaying.  I did another screendump, this time of the site for the Pencil Project.  It displays the same, bluish/purplish, sometimes greenish monochrome color.

I've tried to change my monitor settings from both the monitor controls and from the Desktop settings, but nothing is getting it back to the normal color and brightness.

Any suggestions?

#### neodasa

• Newbie
• Posts: 5
##### Re: Fourier Synthesis
« Reply #14 on: December 11, 2008, 02:49:23 am »
It just occurred to me that what I'm see as a bluish/purplish monochrome color might just be on my monitor, and that when I send you examples with links that you still see the normal reds, yellows, blues, etc.

So tell me, in the links I've sent you, do your see the bluish/purplish monochrome, or do you see things as they normally appear?

I know this is getting weird.  My apologies.

Let me know.