APS Excellence in Physics Education Award
November 2019

Science SPORE Prize
November 2011

The Open Source Physics Project is supported by NSF DUE-0442581.
|
Sound?
post and replies
Return to the Sound? thread
Login to post to this thread
|
Sound in EJSS?
|
kyle forinash
1 Posts
|
Is there a way to make a sine wave play audibly in EJSS?
|
|
Re: Sound in EJSS? -
|
Francisco Esquembre
238 Posts
|
Hi Kyle,
Yes! We just added tow new media-oriented HTMView elements. On the Interface panel, look for Audio and Video.
You need the brand official new release of EjsS: http://fem.um.es/EjsWiki/uploads/Download/EJS_5.01_141119.zip
Attached are is the source code for a JS example that uses a sound.
Paco
Attached File: ejss_src_AudioExample.zip
|
|
Re: Re: Sound in EJSS? -
|

lookang
244 Posts
|
dear paco, this is awesome.
it is NOW possible to create a sound when impact on floor using say.
if (vy < 0){
_view.audio.play(); // a simple code inserted in the event handler when the ball bounce of the floor.
//Toolkit.getDefaultToolkit().beep(); // EJS way
vy=-e*vy;
}
great work everyone in your team.
my files are here. enjoy everyone.
Post edited November 20, 2014 at 3:39 AM EST. Post edited November 20, 2014 at 3:39 AM EST.
OSP@SG blog
OSP@SG Digital Library
|
|
Re: Re: Re: Sound in EJSS? -
|
Francisco Esquembre
238 Posts
|
Yes. We thought it would be nice to have sound!
Paco
|
|
Re: Sound in EJSS? -
|
Wolfgang
195 Posts
|
Yes. EjsS version 5.1 can now play sound files. See the following example:
http://www.compadre.org/OSP/items/detail.cfm?ID=13368
|
|