Decimation of multiple streams

Hey guys,

I just had a quick question; if we have multiple streams that need to be
decimated, is there a fast way to go about doing that in GNURadio
Companion? How would you do it?

Here’s a picture of my flow graph:

Thank you for your help!


Hi Ali,

no, there’s no easy way to have N identical things in GRC.
However, I’m pretty sure you’re misusing vector_to_streamS.
There’s vector_to_streamS and vector_to_stream, and the second is what
you usually want when converting a vector to streams of samples.


Hey Marcus,

So after some thought, I was able to figure out how to do the decimation
for multiple streams. I’m sure most of the gurus on this list already
how to do it, but just thought about sharing my 2 cents on how I
it so that anybody who’s still having a similar difficulty can easily

So I basically used the concept of the hierarchy block and started off
a simple example where I had three streams passing through a constant
multiplier block. What I wanted to do was make the generation of these
blocks and connections dynamic for as many streams as I see want, so I
decided to adjust the python code generated from the hierarchy block,
it turned out to be a really simple fix. I simply added the following,
obviously deleted the redundant part of the code:

self.blocks_multiply_const_vxx = [0]*num_streams

for i in range(num_streams):
self.blocks_multiply_const_vxx[i] =
blocks.multiply_const_vff((2, ))
self.connect((self.blocks_multiply_const_vxx[i], 0), (self, i))
self.connect((self, i), (self.blocks_multiply_const_vxx[i], 0))

where num_streams is the number of streams I want. So just using this
simple idea, I was able to extend it to the decimation for multiple
streams. I’ve also taken some screenshots so that anyone who’s
can see how I got about to do it:


On Sat, Mar 7, 2015 at 3:11 AM, Marcus Müller [email protected]

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs