If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Hi,
this might perhaps be interesting for some guys working on audio projects.

It is a testtone-generator which can do logarithmic frequency sweeps. If you have a 2-channel oscilloscope, then the second channel ist used for trigger and to display a logarithmic frequency grid, which is very handy to see the frequency response. See attachment for an example 80Hz to 10kHz.

In addition to a constant tone and two different sweeps there is a mode to test for compression. The volume of a 400Hz signal is modulated: low-high-low. This is interesting for Guitar Amps or effects.

It took me a while to get a high sample rate for good looking 20kHz. There is some compromise: At low frequency, the precision of the frequencies is not so good and there are some stops of the output between bursts of clear signal.

and the analog output of the 3.6 can go beyond 1MHz.. for audio thats to much, but for ultrasonic ranging or sonar it might be interesting. Even for extended amplifier testing it might be fun to be able to test a few octaves above 20k

As the sample frequency is 250kHz, you could go well over 20kHz. This high frequency signal would not look very much like a sine.
Along the signal path of a guitar effect (not at the output) I found that high frequencies have a high gain factor. This led to the effect, that the high frequency content of a signal, which was not a nice looking clear sine, got amplified very much. So I decided, that a "good clean" sine is important.

For higher sample rate there seem to be limits using the easy Arduino environment. Calling function seems to have a very large overhead which consumes a lot of cycles. But I did not investigate this in more depth. I did not even block interrupts.