NTNUJAVA Virtual Physics Laboratory
Enjoy the fun of physics with simulations!
Backup site http://enjoy.phy.ntnu.edu.tw/ntnujava/
October 19, 2017, 11:07:42 pm *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Login Register  
Youe can not help men permanently by doing for them what they could and should do for themselves. ..."Abraham Lincoln(1809-1865, US President 1861-1865"
Google Bookmarks Yahoo My Web MSN Live Netscape Del.icio.us FURL Stumble Upon Delirious Ask FaceBook

Pages: [1]   Go Down
  Print  
Author Topic: EJS version of Fourier Synthesis (You can hear the sound,too!)  (Read 61652 times)
0 Members and 1 Guest are viewing this topic. Click to toggle author information(expand message area).
Fu-Kwun Hwang
Administrator
Hero Member
*****
Offline Offline

Posts: 3080



WWW
«
Embed this message
on: April 03, 2009, 10:00:37 am » posted from:Taipei,T\'ai-pei,Taiwan

I have created a Fourier Synthesis in 1999.
Here is the EJS version of Fourier Synthesis.

You can adjust the Fourier component with the slider and watch the wave change at the same time.
Click "play" to hear the sound.

Click get button to fetch coefficients. Click set button to modify coefficients.
Please click get button first,before you click set button.


0f
f
2f
3f
4f
5f
6f
7f
8f
9f
sin
cos

Embed a running copy of this simulation

Embed a running copy link(show simulation in a popuped window)
Full screen applet or Problem viewing java?Add http://www.phy.ntnu.edu.tw/ to exception site list
Press the Alt key and the left mouse button to drag the applet off the browser and onto the desktop. This work is licensed under a Creative Commons Attribution 2.5 Taiwan License
  • Please feel free to post your ideas about how to use the simulation for better teaching and learning.
  • Post questions to be asked to help students to think, to explore.
  • Upload worksheets as attached files to share with more users.
Let's work together. We can help more users understand physics conceptually and enjoy the fun of learning physics!


* smf_fouriersound.gif (33.8 KB, 854x571 - viewed 972 times.)
Logged
Fu-Kwun Hwang
Administrator
Hero Member
*****
Offline Offline

Posts: 3080



WWW
«
Embed this message
Reply #1 on: June 06, 2009, 03:35:59 pm » posted from:Taipei,T\'ai-pei,Taiwan

I add a musical keyboard just for fun. ENjoy it!

Embed a running copy of this simulation

Embed a running copy link(show simulation in a popuped window)
Full screen applet or Problem viewing java?Add http://www.phy.ntnu.edu.tw/ to exception site list
Press the Alt key and the left mouse button to drag the applet off the browser and onto the desktop. This work is licensed under a Creative Commons Attribution 2.5 Taiwan License
  • Please feel free to post your ideas about how to use the simulation for better teaching and learning.
  • Post questions to be asked to help students to think, to explore.
  • Upload worksheets as attached files to share with more users.
Let's work together. We can help more users understand physics conceptually and enjoy the fun of learning physics!
Logged
lookang
Hero Member
*****
Offline Offline

Posts: 1784


http://weelookang.blogspot.com


WWW
«
Embed this message
Reply #2 on: January 08, 2010, 12:03:54 am » posted from:Singapore,,Singapore

The EJS version of Fourier Synthesis is wonderful. It is truly remarkable.

By the way on the topic of importing external jar,
Variable declaration The type is fkh.SoundGenerator
so i think it is because of the imported jar file name ./jar/fkh.SoundGenerator.jar


The code assigned variable "sound" to new initial value of fkh.SoundGenerator(frequence,amplitude)..... how do i know it is (frequence,amplitude) and not (frequence,amplitude, XYZ,ABC)?
Does it mean i also need to look inside (the eariler *.java etc??) "fkh.SoundGenerator.jar" before i know how to use it?

The reason i am asking is i don't know how to use my own imported filter.jar here http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=1400.msg5271#msg5271
i am clueless Grin


« Last Edit: January 08, 2010, 12:11:08 am by lookang » Logged
Fu-Kwun Hwang
Administrator
Hero Member
*****
Offline Offline

Posts: 3080



WWW
«
Embed this message
Reply #3 on: January 08, 2010, 09:57:30 am » posted from:Taipei,T\'ai-pei,Taiwan

1.The jar file is the same as ZIP file. The only difference is the file extension.
So you can open it with UNZIP program. (Do not associate jar with UNZIP program, otherwise, you would not be able to run it by double click--UNZIP will open it instead.).

2. You will find a folder fkh inside the jar file when you open my soundGenerator.jar
And there is a file soundGenerator.class inside fkh folder,
 and there is a function call SoundGenerator(frequence,amplitude) inside soundGenerator.class
That is why it is associated as fkh.soundGenerator function.

You will need to have source code or document in order to know what are the parameter for that function.

It is possible to de-compile the program if the program is not protected when it is compiled.
There exists some program to de-compile .class file back to .java
However, the best way is to find the original document or ask the programmer.

User need to find out how to use ConvolveFilter from the source code.
http://www.huxtable.com/ip/ConvolveFilter.java
You can call defined public functions with required parameters.

However, user need to have basic information about java programming.
That is why EJS is called Easy Java Simulation, becauase it make java programming much easier than traditional programming.


Logged
lookang
Hero Member
*****
Offline Offline

Posts: 1784


http://weelookang.blogspot.com


WWW
«
Embed this message
Reply #4 on: March 25, 2010, 01:01:14 pm » posted from:Singapore,,Singapore

great applet.
What will make this applet even more useful is an microphone input.
students can speak into a microphone on their computer  and the PC display (java applet) shows the shape of the waveform.

maybe another applet? Grin
Logged
Fu-Kwun Hwang
Administrator
Hero Member
*****
Offline Offline

Posts: 3080



WWW
«
Embed this message
Reply #5 on: March 25, 2010, 06:58:11 pm » posted from:Taipei,T\'ai-pei,Taiwan

There is a free program can do this : audacity
Do we need to duplicate the work?
Logged
lookang
Hero Member
*****
Offline Offline

Posts: 1784


http://weelookang.blogspot.com


WWW
«
Embed this message
Reply #6 on: March 26, 2010, 05:29:40 am »

Agreed!
I will used audacity to explore voice generated waveforms.
Thanks for the tip!
Logged
N Burling
Newbie
*
Offline Offline

Posts: 1

«
Embed this message
Reply #7 on: July 25, 2011, 09:02:26 am » posted from:Tauranga,Gisborne,New Zealand

Love this site apps are get for assisting with teaching (high school).

Is it possible to get the files for the EJS version of the fourier synthesis.  I have some students struggling with timbre of musical instruments.

Thanks
Logged
Fu-Kwun Hwang
Administrator
Hero Member
*****
Offline Offline

Posts: 3080



WWW
«
Embed this message
Reply #8 on: July 25, 2011, 12:31:27 pm » posted from:Taipei,T'ai-pei,Taiwan

Yes. The simulation is available for offline use.
You should be able to find download button when you login to the forum.
Logged
balijani
Newbie
*
Offline Offline

Posts: 6



«
Embed this message
Reply #9 on: April 17, 2012, 01:04:36 am » posted from:Budapest,Budapest,Hungary

great work!  Smiley
Logged
sajidtoor
Newbie
*
Offline Offline

Posts: 4

«
Embed this message
Reply #10 on: January 17, 2013, 12:27:38 pm » posted from:Faisalabad,Punjab,Pakistan

Hi
welcome to all,i'm newly in this forum.
http://www.phy.ntnu.edu.tw
Logged
sajidtoor
Newbie
*
Offline Offline

Posts: 4

«
Embed this message
Reply #11 on: February 01, 2013, 12:12:16 pm » posted from:Faisalabad,Punjab,Pakistan

Hi
welcome to all,i'm newly in this forum.
Logged
Pages: [1]   Go Up
  Print  
Youe can not help men permanently by doing for them what they could and should do for themselves. ..."Abraham Lincoln(1809-1865, US President 1861-1865"
 
Jump to:  


Related Topics
Subject Started by Replies Views Last post
Fourier Synthesis
Wave
Fu-Kwun Hwang 19 367436 Last post September 22, 2009, 01:16:07 pm
by dannydesiliva
Anyone can help with Fourier synthesis?
Wave
Alliance 4 20535 Last post November 24, 2005, 03:19:27 am
by Alliance
EJS version of Doppler effect (You can hear sound)
Wave and Fluid
Fu-Kwun Hwang 8 35761 Last post December 04, 2013, 12:01:56 pm
by Fu-Kwun Hwang
EJS version of Fourier Synthesis (You can hear the sound,too!)
wave and fluid
ahmedelshfie 6 10286 Last post September 24, 2010, 08:44:25 pm
by ahmedelshfie
EJS version of Fourier Synthesis (You can hear the sound,too)
Questions related to EJS
ahmedelshfie 4 6040 Last post June 23, 2010, 12:03:12 am
by ahmedelshfie
Powered by MySQL Powered by PHP Powered by SMF 1.1.13 | SMF © 2006-2011, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 0.062 seconds with 22 queries.since 2011/06/15