# Add multiple gated streams

**URL:** <https://www.ruby-forum.com/t/add-multiple-gated-streams/243119>\
**Category:** GNU Radio\
**Created:** [August 23, 2015, 10:18pm UTC](https://www.ruby-forum.com/t/add-multiple-gated-streams/243119 "2015-08-23T22:18:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sadaf\_N](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/858c86/32.png) [@Sadaf\_N](https://www.ruby-forum.com/u/Sadaf_N)\
**Post date:** [August 23, 2015, 10:18pm UTC](https://www.ruby-forum.com/t/add-multiple-gated-streams/243119/1 "2015-08-23T22:18:24Z")

</div>

Anyone have an idea how I can sum (add\_ff) multiple, gated streams into  
a single stream? For example, the gr-dsd block gates it’s output when  
there is nothing to decode. I can sum multiple decoders together for a  
single audio stream, ﻿but the add\_ff only processes when ALL inputs have  
a sample. So what I need is a block that passes all samples, and  
outputs zeros (or repeats last sample) when input has halted. Maybe  
there is a trick to do that with an existing block.

Thanks,  
Lou

---

<div class="post-metadata">

**Author:** ![madengr](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ec9cab/32.png) [@madengr](https://www.ruby-forum.com/u/madengr)\
**Post date:** [August 23, 2015, 10:28pm UTC](https://www.ruby-forum.com/t/add-multiple-gated-streams/243119/2 "2015-08-23T22:28:20Z")

</div>

Hi Lou,

gr-eventstream[1] as invented by Tim [2] seems to fit your description  
pretty exactly!

Best regards,  
Marcus

[1] [https://github.com/osh/gr-eventstream](https://github.com/osh/gr-eventstream)  
[2] [http://oshearesearch.com/tag/gr-eventstream/](http://oshearesearch.com/tag/gr-eventstream/)
