D ddk1 Member Licensed User Longtime User Jan 31, 2020 #1 I was playing with creating a dog whistle type app, researching the forum it sees the Beep command in Audio should do it. However it seems the frequencies don't behave as I expected. In theory humans hear ~100-20kHz. I was expecting as I went up in freq I would hear something like in a professional hearing test. Getting higher and harder to hear till you hear nothing (but a dog would). Instead it goes only so high then it repeats those same tones. What am I doing wrong. In thread Beeper HZ ( over 2500 Hz dont work ?? ) Erel said there was a bug in Audio. I tried the attached but it made no difference (and its years older). Attachments QuikDogWhistle.zip QuikDogWhistle.zip 72.6 KB · Views: 671
I was playing with creating a dog whistle type app, researching the forum it sees the Beep command in Audio should do it. However it seems the frequencies don't behave as I expected. In theory humans hear ~100-20kHz. I was expecting as I went up in freq I would hear something like in a professional hearing test. Getting higher and harder to hear till you hear nothing (but a dog would). Instead it goes only so high then it repeats those same tones. What am I doing wrong. In thread Beeper HZ ( over 2500 Hz dont work ?? ) Erel said there was a bug in Audio. I tried the attached but it made no difference (and its years older).
Erel B4X founder Staff member Licensed User Longtime User Jan 31, 2020 #2 ddk1 said: Erel said there was a bug in Audio. Click to expand... That bug was fixed long ago. You are probably reaching the hardware limits. Check this thread for an additional approach: https://www.b4x.com/android/forum/threads/beeper-function-distorts.112621/#post-702388 Upvote 0
ddk1 said: Erel said there was a bug in Audio. Click to expand... That bug was fixed long ago. You are probably reaching the hardware limits. Check this thread for an additional approach: https://www.b4x.com/android/forum/threads/beeper-function-distorts.112621/#post-702388
stevel05 Expert Licensed User Longtime User Jan 31, 2020 #3 You could also try increasing the sample rate see here for an explanation : https://medium.com/@MicroPyramid/understanding-audio-quality-bit-rate-sample-rate-14286953d71f Upvote 0
You could also try increasing the sample rate see here for an explanation : https://medium.com/@MicroPyramid/understanding-audio-quality-bit-rate-sample-rate-14286953d71f
stevel05 Expert Licensed User Longtime User Jan 31, 2020 #4 This is an extreme example, but shows that it makes a difference. Edit: Meant to post this earlier but somehow forgot to hit the post reply button. Attachments ShortBeepTest.zip ShortBeepTest.zip 9.4 KB · Views: 727 Last edited: Feb 1, 2020 Upvote 0
This is an extreme example, but shows that it makes a difference. Edit: Meant to post this earlier but somehow forgot to hit the post reply button.
D ddk1 Member Licensed User Longtime User Feb 1, 2020 #5 Thank you both. Your example stevel works perfectly. I'm not sure I understand the technicalities of the sound control functions you've done, but then I don't need to. It works! cheers Upvote 0
Thank you both. Your example stevel works perfectly. I'm not sure I understand the technicalities of the sound control functions you've done, but then I don't need to. It works! cheers