# Problems with fft\_sink\_f

**URL:** <https://www.ruby-forum.com/t/problems-with-fft-sink-f/67872>\
**Category:** GNU Radio\
**Created:** [September 7, 2006, 3:26pm UTC](https://www.ruby-forum.com/t/problems-with-fft-sink-f/67872 "2006-09-07T15:26:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Erlend\_Barstad\_Stra](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/59ef9b/32.png) [@Erlend\_Barstad\_Stra](https://www.ruby-forum.com/u/Erlend_Barstad_Stra)\
**Post date:** [September 7, 2006, 3:26pm UTC](https://www.ruby-forum.com/t/problems-with-fft-sink-f/67872/1 "2006-09-07T15:26:55Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Erlend\_Barstad\_Stra](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/59ef9b/32.png) [@Erlend\_Barstad\_Stra](https://www.ruby-forum.com/u/Erlend_Barstad_Stra)\
**Post date:** [September 8, 2006, 5:50am UTC](https://www.ruby-forum.com/t/problems-with-fft-sink-f/67872/2 "2006-09-08T05:50:50Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Erlend\_Barstad\_Stra](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/59ef9b/32.png) [@Erlend\_Barstad\_Stra](https://www.ruby-forum.com/u/Erlend_Barstad_Stra)\
**Post date:** [October 21, 2010, 9:55am UTC](https://www.ruby-forum.com/t/problems-with-fft-sink-f/67872/3 "2010-10-21T09:55:44Z")

</div>

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
