sound generator (Documentation Bugs and Problems)

by DickStomp ⌂ @, Europe Netherlands Sassenheim, Monday, March 20, 2017, 13:11 (1044 days ago)

# wave generator
for Hz = 500 to 6000 step 500
print Hz
next Hz

This little program generates beeps UP to 3500 Hz but then beeps DOWN from 3500 to 6000 Hz...
Can somebody explain how that works?
Platform: Ubuntu14, Basic256 version (2014-05-13) - built with QT 5.2.1

I'm suffering of Tinnitus at 7400 Hz left 50dB and right 60dB. I want to check if the frequency still the same. I've now the impression that are extra fequencies too because I hear sissing noice above 7400 Hz.

But the generator goes not higher as 3500 Hz!

it must be possible...

sound generator

by 8BitCoder, Wednesday, September 06, 2017, 01:11 (875 days ago) @ DickStomp

When I checked the source code some time ago (in Sound.cpp, I think), the sample rate was around 11000, which means the maximum frequency should be half that, or around 6KHz. I don't know why it would misbehave at 3500 unless there is a rounding bug in the sine wave generation code; or perhaps the version you are using had an even lower sample rate around 8000/sec.

In any case, I just pulled the latest code and the wave generation code has been reworked and it appears the sample rate is configurable. I can't build the source on Ubuntu to test it, however.

RSS Feed of thread
powered by my little forum