On Tue, 8 Mar 2005, James Cooley wrote: > ============================= > In python, the code to build the flow graph to split, take the fir > (average over 2in this example), and combine looks like this: > > for i in range(0,fft_size): > averagefir = gr.fir_filter_fff(1, [1/2,1/2]) > fg.connect((separator,i),averagefir) > fg.connect(averagefir,(combiner,i)) > > (BTW, doing the above, in python, is "averagefir" a new instance at > every iteration as I expect it to be?) >
Hmmm, that might work but you won't be able to reference a particular averagefir later. You could use a subscript (maybe, I don't know!). I just finished something similar, but for filter taps to switch into an audio filter. The taps are calculated with: audio_lpf_x = [] for co in range(600,3601,100): fc=gr.firdes.low_pass(1.0,af_sample_rate,co,300,gr.firdes.WIN_HAMMING) audio_lpf_x += [fc] then audio_lpf_x[0] is the 600hz, [1] is 700hz, etc to [30] is 3600hz. Once the graph is running I can change audio bw with X.set_taps(audio_lpf_x[filter]) --Chuck _______________________________________________ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org http://lists.gnu.org/mailman/listinfo/discuss-gnuradio