APS Excellence in Physics Education Award
November 2019

Education Prize Logo
Science SPORE Prize
November 2011

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

Opening audios according to a specific frequency post and replies

Return to the Opening audios according to a specific frequency thread
Login to post to this thread

Opening audios according to a specific frequency [EJS] - February 1 at 6:12:AM
Léo Santos
10 Posts

Hello. I would like to know if it is possible to play different audios for a specific frequency.

For example, my program calculates a certain frequency, I turn it into "int". When I have that frequency, I want the program to open an audio with the same name as that frequency.
I have 1000 audios, named "50.wav", "76.wav" and "143.wav" for example.
I created a variable called "arquivonome" of type String with the value "./50.wav/" to call the audio file.

In the audio element, in the Audio File field I write %arquivonome%, however, the element does not search for my file.

I have already tested when the initial value of "arquivonome" is "./50.wav" and "./76.wav/" and it seeks audios in both situations, but only so. The program does not search for the audio file if I change the value of "arquivonome"

Prints of some windows to help the understanding.

https://ibb.co/WfRtxbm
https://ibb.co/Yb4b8P4
https://ibb.co/sRDkLdQ

Thanks in advance for any help :)


Léo Rodrigues Macena dos Santos Departament of Physics - Faculdade de Ciências da Universidade do Porto.

OSP Projects:
Open Source Physics - EJS Modeling
Tracker
Physlet Physics
Physlet Quantum Physics
STP Book