I'm using the Sine Generator component. The design runs at 48,000Hz, block size of 32 (I'm running on Windows).
The frequencies sound ok, until I get to 10,000Hz and above, where the tones generated do not sound correct (they change between two tones, where one is the correct one, the second is not).
Any idea what is the problem?
12:11pm
Hi Yair,
Which version of Audio Weaver are you using?
I looked at 8.2025.3 Standard. I compared Sine Gen (Deprecated) with Sine Smoothed Gen.
Running at 48000 Fs, 32 BS, 12000 Hz, with a display Sink attached, I don't see anything odd. However, on the SineSmoothedGen module I noticed some fluctuations until I explicitly set the block size and sample rate. Please confirm which module you are using and whether you have explicitly set the Sample Rate and Block Size.
When you say it changes, do you mean that it does so without you changing anything, or that while you are changing the frequency, it seems to go to the wrong frequency?
Thanks,
Gary W.
2:04pm
Hi Gary,
I set the properties as you specified by still, the behavior is the same.
I used version 8.C.2.7 and 8.2025.2.A, with same results (attached screen captures). You can see the distorted signals on the SinkDisplay, as well as some modulation on the 10KHz signal.
I can provide you with the AWD design over email if needed.
My system needs accurate tone from 40Hz to 12KHz, but I get harmonics and other tones as I pass the 8KHz range.
Please let me know if you have any solution for that.
Thanks,
Yair
4:07pm
Hi Yair,
I think that what you are seeing in the Sink Display is just the raw digital data. I set up a similar AWD generating a sine wave at 11025 Hz (Fs = 48000) and here is the result (recorded to a WAV file), zoomed into where you can see the individual samples. So, if you connected those points with straight lines, you'd get something similar. Are you able to get a scope picture at the audio output or something equivalent that shows what the samples look like after going through a reconstruction filter?
Thanks,
Gary
8:10pm
Hi Gary,
I was not able to connect a scope to my PC, however, I use my ears and when I get over 8KHz, I start to hear additional tones besides the required tone.
I changed the design and connected a THD block to the Sine Generator, and as you can see from the attached screen shots, the THD increases as I move up the frequency.
For my system, I need pure tones as I'm using them for measurements. Any solution for that?
Thanks,
Yair
11:05am
Hi Yair,
Does increasing the sample rate or changing the block size have any impact on your observations?
Thanks,
Gary W.
1:13pm
Hi again Yair,
Are you using the SineGen (deprecated) module, or Sine Smoothed Gen?
If you are using SineSmoothedGen, then the resolution of the sine function ranges from poor to very poor depending on the target, so you could be seeing bad tones.
There's a new PeriodicFunctionGen module with a Sine option, or the PeriodicFunctionGenTable module that uses a table based approach for waveform generation. These should be more efficient and have better resolution than SineSmoothedGen. Can you try those and see what happens?
Thanks,
Gary W.