Dial_tone.py add_ff()

Another GNU Radio noob here. I’ve been playing around with some of the
examples while I eagerly await my USRP1 and I had a question about the
dial_tone.py example.

I ran the dial_tone.py example that’s part of the 3.3.0 release and
noticed it doesn’t really sound like a (US) dial tone. I’m not sure if I
understand the code correctly but it doesn’t seem like the signals
actually get added together. For example, changing src0 to 440 and src1
to 350 produces a different sound.

I did some more searching on the Internet and found some other examples
using gr.add_ff(), so I added this to the dial_tone.py and it seemed to
do the trick. Did I miss something in the original example? I thought
maybe my libraries were out of date or perhaps I missed something on the
install. I double checked the repository at gnuradio.org and my copy is
the same. I’m running Ubuntu 10.10 on lenovo laptop with gnuradio 3.3.0.

Original source:
— dial_tone.py —
48 dst = audio.sink (sample_rate, options.audio_output)
49 self.connect (src0, (dst, 0))
50 self.connect (src1, (dst, 1))

Changes:

adder = gr.add_ff()
sink = audio.sink (sample_rate, options.audio_output)
self.connect (src0, (adder, 0))
self.connect (src1, (adder, 1))
self.connect(adder, sink)

Cheers,
-Tim

The intention of the original example was to play the two tones on
separate speakers (left and right). Might not work on
all sound systems/configurations.


Marcus L.
Principal Investigator
Shirleys Bay Radio Astronomy Consortium

The intention of the original example was to play the two tones on
separate speakers (left and right). Might not work on
all sound systems/configurations.

Thanks for clarifying this, apparently my speakers weren’t balanced (had
left only) hence the different sounds when swapping sources. I had also
incorrectly assumed that dial_tone.py was set up the same as the GRC
example which uses an adder. Once I fixed my speakers though everything
worked out, I probably spent over two hours just adding different
saw-tooth, square and triangle waves together and messing with the
frequency sliders.

Cheers,
-Tim