# Fwd: Question Concerning Custom Modulator Block

**URL:** <https://www.ruby-forum.com/t/fwd-question-concerning-custom-modulator-block/239284>\
**Category:** GNU Radio\
**Created:** [February 20, 2014, 1:50pm UTC](https://www.ruby-forum.com/t/fwd-question-concerning-custom-modulator-block/239284 "2014-02-20T13:50:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![musicdenotation](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ea666f/32.png) [@musicdenotation](https://www.ruby-forum.com/u/musicdenotation)\
**Post date:** [February 20, 2014, 1:50pm UTC](https://www.ruby-forum.com/t/fwd-question-concerning-custom-modulator-block/239284/1 "2014-02-20T13:50:35Z")

</div>

Forgot to hit reply all.

On Wed, Feb 19, 2014 at 3:30 AM, Martin B.  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)wrote:

> 800 items (samples).
> 
> > Do I make sure noutput\_items is equal to number of samples I wish to  
> > I am going to feed directly to the USRP sink, so a vector output is not  
> > shaping filter.
> 
> M
> 
> * * *
> 
> Discuss-gnuradio mailing list  
> removed\_email\_address@domain.invalid  
> [Discuss-gnuradio Info Page](https://lists.gnu.org/mailman/listinfo/discuss-gnuradio)

Both sampling rate and symbol rate is variable, at least I intend it to  
be.  
The figurative “N” is calculated at runtime inside general\_work()  
because  
it is related to the sampling rate. N is representative of the  
number samples that the modulator produces. Any code I have written  
takes  
place inside the general\_work() routine.

The 800 samples that make up the waveform is just an arbitrary number I  
came up with as an example to explain how many samples I have to get  
out.  
In my modulator code, my basis functions will generate the same amount  
of  
samples as the samples of the bit stream. For prototyping purposes in  
MATLAB, I had a 100 samples per each bit of the input. So an input of 8  
bits after processing was going to give out 800 samples. In my block  
code  
this will be controlled by a variable argument.

I know the I/O signature would control that part. So noutput\_items is  
set  
in the IO signature, the size of it increases when a vector output is  
set.  
So if I call set\_output\_multiple in my constructor and have it set the  
size  
of my modulated waveform sample size, will it handle my problem? Is  
there  
any block I should look at that has it?

---

<div class="post-metadata">

**Author:** ![jfaulkenberry](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/c2a13f/32.png) [@jfaulkenberry](https://www.ruby-forum.com/u/jfaulkenberry)\
**Post date:** [February 20, 2014, 8:35pm UTC](https://www.ruby-forum.com/t/fwd-question-concerning-custom-modulator-block/239284/2 "2014-02-20T20:35:32Z")

</div>

On 02/20/2014 01:49 PM, Jonathan F. wrote:

> I know the I/O signature would control that part. So noutput\_items is  
> set in the IO signature, the size of it increases when a vector output  
> is set. So if I call set\_output\_multiple in my constructor and have it  
> set the size of my modulated waveform sample size, will it handle my  
> problem? Is there any block I should look at that has it?

Perhaps my reply to “Activecat” just know will help. Other than that, I  
say you just start hacking and see where you end up 🙂

M

---

<div class="post-metadata">

**Author:** ![jfaulkenberry](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/c2a13f/32.png) [@jfaulkenberry](https://www.ruby-forum.com/u/jfaulkenberry)\
**Post date:** [February 20, 2014, 8:40pm UTC](https://www.ruby-forum.com/t/fwd-question-concerning-custom-modulator-block/239284/3 "2014-02-20T20:40:50Z")

</div>

On Thu, Feb 20, 2014 at 2:33 PM, Martin B.  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)wrote:

> M
> 
> * * *
> 
> Discuss-gnuradio mailing list  
> [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> [Discuss-gnuradio Info Page](https://lists.gnu.org/mailman/listinfo/discuss-gnuradio)

Alright, I will take this as my cue to get back to work. I will find  
that  
email and take a look. Thanks for the help, I got a lot out of it.

Jon
