Re: [Discuss-gnuradio] File source woes

2007-07-05 Thread Johnathan Corgan
Dan Halperin wrote:

> There is a gr_throttle block that you can use to rate-limit your data. I
> think the only rate-limiting going on here is CPU time.

Correct.  The GNU Radio runtime scheduler will always execute signal
processing blocks at the fastest rate possible given data availability.
 With "real" sources like the USRP, the flowgraph usually becomes
rate-limited by the data production rate of the USRP.  Sometimes it's
the data sink that does the rate limiting, like an audio sink.

In the OP's flowgraph, there is nothing holding up the scheduler other
than the hosts CPU speed, memory bandwidth, or hard disk controller.

-- 
Johnathan Corgan
Corgan Enterprises LLC
http://corganenterprises.com


___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] File source woes

2007-07-05 Thread John Bratteli
Well, that was easy.  Thanks guys! 

John

--- Johnathan Corgan <[EMAIL PROTECTED]>
wrote:

> John Bratteli wrote:
> 
> > I'm attempting to write a script, based on
> > usrp_fft.py, that will read a file of gr_complex
> and
> > display it.  It works, except that it plays back
> much
> > faster than it was recorded.
> 
> Insert a gr.throttle() instance after the file
> source to reduce the
> stream item rate.
> 
> throttle = gr.throttle(itemsize, items_per_second)
> 
> -- 
> Johnathan Corgan
> Corgan Enterprises LLC
> http://corganenterprises.com
> 



   

Be a better Globetrotter. Get better travel answers from someone who knows. 
Yahoo! Answers - Check it out.
http://answers.yahoo.com/dir/?link=list&sid=396545469


___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] File source woes

2007-07-05 Thread Dan Halperin
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

There is a gr_throttle block that you can use to rate-limit your data. I
think the only rate-limiting going on here is CPU time.

- -Dan

John Bratteli wrote:
> I'm attempting to write a script, based on
> usrp_fft.py, that will read a file of gr_complex and
> display it.  It works, except that it plays back much
> faster than it was recorded.  For example, I recorded
> a five second file and gave it to my script.  It
> looked to be correct data, but it finished playback in
> less than a second.  Here's the essential code:
> 
> self.input = gr.file_source(gr.sizeof_gr_complex,
> options.filename, options.loop)
> 
> adc_freq = 64e6 #inherent to USRP
> decim_rate = float(options.decim) #whatever decimation
> rate used in recording
> 
> input_rate = adc_freq / decim_rate
> 
> self.scope = fftsink.fft_sink_c(self, panel,
> fft_size=1024, sample_rate=input_rate)
> 
> self.connect(self.input, self.scope)
> 
> self._build_gui(vbox)
> 
> *
> 
> Any help would be greatly appreciated.
> 
> John Bratteli
> 
> 
>  
> 
> TV dinner still cooling? 
> Check out "Tonight's Picks" on Yahoo! TV.
> http://tv.yahoo.com/
> 
> 
> ___
> Discuss-gnuradio mailing list
> Discuss-gnuradio@gnu.org
> http://lists.gnu.org/mailman/listinfo/discuss-gnuradio

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGjTYUy9GYuuMoUJ4RAtmXAKCZ5DF9IoFsySeGQnCqVrfvu+5uQACgvvLE
4PanFN6JXiX5Bi56H/MrYYg=
=nCEo
-END PGP SIGNATURE-


___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] File source woes

2007-07-05 Thread Johnathan Corgan
John Bratteli wrote:

> I'm attempting to write a script, based on
> usrp_fft.py, that will read a file of gr_complex and
> display it.  It works, except that it plays back much
> faster than it was recorded.

Insert a gr.throttle() instance after the file source to reduce the
stream item rate.

throttle = gr.throttle(itemsize, items_per_second)

-- 
Johnathan Corgan
Corgan Enterprises LLC
http://corganenterprises.com


___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio


[Discuss-gnuradio] File source woes

2007-07-05 Thread John Bratteli
I'm attempting to write a script, based on
usrp_fft.py, that will read a file of gr_complex and
display it.  It works, except that it plays back much
faster than it was recorded.  For example, I recorded
a five second file and gave it to my script.  It
looked to be correct data, but it finished playback in
less than a second.  Here's the essential code:

self.input = gr.file_source(gr.sizeof_gr_complex,
options.filename, options.loop)

adc_freq = 64e6 #inherent to USRP
decim_rate = float(options.decim) #whatever decimation
rate used in recording

input_rate = adc_freq / decim_rate

self.scope = fftsink.fft_sink_c(self, panel,
fft_size=1024, sample_rate=input_rate)

self.connect(self.input, self.scope)

self._build_gui(vbox)

*

Any help would be greatly appreciated.

John Bratteli


 

TV dinner still cooling? 
Check out "Tonight's Picks" on Yahoo! TV.
http://tv.yahoo.com/


___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio