[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] How to work with a limited sample

From: Marcus Müller
Subject: Re: [Discuss-gnuradio] How to work with a limited sample
Date: Sat, 05 Oct 2013 20:18:51 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130923 Thunderbird/17.0.9

Hi Gui,
On 10/05/2013 07:59 PM, Gui Ritter wrote:
I can play the generated file in VLC, but I can't play it in Audacity or see it's waveform.
That's odd. The Wav File Sink produces valid Wav files, and on my PC audacity reads them just fine:
Flowgraph: Signal Source->head->wav file sink,
Parameters: samp_rate = 44100, format float all the way down, head number of samples = samp_rate * 5 (==5 seconds)
I'd like to see the waveform to see stuff like noise. I tried to see it in GRC's WX GUI Scope Sink, but I don't know how to make it show the standing waveform (without updating constantly).
So let's presume you have recorded samples from a raw data file, or a wav file, or a signal source, or whatever. You can "replay" them as slow as you want.
You could use the scope sink, with a throttle block before, with that you could slow down your flowgraph quite a bit. However, throttle does not work as most people expect it too, and does not enforce a constant sampling rate throughout the flowgraph but limits the number of bursts of samples per second so that the _average_ is limited.
In your case, I'd suggest using the very handy gr_plot_{float,iq,int,fft...} tools; you just write your samples to disk using a file sink (NOT wav file sink), and run the tool on the filename.

I though of using the Head block, but how can I know, in runtime, the amount of items that will be passed?
I don't understand the question. You _specify_ the number of samples before running the flowgraph. That's exactly how many samples will be passed.

Hope that helped a little,

Discuss-gnuradio mailing list

reply via email to

[Prev in Thread] Current Thread [Next in Thread]