[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] Setting FIR Taps to None in C++

From: Martin Braun (CEL)
Subject: Re: [Discuss-gnuradio] Setting FIR Taps to None in C++
Date: Fri, 23 Aug 2013 13:42:10 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

On Fri, Aug 23, 2013 at 07:28:50AM -0400, Luke B wrote:
> I am writing a GR C++ program I would like to do a simple rate resampling and 
> I
> don't need to use any FIR filters. Is there a Null Tap or a pass through 
> filter
> I could use? Would some form of this work?


when you're resampling, you *always* need FIR filters. Can you confirm
your application really doesn't need them and that you have fully
understood the theory behind resampling?

> upsample_audio = gr_make_rational_resampler_base_fff(44100, 8000, std::vector
> <float>(1,0));

The filter equivalent of a neutral element would be a Dirac impulse,
i.e. std::vector<float>(1, 1) (In Python notation: (1,) ).

> In python you can simply fill in None for the taps:

As you've figured out, it calculates filter taps which work most of the
time. So 'None' means 'choose suitable default values for me'.

> Which uses the following code in block2 - I can't figure out what grc.gcd is
> though or how to call it from C++:

gcd == greatest common denominator

I recommend you calculate suitable taps a-priori (say, using
gr_filter_design) and import them as a static vector into your code.


Karlsruhe Institute of Technology (KIT)
Communications Engineering Lab (CEL)

Dipl.-Ing. Martin Braun
Research Associate

Kaiserstra├če 12
Building 05.01
76131 Karlsruhe

Phone: +49 721 608-43790
Fax: +49 721 608-46071

KIT -- University of the State of Baden-W├╝rttemberg and
National Laboratory of the Helmholtz Association

Attachment: pgpKV6PZrmypE.pgp
Description: PGP signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]