Write I/Q to WAV file

Long time reader, first time poster so hopefully I’m doing this whole
mailing list thing right.

I was hoping someone could point me in a direction towards fixing this
problem I am having. I have a GRC graph which outputs complex samples.
would like to write these samples specifically to a WAV file so I can
them in SDR programs on Windows such as DREAM or, more importantly,

I can’t seem to do so however as when I run a Complex > Float – WAV
sink, SDR# says the WAV file isn’t valid; and DREAM shows fullband
Playing the WAV in GNURadio also says there are “no samples”.

I have an FFT attached to the Complex > Float stage and it shows the
coming out just fine. What am I doing wrong?

Any assistance is massively apprechiated.

  • Jordan.

Hash: SHA1

Hi Jordan,

you have to be aware that WAVs are only meant to hold real-valued
data. So the question stands: how to “store” complex signals in WAVs?
Usually, this is done by mapping the real and imaginary parts to the
two stereo channels. Since I don’t know what the programs you mention
expect, I can’t really help you diagnose that. So: What does your
“complex>real” stage look like?

If the GNU Radio WAV source tells you that there are no samples,
chances are good that the file is empty, and something in your signal
generation went wrong.

If you generate a well known complex signal in GRC and output it (the
same way as you intend to do it for sdr#) to a wave file, can you then
open that file in software such as audacity?

I don’t quite see what you mean with “FFT attached to the complex >
float stage”. FFT is something you usually do to complex vectors, not
only to the real/imag parts isolated.

Looking forward to hearing from you,

On 28.01.2014 00:35, Jordan J. wrote:

WAV File sink, SDR# says the WAV file isn’t valid; and DREAM shows

_______________________________________________ Discuss-gnuradio
mailing list [email protected]
Discuss-gnuradio Info Page

Version: GnuPG v1
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/


On 01/28/2014 09:56 AM, Jordan J. wrote:

My other email must’ve not made it. I’m a complete newbie to this
mailing list thing. I assumed it was Real and Imaginary. It worked for
signal sources.

But anyway there still seems to be a snag. The individual inputs work,
but once they get to the FIR filter and bandpass it makes noose in the
WAV dump, which is odd because the FFT looks fine and building a
receiver works fine too.

You might be changing the amplitude too much. WAV sinks require the
amplitude to be in [-1, 1], like the audio sinks, or you’ll clip.


On 01/28/2014 10:01 AM, Jordan J. wrote:

They commonly peak at 10dB and above…even without any gain. How do I
go about decreasing it? Never explored that option but worth a shot I
suppose. I’m going to sleep now, but can up the GRC to Google Drive
later today for investigation.

Just add a multipy_const_cc.


Well it indeed appears to be my graph. Tried using a simple graph.

Signal Source (32k) > Complex - Float > WAV

Dream decoded it, SDR# read it, and it was fine.
My graph of interest must have a sample-rate no lower than 360k. It
to be recording something, but its almost as if it is recording the
too quickly?

Here is a screenshot of the graph if it helps any.