I tried that myself and the attached screen shots are the result.
As you say, if I am sampling at 96KHz and have a decimation of then,
then I
should end up with a 9.6KHz window
with the center frequency at 40KHz.
As you will see in the screen shots, the raw FFT shows a signal at about
42.9KHz. The “Zoomed” window shows an image
on the minus side of the scale. I would expect to see a signal about
3KHz
positive from the center frequency of 40KHz.
No?
Could it have something to do with the fact that the filter has to
accept a
float input from the audio source, but has
to translate that to complex to output it to the FFT. (There is no Float
In
-> Float Out parameter.)
I have been working on the problem and have managed to solve most of the
problems myself.
As usual, there is just one last bug to step on
BY adjusting the “baseband frequency” and “sampling rate” of the FFT
GUI, I
managed to get a
Frequency display that makes sense. I (mostly) fixed the image problem
by
adding a translator block
between the output of the filter and the input to the FFT.
However there is still an image at 44.5KHz. I confirmed that this is an
artifact by substituting the
audio source for a 42KHz Sine signal source …
In the Frequency Xlating FIR filter just put a decimation factor and
output that to FFT. This will be “zoomed” to the center frequency by
the decimation factor. For example if you have a 1M sample rate file,
and pass it through a decimation of 4, you will get an FFT “zoomed” to
a 250 kHz bandwidth. Is that what you want to achieve?
Also the center frequency parameter (in that FIR filter) can be a
variable linked to a GUI slider so that you can interactively move the
center frequency you are zoomed on.
On Sun, Aug 12, 2012 at 1:28 PM, William Pretty Security
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.