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?
Luke, 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. MB -- 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 www.cel.kit.edu KIT -- University of the State of Baden-Württemberg and National Laboratory of the Helmholtz Association
pgp68d3dAhd4f.pgp
Description: PGP signature
_______________________________________________ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org https://lists.gnu.org/mailman/listinfo/discuss-gnuradio