Hertz - Frequency Generator

@Joejsanz Nuevamente te felicito.

Yo tengo Tinnitus (un acúfeno), un sonido que se escucha dentro del oído, pero que ningún estudio serio determina cual es su origen para solucionarlo de forma DEFINITIVA. Tengo este problema después de haber sufrido un accidente con una estufa a gas (y haber quedado sordo por 2 días, luego apareció el Tinnitus).
Hay una terapia sonora que dice que escuchando la misma frecuencia sonora se la anula de alguna manera. Espero encontrar la frecuencia de esta forma.
Pregunto ya que estoy, ¿podrías hacer de forma inversa prácticamente una extension para detectar la presión sonora? Se que hay 1 extension que se encuentra en el repositorio del MIT, pero no tiene soporte. A la extension la he usado en 3 teléfonos con regulares a malos resultados en todos ellos.

Unsupported:

-Sound Pressure Level Extension (esta es la extension)

Desde ya muchas gracias por tus aportes.

1 Like

Polyphonic ?

If I drag in two instances, seems to work OK, if I drag in three instances only the last two play..?

1 Like

Muchas gracias.

Voy a investigar eso, me intereza hacer lo que mencionas ya que servira mucho para esa situacion.

It is monophonic.

It can only play one continuous sound at a time, and every time you call the GenerateSound function, it stops any sound already playing before starting a new one.

But as I said, if you drag in another instance of the extension it will play a second tone at the same time (but not a third)

No problem to play 3 sounds at the same time:

Lemme test on real device, with AppInventor...

No luck, and get nasty click when the sound is stopped, even just for one.

Seems we are not any further forward since Juan's tone generator from 2017

Also no problem on Android 13 and 14 with the APK. It also works with 4 or 5 sounds without any issue.

Perfect to go with your other extension: Tuner - Frequency Detector, Musical Note.

Thanks,
Nico

1 Like

Update:

2 Likes

It would be nice if helper blocks were there for this block... We wouldn't have to manually type in the wave type...

2 Likes

If it's true, I had forgotten, thanks for reminding me, I will add it in the next update.

2 Likes

Hola @Joejsanz, use tu extension, me funcionó muy bien, pero he tenido un problema.
Intente generar el valor de la frecuencia por medio de un slider.
Comenzando en 100hz hasta 20000 y se rompió.
Me dio error en el companion y luego en la web.
Aquí te paso la captura

Snap2933

Cuando saque el slider y puse los valores a mano, el problema se soluciono.
¿Como se podría hacer para que funcione con una barra (para elegir el valor) y que el valor se vea en función de la posición de la barra (que se vea en un label el valor que se eligió en el slider)? a eso me refiero.

Aclarame ese detalle por favor y si existe algún impedimento también te agradecería que me lo describas.

Muchas gracias desde ya.

1 Like

you created an endless loop
what about providing a screenshot of your relevant blocks?

Taifun

3 Likes

Thank you for your comment @Taifun , i checked the slider and i have a loop. Also, i have the previous version of the extension, i remove it and added the last one and all the problems have gone now. Thank you Again.

1 Like

your expansion can show the number of Hz from MP3 in the form of a table. The table is of the form:
second|number of Hz.

It's not possible, this extension works to generate, not analyze.

Which is the highest and the lowest frequency of sound it can produce?

You will find this info in the first post

Thanks, I got it