Problems with fft_sink_f

Hi

I am quite fresh on GNU Radio so please exscuse me if ask stupid
questions.

I simlpy want to view the fft of two sines.
Code:
"
self.src0 = gr.sig_source_f (sampling_freq, gr.GR_SIN_WAVE, 350, ampl)
self.src1 = gr.sig_source_f (sampling_freq, gr.GR_SIN_WAVE, 440, ampl)

self.src = gr.add_ff ()

self.connect(self.src0, (self.src, 0))
self.connect(self.src1, (self.src, 1))

self.scope = fftsink.fft_sink_f (self, panel, 512,
sampling_freq, fft_rate = 1)

self.connect (self.src, self.scope)
vbox.Add (self.scope.win, 1, wx.EXPAND)
"

when the window opens there seems to be a sensible spectrum for a very
short period of time, then it flats out and doesnt make much sense.

I have tried changing the fft_rate, sampling_freq and various other
parameters, but the same problem occurs. I have also tried using
fftsink.make_fft_sink_f, but also then a similar problem occurs. After
a very short time the blue line drawing the spectrum disappears.


Erlend Barstad Strand

Erlend Barstad Strand wrote:

"

Have you tried changing the amplitudes and/or the fft scaling? I think
your signal is falling below the bottom of the display.

Matt

Hello,

I am a beginner in GNU radio and of course I am not an expert
programmer.
I have a problem using the function fft_sink_x(): if I try

src0 = gr.sig_source_f(options.sample_rate, gr.GR_SIN_WAVE,
options.freq1, 0.5)
src1 = audio.source(options.sample_rate)
src2 = gr.noise_source_f(gr.GR_GAUSSIAN, 0.001)

scope = fftsink2.fft_sink_f(panel, title=“FFT of some Signal”,
fft_size=1024,
sample_rate=options.sample_rate, ref_level=10,
y_per_div=20)

self.connect(src0,(somma,0))
self.connect(src1,(somma,1))
self.connect(src2,(somma,2))
self.connect(somma, scope)

vbox.Add(scope.win, 4, wx.EXPAND)

everything is ok. But if I try without audio.source the fft windows
appear, the signal appear but I can’t resize the window and every
standard button of fft windows are freezed and I can’t click on them. I
have noted that the cpu level raise up to 85 % in the latter case.
I am using a MacBook whit Mac OSX 10.6 .

Could you help me?

Thanks

Riccardo

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs