Education Prize Logo
Science SPORE Prize
November 2011

NSF Logo
The Open Source Physics Project is supported by NSF DUE-0442581.

Introducing a periodic sound with no loop post and replies

Return to the Introducing a periodic sound with no loop thread
Login to post to this thread

Introducing a periodic sound with no loop - May 21 at 12:39PM
Léo Macena
8 Posts

Hello everyone,
I would like to introduce a sound that plays every specific moment of the simulation. For example, I have a rotating cylinder, and it would be nice to play a beep every 90 degrees, is that possible? I still do not understand how to do this. =/


Léo Rodrigues dos Santos Macena, Departament of Physics - Universidade Federal Rural do Rio de Janeiro. Departament of Physics - Faculdade de Ciências da Universidade do Porto. Programa de Educação

Replies to Introducing a periodic sound with no loop

Re: Introducing a periodic sound with no loop - May 29 11:24AM
lookang Avatar
lookang
190 Posts

you can check out

http://www.opensourcephysics.org/items/detail.cfm?ID=13368

link the audio URL to that mp3 file and add 

 

_view.audio.play(); //to control when to play

 


OSP@SG blog
OSP@SG Digital Library


Re: Re: Introducing a periodic sound with no loop - Jun 13 5:22AM
Léo Macena
8 Posts

Thanks Lookang, worked well. :)


Léo Rodrigues dos Santos Macena, Departament of Physics - Universidade Federal Rural do Rio de Janeiro. Departament of Physics - Faculdade de Ciências da Universidade do Porto. Programa de Educação


The OSP Network:
Open Source Physics - Tracker - EJS Modeling
Physlet Physics
Physlet Quantum Physics